Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update valid statuses for ControlledGlossaryTerms #7550

Merged
merged 2 commits into from
Mar 21, 2023

Conversation

mandy-chessell
Copy link
Contributor

Description

This PR provides the following changes:

  • The archive helper used to create the open metadata types archive was not enabling the inheritance of the valid status list from a new type's super type. This is fixed. The inheritence is a one-time copy of the super type's valid instance types when the default typeDef is created. The typeDef can be updated in the archive builder if the defaults are not required.
  • The valid instance statuses for the ControlledGlossaryTerm have been extended. It also has a new attribute called userDefinedStatus
  • The GlossaryTermStatus enum on Asset Manager OMAS has been extended to support all of the valid instance statuses of the ControlledGlossaryTerm.

Testing

New FVT tests have been added to the Asset Manager OMAS FVT that ensure a ControlledGlossaryTerm can be moved through all of its InstanceStatuses. Also that the userDefinedStatus can be set through this API.

There is also a test that ensures undefined attributes are rejected.

I also used postman to check that the updates to the valid instance statuses in currently defined subtypes that should have inherited the valid instance statuses from their super type are now doing so. For example, GovernancePolicy should inherit is valid instance statuses from GovernanceDefinition. This is now working ...

{
    "class": "TypeDefResponse",
    "relatedHTTPCode": 200,
    "typeDef": {
        "class": "EntityDef",
        "headerVersion": 1,
        "guid": "a7defa41-9cfa-4be5-9059-359022bb016d",
        "name": "GovernancePolicy",
        "status": "ACTIVE_TYPEDEF",
        "version": 1,
        "versionName": "1.0",
        "category": "ENTITY_DEF",
        "superType": {
            "headerVersion": 1,
            "guid": "578a3500-9ad3-45fe-8ada-e4e9572c37c8",
            "name": "GovernanceDefinition",
            "status": "ACTIVE_TYPEDEF"
        },
        "description": "Defines a goal or outcome expected from the organization.",
        "origin": "bce3b0a0-662a-4f87-b8dc-844078a11a6e",
        "createdBy": "ODPi Egeria",
        "createTime": "2020-01-01T13:42:11.090+00:00",
        "validInstanceStatusList": [
            "DRAFT",
            "PROPOSED",
            "APPROVED",
            "ACTIVE",
            "DEPRECATED",
            "OTHER",
            "DELETED"
        ],
        "initialStatus": "DRAFT"
    }
}

This is the new type definition for ControlledGlossaryTerm:

{
    "class": "TypeDefResponse",
    "relatedHTTPCode": 200,
    "typeDef": {
        "class": "EntityDef",
        "headerVersion": 1,
        "guid": "c04e29b2-2d66-48fc-a20d-e59895de6040",
        "name": "ControlledGlossaryTerm",
        "status": "ACTIVE_TYPEDEF",
        "version": 2,
        "versionName": "1.0",
        "category": "ENTITY_DEF",
        "superType": {
            "headerVersion": 1,
            "guid": "0db3e6ec-f5ef-4d75-ae38-b7ee6fd6ec0a",
            "name": "GlossaryTerm",
            "status": "ACTIVE_TYPEDEF"
        },
        "description": "Defines a glossary term that is developed through a controlled workflow.",
        "origin": "bce3b0a0-662a-4f87-b8dc-844078a11a6e",
        "createdBy": "ODPi Egeria",
        "updatedBy": "Egeria",
        "createTime": "2020-01-01T13:42:11.090+00:00",
        "updateTime": "2020-04-30T15:42:46.992+00:00",
        "validInstanceStatusList": [
            "DRAFT",
            "PREPARED",
            "PROPOSED",
            "APPROVED",
            "REJECTED",
            "ACTIVE",
            "DEPRECATED",
            "OTHER",
            "DELETED"
        ],
        "initialStatus": "DRAFT",
        "propertiesDefinition": [
            {
                "headerVersion": 1,
                "attributeName": "userDefinedStatus",
                "attributeType": {
                    "class": "PrimitiveDef",
                    "headerVersion": 1,
                    "version": 1,
                    "versionName": "1.0",
                    "category": "PRIMITIVE",
                    "guid": "b34a64b9-554a-42b1-8f8a-7d5c2339f9c4",
                    "name": "string",
                    "primitiveDefCategory": "OM_PRIMITIVE_TYPE_STRING"
                },
                "attributeStatus": "ACTIVE_ATTRIBUTE",
                "attributeDescription": "Extend or replace the valid instance statuses with additional statuses controlled through valid metadata values.",
                "valuesMinCount": 0,
                "valuesMaxCount": 1,
                "attributeCardinality": "AT_MOST_ONE",
                "indexable": true,
                "unique": false
            }
        ]
    }
}

Release Notes & Documentation

Additional notes

@mandy-chessell
Copy link
Contributor Author

Link to release notes : https://egeria-project.org/release-notes/4-0/
Link to ControlledGlossaryTerm description : https://egeria-project.org/types/3/0385-Controlled-Glossary-Development/

@mandy-chessell mandy-chessell merged commit e5b7315 into odpi:main Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant