From 9249366ca58b4566d72e16b67c0ebb74c8960700 Mon Sep 17 00:00:00 2001 From: Mandy Chessell Date: Sun, 25 Feb 2024 20:31:15 +0000 Subject: [PATCH] Add cancel command for an engine action Signed-off-by: Mandy Chessell --- .../omag-server-platform/build.gradle | 2 + .../exception/AssetCatalogException.java | 6 +- .../event/AssetLineageEventHeader.java | 4 +- .../event/LineageEntityEvent.java | 3 +- .../event/LineageRelationshipEvent.java | 3 +- .../event/LineageRelationshipsEvent.java | 4 +- .../assetlineage/event/LineageSyncEvent.java | 14 +- .../ffdc/exception/AssetLineageException.java | 2 + .../assetlineage/model/GenericStub.java | 7 +- .../converters/DataFileConverter.java | 3 +- .../CommunityProfileCheckedExceptionBase.java | 4 +- .../exceptions/NoProfileForUserException.java | 5 +- .../rest/StatusRequestBody.java | 1 + .../converters/GovernanceActionConverter.java | 3 +- .../GovernanceActionProcessRESTServices.java | 76 +-- .../spring/GovernanceActionResource.java | 1 - .../events/GovernanceServerEventType.java | 7 + .../ffdc/GovernanceServerAuditCode.java | 11 + .../GovernanceServerOMRSTopicListener.java | 16 +- .../GovernanceServerOutTopicPublisher.java | 39 ++ .../exceptions/InvalidParameterException.java | 4 + .../SubjectAreaCheckedException.java | 3 + .../ffdc/exception/FileException.java | 7 +- .../ffdc/exception/FileReadException.java | 4 + ...mentWatchdogGovernanceActionConnector.java | 2 + .../ffdc/SurveyServiceAuditCode.java | 19 + .../surveyfolder/FolderSurveyService.java | 121 +++- .../exception/OMAGCheckedExceptionBase.java | 5 +- .../OMAGConfigurationErrorException.java | 5 +- .../OMAGInvalidParameterException.java | 5 +- .../exception/OMAGNotAuthorizedException.java | 5 +- .../generichandlers/EngineActionBuilder.java | 44 +- .../generichandlers/EngineActionHandler.java | 250 ++++++-- .../FilesAndFoldersHandler.java | 84 +-- .../OpenMetadataAPIGenericHandler.java | 4 +- .../OpenMetadataAPIRootHandler.java | 18 + .../ffdc/GenericHandlersAuditCode.java | 12 +- .../handlers/DiscoveryEngineHandler.java | 11 +- .../handlers/DiscoveryServiceHandler.java | 2 +- .../GovernanceActionEngineHandler.java | 8 +- .../GovernanceActionServiceHandler.java | 7 +- .../RepositoryGovernanceEngineHandler.java | 16 +- .../RepositoryGovernanceServiceHandler.java | 8 +- .../ffdc/SurveyActionAuditCode.java | 22 + .../ffdc/SurveyActionErrorCode.java | 132 +--- .../handlers/SurveyActionEngineHandler.java | 154 ++++- .../handlers/SurveyActionServiceHandler.java | 21 +- ...stGovernanceActionProcessStepResponse.java | 143 +++++ .../GovernanceActionProcessGraphResponse.java | 143 +++++ .../gaf/rest/GovernanceActionRequestBody.java | 10 +- ...a => InitiateEngineActionRequestBody.java} | 34 +- ...teGovernanceActionProcessRequestBody.java} | 38 +- ...tiateGovernanceActionTypeRequestBody.java} | 38 +- ...NewGovernanceActionProcessRequestBody.java | 5 +- ...ateGovernanceActionProcessRequestBody.java | 2 - .../client/GovernanceContextClientBase.java | 2 +- ...vernanceEngineConfigurationClientBase.java | 4 +- .../gaf/client/OpenGovernanceClientBase.java | 116 +++- .../gaf/client/OpenMetadataClientBase.java | 14 +- .../gaf/client/rest/GAFRESTClient.java | 32 +- .../gaf/converters/EngineActionConverter.java | 3 +- .../GovernanceActionProcessConverter.java | 4 + .../GovernanceActionProcessStepConverter.java | 2 +- .../GovernanceActionTypeConverter.java | 2 +- .../OpenMetadataStoreConverter.java | 58 +- .../GAFMetadataManagementInstanceHandler.java | 3 +- .../server/OpenGovernanceRESTServices.java | 414 +++++++++--- ...GovernanceEngineConfigurationResource.java | 4 +- .../server/spring/OpenGovernanceResource.java | 110 +++- .../spring/OpenMetadataStoreResource.java | 6 +- .../client/ActionControlInterface.java | 15 + .../GovernanceActionProcessInterface.java | 36 +- .../ffdc/GovernanceActionEngineException.java | 59 -- .../ffdc/GovernanceServiceException.java | 3 + .../fileclassifier/FileClassifier.java | 213 +++++-- .../mapper/OpenMetadataType.java | 2 + .../properties/ActionTargetElement.java | 90 ++- .../properties/EngineActionStatus.java | 47 +- ...rstGovernanceActionProcessStepElement.java | 171 +++++ .../GovernanceActionProcessGraph.java | 189 ++++++ .../GovernanceActionProcessProperties.java | 254 ++------ .../GovernanceActionTypeProperties.java | 20 +- .../properties/NewActionTarget.java | 6 +- .../NextGovernanceActionProcessStepLink.java | 226 +++++++ .../ffdc/ConnectionCheckedException.java | 4 +- .../ffdc/ConnectorCheckedException.java | 4 +- .../ffdc/PropertyServerException.java | 5 +- .../ffdc/UserNotAuthorizedException.java | 5 +- .../ffdc/DiscoveryEngineException.java | 3 + .../ffdc/DiscoveryServiceException.java | 3 + .../auditlog/DataEngineProxyException.java | 5 +- .../ffdc/EngineHostServicesAuditCode.java | 39 +- .../admin/GovernanceEngineHandler.java | 159 ++++- .../admin/GovernanceServiceHandler.java | 48 +- .../enginemap/GovernanceEngineMap.java | 1 + .../server/EngineHostOperationalServices.java | 2 + .../EngineConfigurationRefreshThread.java | 5 + .../connector/LineageIntegratorContext.java | 14 +- .../ClassificationErrorException.java | 4 +- .../exception/EntityConflictException.java | 4 +- .../exception/EntityNotDeletedException.java | 4 +- .../exception/EntityNotKnownException.java | 4 +- .../exception/EntityProxyOnlyException.java | 4 +- .../FunctionNotSupportedException.java | 5 +- .../ffdc/exception/HomeEntityException.java | 5 +- .../exception/HomeRelationshipException.java | 5 +- .../exception/InvalidEntityException.java | 5 +- .../exception/InvalidParameterException.java | 4 +- .../InvalidRelationshipException.java | 5 +- .../exception/InvalidTypeDefException.java | 5 +- .../exception/OMRSCheckedExceptionBase.java | 5 +- .../ffdc/exception/PagingErrorException.java | 4 +- .../ffdc/exception/PatchErrorException.java | 5 +- .../exception/PropertyErrorException.java | 5 +- .../RelationshipConflictException.java | 5 +- .../RelationshipNotDeletedException.java | 5 +- .../RelationshipNotKnownException.java | 5 +- .../exception/RepositoryErrorException.java | 5 +- .../exception/RepositoryTimeoutException.java | 5 +- .../StatusNotSupportedException.java | 4 +- .../exception/TypeDefConflictException.java | 5 +- .../ffdc/exception/TypeDefInUseException.java | 5 +- .../ffdc/exception/TypeDefKnownException.java | 4 +- .../exception/TypeDefNotKnownException.java | 5 +- .../TypeDefNotSupportedException.java | 5 +- .../ffdc/exception/TypeErrorException.java | 5 +- .../exception/UserNotAuthorizedException.java | 7 +- .../assetcatalog/admin/AssetCatalogAdmin.java | 2 +- .../Egeria-automated-curation-omvs.http | 597 +++++++++++++++++- .../admin/AutomatedCurationAdmin.java | 2 +- .../server/AutomatedCurationRESTServices.java | 125 +++- .../spring/AutomatedCurationResource.java | 95 ++- .../admin/CollectionManagerAdmin.java | 2 +- .../api/ffdc/DinoViewServiceException.java | 3 + .../dino/admin/DinoViewAdmin.java | 2 +- .../auditlog/GlossaryAuthorViewAuditCode.java | 2 +- .../admin/GlossaryBrowserAdmin.java | 2 +- .../admin/GlossaryWorkflowAdmin.java | 4 +- .../myprofile/admin/MyProfileAdmin.java | 2 +- .../rex/api/ffdc/RexViewServiceException.java | 4 + .../ServerAuthorViewServiceException.java | 3 + .../tex/api/ffdc/TexViewServiceException.java | 4 + .../OpenMetadataTypesArchive2_6.java | 11 + .../sample-configs/BuildSampleConfigs.http | 4 +- .../engine-host/config/engine-host.config | 2 +- .../view-server/config/view-server.config | 2 +- 146 files changed, 3764 insertions(+), 1241 deletions(-) create mode 100644 open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/FirstGovernanceActionProcessStepResponse.java create mode 100644 open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionProcessGraphResponse.java rename open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/{EngineActionRequestBody.java => InitiateEngineActionRequestBody.java} (93%) rename open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/{GovernanceActionProcessRequestBody.java => InitiateGovernanceActionProcessRequestBody.java} (86%) rename open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/{GovernanceActionTypeRequestBody.java => InitiateGovernanceActionTypeRequestBody.java} (87%) delete mode 100644 open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/ffdc/GovernanceActionEngineException.java create mode 100644 open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/FirstGovernanceActionProcessStepElement.java create mode 100644 open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessGraph.java create mode 100644 open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/NextGovernanceActionProcessStepLink.java diff --git a/open-metadata-distribution/omag-server-platform/build.gradle b/open-metadata-distribution/omag-server-platform/build.gradle index f52f20885fe..d4c851c57e6 100644 --- a/open-metadata-distribution/omag-server-platform/build.gradle +++ b/open-metadata-distribution/omag-server-platform/build.gradle @@ -394,6 +394,8 @@ distributions { { include 'Egeria*.http' } from { "$rootProject.projectDir/open-metadata-implementation/view-services/glossary-workflow" } { include 'Egeria*.http' } + from { "$rootProject.projectDir/open-metadata-implementation/user-security/user-authn" } + { include 'Egeria*.http' } from { "$rootProject.projectDir/open-metadata-conformance-suite" } { include 'Egeria*.http' } fileMode = 0755 diff --git a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/AssetCatalogException.java b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/AssetCatalogException.java index 7a49adbdbf2..353f8e3eb46 100644 --- a/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/AssetCatalogException.java +++ b/open-metadata-implementation/access-services/asset-catalog/asset-catalog-api/src/main/java/org/odpi/openmetadata/accessservices/assetcatalog/exception/AssetCatalogException.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.commonservices.ffdc.exceptions.OMAGCheckedExceptionBase; import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -16,8 +17,9 @@ * The aim is to be able to uniquely identify the cause and remedy for the error. */ public class AssetCatalogException extends OMAGCheckedExceptionBase { - - private static final long serialVersionUID = 1L; + + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an AssetCatalogException. diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/AssetLineageEventHeader.java b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/AssetLineageEventHeader.java index b0c273a67c7..ce4f3cee135 100644 --- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/AssetLineageEventHeader.java +++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/AssetLineageEventHeader.java @@ -30,8 +30,8 @@ @JsonSubTypes.Type(value = LineageSyncEvent.class, name = "LineageSyncEvent") }) -public abstract class AssetLineageEventHeader implements Serializable { - +public abstract class AssetLineageEventHeader +{ private long eventVersionId = 1L; private AssetLineageEventType assetLineageEventType; diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageEntityEvent.java b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageEntityEvent.java index 8e2ec9c37ac..c798409cf23 100644 --- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageEntityEvent.java +++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageEntityEvent.java @@ -18,7 +18,8 @@ @JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) -public class LineageEntityEvent extends AssetLineageEventHeader { +public class LineageEntityEvent extends AssetLineageEventHeader +{ private LineageEntity lineageEntity; diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageRelationshipEvent.java b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageRelationshipEvent.java index bbf92fabe5f..678647b4f62 100644 --- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageRelationshipEvent.java +++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageRelationshipEvent.java @@ -18,7 +18,8 @@ @JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) -public class LineageRelationshipEvent extends AssetLineageEventHeader { +public class LineageRelationshipEvent extends AssetLineageEventHeader +{ private LineageRelationship lineageRelationship; /** diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageRelationshipsEvent.java b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageRelationshipsEvent.java index 1e4ad59cda2..26f58116fbb 100644 --- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageRelationshipsEvent.java +++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageRelationshipsEvent.java @@ -18,8 +18,8 @@ @JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) -public class LineageRelationshipsEvent extends AssetLineageEventHeader { - +public class LineageRelationshipsEvent extends AssetLineageEventHeader +{ private RelationshipsContext relationshipsContext; public RelationshipsContext getRelationshipsContext() { diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageSyncEvent.java b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageSyncEvent.java index 8fd42f4270e..15942d3aa42 100644 --- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageSyncEvent.java +++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/event/LineageSyncEvent.java @@ -16,8 +16,8 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; /** - * The lineage event contains information used for internal processing of data - * + * LineageSyncEvent is used to notify external consumers about AssetLineage internal processing. + * It can contain details such as publishSummary and/or updateSummary created by corresponding internal processing phases of AssetLineage. */ @JsonAutoDetect(getterVisibility = PUBLIC_ONLY, setterVisibility = PUBLIC_ONLY, fieldVisibility = NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @@ -26,14 +26,8 @@ @Setter @EqualsAndHashCode(callSuper = true) @ToString -/** - * - * LineageSyncEvent is used to notify external consumers about AssetLineage internal processing. - * It can contain details such as publishSummary and/or updateSummary created by corresponding internal processing phases of AssetLineage. - * - */ -public class LineageSyncEvent extends AssetLineageEventHeader { - +public class LineageSyncEvent extends AssetLineageEventHeader +{ /** * LineagePublishSummary is used to describe summary as result of AssetLineage lineagePublish activity that completed. */ diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/ffdc/exception/AssetLineageException.java b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/ffdc/exception/AssetLineageException.java index 556dde443fa..d25873f3a73 100644 --- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/ffdc/exception/AssetLineageException.java +++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/ffdc/exception/AssetLineageException.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Map; /** @@ -12,6 +13,7 @@ * the Asset Lineage OMAS services. */ public class AssetLineageException extends OCFCheckedExceptionBase { + @Serial private static final long serialVersionUID = 1L; diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/model/GenericStub.java b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/model/GenericStub.java index 0ce0916fff3..ca1eb093c49 100644 --- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/model/GenericStub.java +++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-api/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/model/GenericStub.java @@ -2,10 +2,7 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.assetlineage.model; -import java.io.Serializable; - -public class GenericStub implements Serializable { - - +public class GenericStub +{ } diff --git a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/DataFileConverter.java b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/DataFileConverter.java index cabdc2962ad..bd5fff1d3f2 100644 --- a/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/DataFileConverter.java +++ b/open-metadata-implementation/access-services/asset-owner/asset-owner-server/src/main/java/org/odpi/openmetadata/accessservices/assetowner/converters/DataFileConverter.java @@ -58,9 +58,8 @@ public B getNewBean(Class beanClass, */ B returnBean = beanClass.getDeclaredConstructor().newInstance(); - if (returnBean instanceof FileElement) + if (returnBean instanceof FileElement bean) { - FileElement bean = (FileElement) returnBean; FileProperties fileProperties = new FileProperties(); bean.setElementHeader(super.getMetadataElementHeader(beanClass, entity, methodName)); diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/ffdc/exceptions/CommunityProfileCheckedExceptionBase.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/ffdc/exceptions/CommunityProfileCheckedExceptionBase.java index 2d51a447c3e..d9b06c79de3 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/ffdc/exceptions/CommunityProfileCheckedExceptionBase.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/ffdc/exceptions/CommunityProfileCheckedExceptionBase.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Map; /** @@ -18,7 +19,8 @@ */ public abstract class CommunityProfileCheckedExceptionBase extends OCFCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; /** diff --git a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/ffdc/exceptions/NoProfileForUserException.java b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/ffdc/exceptions/NoProfileForUserException.java index d288d27b7b3..31e91c68ae3 100644 --- a/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/ffdc/exceptions/NoProfileForUserException.java +++ b/open-metadata-implementation/access-services/community-profile/community-profile-api/src/main/java/org/odpi/openmetadata/accessservices/communityprofile/ffdc/exceptions/NoProfileForUserException.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Arrays; import java.util.Map; import java.util.Objects; @@ -15,8 +16,8 @@ */ public class NoProfileForUserException extends CommunityProfileCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; private String userId; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/StatusRequestBody.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/StatusRequestBody.java index 7147c29383c..985ca8be0be 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/StatusRequestBody.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-api/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/rest/StatusRequestBody.java @@ -20,6 +20,7 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) +@Deprecated public class StatusRequestBody implements Serializable { private static final long serialVersionUID = 1L; diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/GovernanceActionConverter.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/GovernanceActionConverter.java index bfa82c282db..ed740205d06 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/GovernanceActionConverter.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/GovernanceActionConverter.java @@ -144,8 +144,9 @@ else if (repositoryHelper.isTypeOf(serviceName, actualTypeName, OpenMetadataType { ActionTargetElement actionTargetElement = new ActionTargetElement(); + actionTargetElement.setActionTargetRelationshipGUID(relationship.getGUID()); actionTargetElement.setActionTargetName(this.removeActionTargetName(instanceProperties)); - actionTargetElement.setStatus(this.removeActionStatus(OpenMetadataType.STATUS_PROPERTY_NAME, instanceProperties)); + actionTargetElement.setStatus(this.removeActionStatus(OpenMetadataType.ACTION_STATUS_PROPERTY_NAME, instanceProperties)); actionTargetElement.setStartDate(this.removeStartDate(instanceProperties)); actionTargetElement.setCompletionDate(this.removeCompletionDate(instanceProperties)); actionTargetElement.setCompletionMessage(this.removeCompletionMessage(instanceProperties)); diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/GovernanceActionProcessRESTServices.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/GovernanceActionProcessRESTServices.java index fc89c6be189..292625dd8c5 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/GovernanceActionProcessRESTServices.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/GovernanceActionProcessRESTServices.java @@ -59,7 +59,7 @@ public GovernanceActionProcessRESTServices() /* ===================================================================================================================== - * A governance action process describes a well defined series of steps that gets something done. + * A governance action process describes a well-defined series of steps that gets something done. * The steps are defined using GovernanceActionTypes. */ @@ -97,7 +97,8 @@ public GUIDResponse createGovernanceActionProcess(String Map extendedProperties = new HashMap<>(); extendedProperties.put(OpenMetadataProperty.FORMULA.name, processProperties.getFormula()); - extendedProperties.put(OpenMetadataType.IMPLEMENTATION_LANGUAGE_PROPERTY_NAME, processProperties.getImplementationLanguage()); + extendedProperties.put(OpenMetadataProperty.FORMULA_TYPE.name, processProperties.getFormulaType()); + extendedProperties.put(OpenMetadataType.DOMAIN_IDENTIFIER_PROPERTY_NAME, processProperties.getDomainIdentifier()); Date effectiveTime = new Date(); @@ -105,9 +106,9 @@ public GUIDResponse createGovernanceActionProcess(String null, null, processProperties.getQualifiedName(), - processProperties.getTechnicalName(), + processProperties.getDisplayName(), processProperties.getVersionIdentifier(), - processProperties.getTechnicalDescription(), + processProperties.getDescription(), processProperties.getAdditionalProperties(), OpenMetadataType.GOVERNANCE_ACTION_PROCESS_TYPE_NAME, extendedProperties, @@ -116,27 +117,6 @@ public GUIDResponse createGovernanceActionProcess(String null, effectiveTime, methodName)); - - final String guidParameter = "processGUID"; - - if (response.getGUID() != null) - { - handler.maintainSupplementaryProperties(userId, - response.getGUID(), - guidParameter, - OpenMetadataType.GOVERNANCE_ACTION_PROCESS_TYPE_NAME, - processProperties.getQualifiedName(), - processProperties.getDisplayName(), - processProperties.getSummary(), - processProperties.getDescription(), - processProperties.getAbbreviation(), - processProperties.getUsage(), - false, - false, - false, - effectiveTime, - methodName); - } } else { @@ -163,23 +143,14 @@ private InstanceStatus getProcessStatus(ProcessStatus processStatus) { if (processStatus != null) { - switch (processStatus) + return switch (processStatus) { - case UNKNOWN: - return InstanceStatus.UNKNOWN; - - case DRAFT: - return InstanceStatus.DRAFT; - - case PROPOSED: - return InstanceStatus.PROPOSED; - - case APPROVED: - return InstanceStatus.APPROVED; - - case ACTIVE: - return InstanceStatus.ACTIVE; - } + case UNKNOWN -> InstanceStatus.UNKNOWN; + case DRAFT -> InstanceStatus.DRAFT; + case PROPOSED -> InstanceStatus.PROPOSED; + case APPROVED -> InstanceStatus.APPROVED; + case ACTIVE -> InstanceStatus.ACTIVE; + }; } return InstanceStatus.ACTIVE; @@ -224,7 +195,7 @@ public VoidResponse updateGovernanceActionProcess(String Map extendedProperties = new HashMap<>(); extendedProperties.put(OpenMetadataProperty.FORMULA.name, processProperties.getFormula()); - extendedProperties.put(OpenMetadataType.IMPLEMENTATION_LANGUAGE_PROPERTY_NAME, processProperties.getImplementationLanguage()); + extendedProperties.put(OpenMetadataProperty.FORMULA_TYPE.name, processProperties.getFormulaType()); Date effectiveTime = new Date(); @@ -235,8 +206,8 @@ public VoidResponse updateGovernanceActionProcess(String processGUIDParameterName, processProperties.getQualifiedName(), processProperties.getVersionIdentifier(), - processProperties.getTechnicalName(), - processProperties.getTechnicalDescription(), + processProperties.getDisplayName(), + processProperties.getDescription(), processProperties.getAdditionalProperties(), OpenMetadataType.GOVERNANCE_ACTION_PROCESS_TYPE_GUID, OpenMetadataType.GOVERNANCE_ACTION_PROCESS_TYPE_NAME, @@ -265,22 +236,6 @@ public VoidResponse updateGovernanceActionProcess(String effectiveTime, methodName); } - - handler.maintainSupplementaryProperties(userId, - processGUID, - processGUIDParameterName, - OpenMetadataType.GOVERNANCE_ACTION_PROCESS_TYPE_NAME, - processProperties.getQualifiedName(), - processProperties.getDisplayName(), - processProperties.getSummary(), - processProperties.getDescription(), - processProperties.getAbbreviation(), - processProperties.getUsage(), - requestBody.getMergeUpdate(), - false, - false, - effectiveTime, - methodName); } else { @@ -1098,7 +1053,6 @@ public GovernanceActionTypeElementResponse getFirstActionType(String serverName, GovernanceActionProcessStepHandler handler = instanceHandler.getGovernanceActionProcessStepHandler(userId, serverName, methodName); - response.setElement(handler.getFirstProcessStep(userId, processGUID, null, diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GovernanceActionResource.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GovernanceActionResource.java index 985e01e0dbd..c826c71bbd5 100644 --- a/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GovernanceActionResource.java +++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-spring/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/server/spring/GovernanceActionResource.java @@ -50,7 +50,6 @@ public class GovernanceActionResource * PropertyServerException there was a problem detected by the metadata store. */ @PostMapping(path = "/governance-actions/{governanceActionGUID}/status/update") - public VoidResponse updateGovernanceActionStatus(@PathVariable String serverName, @PathVariable String userId, @PathVariable String governanceActionGUID, diff --git a/open-metadata-implementation/access-services/governance-server/governance-server-api/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/events/GovernanceServerEventType.java b/open-metadata-implementation/access-services/governance-server/governance-server-api/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/events/GovernanceServerEventType.java index f891861dbaf..81b04b81ee6 100644 --- a/open-metadata-implementation/access-services/governance-server/governance-server-api/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/events/GovernanceServerEventType.java +++ b/open-metadata-implementation/access-services/governance-server/governance-server-api/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/events/GovernanceServerEventType.java @@ -63,6 +63,13 @@ public enum GovernanceServerEventType implements Serializable "Requested Engine Action", "New request to run a governance service."), + /** + * New request to run a governance service. + */ + CANCELLED_ENGINE_ACTION_EVENT(5, + "Cancelled Engine Action", + "Request to stop a governance service."), + ; private static final long serialVersionUID = 1L; diff --git a/open-metadata-implementation/access-services/governance-server/governance-server-api/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/ffdc/GovernanceServerAuditCode.java b/open-metadata-implementation/access-services/governance-server/governance-server-api/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/ffdc/GovernanceServerAuditCode.java index 78b6c9d50d6..53085037b3a 100644 --- a/open-metadata-implementation/access-services/governance-server/governance-server-api/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/ffdc/GovernanceServerAuditCode.java +++ b/open-metadata-implementation/access-services/governance-server/governance-server-api/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/ffdc/GovernanceServerAuditCode.java @@ -267,6 +267,17 @@ public enum GovernanceServerAuditCode implements AuditLogMessageSet "This is not necessarily an error if the server is connected to a cohort where members are also connected to other cohorts, of there is strict security in place that is restricting what this server can see.", "Review the exception to reassure yourself that this is expected behavior."), + /** + * OMAS-GOVERNANCE-SERVER-0023 - The Governance Server Open Metadata Access Service (OMAS) sent notification of a cancelled engine action {0} for Governance Engine {1} ({2}) + */ + CANCELLED_ENGINE_ACTION("OMAS-GOVERNANCE-SERVER-0023", + AuditLogRecordSeverityLevel.INFO, + "The Governance Server Open Metadata Access Service (OMAS) sent notification of a cancelled engine action {0} for Governance Engine {1} ({2})", + "The access service sends out notifications about cancelled engine actions to Engine Hosts so " + + "they can stop the execution of the requested governance service.", + "This is part of the normal operation of the service. No action is required if this action is expected " + + "beyond verifying that the requested action is correctly shutdown."), + ; diff --git a/open-metadata-implementation/access-services/governance-server/governance-server-server/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/outtopic/GovernanceServerOMRSTopicListener.java b/open-metadata-implementation/access-services/governance-server/governance-server-server/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/outtopic/GovernanceServerOMRSTopicListener.java index a00822c1ecc..31c47bd9175 100644 --- a/open-metadata-implementation/access-services/governance-server/governance-server-server/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/outtopic/GovernanceServerOMRSTopicListener.java +++ b/open-metadata-implementation/access-services/governance-server/governance-server-server/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/outtopic/GovernanceServerOMRSTopicListener.java @@ -389,7 +389,6 @@ private boolean processEngineActionEvent(String sourceName, if (status == EngineActionStatus.APPROVED) { - String governanceEngineGUID = repositoryHelper.getStringProperty(sourceName, OpenMetadataType.EXECUTOR_ENGINE_GUID_PROPERTY_NAME, entity.getProperties(), @@ -403,6 +402,21 @@ private boolean processEngineActionEvent(String sourceName, governanceEngineName, entity.getGUID()); } + else if (status == EngineActionStatus.CANCELLED) + { + String governanceEngineGUID = repositoryHelper.getStringProperty(sourceName, + OpenMetadataType.EXECUTOR_ENGINE_GUID_PROPERTY_NAME, + entity.getProperties(), + methodName); + String governanceEngineName = repositoryHelper.getStringProperty(sourceName, + OpenMetadataType.EXECUTOR_ENGINE_NAME_PROPERTY_NAME, + entity.getProperties(), + methodName); + + eventPublisher.publishCancelledEngineAction(governanceEngineGUID, + governanceEngineName, + entity.getGUID()); + } return true; } diff --git a/open-metadata-implementation/access-services/governance-server/governance-server-server/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/outtopic/GovernanceServerOutTopicPublisher.java b/open-metadata-implementation/access-services/governance-server/governance-server-server/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/outtopic/GovernanceServerOutTopicPublisher.java index abf78cfbc04..332ce25d213 100644 --- a/open-metadata-implementation/access-services/governance-server/governance-server-server/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/outtopic/GovernanceServerOutTopicPublisher.java +++ b/open-metadata-implementation/access-services/governance-server/governance-server-server/src/main/java/org/odpi/openmetadata/accessservices/governanceserver/outtopic/GovernanceServerOutTopicPublisher.java @@ -249,7 +249,46 @@ void publishNewEngineAction(String governanceEngineGUID, } + /** + * Publish an event to notify listeners that there is an engine action has been cancelled. + * + * @param governanceEngineGUID unique identifier for the Governance Engine + * @param governanceEngineName unique name for the Governance Engine + * @param engineActionGUID element to execute + */ + void publishCancelledEngineAction(String governanceEngineGUID, + String governanceEngineName, + String engineActionGUID) + { + final String methodName = "publishCancelledEngineAction"; + + if (outTopicServerConnector != null) + { + try + { + EngineActionEvent newEvent = new EngineActionEvent(); + + newEvent.setEventType(GovernanceServerEventType.CANCELLED_ENGINE_ACTION_EVENT); + newEvent.setGovernanceEngineGUID(governanceEngineGUID); + newEvent.setGovernanceEngineName(governanceEngineName); + newEvent.setEngineActionGUID(engineActionGUID); + + outTopicServerConnector.sendEvent(newEvent); + if (outTopicAuditLog != null) + { + outTopicAuditLog.logMessage(actionDescription, + GovernanceServerAuditCode.CANCELLED_ENGINE_ACTION.getMessageDefinition(engineActionGUID, + governanceEngineName, + governanceEngineGUID)); + } + } + catch (Exception error) + { + logUnexpectedPublishingException(error, methodName); + } + } + } /** * Log any exceptions that have come from the publishing process. diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/InvalidParameterException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/InvalidParameterException.java index eb2baaa2d6f..ac486423ebc 100644 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/InvalidParameterException.java +++ b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/InvalidParameterException.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,6 +13,9 @@ * value. */ public class InvalidParameterException extends SubjectAreaCheckedException { + @Serial + private static final long serialVersionUID = 1L; + /** * invalid property name * diff --git a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/SubjectAreaCheckedException.java b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/SubjectAreaCheckedException.java index 46a3e504d3c..843aee183c5 100644 --- a/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/SubjectAreaCheckedException.java +++ b/open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/ffdc/exceptions/SubjectAreaCheckedException.java @@ -6,6 +6,7 @@ import org.odpi.openmetadata.frameworks.auditlog.MessageFormatter; import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -18,8 +19,10 @@ */ public class SubjectAreaCheckedException extends OMAGCheckedExceptionBase { + @Serial private static final long serialVersionUID = 1L; + /** * This is the typical constructor used for creating an SubjectAreaCheckedException. * diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/basic-file-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/datastore/basicfile/ffdc/exception/FileException.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/basic-file-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/datastore/basicfile/ffdc/exception/FileException.java index 210938ce4bc..645eae5558b 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/basic-file-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/datastore/basicfile/ffdc/exception/FileException.java +++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/basic-file-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/datastore/basicfile/ffdc/exception/FileException.java @@ -6,6 +6,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; +import java.io.Serial; import java.util.Arrays; import java.util.Map; import java.util.Objects; @@ -15,6 +16,9 @@ */ public class FileException extends ConnectorCheckedException { + @Serial + private static final long serialVersionUID = 1L; + /** * Name of file with error */ @@ -252,7 +256,7 @@ public boolean equals(Object objectToCompare) { return true; } - if (!(objectToCompare instanceof FileException)) + if (!(objectToCompare instanceof FileException that)) { return false; } @@ -260,7 +264,6 @@ public boolean equals(Object objectToCompare) { return false; } - FileException that = (FileException) objectToCompare; return Objects.equals(getFileName(), that.getFileName()); } diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/csv-file-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/datastore/csvfile/ffdc/exception/FileReadException.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/csv-file-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/datastore/csvfile/ffdc/exception/FileReadException.java index 3256a7c3a05..6c80d6ee853 100644 --- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/csv-file-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/datastore/csvfile/ffdc/exception/FileReadException.java +++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/file-connectors/csv-file-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/datastore/csvfile/ffdc/exception/FileReadException.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; +import java.io.Serial; import java.util.Arrays; import java.util.Map; import java.util.Objects; @@ -15,6 +16,9 @@ */ public class FileReadException extends ConnectorCheckedException { + @Serial + private static final long serialVersionUID = 1L; + /** * Name of the file in error. */ diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericElementWatchdogGovernanceActionConnector.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericElementWatchdogGovernanceActionConnector.java index e3d0975878e..d9e19ef92f4 100644 --- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericElementWatchdogGovernanceActionConnector.java +++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericElementWatchdogGovernanceActionConnector.java @@ -175,6 +175,8 @@ else if (event instanceof WatchdogRelatedElementsEvent) actionTarget.setActionTargetGUID(end1GUID); actionTargets.add(actionTarget); + actionTarget = new NewActionTarget(); + actionTarget.setActionTargetName(actionTargetTwoName); actionTarget.setActionTargetGUID(end2GUID); actionTargets.add(actionTarget); diff --git a/open-metadata-implementation/adapters/open-connectors/survey-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/surveyaction/ffdc/SurveyServiceAuditCode.java b/open-metadata-implementation/adapters/open-connectors/survey-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/surveyaction/ffdc/SurveyServiceAuditCode.java index 3248af92796..5d09ca07731 100644 --- a/open-metadata-implementation/adapters/open-connectors/survey-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/surveyaction/ffdc/SurveyServiceAuditCode.java +++ b/open-metadata-implementation/adapters/open-connectors/survey-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/surveyaction/ffdc/SurveyServiceAuditCode.java @@ -48,6 +48,25 @@ public enum SurveyServiceAuditCode implements AuditLogMessageSet "The survey action service {0} is overriding log file {1}", "This message warns the survey team that a particular survey log file is being reused.", "No specific action is required. The new results are appended to the existing results."), + + + /** + * SURVEY-ACTION-SERVICE-0004 - The survey action service {0} is surveying the {1} folder (directory) + */ + SURVEYING_FOLDER("SURVEY-ACTION-SERVICE-0004", + AuditLogRecordSeverityLevel.INFO, + "The survey action service {0} is surveying the {1} folder (directory)", + "This message shows that the starting folder to survey.", + "No specific action is required. This message is marking the start of the survey process."), + + /** + * SURVEY-ACTION-SERVICE-0003 - The survey action service {0} is has surveyed {1} files and folders (directories) + */ + PROGRESS_REPORT("SURVEY-ACTION-SERVICE-0005", + AuditLogRecordSeverityLevel.INFO, + "The survey action service {0} is has surveyed {1} files and folders (directories)", + "This message shows that the progress of the survey.", + "No specific action is required. This message is marking the progress of the survey process."), ; private final String logMessageId; diff --git a/open-metadata-implementation/adapters/open-connectors/survey-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/surveyaction/surveyfolder/FolderSurveyService.java b/open-metadata-implementation/adapters/open-connectors/survey-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/surveyaction/surveyfolder/FolderSurveyService.java index 4bc388841c8..5b379ade748 100644 --- a/open-metadata-implementation/adapters/open-connectors/survey-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/surveyaction/surveyfolder/FolderSurveyService.java +++ b/open-metadata-implementation/adapters/open-connectors/survey-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/surveyaction/surveyfolder/FolderSurveyService.java @@ -6,6 +6,7 @@ import org.odpi.openmetadata.adapters.connectors.datastore.basicfile.BasicFolderConnector; import org.odpi.openmetadata.adapters.connectors.surveyaction.AuditableSurveyService; import org.odpi.openmetadata.adapters.connectors.surveyaction.ffdc.SurveyServiceAuditCode; +import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.Connector; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -141,7 +142,12 @@ else if (! propertyHelper.isTypeOf(assetUniverse, OpenMetadataType.FILE_FOLDER.t /* * Scan the folder (and sub-folders) and count up its contents */ - profileFolder(openMetadataStore, rootFolder); + auditLog.logMessage(methodName, SurveyServiceAuditCode.SURVEYING_FOLDER.getMessageDefinition(surveyActionServiceName, + rootFolder.getAbsolutePath())); + + LogFileProgress logFileProgress = new LogFileProgress(auditLog, surveyActionServiceName); + + profileFolder(openMetadataStore, rootFolder, logFileProgress); DataProfileAnnotation dataProfile = new DataProfileAnnotation(); @@ -285,48 +291,57 @@ private String setUpExternalLogFile(String surveyReportGUID, * * @param openMetadataStore open metadata client * @param fileFolder folder to profile + * @param logFileProgress progressBar * @throws InvalidParameterException invalid parameter * @throws PropertyServerException problem connecting to the open metadata repositories * @throws UserNotAuthorizedException insufficient access */ private void profileFolder(SurveyOpenMetadataStore openMetadataStore, - File fileFolder) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException + File fileFolder, + LogFileProgress logFileProgress) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException { - if ((fileFolder != null) && (fileFolder.listFiles() != null)) + if (fileFolder != null) { - for (File nestedFile : Objects.requireNonNull(fileFolder.listFiles())) + if (fileFolder.listFiles() != null) { - if (nestedFile.isDirectory()) - { - folderCount++; - profileFolder(openMetadataStore, nestedFile); - } - else + for (File nestedFile : Objects.requireNonNull(fileFolder.listFiles())) { - fileCount++; - FileClassifier fileClassifier = new FileClassifier(openMetadataStore, nestedFile); - - updateValueCount(fileExtensionCounts, fileClassifier.getFileExtension()); - updateValueCount(fileNameCounts, fileClassifier.getFileName()); - updateValueCount(fileTypeCounts, fileClassifier.getFileType()); - updateValueCount(deployedImplementationTypeCounts, fileClassifier.getDeployedImplementationType()); - updateValueCount(assetTypeCounts, fileClassifier.getAssetTypeName()); - - if (fileClassifier.isCanRead()) + if (nestedFile.isDirectory()) { - canReadCount++; - } + folderCount++; + logFileProgress.logFilesProcessed(); - if (fileClassifier.isCanWrite()) - { - canWriteCount++; + profileFolder(openMetadataStore, nestedFile, logFileProgress); } - - if (fileClassifier.isCanExecute()) + else { - canExecuteCount++; + fileCount++; + logFileProgress.logFilesProcessed(); + + FileClassifier fileClassifier = new FileClassifier(openMetadataStore, nestedFile); + + updateValueCount(fileExtensionCounts, fileClassifier.getFileExtension()); + updateValueCount(fileNameCounts, fileClassifier.getFileName()); + updateValueCount(fileTypeCounts, fileClassifier.getFileType()); + updateValueCount(deployedImplementationTypeCounts, fileClassifier.getDeployedImplementationType()); + updateValueCount(assetTypeCounts, fileClassifier.getAssetTypeName()); + + if (fileClassifier.isCanRead()) + { + canReadCount++; + } + + if (fileClassifier.isCanWrite()) + { + canWriteCount++; + } + + if (fileClassifier.isCanExecute()) + { + canExecuteCount++; + } } } } @@ -334,6 +349,52 @@ private void profileFolder(SurveyOpenMetadataStore openMetadataStore, } + /** + * Provide a periodic progress report for the survey process. + */ + static class LogFileProgress + { + private long fileLogPointer = 0; + private long fileCount = 0; + + private final AuditLog auditLog; + private final String surveyActionServiceName; + + /** + * Constructor + * @param auditLog logging destination + * @param surveyActionServiceName name of this survey + */ + public LogFileProgress(AuditLog auditLog, + String surveyActionServiceName) + { + this.auditLog = auditLog; + this.surveyActionServiceName = surveyActionServiceName; + } + + + /** + * Log a message every 5000 files. + */ + public void logFilesProcessed() + { + final String methodName = "logFilesProcessed"; + final long fileLogLimit = 5000; + + fileCount++; + fileLogPointer++; + + if (fileLogPointer == fileLogLimit) + { + fileLogPointer = 0; + + auditLog.logMessage(methodName, SurveyServiceAuditCode.PROGRESS_REPORT.getMessageDefinition(surveyActionServiceName, + Long.toString(fileCount))); + } + } + } + + /** * Free up any resources held since the connector is no longer needed. * diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGCheckedExceptionBase.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGCheckedExceptionBase.java index 748d063b038..d8e0209333a 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGCheckedExceptionBase.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGCheckedExceptionBase.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Map; /** @@ -15,8 +16,8 @@ */ class OMAGCheckedExceptionBase extends OCFCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an OCFCheckedException. diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGConfigurationErrorException.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGConfigurationErrorException.java index 989cc2d6952..54f5f5ceaae 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGConfigurationErrorException.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGConfigurationErrorException.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Map; /** @@ -13,8 +14,8 @@ */ public class OMAGConfigurationErrorException extends OMAGCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an OCFCheckedException. diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGInvalidParameterException.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGInvalidParameterException.java index 8ff5fff0884..bc26dc13dbe 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGInvalidParameterException.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGInvalidParameterException.java @@ -6,6 +6,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Map; /** @@ -13,8 +14,8 @@ */ public class OMAGInvalidParameterException extends OMAGCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an OCFCheckedException. diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGNotAuthorizedException.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGNotAuthorizedException.java index d3643f2d15a..57848fbe495 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGNotAuthorizedException.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/ffdc/exception/OMAGNotAuthorizedException.java @@ -6,6 +6,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Map; /** @@ -13,8 +14,8 @@ */ public class OMAGNotAuthorizedException extends OMAGCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an OCFCheckedException. diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EngineActionBuilder.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EngineActionBuilder.java index f300c81575e..83f0fd2f363 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EngineActionBuilder.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EngineActionBuilder.java @@ -338,15 +338,9 @@ InstanceProperties getClaimInstanceProperties(String methodName) throws Invalid } catch (TypeErrorException error) { - throw new InvalidParameterException(error, OpenMetadataType.ACTIVITY_TYPE_PROPERTY_NAME); + throw new InvalidParameterException(error, OpenMetadataType.ACTION_STATUS_PROPERTY_NAME); } - properties = repositoryHelper.addDatePropertyToInstance(serviceName, - properties, - OpenMetadataType.START_DATE_PROPERTY_NAME, - startDate, - methodName); - properties = repositoryHelper.addStringPropertyToInstance(serviceName, properties, OpenMetadataType.PROCESSING_ENGINE_USER_ID_PROPERTY_NAME, @@ -357,6 +351,42 @@ InstanceProperties getClaimInstanceProperties(String methodName) throws Invalid } + /** + * Return the supplied bean properties in an InstanceProperties object. + * + * @param methodName name of the calling method + * @return InstanceProperties object + * @throws InvalidParameterException there is a problem with the properties + */ + InstanceProperties getCancelInstanceProperties(String methodName) throws InvalidParameterException + { + InstanceProperties properties = super.getInstanceProperties(methodName); + + try + { + properties = repositoryHelper.addEnumPropertyToInstance(serviceName, + properties, + OpenMetadataType.ACTION_STATUS_PROPERTY_NAME, + OpenMetadataType.ENGINE_ACTION_STATUS_ENUM_TYPE_GUID, + OpenMetadataType.ENGINE_ACTION_STATUS_ENUM_TYPE_NAME, + actionStatus, + methodName); + } + catch (TypeErrorException error) + { + throw new InvalidParameterException(error, OpenMetadataType.ACTION_STATUS_PROPERTY_NAME); + } + + properties = repositoryHelper.addDatePropertyToInstance(serviceName, + properties, + OpenMetadataType.COMPLETION_DATE_PROPERTY_NAME, + new Date(), + methodName); + + return properties; + } + + /** * Append the supplied bean properties in the supplied InstanceProperties object. * diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EngineActionHandler.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EngineActionHandler.java index 20060c79bc2..7bd882e59b9 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EngineActionHandler.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/EngineActionHandler.java @@ -689,13 +689,13 @@ private String prepareEngineActionFromProcessStep(String userId, /** - * Create an engine action in the metadata store which will trigger the governance service + * Move the engine action in the metadata store to Approved which will trigger the governance service * associated with the supplied request type. The engine action remains to act as a record * of the actions taken for auditing. * * @param userId caller's userId * @param engineActionGUID unique identifier of the engine action - * @param qualifiedName unique identifier to give this governance action + * @param qualifiedName unique identifier to give this engine action * @param mandatoryGuards list of guards that have to be received * @param startTime future start time or null for "as soon as possible" * @param governanceEngineName name of the governance engine that should execute the request @@ -749,7 +749,6 @@ private void runEngineActionIfReady(String userId, * There are potential follow-on actions. Need to loop though each one to evaluate if the output guards * permit it to execute. */ - for (Relationship previousResult : previousResults) { /* @@ -810,12 +809,11 @@ private void runEngineActionIfReady(String userId, * @param serviceSupportedZones supported zones for calling service * @param methodName calling method * - * @return unique identifier of the engine action * @throws InvalidParameterException null qualified name * @throws UserNotAuthorizedException the caller is not authorized to create an engine action * @throws PropertyServerException there is a problem with the metadata store */ - public String approveEngineAction(String userId, + public void approveEngineAction(String userId, String engineActionGUID, String qualifiedName, List mandatoryGuards, @@ -898,8 +896,6 @@ public String approveEngineAction(String userId, serviceSupportedZones, null, methodName); - - return engineActionGUID; } @@ -1635,6 +1631,7 @@ public EngineActionStatus getActionStatus(String propertyName, case 11 -> engineActionStatus = EngineActionStatus.INVALID; case 12 -> engineActionStatus = EngineActionStatus.IGNORED; case 13 -> engineActionStatus = EngineActionStatus.FAILED; + case 14 -> engineActionStatus = EngineActionStatus.CANCELLED; } } } @@ -1755,6 +1752,102 @@ public void claimEngineAction(String userId, } + /** + * Request that execution of an engine action is allocated to the caller. + * This is only permitted if no other caller has claimed it. + * + * @param userId identifier of calling user + * @param engineActionGUID identifier of the engine action request + * @param effectiveTime the time that the retrieved elements must be effective for (null for any time, new Date() for now) + * @param serviceSupportedZones supported zones for calling service + * @param methodName calling method + * + * @throws InvalidParameterException one of the parameters is null or invalid. + * @throws UserNotAuthorizedException user not authorized to issue this request. + * @throws PropertyServerException there was a problem detected by the metadata store. + */ + public void cancelEngineAction(String userId, + String engineActionGUID, + List serviceSupportedZones, + Date effectiveTime, + String methodName) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + final String guidParameterName = "engineActionGUID"; + + invalidParameterHandler.validateUserId(userId, methodName); + invalidParameterHandler.validateGUID(engineActionGUID, guidParameterName, methodName); + + EntityDetail entity = this.getEntityFromRepository(userId, + engineActionGUID, + guidParameterName, + OpenMetadataType.ENGINE_ACTION_TYPE_NAME, + null, + null, + false, + false, + serviceSupportedZones, + effectiveTime, + methodName); + + if (entity != null) + { + InstanceProperties properties = entity.getProperties(); + + if (properties != null) + { + EngineActionStatus status = this.getActionStatus(OpenMetadataType.ACTION_STATUS_PROPERTY_NAME, + properties); + + EngineActionBuilder builder = new EngineActionBuilder(OpenMetadataType.CANCELLED_EA_STATUS_ORDINAL, + userId, + repositoryHelper, + serviceName, + serverName); + + updateBeanInRepository(userId, + null, + null, + engineActionGUID, + guidParameterName, + OpenMetadataType.ENGINE_ACTION_TYPE_GUID, + OpenMetadataType.ENGINE_ACTION_TYPE_NAME, + false, + false, + serviceSupportedZones, + builder.getCancelInstanceProperties(methodName), + true, + effectiveTime, + methodName); + + auditLog.logMessage(methodName, + GenericHandlersAuditCode.ENGINE_ACTION_CANCELLED.getMessageDefinition(engineActionGUID, + userId, + status.name())); + } + else + { + throw new PropertyServerException(GenericHandlersErrorCode.MISSING_ENGINE_ACTION_PROPERTIES.getMessageDefinition(engineActionGUID, + guidParameterName, + serviceName, + methodName), + this.getClass().getName(), + methodName); + } + } + else + { + throw new PropertyServerException(GenericHandlersErrorCode.MISSING_ENGINE_ACTION.getMessageDefinition(engineActionGUID, + guidParameterName, + serviceName, + methodName), + this.getClass().getName(), + methodName); + } + } + + /** * Create a string message for log messages. * @@ -1974,73 +2067,87 @@ public void recordCompletionStatus(String userId, properties, methodName); - if (userId.equals(processingEngineUserId)) - { - EngineActionBuilder builder = new EngineActionBuilder(repositoryHelper, - serviceName, - serverName); - - repositoryHandler.updateEntityProperties(userId, - null, - null, - engineActionGUID, - engineActionEntity, - OpenMetadataType.ENGINE_ACTION_TYPE_GUID, - OpenMetadataType.ENGINE_ACTION_TYPE_NAME, - builder.getCompletionInstanceProperties(engineActionEntity.getProperties(), - status, - new Date(), - outputGuards, - completionMessage, - methodName), - methodName); - - this.markActionTargetsAsComplete(userId, - engineActionGUID, - serviceSupportedZones, - effectiveTime, - status); + int storedStatus = repositoryHelper.getEnumPropertyOrdinal(serviceName, + OpenMetadataType.ACTION_STATUS_PROPERTY_NAME, + properties, + methodName); + if ((storedStatus == OpenMetadataType.REQUESTED_EA_STATUS_ORDINAL) || + (storedStatus == OpenMetadataType.APPROVED_EA_STATUS_ORDINAL) || + (storedStatus == OpenMetadataType.WAITING_EA_STATUS_ORDINAL) || + (storedStatus == OpenMetadataType.ACTIVATING_EA_STATUS_ORDINAL) || + (storedStatus == OpenMetadataType.IN_PROGRESS_EA_STATUS_ORDINAL)) + { /* - * The anchor GUID is set if this is part of a governance action process. It points to the first engine action entity - * created when the governance action process was initiated. + * Only record completion on an engine action that has not already completed. */ - AnchorIdentifiers anchorIdentifiers = this.getAnchorGUIDFromAnchorsClassification(engineActionEntity, methodName); + if (userId.equals(processingEngineUserId)) + { + EngineActionBuilder builder = new EngineActionBuilder(repositoryHelper, + serviceName, + serverName); + + repositoryHandler.updateEntityProperties(userId, + null, + null, + engineActionGUID, + engineActionEntity, + OpenMetadataType.ENGINE_ACTION_TYPE_GUID, + OpenMetadataType.ENGINE_ACTION_TYPE_NAME, + builder.getCompletionInstanceProperties(engineActionEntity.getProperties(), + status, + new Date(), + outputGuards, + completionMessage, + methodName), + methodName); + + this.markActionTargetsAsComplete(userId, + engineActionGUID, + serviceSupportedZones, + effectiveTime, + status); - String anchorGUID = null; + /* + * The anchor GUID is set if this is part of a governance action process. It points to the first engine action entity + * created when the governance action process was initiated. + */ + AnchorIdentifiers anchorIdentifiers = this.getAnchorGUIDFromAnchorsClassification(engineActionEntity, methodName); - if (anchorIdentifiers != null) + String anchorGUID = null; + + if (anchorIdentifiers != null) + { + anchorGUID = anchorIdentifiers.anchorGUID; + } + + String processName = repositoryHelper.getStringProperty(serviceName, + OpenMetadataProperty.PROCESS_NAME.name, + properties, + methodName); + this.initiateNextEngineActions(userId, + engineActionGUID, + governanceActionProcessStepGUID, + anchorGUID, + processName, + outputGuards, + newActionTargets, + callerRequestParameters, + serviceSupportedZones, + effectiveTime, + methodName); + } + else { - anchorGUID = anchorIdentifiers.anchorGUID; + throw new UserNotAuthorizedException(GenericHandlersErrorCode.INVALID_PROCESSING_USER.getMessageDefinition(userId, + methodName, + engineActionGUID, + processingEngineUserId), + this.getClass().getName(), + methodName, + userId); } - - String processName = repositoryHelper.getStringProperty(serviceName, - OpenMetadataProperty.PROCESS_NAME.name, - properties, - methodName); - this.initiateNextEngineActions(userId, - engineActionGUID, - governanceActionProcessStepGUID, - anchorGUID, - processName, - outputGuards, - newActionTargets, - callerRequestParameters, - serviceSupportedZones, - effectiveTime, - methodName); } - else - { - throw new UserNotAuthorizedException(GenericHandlersErrorCode.INVALID_PROCESSING_USER.getMessageDefinition(userId, - methodName, - engineActionGUID, - processingEngineUserId), - this.getClass().getName(), - methodName, - userId); - } - } else { @@ -2475,7 +2582,7 @@ public List getActiveEngineActions(String userId, if (entityCount > startFrom) { int status = repositoryHelper.getEnumPropertyOrdinal(serviceName, - OpenMetadataType.STATUS_PROPERTY_NAME, + OpenMetadataType.ACTION_STATUS_PROPERTY_NAME, nextEngineAction.getProperties(), methodName); @@ -2566,11 +2673,16 @@ public List getActiveClaimedEngineActions(String userId, if (entityCount > startFrom) { int status = repositoryHelper.getEnumPropertyOrdinal(serviceName, - OpenMetadataType.STATUS_PROPERTY_NAME, + OpenMetadataType.ACTION_STATUS_PROPERTY_NAME, nextEngineAction.getProperties(), methodName); - if ((status == OpenMetadataType.WAITING_EA_STATUS_ORDINAL) || (status == OpenMetadataType.IN_PROGRESS_EA_STATUS_ORDINAL)) + String engineActionGovernanceEngineGUID = repositoryHelper.getStringProperty(serviceName, + OpenMetadataType.EXECUTOR_ENGINE_GUID_PROPERTY_NAME, + nextEngineAction.getProperties(), + methodName); + if ((governanceEngineGUID.equals(engineActionGovernanceEngineGUID) && + ((status == OpenMetadataType.WAITING_EA_STATUS_ORDINAL) || (status == OpenMetadataType.IN_PROGRESS_EA_STATUS_ORDINAL)))) { B bean = this.getEngineAction(userId, nextEngineAction, serviceSupportedZones, effectiveTime, methodName); diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FilesAndFoldersHandler.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FilesAndFoldersHandler.java index 9156ba8fb1a..9e86c51c270 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FilesAndFoldersHandler.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/FilesAndFoldersHandler.java @@ -12,7 +12,6 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataValidValues; import org.odpi.openmetadata.frameworks.governanceaction.refdata.DeployedImplementationType; import org.odpi.openmetadata.metadatasecurity.server.OpenMetadataServerSecurityVerifier; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -53,15 +52,6 @@ public class FilesAndFoldersHandler private final static String defaultAvroFileType = "avro"; private final static String defaultCSVFileType = "csv"; - private static final String fileTypeCategory = - OpenMetadataValidValues.constructValidValueCategory(OpenMetadataType.DATA_FILE.typeName, - OpenMetadataProperty.FILE_TYPE.name, - null); - private static final String deployedImplementationTypeCategory = - OpenMetadataValidValues.constructValidValueCategory(OpenMetadataType.DATA_FILE.typeName, - OpenMetadataProperty.DEPLOYED_IMPLEMENTATION_TYPE.name, - null); - /** * Construct the handler information needed to interact with the repository services @@ -234,7 +224,7 @@ private List getFolderNames(String pathName) { int startingToken = 0; - if (tokens[startingToken].length() == 0) + if (tokens[startingToken].isEmpty()) { startingToken = 1; } @@ -908,7 +898,7 @@ public List createFolderStructureInCatalog(String userId, externalSourceName, connectToGUID, this.getFileSystemName(pathName), - this.getFolderNames(pathName), + this.getFolderNames(pathName + "/dummyFileName.ext"), effectiveFrom, effectiveTo, forLineage, @@ -3294,23 +3284,18 @@ private String getFolderGUIDByPathName(String userId, 0, effectiveTime, methodName); - if (entities == null) - { - return null; - } - else if (entities.size() == 1) + if (entities != null) { - return entities.get(0).getGUID(); + for (EntityDetail entityDetail : entities) + { + if (entityDetail != null) + { + return entityDetail.getGUID(); + } + } } - throw new PropertyServerException(GenericHandlersErrorCode.MULTIPLE_ENTITIES_FOUND.getMessageDefinition(OpenMetadataType.FILE_FOLDER.typeName, - pathName, - entities.toString(), - methodName, - pathNameParameterName, - serverName), - this.getClass().getName(), - methodName); + return null; } @@ -3360,23 +3345,18 @@ public FOLDER getFolderByPathName(String userId, 0, effectiveTime, methodName); - if (folders == null) - { - return null; - } - else if (folders.size() == 1) + if (folders != null) { - return folders.get(0); + for (FOLDER folder : folders) + { + if (folder != null) + { + return folder; + } + } } - throw new PropertyServerException(GenericHandlersErrorCode.MULTIPLE_ENTITIES_FOUND.getMessageDefinition(OpenMetadataType.FILE_FOLDER.typeName, - pathName, - folders.toString(), - methodName, - pathNameParameterName, - serverName), - this.getClass().getName(), - methodName); + return null; } @@ -3756,23 +3736,19 @@ public FILE getDataFileByPathName(String userId, 0, effectiveTime, methodName); - if (files == null) - { - return null; - } - else if (files.size() == 1) + + if (files != null) { - return files.get(0); + for (FILE file : files) + { + if (file != null) + { + return file; + } + } } - throw new PropertyServerException(GenericHandlersErrorCode.MULTIPLE_ENTITIES_FOUND.getMessageDefinition(OpenMetadataType.DATA_FILE.typeName, - pathName, - files.toString(), - methodName, - pathNameParameterName, - serverName), - this.getClass().getName(), - methodName); + return null; } diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericHandler.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericHandler.java index 81ea35f256e..597365fa686 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericHandler.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericHandler.java @@ -9697,7 +9697,7 @@ public String getBeanGUIDByUniqueName(String userId, * Once they are filtered out, more entities need to be retrieved to fill the gaps. */ String guid = null; - List duplicateEntities = new ArrayList<>(); + Set duplicateEntities = new HashSet<>(); String entityParameterName = "Entity from search of value " + name; while (iterator.moreToReceive() && ((queryPageSize == 0) || (duplicateEntities.size() < queryPageSize))) @@ -9870,7 +9870,7 @@ public B getBeanByUniqueName(String userId, * Once they are filtered out, more entities need to be retrieved to fill the gaps. */ B bean = null; - List duplicateEntities = new ArrayList<>(); + Set duplicateEntities = new HashSet<>(); String entityParameterName = "Entity from search of value " + name; while (iterator.moreToReceive() && ((queryPageSize == 0) || (duplicateEntities.size() < queryPageSize))) diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIRootHandler.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIRootHandler.java index ff606deb70e..a605613d534 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIRootHandler.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIRootHandler.java @@ -7,8 +7,11 @@ import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryErrorHandler; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; import org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataProperty; import org.odpi.openmetadata.metadatasecurity.server.OpenMetadataServerSecurityVerifier; +import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef; import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper; @@ -161,6 +164,21 @@ public RepositoryHandler getRepositoryHandler() } + /** + * Convert an entity proxy into an element stub. + * + * @param entityProxy proxy to convert + * @return element stub + * @throws PropertyServerException null entity proxy + */ + public ElementStub getElementStub(EntityProxy entityProxy) throws PropertyServerException + { + final String methodName = "getElementStub"; + + return converter.getElementStub(beanClass, entityProxy, methodName); + } + + /** * Return the list of zones to use for retrieving assets. * diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ffdc/GenericHandlersAuditCode.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ffdc/GenericHandlersAuditCode.java index 89237ccb2b6..8e464c3b4a0 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ffdc/GenericHandlersAuditCode.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ffdc/GenericHandlersAuditCode.java @@ -176,7 +176,7 @@ public enum GenericHandlersAuditCode implements AuditLogMessageSet * OMAG-GENERIC-HANDLERS-0025 - Status changed from {0} to {1} for engine action {2} by governance engine with {3} userId */ ENGINE_ACTION_STATUS_CHANGE("OMAG-GENERIC-HANDLERS-0025", - AuditLogRecordSeverityLevel.STARTUP, + AuditLogRecordSeverityLevel.INFO, "Status changed from {0} to {1} for engine action {2} by governance engine with {3} userId", "The engine action's status has been updated as requested.", "Validate that the status change is valid."), @@ -191,6 +191,16 @@ public enum GenericHandlersAuditCode implements AuditLogMessageSet "This message is used to capture user requests to create an asset.", "No action is required, but this message can be used to capture user activity information related to asset creation."), + /** + * OMAG-GENERIC-HANDLERS-0024 - Governance engine with {0} userId has successfully claimed engine action {1} + */ + ENGINE_ACTION_CANCELLED("OMAG-GENERIC-HANDLERS-0027", + AuditLogRecordSeverityLevel.SHUTDOWN, + "Engine action {0} has been cancelled by user {1}, it was in {2} status before the cancel request", + "The engine action is updated to show that it was cancelled. If a governance service is running in an engine host," + + " it is informed and it will attempt to stop the service as fast as possible.", + "Monitor the shutdown of the request in the engine host."), + ; private final String logMessageId; diff --git a/open-metadata-implementation/engine-services/asset-analysis/asset-analysis-server/src/main/java/org/odpi/openmetadata/engineservices/assetanalysis/handlers/DiscoveryEngineHandler.java b/open-metadata-implementation/engine-services/asset-analysis/asset-analysis-server/src/main/java/org/odpi/openmetadata/engineservices/assetanalysis/handlers/DiscoveryEngineHandler.java index 0936fa8dab6..b39fa193b3c 100644 --- a/open-metadata-implementation/engine-services/asset-analysis/asset-analysis-server/src/main/java/org/odpi/openmetadata/engineservices/assetanalysis/handlers/DiscoveryEngineHandler.java +++ b/open-metadata-implementation/engine-services/asset-analysis/asset-analysis-server/src/main/java/org/odpi/openmetadata/engineservices/assetanalysis/handlers/DiscoveryEngineHandler.java @@ -177,7 +177,7 @@ public void scanAllAssets(String discoveryRequestType, /** * Run an instance of a discovery service in its own thread and return the handler (for disconnect processing). * - * @param governanceActionGUID unique identifier of the asset to analyse + * @param engineActionGUID unique identifier of the asset to analyse * @param governanceRequestType governance request type to use when calling the governance engine * @param startDate date/time to start the governance action service * @param requestParameters name-value properties to control the governance action service @@ -189,7 +189,7 @@ public void scanAllAssets(String discoveryRequestType, * @throws PropertyServerException there was a problem detected by the governance action engine. */ @Override - public void runGovernanceService(String governanceActionGUID, + public void runGovernanceService(String engineActionGUID, String governanceRequestType, Date startDate, Map requestParameters, @@ -229,11 +229,12 @@ public void runGovernanceService(String governanceActionGUID requestParameters, null, null, - governanceActionGUID, + engineActionGUID, governanceServiceCache); - Thread thread = new Thread(discoveryServiceHandler, governanceServiceCache.getGovernanceServiceName() + assetGUID + new Date()); - thread.start(); + super.startServiceExecutionThread(engineActionGUID, + discoveryServiceHandler, + governanceServiceCache.getGovernanceServiceName() + assetGUID + new Date()); } } diff --git a/open-metadata-implementation/engine-services/asset-analysis/asset-analysis-server/src/main/java/org/odpi/openmetadata/engineservices/assetanalysis/handlers/DiscoveryServiceHandler.java b/open-metadata-implementation/engine-services/asset-analysis/asset-analysis-server/src/main/java/org/odpi/openmetadata/engineservices/assetanalysis/handlers/DiscoveryServiceHandler.java index a9dbbb415a9..1d29ff7fecd 100644 --- a/open-metadata-implementation/engine-services/asset-analysis/asset-analysis-server/src/main/java/org/odpi/openmetadata/engineservices/assetanalysis/handlers/DiscoveryServiceHandler.java +++ b/open-metadata-implementation/engine-services/asset-analysis/asset-analysis-server/src/main/java/org/odpi/openmetadata/engineservices/assetanalysis/handlers/DiscoveryServiceHandler.java @@ -69,11 +69,11 @@ public class DiscoveryServiceHandler extends GovernanceServiceHandler discoveryServiceGUID, discoveryServiceName, discoveryServiceConnector, + null, auditLog); this.discoveryContext = discoveryContext; this.discoveryReportGUID = discoveryReportGUID; - this.auditLog = auditLog; try { diff --git a/open-metadata-implementation/engine-services/governance-action/governance-action-server/src/main/java/org/odpi/openmetadata/engineservices/governanceaction/handlers/GovernanceActionEngineHandler.java b/open-metadata-implementation/engine-services/governance-action/governance-action-server/src/main/java/org/odpi/openmetadata/engineservices/governanceaction/handlers/GovernanceActionEngineHandler.java index 3b7a395ae8e..8167ac91cdf 100644 --- a/open-metadata-implementation/engine-services/governance-action/governance-action-server/src/main/java/org/odpi/openmetadata/engineservices/governanceaction/handlers/GovernanceActionEngineHandler.java +++ b/open-metadata-implementation/engine-services/governance-action/governance-action-server/src/main/java/org/odpi/openmetadata/engineservices/governanceaction/handlers/GovernanceActionEngineHandler.java @@ -13,7 +13,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.properties.RequestSourceElement; import org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceEngineHandler; import org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceServiceCache; -import org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceServiceHandler; import java.util.*; @@ -128,7 +127,6 @@ public void runGovernanceService(String engineActionGUID, * Need to combine the request parameters from the SupportedGovernanceService relationship with any from the caller. * The caller's request parameters take precedence. This is done in the governanceServiceCache. */ - GovernanceActionServiceHandler governanceActionServiceHandler = new GovernanceActionServiceHandler(governanceEngineProperties, governanceEngineGUID, serverUserId, @@ -144,10 +142,12 @@ public void runGovernanceService(String engineActionGUID, partnerServerName, partnerURLRoot, governanceContextClient, + startDate, auditLog); - Thread thread = new Thread(governanceActionServiceHandler, governanceServiceCache.getGovernanceServiceName() + engineActionGUID + new Date()); - thread.start(); + super.startServiceExecutionThread(engineActionGUID, + governanceActionServiceHandler, + governanceServiceCache.getGovernanceServiceName() + engineActionGUID + new Date()); } } } diff --git a/open-metadata-implementation/engine-services/governance-action/governance-action-server/src/main/java/org/odpi/openmetadata/engineservices/governanceaction/handlers/GovernanceActionServiceHandler.java b/open-metadata-implementation/engine-services/governance-action/governance-action-server/src/main/java/org/odpi/openmetadata/engineservices/governanceaction/handlers/GovernanceActionServiceHandler.java index c3b725b7406..9c73e285fab 100644 --- a/open-metadata-implementation/engine-services/governance-action/governance-action-server/src/main/java/org/odpi/openmetadata/engineservices/governanceaction/handlers/GovernanceActionServiceHandler.java +++ b/open-metadata-implementation/engine-services/governance-action/governance-action-server/src/main/java/org/odpi/openmetadata/engineservices/governanceaction/handlers/GovernanceActionServiceHandler.java @@ -49,6 +49,7 @@ public class GovernanceActionServiceHandler extends GovernanceServiceHandler * @param governanceActionServiceConnector connector that does the work * @param partnerServerName name of the metadata server used by the governance service * @param partnerServerPlatformURLRoot location of the metadata server used by the governance service + * @param startDate date/time that the governance service should start executing * @param auditLog destination for log messages * @throws InvalidParameterException problem with the governance service definitions */ @@ -67,6 +68,7 @@ public class GovernanceActionServiceHandler extends GovernanceServiceHandler String partnerServerName, String partnerServerPlatformURLRoot, GovernanceContextClient governanceContextClient, + Date startDate, AuditLog auditLog) throws InvalidParameterException { super(governanceActionEngineProperties, @@ -78,6 +80,7 @@ public class GovernanceActionServiceHandler extends GovernanceServiceHandler governanceActionServiceGUID, governanceActionServiceName, governanceActionServiceConnector, + startDate, auditLog); final String actionDescription = "Initializing GeneralGovernanceActionService"; @@ -208,10 +211,12 @@ public void run() Date startTime; Date endTime; - final String actionDescription = "Run governance service"; + final String actionDescription = "Run governance action service"; try { + super.waitForStartDate(); + auditLog.logMessage(actionDescription, GovernanceActionAuditCode.GOVERNANCE_ACTION_SERVICE_STARTING.getMessageDefinition(governanceActionServiceType, governanceServiceName, diff --git a/open-metadata-implementation/engine-services/repository-governance/repository-governance-server/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/handlers/RepositoryGovernanceEngineHandler.java b/open-metadata-implementation/engine-services/repository-governance/repository-governance-server/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/handlers/RepositoryGovernanceEngineHandler.java index 0eb540df97f..1d7f4b3b9cc 100644 --- a/open-metadata-implementation/engine-services/repository-governance/repository-governance-server/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/handlers/RepositoryGovernanceEngineHandler.java +++ b/open-metadata-implementation/engine-services/repository-governance/repository-governance-server/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/handlers/RepositoryGovernanceEngineHandler.java @@ -12,7 +12,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.properties.RequestSourceElement; import org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceEngineHandler; import org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceServiceCache; -import org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceServiceHandler; import org.odpi.openmetadata.repositoryservices.clients.EnterpriseRepositoryServicesClient; import java.util.*; @@ -98,10 +97,12 @@ public void runGovernanceService(String engineActionGUID, requestSourceElements, actionTargetElements, engineActionGUID, + startDate, governanceServiceCache); - Thread thread = new Thread(repositoryGovernanceServiceHandler, governanceServiceCache.getGovernanceServiceName() + new Date()); - thread.start(); + startServiceExecutionThread(engineActionGUID, + repositoryGovernanceServiceHandler, + governanceServiceCache.getGovernanceServiceName() + new Date()); } } @@ -114,7 +115,8 @@ public void runGovernanceService(String engineActionGUID, * @param requestParameters name-value properties to control the governance action service * @param requestSourceElements metadata elements associated with the request to the governance action service * @param actionTargetElements metadata elements that need to be worked on by the governance action service - * @param governanceActionGUID unique identifier of the associated governance action entity + * @param engineActionGUID unique identifier of the associated engine action entity + * @param startDate date/time that the governance service should start executing * @param governanceServiceCache factory for repository governance services * * @return unique identifier for this request. @@ -127,7 +129,8 @@ private RepositoryGovernanceServiceHandler getRepositoryGovernanceServiceHandler Map requestParameters, List requestSourceElements, List actionTargetElements, - String governanceActionGUID, + String engineActionGUID, + Date startDate, GovernanceServiceCache governanceServiceCache) throws InvalidParameterException, PropertyServerException { @@ -142,13 +145,14 @@ private RepositoryGovernanceServiceHandler getRepositoryGovernanceServiceHandler RepositoryGovernanceServiceHandler repositoryGovernanceServiceHandler = new RepositoryGovernanceServiceHandler(governanceEngineProperties, governanceEngineGUID, serverUserId, - governanceActionGUID, + engineActionGUID, engineActionClient, repositoryGovernanceRequestType, governanceServiceCache.getGovernanceServiceGUID(), governanceServiceCache.getGovernanceServiceName(), governanceServiceCache.getNextGovernanceService(), repositoryGovernanceContext, + startDate, auditLog); repositoryGovernanceContext.setRepositoryGovernanceServiceHandler(repositoryGovernanceServiceHandler); diff --git a/open-metadata-implementation/engine-services/repository-governance/repository-governance-server/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/handlers/RepositoryGovernanceServiceHandler.java b/open-metadata-implementation/engine-services/repository-governance/repository-governance-server/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/handlers/RepositoryGovernanceServiceHandler.java index 830436b55eb..8293fd3f0c6 100644 --- a/open-metadata-implementation/engine-services/repository-governance/repository-governance-server/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/handlers/RepositoryGovernanceServiceHandler.java +++ b/open-metadata-implementation/engine-services/repository-governance/repository-governance-server/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/handlers/RepositoryGovernanceServiceHandler.java @@ -41,6 +41,7 @@ public class RepositoryGovernanceServiceHandler extends GovernanceServiceHandler * @param repositoryGovernanceServiceName name of this repository governance service - used for message logging * @param repositoryGovernanceServiceConnector connector that does the work * @param repositoryGovernanceContext context for the connector + * @param startDate date/time that the governance service should start executing * @param auditLog destination for log messages */ RepositoryGovernanceServiceHandler(GovernanceEngineProperties repositoryGovernanceEngineProperties, @@ -53,6 +54,7 @@ public class RepositoryGovernanceServiceHandler extends GovernanceServiceHandler String repositoryGovernanceServiceName, Connector repositoryGovernanceServiceConnector, RepositoryGovernanceContext repositoryGovernanceContext, + Date startDate, AuditLog auditLog) throws InvalidParameterException { super(repositoryGovernanceEngineProperties, @@ -64,10 +66,10 @@ public class RepositoryGovernanceServiceHandler extends GovernanceServiceHandler repositoryGovernanceServiceGUID, repositoryGovernanceServiceName, repositoryGovernanceServiceConnector, + startDate, auditLog); this.repositoryGovernanceContext = repositoryGovernanceContext; - this.auditLog = auditLog; try { @@ -105,10 +107,12 @@ public void run() Date startTime; Date endTime; - final String actionDescription = "Maintain an repository governance service"; + final String actionDescription = "Run a repository governance service"; try { + super.waitForStartDate(); + auditLog.logMessage(actionDescription, RepositoryGovernanceAuditCode.REPOSITORY_GOVERNANCE_SERVICE_STARTING.getMessageDefinition(governanceServiceName, serviceRequestType, diff --git a/open-metadata-implementation/engine-services/survey-action/survey-action-api/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/ffdc/SurveyActionAuditCode.java b/open-metadata-implementation/engine-services/survey-action/survey-action-api/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/ffdc/SurveyActionAuditCode.java index 67132e7823f..757d3760e72 100644 --- a/open-metadata-implementation/engine-services/survey-action/survey-action-api/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/ffdc/SurveyActionAuditCode.java +++ b/open-metadata-implementation/engine-services/survey-action/survey-action-api/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/ffdc/SurveyActionAuditCode.java @@ -113,6 +113,19 @@ public enum SurveyActionAuditCode implements AuditLogMessageSet "The server is not able to record the failed result for a survey request. The survey report status is not updated.", "Review the error message and any other reported failures to determine the cause of the problem. Once this is resolved, retry the survey request."), + /** + * OMES-SURVEY-ACTION-0022 - Method {0} can not execute in the survey action engine {1} hosted by Survey Action OMES in server {2} because the associated " + + * "survey action service properties are null + */ + NULL_SURVEY_SERVICE( "OMES-SURVEY-ACTION-0022", + AuditLogRecordSeverityLevel.ERROR, + "Method {0} can not execute in the survey action engine {1} hosted by Survey Action OMES in server {2} because the associated " + + "survey action service properties are null", + "The survey request is not run and an error is returned to the caller.", + "This may be an error in the survey action engine's logic or the Survey Action Framework (SAF) may have returned " + + "invalid configuration. Raise an issue to get help to fix it"), + + /** * OMES-SURVEY-ACTION-0029 - The survey action service {0} linked to request type {1} can not be started. * The {2} exception was returned with message {3} @@ -132,6 +145,15 @@ public enum SurveyActionAuditCode implements AuditLogMessageSet "true this it is likely to be a code error in the survey action service in which case, " + "raise an issue with the author of the survey action service to get it fixed. Once the cause is resolved, " + "retry the survey request."), + + /** + * OMES-SURVEY-ACTION-0030 - The survey action service {0} linked to request type {1} is processing asset {2} and ignoring the following asset action targets: {3} + */ + IGNORING_ASSETS("OMES-SURVEY-ACTION-0030", + AuditLogRecordSeverityLevel.INFO, + "The survey action service {0} linked to request type {1} for engine action {2} is processing asset {3} and ignoring the following asset action targets: {4}", + "There are multiple assets in the action targets. The survey action service can only process one of them. The other assets are ignored.", + "Create a new engine action for each of the ignored assets so that they each run in their own survey action service."), ; diff --git a/open-metadata-implementation/engine-services/survey-action/survey-action-api/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/ffdc/SurveyActionErrorCode.java b/open-metadata-implementation/engine-services/survey-action/survey-action-api/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/ffdc/SurveyActionErrorCode.java index bf1c864feaf..eb8733465d4 100644 --- a/open-metadata-implementation/engine-services/survey-action/survey-action-api/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/ffdc/SurveyActionErrorCode.java +++ b/open-metadata-implementation/engine-services/survey-action/survey-action-api/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/ffdc/SurveyActionErrorCode.java @@ -26,109 +26,25 @@ */ public enum SurveyActionErrorCode implements ExceptionMessageSet { - /* - * Invalid configuration document - these errors need the server to be restarted to resolve. - */ - /** - * + * OMES-SURVEY-ACTION-400-001 - The Survey Action OMES are unable to initialize a new instance in server {0}; error message is {1} */ - SURVEY_ACTION_ENGINE_INSTANCE_FAILURE(400, "OMES-SURVEY-ACTION-400-007", - "The Survey Action OMES are unable to initialize a new instance of survey action engine {0}; error message is {1}", - "The Survey Action OMES detected an error during the start up of a specific survey action engine instance. " + - "Its survey action services are not available in the Survey Action OMES.", - "Review the error message and any other reported failures to determine the cause of the problem. " + - "Once this is resolved, restart the server."), - - SERVICE_INSTANCE_FAILURE(400, "OMES-SURVEY-ACTION-400-008", + SERVICE_INSTANCE_FAILURE(400, "OMES-SURVEY-ACTION-400-001", "The Survey Action OMES are unable to initialize a new instance in server {0}; error message is {1}", "The Survey Action OMES detected an error during the start up of a specific server instance. " + "No survey action services are available in the server.", "Review the error message and any other reported failures to determine the cause of the problem. " + "Once this is resolved, restart the server."), - /* - * Unavailable configuration in metadata server (the server may be down or the definitions are not loaded in the metadata server). - * These errors are returned to the caller while the server is retrying its attempts to retrieve the configuration. - * The problem is transient - once the configuration is available in the metadata server and the server has retrieved the - * configuration, the survey action engines will operate successfully. - */ - CONFIGURATION_LISTENER_INSTANCE_FAILURE(400, "OMES-SURVEY-ACTION-400-010", - "The Survey Action OMES are unable to retrieve the connection for the configuration " + - "listener for server {0} from metadata server {1}. " + - "Exception returned was {2} with error message {3}", - "The server continues to run. The Survey Action OMES will start up the " + - "survey action engines and they will operate with whatever configuration that they can retrieve. " + - "Periodically the Survey Action OMES will" + - "retry the request to retrieve the connection information. " + - "Without the connection, the Survey Action OMES will not be notified of changes to the discovery " + - "engines' configuration", - "This problem may be caused because the Survey Action OMES has been configured with the wrong location for the " + - "metadata server, or the metadata server is not running the Discovery Engine OMAS service or " + - "the metadata server is not running at all. Investigate the status of the metadata server to " + - "ensure it is running and correctly configured. Once it is ready, either restart the server, or issue the " + - "refresh-config command or wait for the Survey Action OMES to retry the configuration request."), - - UNKNOWN_ENGINE_CONFIG_AT_STARTUP(400, "OMES-SURVEY-ACTION-400-011", - "Properties for survey action engine called {0} have not been returned by open metadata server {1}. Exception {2} " + - "with message {3} returned to server {4}", - "The Survey Action OMES is not able to initialize the survey action engine and so it will not de able to support discovery " + - "requests targeted to this survey action engine. ", - "This may be a configuration error or the metadata server may be down. Look for other error messages and review the " + - "configuration of the Survey Action OMES. Once the cause is resolved, restart the server."), - - NO_SURVEY_ENGINES_STARTED(400, "OMES-SURVEY-ACTION-400-012", - "Survey Action OMES in server {0} is unable to start any survey action engines", - "The server is not able to run any discovery requests. It fails to start.", - "Add the configuration for at least one survey action engine to this Survey Action OMES."), - - NO_STEWARDSHIP_ACTION_CLIENT(400, "OMES-SURVEY-ACTION-400-013", - "Survey Action OMES in server {0} is unable to start a client to the Discovery Engine OMAS for survey action engine {1}. The " + - "exception was {2} and the error message was {3}", - "The server is not able to run any discovery requests. It fails to start.", - "Using the information in the error message, correct the server configuration and restart the server."), - - - UNKNOWN_DISCOVERY_ENGINE_CONFIG(400, "OMES-SURVEY-ACTION-400-014", - "Properties for survey action engine called {0} have not been returned by open metadata server {1} to Survey Action OMES in server {2}", - "The Survey Action OMES is not able to initialize the survey action engine and so it will not de able to support discovery " + - "requests targeted to this survey action engine.", - "This may be a configuration error or the metadata server may be down. Look for other error messages and review the " + - "configuration of the Survey Action OMES. Once the cause is resolved, restart the server."), - - /* - * Errors when running requests + /** + * OMES-SURVEY-ACTION-400-002 - The survey action service {0} linked to request type {1} can not be started. + * The {2} exception was returned with message {3} */ - UNKNOWN_SURVEY_ACTION_ENGINE(400, "OMES-SURVEY-ACTION-400-020", - "Discovery engine {0} is not running in the Survey Action OMES in server {1}", - "The survey action engine requested on a request is not known to the Survey Action OMES.", - "This may be a configuration error in the Survey Action OMES or an error in the caller. " + - "The supported survey action engines are listed in the Survey Action OMES's configuration. " + - "Check the configuration document for the server and then its start up messages to ensure the correct " + - "survey action engines are started. Look for other error messages that indicate that an error occurred during " + - "start up. If the Survey Action OMES is running the correct survey action engines then validate that " + - "the caller has passed the correct name of the survey action engine to the Survey Action OMES. If all of this is " + - "correct then it may be a code error in the Survey Action OMES and you need to raise an issue to get " + - "it fixed. Once the cause is resolved, retry the discovery request."), - - UNKNOWN_DISCOVERY_REQUEST_TYPE(400, "OMES-SURVEY-ACTION-400-021", - "The discovery request type {0} is not recognized by survey action engine {1} hosted by server {2}", - "The discovery request is not run and an error is returned to the caller.", - "This may be an error in the caller's logic, a configuration error related to the survey action engine or the metadata server" + - "used by the engine host server may be down. " + - "The configuration that defines the discovery request type in the survey action engine and links " + - "it to the survey action service that should run is maintained in the metadata server by the Discovery " + - "Engine OMAS's configuration API." + - "Verify that this configuration is correct, that the metadata server is running and the discovery " + - "server has been able to retrieve the configuration. If all this is true and the caller's request is " + - "consistent with this configuration then it may be a code error in the Survey Action OMES in which case, " + - "raise an issue to get it fixed. Once the cause is resolved, retry the discovery request."), - - INVALID_DISCOVERY_SERVICE(400, "OMES-SURVEY-ACTION-400-022", - "The survey action service {0} linked to discovery request type {1} can not be started. " + + INVALID_SURVEY_SERVICE(400, "OMES-SURVEY-ACTION-400-002", + "The survey action service {0} linked to request type {1} can not be started. " + "The {2} exception was returned with message {3}", - "The discovery request is not run and an error is returned to the caller.", - "This may be an error in the survey action service's logic or the survey action service may not be properly deployed or " + + "The survey request is not run and an error is returned to the caller.", + "This may be an error in the survey action service's logic or the survey action service may not be properly deployed or " + "there is a configuration error related to the survey action engine. " + "The configuration that defines the discovery request type in the survey action engine and links " + "it to the survey action service is maintained in the metadata server by the Discovery " + @@ -137,21 +53,21 @@ public enum SurveyActionErrorCode implements ExceptionMessageSet "survey action service's implementation has been deployed so the Survey Action OMES can load it. If all this is " + "true this it is likely to be a code error in the survey action service in which case, " + "raise an issue with the author of the survey action service to get it fixed. Once the cause is resolved, " + - "retry the discovery request."), - - NULL_DISCOVERY_SERVICE(400, "OMES-SURVEY-ACTION-400-023", - "Method {0} can not execute in the survey action engine {1} hosted by Survey Action OMES in server {2} because the associated " + - "survey action service properties are null", - "The discovery request is not run and an error is returned to the caller.", - "This may be an error in the survey action engine's logic or the Discovery Engine OMAS may have returned " + - "invalid configuration. Raise an issue to get help to fix it"), - - DISCOVERY_ENGINE_NOT_INITIALIZED(400,"OMES-SURVEY-ACTION-400-024", - "Survey Action OMES in server {0} is unable to pass a discovery request to survey action engine {1} because this survey action engine has not " + - "retrieved its configuration from the metadata server", - "The survey action engine is not able to run any discovery requests until it is able to retrieve its configuration.", - "Use the configuration interface of the Discovery Engine OMAS to create a definition of at least one discovery" + - " engine."), + "retry the survey request."), + + + NO_TARGET_ASSET(400, "OMES-SURVEY-ACTION-400-003", + "The survey action service {0} linked to request type {1} and engine action {2} can not be started because there is no asset action target supplied", + "The survey request is not run and an error is recorded in the engine action.", + "Retry the survey request and ensuring that an action target is included in the request."), + + + NULL_REQUEST(400, "OMES-SURVEY-ACTION-400-004", + "The survey engine action {0} can not be started because there is no governance service context", + "The survey request is not run and an error is recorded in the engine action because the governance service is not set up property.", + "This is an unexpected error, you may need to trace through the code to find out what has happened."), + + ; diff --git a/open-metadata-implementation/engine-services/survey-action/survey-action-server/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/handlers/SurveyActionEngineHandler.java b/open-metadata-implementation/engine-services/survey-action/survey-action-server/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/handlers/SurveyActionEngineHandler.java index 72c88aabd92..b54bf8a2cf1 100644 --- a/open-metadata-implementation/engine-services/survey-action/survey-action-server/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/handlers/SurveyActionEngineHandler.java +++ b/open-metadata-implementation/engine-services/survey-action/survey-action-server/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/handlers/SurveyActionEngineHandler.java @@ -10,11 +10,14 @@ import org.odpi.openmetadata.accessservices.assetowner.client.SurveyAssetStoreClient; import org.odpi.openmetadata.adminservices.configuration.properties.EngineConfig; import org.odpi.openmetadata.adminservices.configuration.registration.EngineServiceDescription; +import org.odpi.openmetadata.engineservices.surveyaction.ffdc.SurveyActionAuditCode; +import org.odpi.openmetadata.engineservices.surveyaction.ffdc.SurveyActionErrorCode; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.*; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.ActionTargetElement; +import org.odpi.openmetadata.frameworks.governanceaction.properties.EngineActionStatus; import org.odpi.openmetadata.frameworks.governanceaction.properties.RequestSourceElement; import org.odpi.openmetadata.frameworks.surveyaction.AnnotationStore; import org.odpi.openmetadata.frameworks.surveyaction.SurveyAssetStore; @@ -22,7 +25,6 @@ import org.odpi.openmetadata.frameworks.surveyaction.SurveyOpenMetadataStore; import org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceEngineHandler; import org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceServiceCache; -import org.odpi.openmetadata.governanceservers.enginehostservices.admin.GovernanceServiceHandler; import java.util.*; @@ -84,19 +86,19 @@ public SurveyActionEngineHandler(EngineConfig engineConfi /** * Run an instance of a survey action service in its own thread and return the handler (for disconnect processing). * - * @param governanceActionGUID unique identifier of the asset to analyse + * @param engineActionGUID unique identifier of engine action to activate * @param governanceRequestType governance request type to use when calling the governance engine * @param startDate date/time to start the governance action service * @param requestParameters name-value properties to control the governance action service - * @param requestSourceElements metadata elements associated with the request to the governance action service - * @param actionTargetElements metadata elements that need to be worked on by the governance action service + * @param requestSourceElements metadata elements associated with the request to the governance service + * @param actionTargetElements metadata elements that need to be worked on by the governance service * * @throws InvalidParameterException one of the parameters is null or invalid. * @throws UserNotAuthorizedException user not authorized to issue this request. - * @throws PropertyServerException there was a problem detected by the governance action engine. + * @throws PropertyServerException there was a problem detected by the governance engine. */ @Override - public void runGovernanceService(String governanceActionGUID, + public void runGovernanceService(String engineActionGUID, String governanceRequestType, Date startDate, Map requestParameters, @@ -111,37 +113,126 @@ public void runGovernanceService(String governanceActionGUID GovernanceServiceCache governanceServiceCache = super.getServiceCache(governanceRequestType); - if ((governanceServiceCache != null) && (actionTargetElements != null) && (! actionTargetElements.isEmpty())) + if (governanceServiceCache != null) { - String assetGUID = null; - - for (ActionTargetElement actionTargetElement : actionTargetElements) + if ((actionTargetElements != null) && (! actionTargetElements.isEmpty())) { - if ((actionTargetElement != null) - && (actionTargetElement.getTargetElement() != null) - && (actionTargetElement.getTargetElement().getType() != null)) + String assetGUID = getAssetGUIDFromActionTargets(actionTargetElements, + governanceServiceCache.getGovernanceServiceName(), + governanceRequestType, + engineActionGUID); + + if (assetGUID != null) + { + SurveyActionServiceHandler surveyActionServiceHandler = this.getSurveyActionServiceHandler(assetGUID, + governanceRequestType, + requestParameters, + engineActionGUID, + startDate, + governanceServiceCache); + + super.startServiceExecutionThread(engineActionGUID, + surveyActionServiceHandler, + governanceServiceCache.getGovernanceServiceName() + assetGUID + new Date()); + } + else { - String typeName = actionTargetElement.getTargetElement().getType().getTypeName(); - List superTypeNames = actionTargetElement.getTargetElement().getType().getSuperTypeNames(); + throw new InvalidParameterException(SurveyActionErrorCode.NO_TARGET_ASSET.getMessageDefinition(governanceServiceCache.getGovernanceServiceName(), + governanceRequestType, + engineActionGUID), + this.getClass().getName(), + methodName, + "assetGUID"); + } + } + else + { + throw new InvalidParameterException(SurveyActionErrorCode.NO_TARGET_ASSET.getMessageDefinition(governanceServiceCache.getGovernanceServiceName(), + governanceRequestType, + engineActionGUID), + this.getClass().getName(), + methodName, + "assetGUID"); + } + } + else + { + throw new InvalidParameterException(SurveyActionErrorCode.NULL_REQUEST.getMessageDefinition(engineActionGUID), + this.getClass().getName(), + methodName, + "governanceServiceCache"); + } + } + - if ((OpenMetadataType.ASSET.typeName.equals(typeName)) || ((superTypeNames != null) && (superTypeNames.contains(OpenMetadataType.ASSET.typeName)))) + /** + * Extract the asset to survey from the action targets. If there are multiple + * action targets that are assets then the method picks one and logs a message to + * say the others are being ignored. + * + * @param actionTargetElements action target elements + * @param governanceServiceName name of the selected governance service + * @param governanceRequestType calling request type + * @param engineActionGUID unique identifier of the engine action + * @return assetGUID or null + * @throws InvalidParameterException problem updating action target status + * @throws UserNotAuthorizedException problem updating action target status + * @throws PropertyServerException problem updating action target status + */ + private String getAssetGUIDFromActionTargets(List actionTargetElements, + String governanceServiceName, + String governanceRequestType, + String engineActionGUID) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + final String methodName = "getAssetGUIDFromActionTargets"; + + String assetGUID = null; + List ignoredAssets = new ArrayList<>(); + + for (ActionTargetElement actionTargetElement : actionTargetElements) + { + if ((actionTargetElement != null) + && (actionTargetElement.getTargetElement() != null) + && (actionTargetElement.getTargetElement().getType() != null)) + { + String typeName = actionTargetElement.getTargetElement().getType().getTypeName(); + List superTypeNames = actionTargetElement.getTargetElement().getType().getSuperTypeNames(); + + if ((OpenMetadataType.ASSET.typeName.equals(typeName)) || + ((superTypeNames != null) && (superTypeNames.contains(OpenMetadataType.ASSET.typeName)))) + { + if (assetGUID == null) { assetGUID = actionTargetElement.getTargetElement().getElementGUID(); + engineActionClient.updateActionTargetStatus(serverUserId, + actionTargetElement.getActionTargetRelationshipGUID(), + EngineActionStatus.IN_PROGRESS, + new Date(), + null, + null); + } + else + { + ignoredAssets.add(actionTargetElement.getTargetElement().getElementGUID()); } } } + } - SurveyActionServiceHandler surveyActionServiceHandler = this.getSurveyActionServiceHandler(assetGUID, - governanceRequestType, - requestParameters, - governanceActionGUID, - governanceServiceCache); - - Thread thread = new Thread(surveyActionServiceHandler, governanceServiceCache.getGovernanceServiceName() + assetGUID + new Date()); - thread.start(); + if (! ignoredAssets.isEmpty()) + { + auditLog.logMessage(methodName, + SurveyActionAuditCode.IGNORING_ASSETS.getMessageDefinition(governanceServiceName, + governanceRequestType, + engineActionGUID, + assetGUID, + ignoredAssets.toString())); } - } + return assetGUID; + } /** * Create an instance of a survey action service handler. @@ -150,6 +241,7 @@ public void runGovernanceService(String governanceActionGUID * @param requestType type of survey * @param requestParameters parameters for the survey * @param engineActionGUID unique identifier of the associated engine action entity + * @param startDate date/time that the governance service should start executing * @param governanceServiceCache factory for survey action services * * @return unique identifier for this request. @@ -162,6 +254,7 @@ private SurveyActionServiceHandler getSurveyActionServiceHandler(String String requestType, Map requestParameters, String engineActionGUID, + Date startDate, GovernanceServiceCache governanceServiceCache) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException @@ -200,11 +293,11 @@ private SurveyActionServiceHandler getSurveyActionServiceHandler(String null); SurveyContext surveyContext = new SurveyContext(engineUserId, - assetGUID, - analysisParameters, - assetStore, - annotationStore, - openMetadataStore); + assetGUID, + analysisParameters, + assetStore, + annotationStore, + openMetadataStore); return new SurveyActionServiceHandler(governanceEngineProperties, governanceEngineGUID, @@ -216,6 +309,7 @@ private SurveyActionServiceHandler getSurveyActionServiceHandler(String governanceServiceCache.getGovernanceServiceName(), governanceServiceCache.getNextGovernanceService(), surveyContext, + startDate, auditLog); } } diff --git a/open-metadata-implementation/engine-services/survey-action/survey-action-server/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/handlers/SurveyActionServiceHandler.java b/open-metadata-implementation/engine-services/survey-action/survey-action-server/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/handlers/SurveyActionServiceHandler.java index de525c08684..6b77e58581c 100644 --- a/open-metadata-implementation/engine-services/survey-action/survey-action-server/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/handlers/SurveyActionServiceHandler.java +++ b/open-metadata-implementation/engine-services/survey-action/survey-action-server/src/main/java/org/odpi/openmetadata/engineservices/surveyaction/handlers/SurveyActionServiceHandler.java @@ -40,6 +40,7 @@ public class SurveyActionServiceHandler extends GovernanceServiceHandler * @param surveyActionServiceName name of this survey action service - used for message logging * @param surveyActionServiceConnector connector that does the work * @param surveyContext context for the connector + * @param startDate date/time that the service should start * @param auditLog destination for log messages */ SurveyActionServiceHandler(GovernanceEngineProperties surveyActionEngineProperties, @@ -52,6 +53,7 @@ public class SurveyActionServiceHandler extends GovernanceServiceHandler String surveyActionServiceName, Connector surveyActionServiceConnector, SurveyContext surveyContext, + Date startDate, AuditLog auditLog) throws InvalidParameterException { super(surveyActionEngineProperties, @@ -63,10 +65,10 @@ public class SurveyActionServiceHandler extends GovernanceServiceHandler surveyActionServiceGUID, surveyActionServiceName, surveyActionServiceConnector, + startDate, auditLog); - this.surveyContext = surveyContext; - this.auditLog = auditLog; + this.surveyContext = surveyContext; try { @@ -83,10 +85,10 @@ public class SurveyActionServiceHandler extends GovernanceServiceHandler error.getClass().getName(), error.getMessage()), error); - throw new InvalidParameterException(SurveyActionErrorCode.INVALID_DISCOVERY_SERVICE.getMessageDefinition(surveyActionServiceName, - serviceRequestType, - error.getClass().getName(), - error.getMessage()), + throw new InvalidParameterException(SurveyActionErrorCode.INVALID_SURVEY_SERVICE.getMessageDefinition(surveyActionServiceName, + serviceRequestType, + error.getClass().getName(), + error.getMessage()), this.getClass().getName(), actionDescription, error, @@ -106,10 +108,12 @@ public void run() String surveyReportGUID = null; - final String actionDescription = "Analyse an Asset"; + final String actionDescription = "Survey an Asset"; try { + super.waitForStartDate(); + surveyReportGUID = surveyContext.getAnnotationStore().getSurveyReportGUID(); auditLog.logMessage(actionDescription, SurveyActionAuditCode.SURVEY_ACTION_SERVICE_STARTING.getMessageDefinition(governanceServiceName, @@ -137,7 +141,7 @@ public void run() super.disconnect(); surveyActionService.setSurveyContext(null); - super.recordCompletionStatus(CompletionStatus.ACTIONED, null, null, null, null); + super.recordCompletionStatus(CompletionStatus.ACTIONED, null, null, null, "SUCCESS"); } catch (Exception error) { @@ -147,6 +151,7 @@ public void run() * Try to log the completion message - may not work */ surveyContext.getAnnotationStore().setCompletionMessage(error.getMessage()); + super.recordCompletionStatus(CompletionStatus.FAILED, null, null, null, error.getMessage()); } catch (Exception ignore) { diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/FirstGovernanceActionProcessStepResponse.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/FirstGovernanceActionProcessStepResponse.java new file mode 100644 index 00000000000..bd349618c2f --- /dev/null +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/FirstGovernanceActionProcessStepResponse.java @@ -0,0 +1,143 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworkservices.gaf.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.governanceaction.properties.FirstGovernanceActionProcessStepElement; + +import java.util.Arrays; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * FirstGovernanceActionProcessStepResponse is the response structure used on the Governance Action Framework (GAF) + * API calls that returns a FirstGovernanceActionProcessStep element object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FirstGovernanceActionProcessStepResponse extends OMAGGAFAPIResponse +{ + private FirstGovernanceActionProcessStepElement element = null; + + /** + * Default constructor + */ + public FirstGovernanceActionProcessStepResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FirstGovernanceActionProcessStepResponse(FirstGovernanceActionProcessStepResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the properties object. + * + * @return properties object + */ + public FirstGovernanceActionProcessStepElement getElement() + { + if (element == null) + { + return null; + } + else + { + return element; + } + } + + + /** + * Set up the properties object. + * + * @param element properties object + */ + public void setElement(FirstGovernanceActionProcessStepElement element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "FirstGovernanceActionProcessStepResponse{" + + "element=" + element + + ", exceptionClassName='" + getExceptionClassName() + '\'' + + ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + + ", actionDescription='" + getActionDescription() + '\'' + + ", relatedHTTPCode=" + getRelatedHTTPCode() + + ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + + ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + + ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + + ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + + ", exceptionUserAction='" + getExceptionUserAction() + '\'' + + ", exceptionProperties=" + getExceptionProperties() + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + FirstGovernanceActionProcessStepResponse that = (FirstGovernanceActionProcessStepResponse) objectToCompare; + return Objects.equals(getElement(), that.getElement()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getElement()); + } +} diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionProcessGraphResponse.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionProcessGraphResponse.java new file mode 100644 index 00000000000..ee32ccfd6a9 --- /dev/null +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionProcessGraphResponse.java @@ -0,0 +1,143 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworkservices.gaf.rest; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessGraph; + +import java.util.Arrays; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + + +/** + * FirstGovernanceActionProcessStepResponse is the response structure used on the Governance Action Framework (GAF) + * API calls that returns a FirstGovernanceActionProcessStep element object as a response. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceActionProcessGraphResponse extends OMAGGAFAPIResponse +{ + private GovernanceActionProcessGraph element = null; + + /** + * Default constructor + */ + public GovernanceActionProcessGraphResponse() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceActionProcessGraphResponse(GovernanceActionProcessGraphResponse template) + { + super(template); + + if (template != null) + { + this.element = template.getElement(); + } + } + + + /** + * Return the properties object. + * + * @return properties object + */ + public GovernanceActionProcessGraph getElement() + { + if (element == null) + { + return null; + } + else + { + return element; + } + } + + + /** + * Set up the properties object. + * + * @param element properties object + */ + public void setElement(GovernanceActionProcessGraph element) + { + this.element = element; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceActionProcessGraphResponse{" + + "element=" + element + + ", exceptionClassName='" + getExceptionClassName() + '\'' + + ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' + + ", actionDescription='" + getActionDescription() + '\'' + + ", relatedHTTPCode=" + getRelatedHTTPCode() + + ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' + + ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' + + ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) + + ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' + + ", exceptionUserAction='" + getExceptionUserAction() + '\'' + + ", exceptionProperties=" + getExceptionProperties() + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + if (!super.equals(objectToCompare)) + { + return false; + } + GovernanceActionProcessGraphResponse that = (GovernanceActionProcessGraphResponse) objectToCompare; + return Objects.equals(getElement(), that.getElement()); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(super.hashCode(), getElement()); + } +} diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionRequestBody.java index b2c601b11b0..5a269999dd2 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionRequestBody.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionRequestBody.java @@ -6,12 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.odpi.openmetadata.frameworks.governanceaction.properties.NewActionTarget; - -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -23,7 +17,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) @Deprecated -public class GovernanceActionRequestBody extends EngineActionRequestBody +public class GovernanceActionRequestBody extends InitiateEngineActionRequestBody { /** * JSON-style toString. @@ -41,7 +35,7 @@ public String toString() ", requestSourceGUIDs=" + getRequestSourceGUIDs() + ", actionTargets=" + getActionTargets() + ", receivedGuards=" + getReceivedGuards() + - ", startTime=" + getStartTime() + + ", startTime=" + getStartDate() + ", requestType='" + getRequestType() + '\'' + ", requestParameters=" + getRequestParameters() + ", processName='" + getProcessName() + '\'' + diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/EngineActionRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/InitiateEngineActionRequestBody.java similarity index 93% rename from open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/EngineActionRequestBody.java rename to open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/InitiateEngineActionRequestBody.java index 25946da01db..c76df16dbc2 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/EngineActionRequestBody.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/InitiateEngineActionRequestBody.java @@ -17,12 +17,12 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; /** - * EngineActionRequestBody provides a structure for passing the properties for a new governance action. + * EngineActionRequestBody provides a structure for passing the properties for a new engine action. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class EngineActionRequestBody +public class InitiateEngineActionRequestBody { private String qualifiedName = null; private int domainIdentifier = 0; @@ -31,7 +31,7 @@ public class EngineActionRequestBody private List requestSourceGUIDs = null; private List actionTargets = null; private List receivedGuards = null; - private Date startTime = null; + private Date startDate = null; private String requestType = null; private Map requestParameters = null; private String processName = null; @@ -42,7 +42,7 @@ public class EngineActionRequestBody /** * Default constructor */ - public EngineActionRequestBody() + public InitiateEngineActionRequestBody() { super(); } @@ -53,7 +53,7 @@ public EngineActionRequestBody() * * @param template object to copy */ - public EngineActionRequestBody(EngineActionRequestBody template) + public InitiateEngineActionRequestBody(InitiateEngineActionRequestBody template) { if (template != null) { @@ -64,8 +64,8 @@ public EngineActionRequestBody(EngineActionRequestBody template) requestSourceGUIDs = template.getRequestSourceGUIDs(); actionTargets = template.getActionTargets(); receivedGuards = template.getReceivedGuards(); - startTime = template.getStartTime(); - requestType = template.getRequestType(); + startDate = template.getStartDate(); + requestType = template.getRequestType(); requestParameters = template.getRequestParameters(); processName = template.getProcessName(); requestSourceName = template.getRequestSourceName(); @@ -253,20 +253,20 @@ public void setReceivedGuards(List receivedGuards) * * @return date object */ - public Date getStartTime() + public Date getStartDate() { - return startTime; + return startDate; } /** * Set up the time that this governance action should start (null means as soon as possible). * - * @param startTime date object + * @param startDate date object */ - public void setStartTime(Date startTime) + public void setStartDate(Date startDate) { - this.startTime = startTime; + this.startDate = startDate; } @@ -420,7 +420,7 @@ public void setOriginatorEngineName(String originatorEngineName) @Override public String toString() { - return "EngineActionRequestBody{" + + return "InitiateEngineActionRequestBody{" + "qualifiedName='" + qualifiedName + '\'' + ", domainIdentifier=" + domainIdentifier + ", displayName='" + displayName + '\'' + @@ -428,7 +428,7 @@ public String toString() ", requestSourceGUIDs=" + requestSourceGUIDs + ", actionTargets=" + actionTargets + ", receivedGuards=" + receivedGuards + - ", startTime=" + startTime + + ", startDate=" + startDate + ", requestType='" + requestType + '\'' + ", requestParameters=" + requestParameters + ", processName='" + processName + '\'' + @@ -456,14 +456,14 @@ public boolean equals(Object objectToCompare) { return false; } - EngineActionRequestBody that = (EngineActionRequestBody) objectToCompare; + InitiateEngineActionRequestBody that = (InitiateEngineActionRequestBody) objectToCompare; return domainIdentifier == that.domainIdentifier && Objects.equals(qualifiedName, that.qualifiedName) && Objects.equals(displayName, that.displayName) && Objects.equals(description, that.description) && Objects.equals(requestSourceGUIDs, that.requestSourceGUIDs) && Objects.equals(actionTargets, that.actionTargets) && - Objects.equals(startTime, that.startTime) && + Objects.equals(startDate, that.startDate) && Objects.equals(requestType, that.requestType) && Objects.equals(processName, that.processName) && Objects.equals(requestSourceName, that.requestSourceName) && @@ -481,7 +481,7 @@ public boolean equals(Object objectToCompare) @Override public int hashCode() { - return Objects.hash(qualifiedName, domainIdentifier, displayName, description, requestSourceGUIDs, actionTargets, startTime, requestType, + return Objects.hash(qualifiedName, domainIdentifier, displayName, description, requestSourceGUIDs, actionTargets, startDate, requestType, processName, requestSourceName, requestParameters, originatorServiceName, originatorEngineName); } } diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionProcessRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/InitiateGovernanceActionProcessRequestBody.java similarity index 86% rename from open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionProcessRequestBody.java rename to open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/InitiateGovernanceActionProcessRequestBody.java index 7b445e899a1..61d0281318c 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionProcessRequestBody.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/InitiateGovernanceActionProcessRequestBody.java @@ -17,18 +17,18 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; /** - * GovernanceActionProcessRequestBody provides a structure for passing the properties for initiating a new instance of a governance action process. + * InitiateGovernanceActionProcessRequestBody provides a structure for passing the properties for initiating a new instance of a governance action process. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceActionProcessRequestBody +public class InitiateGovernanceActionProcessRequestBody { private String processQualifiedName = null; private Map requestParameters = null; private List requestSourceGUIDs = null; private List actionTargets = null; - private Date startTime = null; + private Date startDate = null; private String originatorServiceName = null; private String originatorEngineName = null; @@ -36,7 +36,7 @@ public class GovernanceActionProcessRequestBody /** * Default constructor */ - public GovernanceActionProcessRequestBody() + public InitiateGovernanceActionProcessRequestBody() { super(); } @@ -47,15 +47,15 @@ public GovernanceActionProcessRequestBody() * * @param template object to copy */ - public GovernanceActionProcessRequestBody(GovernanceActionProcessRequestBody template) + public InitiateGovernanceActionProcessRequestBody(InitiateGovernanceActionProcessRequestBody template) { if (template != null) { processQualifiedName = template.getProcessQualifiedName(); requestParameters = template.getRequestParameters(); requestSourceGUIDs = template.getRequestSourceGUIDs(); - actionTargets = template.getActionTargets(); - startTime = template.getStartTime(); + actionTargets = template.getActionTargets(); + startDate = template.getStartDate(); originatorServiceName = template.getOriginatorServiceName(); originatorEngineName = template.getOriginatorEngineName(); } @@ -143,7 +143,7 @@ public void setRequestSourceGUIDs(List requestSourceGUIDs) /** * Return the list of elements that the governance action process will work on. * - * @return map of names to string guids + * @return list of names to string guids */ public List getActionTargets() { @@ -154,7 +154,7 @@ public List getActionTargets() /** * Set up the list of elements that the governance action process will work on. * - * @param actionTargets map of names to string guids + * @param actionTargets list of names to string guids */ public void setActionTargets(List actionTargets) { @@ -167,20 +167,20 @@ public void setActionTargets(List actionTargets) * * @return date object */ - public Date getStartTime() + public Date getStartDate() { - return startTime; + return startDate; } /** * Set up the time that this process should start (null means as soon as possible). * - * @param startTime date object + * @param startDate date object */ - public void setStartTime(Date startTime) + public void setStartDate(Date startDate) { - this.startTime = startTime; + this.startDate = startDate; } @@ -236,12 +236,12 @@ public void setOriginatorEngineName(String originatorEngineName) @Override public String toString() { - return "GovernanceActionProcessRequestBody{" + + return "InitiateGovernanceActionProcessRequestBody{" + "processQualifiedName='" + processQualifiedName + '\'' + ", requestParameters=" + requestParameters + ", requestSourceGUIDs=" + requestSourceGUIDs + ", actionTargets=" + actionTargets + - ", startTime=" + startTime + + ", startDate=" + startDate + ", originatorServiceName='" + originatorServiceName + '\'' + ", originatorEngineName='" + originatorEngineName + '\'' + '}'; @@ -265,14 +265,14 @@ public boolean equals(Object objectToCompare) { return false; } - GovernanceActionProcessRequestBody that = (GovernanceActionProcessRequestBody) objectToCompare; + InitiateGovernanceActionProcessRequestBody that = (InitiateGovernanceActionProcessRequestBody) objectToCompare; return Objects.equals(processQualifiedName, that.processQualifiedName) && Objects.equals(requestSourceGUIDs, that.requestSourceGUIDs) && Objects.equals(requestParameters, that.requestParameters) && Objects.equals(actionTargets, that.actionTargets) && Objects.equals(originatorServiceName, that.originatorServiceName) && Objects.equals(originatorEngineName, that.originatorEngineName) && - Objects.equals(startTime, that.startTime); + Objects.equals(startDate, that.startDate); } @@ -284,7 +284,7 @@ public boolean equals(Object objectToCompare) @Override public int hashCode() { - return Objects.hash(processQualifiedName, requestSourceGUIDs, requestParameters, actionTargets, startTime, + return Objects.hash(processQualifiedName, requestSourceGUIDs, requestParameters, actionTargets, startDate, originatorServiceName, originatorEngineName); } } diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionTypeRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/InitiateGovernanceActionTypeRequestBody.java similarity index 87% rename from open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionTypeRequestBody.java rename to open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/InitiateGovernanceActionTypeRequestBody.java index 945bf5c68e7..a52d03f4677 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/GovernanceActionTypeRequestBody.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/InitiateGovernanceActionTypeRequestBody.java @@ -23,13 +23,13 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class GovernanceActionTypeRequestBody +public class InitiateGovernanceActionTypeRequestBody { private String governanceActionTypeQualifiedName = null; private Map requestParameters = null; private List requestSourceGUIDs = null; private List actionTargets = null; - private Date startTime = null; + private Date startDate = null; private String originatorServiceName = null; private String originatorEngineName = null; @@ -37,7 +37,7 @@ public class GovernanceActionTypeRequestBody /** * Default constructor */ - public GovernanceActionTypeRequestBody() + public InitiateGovernanceActionTypeRequestBody() { super(); } @@ -48,16 +48,16 @@ public GovernanceActionTypeRequestBody() * * @param template object to copy */ - public GovernanceActionTypeRequestBody(GovernanceActionTypeRequestBody template) + public InitiateGovernanceActionTypeRequestBody(InitiateGovernanceActionTypeRequestBody template) { if (template != null) { governanceActionTypeQualifiedName = template.getGovernanceActionTypeQualifiedName(); requestParameters = template.getRequestParameters(); requestSourceGUIDs = template.getRequestSourceGUIDs(); - actionTargets = template.getActionTargets(); - startTime = template.getStartTime(); - originatorServiceName = template.getOriginatorServiceName(); + actionTargets = template.getActionTargets(); + startDate = template.getStartDate(); + originatorServiceName = template.getOriginatorServiceName(); originatorEngineName = template.getOriginatorEngineName(); } } @@ -144,7 +144,7 @@ public void setRequestSourceGUIDs(List requestSourceGUIDs) /** * Return the list of elements that the governance service will work on. * - * @return map of names to string guids + * @return list of names to string guids */ public List getActionTargets() { @@ -155,7 +155,7 @@ public List getActionTargets() /** * Set up the list of elements that the governance service will work on. * - * @param actionTargets map of names to string guids + * @param actionTargets list of names to string guids */ public void setActionTargets(List actionTargets) { @@ -168,20 +168,20 @@ public void setActionTargets(List actionTargets) * * @return date object */ - public Date getStartTime() + public Date getStartDate() { - return startTime; + return startDate; } /** * Set up the time that this engine action should start (null means as soon as possible). * - * @param startTime date object + * @param startDate date object */ - public void setStartTime(Date startTime) + public void setStartDate(Date startDate) { - this.startTime = startTime; + this.startDate = startDate; } @@ -237,12 +237,12 @@ public void setOriginatorEngineName(String originatorEngineName) @Override public String toString() { - return "GovernanceActionTypeRequestBody{" + + return "InitiateGovernanceActionTypeRequestBody{" + "governanceActionTypeQualifiedName='" + governanceActionTypeQualifiedName + '\'' + ", requestParameters=" + requestParameters + ", requestSourceGUIDs=" + requestSourceGUIDs + ", actionTargets=" + actionTargets + - ", startTime=" + startTime + + ", startDate=" + startDate + ", originatorServiceName='" + originatorServiceName + '\'' + ", originatorEngineName='" + originatorEngineName + '\'' + '}'; @@ -266,14 +266,14 @@ public boolean equals(Object objectToCompare) { return false; } - GovernanceActionTypeRequestBody that = (GovernanceActionTypeRequestBody) objectToCompare; + InitiateGovernanceActionTypeRequestBody that = (InitiateGovernanceActionTypeRequestBody) objectToCompare; return Objects.equals(governanceActionTypeQualifiedName, that.governanceActionTypeQualifiedName) && Objects.equals(requestSourceGUIDs, that.requestSourceGUIDs) && Objects.equals(requestParameters, that.requestParameters) && Objects.equals(actionTargets, that.actionTargets) && Objects.equals(originatorServiceName, that.originatorServiceName) && Objects.equals(originatorEngineName, that.originatorEngineName) && - Objects.equals(startTime, that.startTime); + Objects.equals(startDate, that.startDate); } @@ -285,7 +285,7 @@ public boolean equals(Object objectToCompare) @Override public int hashCode() { - return Objects.hash(governanceActionTypeQualifiedName, requestSourceGUIDs, requestParameters, actionTargets, startTime, + return Objects.hash(governanceActionTypeQualifiedName, requestSourceGUIDs, requestParameters, actionTargets, startDate, originatorServiceName, originatorEngineName); } } diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewGovernanceActionProcessRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewGovernanceActionProcessRequestBody.java index 1a7d62823c1..a8a8eb33a0a 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewGovernanceActionProcessRequestBody.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/NewGovernanceActionProcessRequestBody.java @@ -9,7 +9,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.ProcessStatus; -import java.io.Serializable; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -22,10 +21,8 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class NewGovernanceActionProcessRequestBody implements Serializable +public class NewGovernanceActionProcessRequestBody { - private static final long serialVersionUID = 1L; - private ProcessStatus processStatus = null; private GovernanceActionProcessProperties properties = null; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/UpdateGovernanceActionProcessRequestBody.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/UpdateGovernanceActionProcessRequestBody.java index 68424b914af..44220330a5e 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/UpdateGovernanceActionProcessRequestBody.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/UpdateGovernanceActionProcessRequestBody.java @@ -21,8 +21,6 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class UpdateGovernanceActionProcessRequestBody extends NewGovernanceActionProcessRequestBody { - private static final long serialVersionUID = 1L; - private boolean mergeUpdate = false; diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/GovernanceContextClientBase.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/GovernanceContextClientBase.java index abbb59da148..1bc531168c7 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/GovernanceContextClientBase.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/GovernanceContextClientBase.java @@ -258,7 +258,7 @@ public void claimEngineAction(String userId, /** - * Retrieve the governance actions that are still in process and that have been claimed by this caller's userId. + * Retrieve the engine actions that are still in process and that have been claimed by this caller's userId. * This call is used when the caller restarts. * * @param userId userId of caller diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/GovernanceEngineConfigurationClientBase.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/GovernanceEngineConfigurationClientBase.java index 3d38ba7aa56..32a4ef493df 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/GovernanceEngineConfigurationClientBase.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/GovernanceEngineConfigurationClientBase.java @@ -156,7 +156,7 @@ public String createGovernanceEngine(String userId, final String methodName = "createGovernanceEngine"; final String engineTypeParameterName = "governanceEngineType"; final String nameParameterName = "qualifiedName"; - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/governance-engine-configuration-service/users/{2}/governance-engines/{3}/new"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/governance-engine-configuration-service/users/{2}/governance-engines/{3}"; invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateName(governanceEngineType, engineTypeParameterName, methodName); @@ -432,7 +432,7 @@ public String createGovernanceService(String userId, final String serviceTypeParameterName = "governanceServiceType"; final String nameParameterName = "qualifiedName"; final String connectionParameterName = "connection"; - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/governance-engine-configuration-service/users/{2}/governance-services/new/{3}"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/governance-engine-configuration-service/users/{2}/governance-services/types/{3}"; invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateName(governanceServiceType, serviceTypeParameterName, methodName); diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenGovernanceClientBase.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenGovernanceClientBase.java index b8b188a0f8c..1d77535e5be 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenGovernanceClientBase.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenGovernanceClientBase.java @@ -246,7 +246,7 @@ public String initiateEngineAction(String userId, invalidParameterHandler.validateName(qualifiedName, qualifiedNameParameterName, methodName); invalidParameterHandler.validateName(governanceEngineName, engineNameParameterName, methodName); - EngineActionRequestBody requestBody = new EngineActionRequestBody(); + InitiateEngineActionRequestBody requestBody = new InitiateEngineActionRequestBody(); requestBody.setQualifiedName(qualifiedName); requestBody.setDomainIdentifier(domainIdentifier); @@ -255,7 +255,7 @@ public String initiateEngineAction(String userId, requestBody.setRequestSourceGUIDs(requestSourceGUIDs); requestBody.setActionTargets(actionTargets); requestBody.setReceivedGuards(receivedGuards); - requestBody.setStartTime(startTime); + requestBody.setStartDate(startTime); requestBody.setRequestType(requestType); requestBody.setRequestParameters(requestParameters); requestBody.setProcessName(processName); @@ -311,12 +311,12 @@ public String initiateGovernanceActionType(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateName(governanceActionTypeQualifiedName, qualifiedNameParameterName, methodName); - GovernanceActionTypeRequestBody requestBody = new GovernanceActionTypeRequestBody(); + InitiateGovernanceActionTypeRequestBody requestBody = new InitiateGovernanceActionTypeRequestBody(); requestBody.setGovernanceActionTypeQualifiedName(governanceActionTypeQualifiedName); requestBody.setRequestSourceGUIDs(requestSourceGUIDs); requestBody.setActionTargets(actionTargets); - requestBody.setStartTime(startTime); + requestBody.setStartDate(startTime); requestBody.setRequestParameters(requestParameters); requestBody.setOriginatorServiceName(originatorServiceName); requestBody.setOriginatorEngineName(originatorEngineName); @@ -368,12 +368,12 @@ public String initiateGovernanceActionProcess(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateName(processQualifiedName, qualifiedNameParameterName, methodName); - GovernanceActionProcessRequestBody requestBody = new GovernanceActionProcessRequestBody(); + InitiateGovernanceActionProcessRequestBody requestBody = new InitiateGovernanceActionProcessRequestBody(); requestBody.setProcessQualifiedName(processQualifiedName); requestBody.setRequestSourceGUIDs(requestSourceGUIDs); requestBody.setActionTargets(actionTargets); - requestBody.setStartTime(startTime); + requestBody.setStartDate(startTime); requestBody.setRequestParameters(requestParameters); requestBody.setOriginatorServiceName(originatorServiceName); requestBody.setOriginatorEngineName(originatorEngineName); @@ -425,6 +425,40 @@ public EngineActionElement getEngineAction(String userId, } + + /** + * Request that execution of an engine action is stopped. + * + * @param userId identifier of calling user + * @param engineActionGUID identifier of the engine action request. + * + * @throws InvalidParameterException one of the parameters is null or invalid. + * @throws UserNotAuthorizedException user not authorized to issue this request. + * @throws PropertyServerException there was a problem detected by the metadata store. + */ + @Override + public void cancelEngineAction(String userId, + String engineActionGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + final String methodName = "cancelEngineAction"; + final String guidParameterName = "engineActionGUID"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-governance-service/users/{2}/engine-actions/{3}/cancel"; + + invalidParameterHandler.validateUserId(userId, methodName); + invalidParameterHandler.validateGUID(engineActionGUID, guidParameterName, methodName); + + restClient.callVoidPostRESTCall(methodName, + urlTemplate, + nullRequestBody, + serverName, + serviceURLMarker, + userId, + engineActionGUID); + } + + /** * Retrieve the engine actions known to the server. * @@ -740,7 +774,7 @@ public String createGovernanceActionType(String userId, final String methodName = "createGovernanceActionType"; final String propertiesParameterName = "properties"; final String qualifiedNameParameterName = "properties.getQualifiedName"; - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-governance-service/users/{2}/governance-action-types/new"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-governance-service/users/{2}/governance-action-types"; invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateObject(properties, propertiesParameterName, methodName); @@ -992,7 +1026,7 @@ public String createGovernanceActionProcess(String us final String methodName = "createGovernanceActionProcess"; final String propertiesParameterName = "processProperties"; final String qualifiedNameParameterName = "processProperties.getQualifiedName"; - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-governance-service/users/{2}/governance-action-processes/new"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-governance-service/users/{2}/governance-action-processes"; invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateObject(processProperties, propertiesParameterName, methodName); @@ -1308,6 +1342,44 @@ public GovernanceActionProcessElement getGovernanceActionProcessByGUID(String us + /** + * Retrieve the governance action process metadata element with the supplied unique identifier + * along with its process flow implementation. This includes the process steps and the links + * between them + * + * @param userId calling user + * @param processGUID unique identifier of the requested metadata element + * + * @return requested metadata element + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + @Override + public GovernanceActionProcessGraph getGovernanceActionProcessGraph(String userId, + String processGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + final String methodName = "getGovernanceActionProcessGraph"; + final String guidParameterName = "processGUID"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-governance-service/users/{2}/governance-action-processes/{3}/graph"; + + invalidParameterHandler.validateUserId(userId, methodName); + invalidParameterHandler.validateGUID(processGUID, guidParameterName, methodName); + + GovernanceActionProcessGraphResponse restResult = restClient.callGovernanceActionProcessGraphGetRESTCall(methodName, + urlTemplate, + serverName, + serviceURLMarker, + userId, + processGUID); + + return restResult.getElement(); + } + + /* ===================================================================================================================== * A governance action process step describes a step in a governance action process @@ -1334,7 +1406,7 @@ public String createGovernanceActionProcessStep(String final String methodName = "createGovernanceActionProcessStep"; final String propertiesParameterName = "processStepProperties"; final String qualifiedNameParameterName = "processStepProperties.getQualifiedName"; - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-governance-service/users/{2}/governance-action-process-steps/new"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-governance-service/users/{2}/governance-action-process-steps"; invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateObject(processStepProperties, propertiesParameterName, methodName); @@ -1591,7 +1663,7 @@ public void setupFirstActionProcessStep(String userId, final String methodName = "setupFirstActionProcessStep"; final String processGUIDParameterName = "processGUID"; final String processStepGUIDParameterName = "processStepGUID"; - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-governance-service/users/{2}/governance-action-processes/{3}/first-action-process-step/{4}/new"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-governance-service/users/{2}/governance-action-processes/{3}/first-action-process-step/{4}"; invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(processGUID, processGUIDParameterName, methodName); @@ -1614,17 +1686,17 @@ public void setupFirstActionProcessStep(String userId, * @param userId calling user * @param processGUID unique identifier of the governance action process * - * @return properties of the governance action process step + * @return properties of the first governance action process step * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ @Override - public GovernanceActionProcessStepElement getFirstActionProcessStep(String userId, - String processGUID) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public FirstGovernanceActionProcessStepElement getFirstActionProcessStep(String userId, + String processGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { final String methodName = "getFirstActionProcessStep"; final String guidParameterName = "processGUID"; @@ -1633,12 +1705,12 @@ public GovernanceActionProcessStepElement getFirstActionProcessStep(String userI invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(processGUID, guidParameterName, methodName); - GovernanceActionProcessStepResponse restResult = restClient.callGovernanceActionProcessStepGetRESTCall(methodName, - urlTemplate, - serverName, - serviceURLMarker, - userId, - processGUID); + FirstGovernanceActionProcessStepResponse restResult = restClient.callFirstGovernanceActionProcessStepGetRESTCall(methodName, + urlTemplate, + serverName, + serviceURLMarker, + userId, + processGUID); return restResult.getElement(); } @@ -1708,7 +1780,7 @@ public String setupNextActionProcessStep(String userId, final String methodName = "setupNextActionProcessStep"; final String currentGUIDParameterName = "currentActionProcessStepGUID"; final String nextGUIDParameterName = "nextActionProcessStepGUID"; - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-governance-service/users/{2}/governance-action-process-steps/{3}/next-process-steps/{4}/new"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-governance-service/users/{2}/governance-action-process-steps/{3}/next-process-steps/{4}"; invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(currentActionProcessStepGUID, currentGUIDParameterName, methodName); diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenMetadataClientBase.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenMetadataClientBase.java index 3218138f340..5d57b8fd7aa 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenMetadataClientBase.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenMetadataClientBase.java @@ -1302,7 +1302,7 @@ public String createMetadataElementInStore(String userId { final String methodName = "createMetadataElementInStore"; final String elementTypeParameterName = "metadataElementTypeName"; - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-metadata-store/users/{2}/metadata-elements/new"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-metadata-store/users/{2}/metadata-elements"; invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateName(metadataElementTypeName, elementTypeParameterName, methodName); @@ -1360,7 +1360,7 @@ public String createMetadataElementInStore(String userId * connection etc) * @param templateProperties properties of the new metadata element. These override the template values * @param placeholderProperties property name-to-property value map to replace any placeholder values in the - * template element - and their anchored elements, which are also copied as part of this operaiton. + * template element - and their anchored elements, which are also copied as part of this operation. * @param parentGUID unique identifier of optional parent entity * @param parentRelationshipTypeName type of relationship to connect the new element to the parent * @param parentRelationshipProperties properties to include in parent relationship @@ -1428,7 +1428,7 @@ public String createMetadataElementFromTemplate(String u * connection etc) * @param templateProperties properties of the new metadata element. These override the template values * @param placeholderProperties property name-to-property value map to replace any placeholder values in the - * template element - and their anchored elements, which are also copied as part of this operaiton. + * template element - and their anchored elements, which are also copied as part of this operation. * @param parentGUID unique identifier of optional parent entity * @param parentRelationshipTypeName type of relationship to connect the new element to the parent * @param parentRelationshipProperties properties to include in parent relationship @@ -2048,7 +2048,7 @@ public void classifyMetadataElementInStore(String userId, final String methodName = "classifyMetadataElementInStore"; final String guidParameterName = "metadataElementGUID"; final String classificationParameterName = "classificationName"; - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-metadata-store/users/{2}/metadata-elements/{3}/classifications/{4}/new"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-metadata-store/users/{2}/metadata-elements/{3}/classifications/{4}"; invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateGUID(metadataElementGUID, guidParameterName, methodName); @@ -2472,7 +2472,7 @@ public String createRelatedElementsInStore(String userId, final String elementTypeParameterName = "relationshipTypeName"; final String end1ParameterName = "metadataElement1GUID"; final String end2ParameterName = "metadataElement2GUID"; - final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-metadata-store/users/{2}/related-elements/new"; + final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-metadata-store/users/{2}/related-elements"; invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateName(relationshipTypeName, elementTypeParameterName, methodName); @@ -2816,12 +2816,12 @@ public String initiateGovernanceActionProcess(String userId, invalidParameterHandler.validateUserId(userId, methodName); invalidParameterHandler.validateName(processQualifiedName, qualifiedNameParameterName, methodName); - GovernanceActionProcessRequestBody requestBody = new GovernanceActionProcessRequestBody(); + InitiateGovernanceActionProcessRequestBody requestBody = new InitiateGovernanceActionProcessRequestBody(); requestBody.setProcessQualifiedName(processQualifiedName); requestBody.setRequestSourceGUIDs(requestSourceGUIDs); requestBody.setActionTargets(actionTargets); - requestBody.setStartTime(startTime); + requestBody.setStartDate(startTime); requestBody.setRequestParameters(requestParameters); requestBody.setOriginatorServiceName(originatorServiceName); requestBody.setOriginatorEngineName(originatorEngineName); diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/rest/GAFRESTClient.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/rest/GAFRESTClient.java index fe4eb2d7199..8046ae87076 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/rest/GAFRESTClient.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/rest/GAFRESTClient.java @@ -940,6 +940,32 @@ public GovernanceActionProcessStepResponse callGovernanceActionProcessStepGetRES } + /** + * Issue a GET REST call that returns a GovernanceProcessStepResponseElementsResponse object. + * + * @param methodName name of the method being called. + * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. + * @param params a list of parameters that are slotted into the url template. + * + * @return response object + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public FirstGovernanceActionProcessStepResponse callFirstGovernanceActionProcessStepGetRESTCall(String methodName, + String urlTemplate, + Object... params) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + FirstGovernanceActionProcessStepResponse restResult = this.callGetRESTCall(methodName, FirstGovernanceActionProcessStepResponse.class, urlTemplate, params); + + exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); + + return restResult; + } + + /** * Issue a POST REST call that returns a GovernanceActionProcessStepsResponse object. * @@ -1029,7 +1055,7 @@ public GovernanceActionProcessElementResponse callGovernanceActionProcessGetREST /** - * Issue a GET REST call that returns a GovernanceActionProcessElementsResponse object. + * Issue a GET REST call that returns a GovernanceActionProcessGraphResponse object. * * @param methodName name of the method being called. * @param urlTemplate template of the URL for the REST API with place-holders for the parameters. @@ -1040,13 +1066,13 @@ public GovernanceActionProcessElementResponse callGovernanceActionProcessGetREST * @throws UserNotAuthorizedException the user is not authorized to make this request. * @throws PropertyServerException the repository is not available or not working properly. */ - public GovernanceActionProcessElementsResponse callGovernanceActionProcessesGetRESTCall(String methodName, + public GovernanceActionProcessGraphResponse callGovernanceActionProcessGraphGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - GovernanceActionProcessElementsResponse restResult = this.callGetRESTCall(methodName, GovernanceActionProcessElementsResponse.class, urlTemplate, params); + GovernanceActionProcessGraphResponse restResult = this.callGetRESTCall(methodName, GovernanceActionProcessGraphResponse.class, urlTemplate, params); exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult); diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/EngineActionConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/EngineActionConverter.java index 6ed41e26e32..e109ca4b7c8 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/EngineActionConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/EngineActionConverter.java @@ -146,8 +146,9 @@ else if (repositoryHelper.isTypeOf(serviceName, actualTypeName, OpenMetadataType { ActionTargetElement actionTargetElement = new ActionTargetElement(); + actionTargetElement.setActionTargetRelationshipGUID(relationship.getGUID()); actionTargetElement.setActionTargetName(this.removeActionTargetName(instanceProperties)); - actionTargetElement.setStatus(this.removeActionStatus(OpenMetadataType.STATUS_PROPERTY_NAME, instanceProperties)); + actionTargetElement.setStatus(this.removeActionStatus(OpenMetadataType.ACTION_STATUS_PROPERTY_NAME, instanceProperties)); actionTargetElement.setStartDate(this.removeStartDate(instanceProperties)); actionTargetElement.setCompletionDate(this.removeCompletionDate(instanceProperties)); actionTargetElement.setCompletionMessage(this.removeCompletionMessage(instanceProperties)); diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceActionProcessConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceActionProcessConverter.java index 9756877b51a..0407ba6618a 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceActionProcessConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceActionProcessConverter.java @@ -72,8 +72,12 @@ public B getNewBean(Class beanClass, processProperties.setQualifiedName(this.removeQualifiedName(instanceProperties)); processProperties.setAdditionalProperties(this.removeAdditionalProperties(instanceProperties)); + processProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); processProperties.setDisplayName(this.removeName(instanceProperties)); processProperties.setDescription(this.removeDescription(instanceProperties)); + processProperties.setVersionIdentifier(this.removeVersionIdentifier(instanceProperties)); + processProperties.setFormula(this.removeFormula(instanceProperties)); + processProperties.setFormulaType(this.removeFormulaType(instanceProperties)); bean.setProcessProperties(processProperties); } diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceActionProcessStepConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceActionProcessStepConverter.java index 8203c3967ff..b6f007abc4e 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceActionProcessStepConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceActionProcessStepConverter.java @@ -97,7 +97,7 @@ public B getNewBean(Class beanClass, actionTypeProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); actionTypeProperties.setDisplayName(this.removeDisplayName(instanceProperties)); actionTypeProperties.setDescription(this.removeDescription(instanceProperties)); - actionTypeProperties.setSupportedGuards(this.removeProducedGuards(instanceProperties)); + actionTypeProperties.setProducedGuards(this.removeProducedGuards(instanceProperties)); actionTypeProperties.setIgnoreMultipleTriggers(this.removeIgnoreMultipleTriggers(instanceProperties)); actionTypeProperties.setWaitTime(this.removeWaitTime(instanceProperties)); } diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceActionTypeConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceActionTypeConverter.java index 68fba168d85..2893428238b 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceActionTypeConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/GovernanceActionTypeConverter.java @@ -98,7 +98,7 @@ public B getNewBean(Class beanClass, actionTypeProperties.setDomainIdentifier(this.removeDomainIdentifier(instanceProperties)); actionTypeProperties.setDisplayName(this.removeDisplayName(instanceProperties)); actionTypeProperties.setDescription(this.removeDescription(instanceProperties)); - actionTypeProperties.setSupportedGuards(this.removeProducedGuards(instanceProperties)); + actionTypeProperties.setProducedGuards(this.removeProducedGuards(instanceProperties)); actionTypeProperties.setWaitTime(this.removeWaitTime(instanceProperties)); } else diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/OpenMetadataStoreConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/OpenMetadataStoreConverter.java index 24cf4cc1893..5e007847eef 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/OpenMetadataStoreConverter.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/OpenMetadataStoreConverter.java @@ -144,7 +144,7 @@ protected EngineActionStatus removeActionStatus(String propertyNam private EngineActionStatus getActionStatus(String propertyName, InstanceProperties properties) { - EngineActionStatus governanceActionStatus = EngineActionStatus.OTHER; + EngineActionStatus engineActionStatus = EngineActionStatus.OTHER; if (properties != null) { @@ -154,53 +154,27 @@ private EngineActionStatus getActionStatus(String propertyName, { InstancePropertyValue instancePropertyValue = instancePropertiesMap.get(propertyName); - if (instancePropertyValue instanceof EnumPropertyValue) + if (instancePropertyValue instanceof EnumPropertyValue enumPropertyValue) { - EnumPropertyValue enumPropertyValue = (EnumPropertyValue) instancePropertyValue; - - switch (enumPropertyValue.getOrdinal()) + engineActionStatus = switch (enumPropertyValue.getOrdinal()) { - case 0: - governanceActionStatus = EngineActionStatus.REQUESTED; - break; - - case 1: - governanceActionStatus = EngineActionStatus.APPROVED; - break; - - case 2: - governanceActionStatus = EngineActionStatus.WAITING; - break; - - case 3: - governanceActionStatus = EngineActionStatus.ACTIVATING; - break; - - case 4: - governanceActionStatus = EngineActionStatus.IN_PROGRESS; - break; - - case 10: - governanceActionStatus = EngineActionStatus.ACTIONED; - break; - - case 11: - governanceActionStatus = EngineActionStatus.INVALID; - break; - - case 12: - governanceActionStatus = EngineActionStatus.IGNORED; - break; - - case 13: - governanceActionStatus = EngineActionStatus.FAILED; - break; - } + case 0 -> EngineActionStatus.REQUESTED; + case 1 -> EngineActionStatus.APPROVED; + case 2 -> EngineActionStatus.WAITING; + case 3 -> EngineActionStatus.ACTIVATING; + case 4 -> EngineActionStatus.IN_PROGRESS; + case 10 -> EngineActionStatus.ACTIONED; + case 11 -> EngineActionStatus.INVALID; + case 12 -> EngineActionStatus.IGNORED; + case 13 -> EngineActionStatus.FAILED; + case 14 -> EngineActionStatus.CANCELLED; + default -> engineActionStatus; + }; } } } - return governanceActionStatus; + return engineActionStatus; } diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/GAFMetadataManagementInstanceHandler.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/GAFMetadataManagementInstanceHandler.java index c0cbea11e74..476f65e2a34 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/GAFMetadataManagementInstanceHandler.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/GAFMetadataManagementInstanceHandler.java @@ -113,7 +113,6 @@ GovernanceActionProcessStepHandler getGovern } - /** * Retrieve the specific handler for the access service. * @@ -142,7 +141,6 @@ GovernanceActionTypeHandler getGovernanceActionType } - /** * Retrieve the specific handler for the access service. * @@ -170,6 +168,7 @@ EngineActionHandler getEngineActionHandler(String userId, return null; } + /** * Retrieve the specific handler for the access service. * diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenGovernanceRESTServices.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenGovernanceRESTServices.java index b53d687feef..33f1a6d2bd4 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenGovernanceRESTServices.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenGovernanceRESTServices.java @@ -12,7 +12,11 @@ import org.odpi.openmetadata.commonservices.generichandlers.EngineActionHandler; import org.odpi.openmetadata.commonservices.generichandlers.GovernanceActionProcessStepHandler; import org.odpi.openmetadata.commonservices.generichandlers.GovernanceActionTypeHandler; +import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; +import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; +import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; +import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataProperty; import org.odpi.openmetadata.frameworks.governanceaction.mapper.OpenMetadataType; import org.odpi.openmetadata.frameworks.governanceaction.properties.*; @@ -53,8 +57,6 @@ public OpenGovernanceRESTServices() } - - /* ===================================================================================================================== * A governance action type describes a template to call a single engine action. */ @@ -99,7 +101,7 @@ public GUIDResponse createGovernanceActionType(String se requestBody.getDomainIdentifier(), requestBody.getDisplayName(), requestBody.getDescription(), - requestBody.getSupportedGuards(), + requestBody.getProducedGuards(), requestBody.getAdditionalProperties(), requestBody.getGovernanceEngineGUID(), requestBody.getRequestType(), @@ -176,7 +178,7 @@ public VoidResponse updateGovernanceActionType(String properties.getDomainIdentifier(), properties.getDisplayName(), properties.getDescription(), - properties.getSupportedGuards(), + properties.getProducedGuards(), properties.getAdditionalProperties(), properties.getGovernanceEngineGUID(), properties.getRequestType(), @@ -491,7 +493,8 @@ public GUIDResponse createGovernanceActionProcess(String Map extendedProperties = new HashMap<>(); extendedProperties.put(OpenMetadataProperty.FORMULA.name, processProperties.getFormula()); - extendedProperties.put(OpenMetadataType.IMPLEMENTATION_LANGUAGE_PROPERTY_NAME, processProperties.getImplementationLanguage()); + extendedProperties.put(OpenMetadataProperty.FORMULA_TYPE.name, processProperties.getFormulaType()); + extendedProperties.put(OpenMetadataType.DOMAIN_IDENTIFIER_PROPERTY_NAME, processProperties.getDomainIdentifier()); Date effectiveTime = new Date(); @@ -499,9 +502,9 @@ public GUIDResponse createGovernanceActionProcess(String null, null, processProperties.getQualifiedName(), - processProperties.getTechnicalName(), + processProperties.getDisplayName(), processProperties.getVersionIdentifier(), - processProperties.getTechnicalDescription(), + processProperties.getDescription(), processProperties.getAdditionalProperties(), OpenMetadataType.GOVERNANCE_ACTION_PROCESS_TYPE_NAME, extendedProperties, @@ -510,27 +513,6 @@ public GUIDResponse createGovernanceActionProcess(String null, effectiveTime, methodName)); - - final String guidParameter = "processGUID"; - - if (response.getGUID() != null) - { - handler.maintainSupplementaryProperties(userId, - response.getGUID(), - guidParameter, - OpenMetadataType.GOVERNANCE_ACTION_PROCESS_TYPE_NAME, - processProperties.getQualifiedName(), - processProperties.getDisplayName(), - processProperties.getSummary(), - processProperties.getDescription(), - processProperties.getAbbreviation(), - processProperties.getUsage(), - false, - false, - false, - effectiveTime, - methodName); - } } else { @@ -611,7 +593,8 @@ public VoidResponse updateGovernanceActionProcess(String Map extendedProperties = new HashMap<>(); extendedProperties.put(OpenMetadataProperty.FORMULA.name, processProperties.getFormula()); - extendedProperties.put(OpenMetadataType.IMPLEMENTATION_LANGUAGE_PROPERTY_NAME, processProperties.getImplementationLanguage()); + extendedProperties.put(OpenMetadataProperty.FORMULA_TYPE.name, processProperties.getFormulaType()); + extendedProperties.put(OpenMetadataType.DOMAIN_IDENTIFIER_PROPERTY_NAME, processProperties.getDomainIdentifier()); Date effectiveTime = new Date(); @@ -622,8 +605,8 @@ public VoidResponse updateGovernanceActionProcess(String processGUIDParameterName, processProperties.getQualifiedName(), processProperties.getVersionIdentifier(), - processProperties.getTechnicalName(), - processProperties.getTechnicalDescription(), + processProperties.getDisplayName(), + processProperties.getDescription(), processProperties.getAdditionalProperties(), OpenMetadataType.GOVERNANCE_ACTION_PROCESS_TYPE_GUID, OpenMetadataType.GOVERNANCE_ACTION_PROCESS_TYPE_NAME, @@ -654,22 +637,6 @@ public VoidResponse updateGovernanceActionProcess(String effectiveTime, methodName); } - - handler.maintainSupplementaryProperties(userId, - processGUID, - processGUIDParameterName, - OpenMetadataType.GOVERNANCE_ACTION_PROCESS_TYPE_NAME, - processProperties.getQualifiedName(), - processProperties.getDisplayName(), - processProperties.getSummary(), - processProperties.getDescription(), - processProperties.getAbbreviation(), - processProperties.getUsage(), - requestBody.getMergeUpdate(), - false, - false, - effectiveTime, - methodName); } else { @@ -1047,6 +1014,189 @@ public GovernanceActionProcessElementResponse getGovernanceActionProcessByGUID(S + /** + * Retrieve the governance action process metadata element with the supplied unique identifier + * along with the flow definition describing its implementation. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the requested metadata element + * + * @return requested metadata element or + * InvalidParameterException one of the parameters is invalid + * UserNotAuthorizedException the user is not authorized to issue this request + * PropertyServerException there is a problem reported in the open metadata server(s) + */ + public GovernanceActionProcessGraphResponse getGovernanceActionProcessGraph(String serverName, + String serviceURLMarker, + String userId, + String processGUID) + { + final String methodName = "getGovernanceActionProcessGraph"; + final String processGUIDParameterName = "processGUID"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + GovernanceActionProcessGraphResponse response = new GovernanceActionProcessGraphResponse(); + AuditLog auditLog = null; + + try + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + AssetHandler processHandler = instanceHandler.getGovernanceActionProcessHandler(userId, serverName, methodName); + GovernanceActionProcessStepHandler + handler = instanceHandler.getGovernanceActionProcessStepHandler(userId, + serverName, + methodName); + + GovernanceActionProcessGraph governanceActionProcessGraph = new GovernanceActionProcessGraph(); + + governanceActionProcessGraph.setGovernanceActionProcess(processHandler.getBeanFromRepository(userId, + processGUID, + processGUIDParameterName, + OpenMetadataType.GOVERNANCE_ACTION_PROCESS_TYPE_NAME, + false, + false, + instanceHandler.getSupportedZones(userId, serverName, serviceURLMarker, methodName), + new Date(), + methodName)); + + + governanceActionProcessGraph.setFirstProcessStep(this.getFirstProcessStepElement(serverName, + serviceURLMarker, + userId, + processGUID, + methodName)); + + if (governanceActionProcessGraph.getFirstProcessStep() != null) + { + getNextProcessSteps(userId, + handler, + governanceActionProcessGraph.getFirstProcessStep().getElement().getElementHeader().getGUID(), + governanceActionProcessGraph, + new ArrayList<>(), + instanceHandler.getSupportedZones(userId, serverName, serviceURLMarker, methodName), + invalidParameterHandler.getMaxPagingSize()); + } + + response.setElement(governanceActionProcessGraph); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + + + private void getNextProcessSteps(String userId, + GovernanceActionProcessStepHandler handler, + String processStepGUID, + GovernanceActionProcessGraph governanceActionProcessGraph, + List processedGUIDs, + List supportedZones, + int pageSize) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + final String methodName = "getNextProcessSteps"; + + RepositoryHandler repositoryHandler = handler.getRepositoryHandler(); + + int startFrom = 0; + List nextProcessStepRelationships = repositoryHandler.getRelationshipsByType(userId, + processStepGUID, + OpenMetadataType.GOVERNANCE_ACTION_PROCESS_STEP_TYPE_NAME, + OpenMetadataType.NEXT_GOVERNANCE_ACTION_PROCESS_STEP_TYPE_GUID, + OpenMetadataType.NEXT_GOVERNANCE_ACTION_PROCESS_STEP_TYPE_NAME, + 2, + false, + false, + startFrom, + pageSize, + null, + methodName); + + while (nextProcessStepRelationships != null) + { + for (Relationship relationship : nextProcessStepRelationships) + { + NextGovernanceActionProcessStepLink processStepLink = new NextGovernanceActionProcessStepLink(); + + processStepLink.setPreviousProcessStep(handler.getElementStub(relationship.getEntityOneProxy())); + processStepLink.setNextProcessStep(handler.getElementStub(relationship.getEntityTwoProxy())); + processStepLink.setNextProcessStepLinkGUID(relationship.getGUID()); + processStepLink.setGuard(handler.getRepositoryHelper().getStringProperty(handler.getServiceName(), + OpenMetadataType.GUARD_PROPERTY_NAME, + relationship.getProperties(), + methodName)); + processStepLink.setMandatoryGuard(handler.getRepositoryHelper().getBooleanProperty(handler.getServiceName(), + OpenMetadataType.MANDATORY_GUARD_PROPERTY_NAME, + relationship.getProperties(), + methodName)); + + List processStepLinks = governanceActionProcessGraph.getProcessStepLinks(); + + if (processStepLinks == null) + { + processStepLinks = new ArrayList<>(); + } + + processStepLinks.add(processStepLink); + governanceActionProcessGraph.setProcessStepLinks(processStepLinks); + + if (! processedGUIDs.contains(relationship.getEntityTwoProxy().getGUID())) + { + processedGUIDs.add(relationship.getEntityTwoProxy().getGUID()); + + getNextProcessSteps(userId, + handler, + relationship.getEntityTwoProxy().getGUID(), + governanceActionProcessGraph, + processedGUIDs, + supportedZones, + pageSize); + } + else + { + GovernanceActionProcessStepElement processStepElement = handler.getGovernanceActionProcessStepByGUID(userId, + relationship.getEntityTwoProxy().getGUID(), + supportedZones, + null, + methodName); + + List processStepElements = governanceActionProcessGraph.getNextProcessSteps(); + + if (processStepElements == null) + { + processStepElements = new ArrayList<>(); + } + + processStepElements.add(processStepElement); + + governanceActionProcessGraph.setNextProcessSteps(processStepElements); + } + } + + startFrom = startFrom + pageSize; + nextProcessStepRelationships = repositoryHandler.getRelationshipsByType(userId, + processStepGUID, + OpenMetadataType.GOVERNANCE_ACTION_PROCESS_STEP_TYPE_NAME, + OpenMetadataType.NEXT_GOVERNANCE_ACTION_PROCESS_STEP_TYPE_GUID, + OpenMetadataType.NEXT_GOVERNANCE_ACTION_PROCESS_STEP_TYPE_NAME, + 2, + false, + false, + startFrom, + pageSize, + null, + methodName); + } + } + + /* ===================================================================================================================== * A governance action process step describes a step in a governance action process */ @@ -1091,7 +1241,7 @@ public GUIDResponse createGovernanceActionProcessStep(String requestBody.getDomainIdentifier(), requestBody.getDisplayName(), requestBody.getDescription(), - requestBody.getSupportedGuards(), + requestBody.getProducedGuards(), requestBody.getAdditionalProperties(), requestBody.getGovernanceEngineGUID(), requestBody.getRequestType(), @@ -1169,7 +1319,7 @@ public VoidResponse updateGovernanceActionProcessStep(String properties.getDomainIdentifier(), properties.getDisplayName(), properties.getDescription(), - properties.getSupportedGuards(), + properties.getProducedGuards(), properties.getAdditionalProperties(), properties.getGovernanceEngineGUID(), properties.getRequestType(), @@ -1458,7 +1608,6 @@ public GovernanceActionProcessStepResponse getGovernanceActionProcessStepByGUID( * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - @SuppressWarnings(value = "unused") public VoidResponse setupFirstProcessStep(String serverName, String serviceURLMarker, String userId, @@ -1476,9 +1625,7 @@ public VoidResponse setupFirstProcessStep(String serverName, try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - GovernanceActionProcessStepHandler handler = instanceHandler.getGovernanceActionProcessStepHandler(userId, - serverName, - methodName); + GovernanceActionProcessStepHandler handler = instanceHandler.getGovernanceActionProcessStepHandler(userId, serverName, methodName); handler.setupFirstProcessStep(userId, processGUID, @@ -1515,31 +1662,27 @@ public VoidResponse setupFirstProcessStep(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceActionProcessStepResponse getFirstProcessStep(String serverName, - String serviceURLMarker, - String userId, - String processGUID) + public FirstGovernanceActionProcessStepResponse getFirstProcessStep(String serverName, + String serviceURLMarker, + String userId, + String processGUID) { final String methodName = "getFirstActionProcessStep"; RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); - GovernanceActionProcessStepResponse response = new GovernanceActionProcessStepResponse(); - AuditLog auditLog = null; + FirstGovernanceActionProcessStepResponse response = new FirstGovernanceActionProcessStepResponse(); + AuditLog auditLog = null; try { auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); - GovernanceActionProcessStepHandler handler = instanceHandler.getGovernanceActionProcessStepHandler(userId, - serverName, - methodName); - response.setElement(handler.getFirstProcessStep(userId, - processGUID, - null, - instanceHandler.getSupportedZones(userId, serverName, serviceURLMarker, methodName), - null, - methodName)); + response.setElement(this.getFirstProcessStepElement(serverName, + serviceURLMarker, + userId, + processGUID, + methodName)); } catch (Exception error) { @@ -1551,6 +1694,70 @@ public GovernanceActionProcessStepResponse getFirstProcessStep(String serverName } + /** + * Return the first process step element of a governance action process. + * + * @param serverName name of the service to route the request to + * @param serviceURLMarker the identifier of the access service (for example asset-owner for the Asset Owner OMAS) + * @param userId calling user + * @param processGUID unique identifier of the governance action process + * @param methodName calling method + * @return first process step element + * @throws InvalidParameterException one of the parameters is invalid + * @throws PropertyServerException the user is not authorized to issue this request + * @throws UserNotAuthorizedException there is a problem reported in the open metadata server(s) + */ + private FirstGovernanceActionProcessStepElement getFirstProcessStepElement(String serverName, + String serviceURLMarker, + String userId, + String processGUID, + String methodName) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + GovernanceActionProcessStepHandler handler = instanceHandler.getGovernanceActionProcessStepHandler(userId, serverName, methodName); + + final String processGUIDParameterName = "processGUID"; + + Relationship firstActionProcessStepLink = handler.getUniqueAttachmentLink(userId, + processGUID, + processGUIDParameterName, + OpenMetadataType.GOVERNANCE_ACTION_PROCESS_TYPE_NAME, + OpenMetadataType.GOVERNANCE_ACTION_PROCESS_FLOW_TYPE_GUID, + OpenMetadataType.GOVERNANCE_ACTION_PROCESS_FLOW_TYPE_NAME, + null, + OpenMetadataType.GOVERNANCE_ACTION_PROCESS_STEP_TYPE_NAME, + 0, + false, + false, + instanceHandler.getSupportedZones(userId, serverName, serviceURLMarker, methodName), + null, + methodName); + + if ((firstActionProcessStepLink != null) && (firstActionProcessStepLink.getEntityTwoProxy() != null)) + { + FirstGovernanceActionProcessStepElement firstProcessStep = new FirstGovernanceActionProcessStepElement(); + + firstProcessStep.setLinkGUID(firstActionProcessStepLink.getGUID()); + firstProcessStep.setGuard(handler.getRepositoryHelper().getStringProperty(instanceHandler.getServiceName(serviceURLMarker), + OpenMetadataType.GUARD_PROPERTY_NAME, + firstActionProcessStepLink.getProperties(), + methodName)); + + firstProcessStep.setElement(handler.getGovernanceActionProcessStepByGUID(userId, + firstActionProcessStepLink.getEntityTwoProxy().getGUID(), + instanceHandler.getSupportedZones(userId, serverName, serviceURLMarker, methodName), + null, + methodName)); + + return firstProcessStep; + } + + return null; + } + + + /** * Remove the link between a governance process and that governance action process step that defines its first step. * @@ -2261,6 +2468,56 @@ public VoidResponse claimEngineAction(String serverName, } + /** + * Request that execution of an engine action is stopped. + * + * @param serverName name of server instance to route request to + * @param serviceURLMarker the identifier of the access service (for example asset-owner for the Asset Owner OMAS) + * @param userId identifier of calling user + * @param engineActionGUID identifier of the engine action request + * @param requestBody null request body + * + * @return void or + * InvalidParameterException one of the parameters is null or invalid. + * UserNotAuthorizedException user not authorized to issue this request. + * PropertyServerException there was a problem detected by the metadata store. + */ + @SuppressWarnings(value = "unused") + public VoidResponse cancelEngineAction(String serverName, + String serviceURLMarker, + String userId, + String engineActionGUID, + NullRequestBody requestBody) + { + final String methodName = "cancelEngineAction"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName); + + AuditLog auditLog = null; + VoidResponse response = new VoidResponse(); + + try + { + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + + EngineActionHandler handler = instanceHandler.getEngineActionHandler(userId, serverName, methodName); + + handler.cancelEngineAction(userId, + engineActionGUID, + instanceHandler.getSupportedZones(userId, serverName, serviceURLMarker, methodName), + new Date(), + methodName); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + /** * Update the status of the engine action - providing the caller is permitted. @@ -2624,7 +2881,7 @@ public GUIDResponse initiateEngineAction(String serverName, String serviceURLMarker, String userId, String governanceEngineName, - EngineActionRequestBody requestBody) + InitiateEngineActionRequestBody requestBody) { final String methodName = "initiateGovernanceAction"; @@ -2641,6 +2898,13 @@ public GUIDResponse initiateEngineAction(String serverName, { EngineActionHandler handler = instanceHandler.getEngineActionHandler(userId, serverName, methodName); + Date startTime = requestBody.getStartDate(); + + if (startTime == null) + { + startTime = new Date(); + } + String engineActionGUID = handler.createEngineAction(userId, requestBody.getQualifiedName(), requestBody.getDomainIdentifier(), @@ -2650,7 +2914,7 @@ public GUIDResponse initiateEngineAction(String serverName, requestBody.getActionTargets(), null, requestBody.getReceivedGuards(), - requestBody.getStartTime(), + startTime, governanceEngineName, requestBody.getRequestType(), requestBody.getRequestParameters(), @@ -2677,7 +2941,7 @@ public GUIDResponse initiateEngineAction(String serverName, requestBody.getQualifiedName(), null, requestBody.getReceivedGuards(), - requestBody.getStartTime(), + requestBody.getStartDate(), governanceEngineName, requestBody.getRequestType(), requestBody.getRequestParameters(), @@ -2720,7 +2984,7 @@ public GUIDResponse initiateEngineAction(String serverName, public GUIDResponse initiateGovernanceActionType(String serverName, String serviceURLMarker, String userId, - GovernanceActionTypeRequestBody requestBody) + InitiateGovernanceActionTypeRequestBody requestBody) { final String methodName = "initiateGovernanceActionType"; @@ -2742,7 +3006,7 @@ public GUIDResponse initiateGovernanceActionType(String requestBody.getRequestSourceGUIDs(), requestBody.getActionTargets(), requestBody.getRequestParameters(), - requestBody.getStartTime(), + requestBody.getStartDate(), requestBody.getOriginatorServiceName(), requestBody.getOriginatorEngineName(), instanceHandler.getSupportedZones(userId, serverName, serviceURLMarker, methodName), @@ -2779,7 +3043,7 @@ public GUIDResponse initiateGovernanceActionType(String public GUIDResponse initiateGovernanceActionProcess(String serverName, String serviceURLMarker, String userId, - GovernanceActionProcessRequestBody requestBody) + InitiateGovernanceActionProcessRequestBody requestBody) { final String methodName = "initiateGovernanceActionProcess"; @@ -2801,7 +3065,7 @@ public GUIDResponse initiateGovernanceActionProcess(String requestBody.getRequestSourceGUIDs(), requestBody.getActionTargets(), requestBody.getRequestParameters(), - requestBody.getStartTime(), + requestBody.getStartDate(), requestBody.getOriginatorServiceName(), requestBody.getOriginatorEngineName(), instanceHandler.getSupportedZones(userId, serverName, serviceURLMarker, methodName), diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/GovernanceEngineConfigurationResource.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/GovernanceEngineConfigurationResource.java index 57211fc056e..1bf7fa7679d 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/GovernanceEngineConfigurationResource.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/GovernanceEngineConfigurationResource.java @@ -44,7 +44,7 @@ public class GovernanceEngineConfigurationResource * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem storing the governance engine definition. */ - @PostMapping(path = "/governance-engines/{typeName}/new") + @PostMapping(path = "/governance-engines/{typeName}") @Operation(summary="createGovernanceEngine", description="Create a new governance engine definition.", @@ -238,7 +238,7 @@ public VoidResponse deleteGovernanceEngine(@PathVariable String se * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem storing the governance engine definition. */ - @PostMapping(path = "/governance-services/new/{typeName}") + @PostMapping(path = "/governance-services/types/{typeName}") @Operation(summary="createGovernanceService", description="Create a governance service definition. The same governance service can be associated with multiple" + diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenGovernanceResource.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenGovernanceResource.java index bfa1233e203..276abd8ff11 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenGovernanceResource.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenGovernanceResource.java @@ -12,26 +12,7 @@ import org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse; import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessStepProperties; import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionTypeProperties; -import org.odpi.openmetadata.frameworkservices.gaf.rest.ConsolidatedDuplicatesRequestBody; -import org.odpi.openmetadata.frameworkservices.gaf.rest.EngineActionElementResponse; -import org.odpi.openmetadata.frameworkservices.gaf.rest.EngineActionElementsResponse; -import org.odpi.openmetadata.frameworkservices.gaf.rest.EngineActionRequestBody; -import org.odpi.openmetadata.frameworkservices.gaf.rest.GovernanceActionProcessElementResponse; -import org.odpi.openmetadata.frameworkservices.gaf.rest.GovernanceActionProcessElementsResponse; -import org.odpi.openmetadata.frameworkservices.gaf.rest.GovernanceActionProcessRequestBody; -import org.odpi.openmetadata.frameworkservices.gaf.rest.GovernanceActionTypeRequestBody; -import org.odpi.openmetadata.frameworkservices.gaf.rest.GovernanceActionProcessStepResponse; -import org.odpi.openmetadata.frameworkservices.gaf.rest.GovernanceActionProcessStepsResponse; -import org.odpi.openmetadata.frameworkservices.gaf.rest.GovernanceActionTypeResponse; -import org.odpi.openmetadata.frameworkservices.gaf.rest.GovernanceActionTypesResponse; -import org.odpi.openmetadata.frameworkservices.gaf.rest.GovernanceActionRequestBody; -import org.odpi.openmetadata.frameworkservices.gaf.rest.NewGovernanceActionProcessRequestBody; -import org.odpi.openmetadata.frameworkservices.gaf.rest.NextGovernanceActionProcessStepRequestBody; -import org.odpi.openmetadata.frameworkservices.gaf.rest.NextGovernanceActionProcessStepsResponse; -import org.odpi.openmetadata.frameworkservices.gaf.rest.PeerDuplicatesRequestBody; -import org.odpi.openmetadata.frameworkservices.gaf.rest.UpdateGovernanceActionProcessRequestBody; -import org.odpi.openmetadata.frameworkservices.gaf.rest.UpdateGovernanceActionTypeRequestBody; -import org.odpi.openmetadata.frameworkservices.gaf.rest.UpdateGovernanceActionProcessStepRequestBody; +import org.odpi.openmetadata.frameworkservices.gaf.rest.*; import org.odpi.openmetadata.frameworkservices.gaf.server.OpenGovernanceRESTServices; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -75,7 +56,7 @@ public class OpenGovernanceResource * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - @PostMapping(path = "/governance-action-types/new") + @PostMapping(path = "/governance-action-types") @Operation(summary="createGovernanceActionType", description="Create a new metadata element to represent a governance action type.", externalDocs=@ExternalDocumentation(description="Further Information", @@ -262,7 +243,7 @@ public GovernanceActionTypeResponse getGovernanceActionTypeByGUID(@PathVariable * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - @PostMapping(path = "/governance-action-processes/new") + @PostMapping(path = "/governance-action-processes") @Operation(summary="createGovernanceActionProcess", description="Create a new metadata element to represent a governance action process.", externalDocs=@ExternalDocumentation(description="Further Information", @@ -496,6 +477,37 @@ public GovernanceActionProcessElementResponse getGovernanceActionProcessByGUID(@ } + /** + * Retrieve the governance action process metadata element with the supplied unique identifier + * along with the flow definition describing its implementation. + * + * @param serverName name of the service to route the request to + * @param serviceURLMarker the identifier of the access service (for example asset-owner for the Asset Owner OMAS) + * @param userId calling user + * @param processGUID unique identifier of the requested metadata element + * + * @return requested metadata element or + * InvalidParameterException one of the parameters is invalid + * UserNotAuthorizedException the user is not authorized to issue this request + * PropertyServerException there is a problem reported in the open metadata server(s) + */ + @GetMapping(path = "/governance-action-processes/{processGUID}/graph") + @Operation(summary="getGovernanceActionProcessGraph", + description="Retrieve the governance action process metadata element with the supplied " + + "unique identifier along with the flow definition describing its implementation.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GovernanceActionProcessGraphResponse getGovernanceActionProcessGraph(@PathVariable String serverName, + @PathVariable String serviceURLMarker, + @PathVariable String userId, + @PathVariable String processGUID) + { + return restAPI.getGovernanceActionProcessGraph(serverName, serviceURLMarker, userId, processGUID); + } + + + /* ===================================================================================================================== * A governance action process step describes a step in a governance action process */ @@ -513,7 +525,7 @@ public GovernanceActionProcessElementResponse getGovernanceActionProcessByGUID(@ * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - @PostMapping(path = "/governance-action-process-steps/new") + @PostMapping(path = "/governance-action-process-steps") @Operation(summary="createGovernanceActionProcessStep", description="Create a new metadata element to represent a governance action process step.", externalDocs=@ExternalDocumentation(description="Further Information", @@ -698,7 +710,7 @@ public GovernanceActionProcessStepResponse getGovernanceActionProcessStepByGUID( * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - @PostMapping(path = "/governance-action-processes/{processGUID}/first-process-step/{processStepGUID}/new") + @PostMapping(path = "/governance-action-processes/{processGUID}/first-process-step/{processStepGUID}") @Operation(summary="setupFirstProcessStep", description="Set up a link between a governance action process and a governance action process step. This defines the first step in the process.", externalDocs=@ExternalDocumentation(description="Further Information", @@ -734,10 +746,10 @@ public VoidResponse setupFirstProcessStep(@PathVariable String externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/governance-action-process")) - public GovernanceActionProcessStepResponse getFirstProcessStep(@PathVariable String serverName, - @PathVariable String serviceURLMarker, - @PathVariable String userId, - @PathVariable String processGUID) + public FirstGovernanceActionProcessStepResponse getFirstProcessStep(@PathVariable String serverName, + @PathVariable String serviceURLMarker, + @PathVariable String userId, + @PathVariable String processGUID) { return restAPI.getFirstProcessStep(serverName, serviceURLMarker, userId, processGUID); } @@ -790,7 +802,7 @@ public VoidResponse removeFirstProcessStep(@PathVariable Strin * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - @PostMapping(path = "/governance-action-process-steps/{currentProcessStepGUID}/next-process-steps/{nextProcessStepGUID}/new") + @PostMapping(path = "/governance-action-process-steps/{currentProcessStepGUID}/next-process-steps/{nextProcessStepGUID}") @Operation(summary="removeFirstProcessStep", description="Remove the link between a governance process and that governance action process step that defines its first step.", externalDocs=@ExternalDocumentation(description="Further Information", @@ -926,7 +938,7 @@ public GUIDResponse initiateEngineAction(@PathVariable String s @PathVariable String serviceURLMarker, @PathVariable String userId, @PathVariable String governanceEngineName, - @RequestBody EngineActionRequestBody requestBody) + @RequestBody InitiateEngineActionRequestBody requestBody) { return restAPI.initiateEngineAction(serverName, serviceURLMarker, userId, governanceEngineName, requestBody); } @@ -986,7 +998,7 @@ public GUIDResponse initiateGovernanceAction(@PathVariable String public GUIDResponse initiateGovernanceActionType(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, - @RequestBody GovernanceActionTypeRequestBody requestBody) + @RequestBody InitiateGovernanceActionTypeRequestBody requestBody) { return restAPI.initiateGovernanceActionType(serverName, serviceURLMarker, userId, requestBody); } @@ -1006,6 +1018,7 @@ public GUIDResponse initiateGovernanceActionType(@PathVariable String * PropertyServerException there is a problem with the metadata store */ @PostMapping(path = "/governance-action-processes/initiate") + @Operation(summary="initiateGovernanceActionProcess", description="Using the named governance action process as a template, initiate a chain of engine actions.", externalDocs=@ExternalDocumentation(description="Further Information", @@ -1014,7 +1027,7 @@ public GUIDResponse initiateGovernanceActionType(@PathVariable String public GUIDResponse initiateGovernanceActionProcess(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, - @RequestBody GovernanceActionProcessRequestBody requestBody) + @RequestBody InitiateGovernanceActionProcessRequestBody requestBody) { return restAPI.initiateGovernanceActionProcess(serverName, serviceURLMarker, userId, requestBody); } @@ -1034,6 +1047,7 @@ public GUIDResponse initiateGovernanceActionProcess(@PathVariable String * PropertyServerException there was a problem detected by the metadata store. */ @GetMapping(path = "/engine-actions/{engineActionGUID}") + @Operation(summary="getEngineAction", description="Request the status and properties of an executing engine action request.", externalDocs=@ExternalDocumentation(description="Further Information", @@ -1048,6 +1062,38 @@ public EngineActionElementResponse getEngineAction(@PathVariable String serverNa } + /** + * Request that execution of an engine action is stopped. + * + * @param serverName name of server instance to route request to + * @param serviceURLMarker the identifier of the access service (for example asset-owner for the Asset Owner OMAS) + * @param userId identifier of calling user + * @param engineActionGUID identifier of the engine action request. + * @param requestBody null request body + * + * @return void or + * InvalidParameterException one of the parameters is null or invalid. + * UserNotAuthorizedException user not authorized to issue this request. + * PropertyServerException there was a problem detected by the metadata store. + */ + @PostMapping(path = "/engine-actions/{engineActionGUID}/cancel") + + @Operation(summary="cancelEngineAction", + description="Request that an engine action request is cancelled and any running governance service is stopped.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/engine-action")) + + public VoidResponse cancelEngineAction(@PathVariable String serverName, + @PathVariable String serviceURLMarker, + @PathVariable String userId, + @PathVariable String engineActionGUID, + @RequestBody(required = false) NullRequestBody requestBody) + { + return restAPI.cancelEngineAction(serverName, serviceURLMarker, userId, engineActionGUID, requestBody); + } + + + /** * Retrieve the engine actions that are known to the server. * diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java index b3ed8463e4d..b9fbc2570ea 100644 --- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java +++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java @@ -809,7 +809,7 @@ public RelatedMetadataElementsResponse getRelationshipByGUID(@PathVariable Strin * UserNotAuthorizedException the governance action service is not authorized to create this type of element * PropertyServerException there is a problem with the metadata store */ - @PostMapping(path = "/metadata-elements/new") + @PostMapping(path = "/metadata-elements") public GUIDResponse createMetadataElementInStore(@PathVariable String serverName, @PathVariable String serviceURLMarker, @@ -997,7 +997,7 @@ public VoidResponse archiveMetadataElementInStore(@PathVariable String * UserNotAuthorizedException the governance action service is not authorized to update this element * PropertyServerException there is a problem with the metadata store */ - @PostMapping(path = "/metadata-elements/{metadataElementGUID}/classifications/{classificationName}/new") + @PostMapping(path = "/metadata-elements/{metadataElementGUID}/classifications/{classificationName}") public VoidResponse classifyMetadataElementInStore(@PathVariable String serverName, @PathVariable String serviceURLMarker, @@ -1111,7 +1111,7 @@ public VoidResponse declassifyMetadataElementInStore(@PathVariable String * UserNotAuthorizedException the governance action service is not authorized to create this type of relationship * PropertyServerException there is a problem with the metadata store */ - @PostMapping(path = "/related-elements/new") + @PostMapping(path = "/related-elements") public GUIDResponse createRelatedElementsInStore(@PathVariable String serverName, @PathVariable String serviceURLMarker, diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/ActionControlInterface.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/ActionControlInterface.java index 9a51d2c83a6..e9d8a3b1a70 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/ActionControlInterface.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/ActionControlInterface.java @@ -141,6 +141,21 @@ EngineActionElement getEngineAction(String userId, PropertyServerException; + /** + * Request that execution of an engine action is stopped. + * + * @param userId identifier of calling user + * @param engineActionGUID identifier of the engine action request. + * + * @throws InvalidParameterException one of the parameters is null or invalid. + * @throws UserNotAuthorizedException user not authorized to issue this request. + * @throws PropertyServerException there was a problem detected by the metadata store. + */ + void cancelEngineAction(String userId, + String engineActionGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException; + /** * Retrieve the engine actions that are known to the server. diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/GovernanceActionProcessInterface.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/GovernanceActionProcessInterface.java index f974ebca640..444f0fdc921 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/GovernanceActionProcessInterface.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/GovernanceActionProcessInterface.java @@ -2,15 +2,10 @@ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworks.governanceaction.client; -import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessStepElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.NextGovernanceActionProcessStepElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessProperties; -import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessStepProperties; +import org.odpi.openmetadata.frameworks.governanceaction.properties.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; -import org.odpi.openmetadata.frameworks.governanceaction.properties.ProcessStatus; import java.util.List; @@ -182,6 +177,25 @@ GovernanceActionProcessElement getGovernanceActionProcessByGUID(String userId, PropertyServerException; + /** + * Retrieve the governance action process metadata element with the supplied unique identifier + * along with its process flow implementation. This includes the process steps and the links + * between them + * + * @param userId calling user + * @param processGUID unique identifier of the requested metadata element + * + * @return requested metadata element + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + GovernanceActionProcessGraph getGovernanceActionProcessGraph(String userId, + String processGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException; + /* ===================================================================================================================== * A governance action process step describes a step in a governance action process @@ -331,16 +345,16 @@ void setupFirstActionProcessStep(String userId, * @param userId calling user * @param processGUID unique identifier of the governance action process * - * @return properties of the governance action process step + * @return properties of the first governance action process step * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ - GovernanceActionProcessStepElement getFirstActionProcessStep(String userId, - String processGUID) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException; + FirstGovernanceActionProcessStepElement getFirstActionProcessStep(String userId, + String processGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException; /** diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/ffdc/GovernanceActionEngineException.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/ffdc/GovernanceActionEngineException.java deleted file mode 100644 index e6ae73e2f19..00000000000 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/ffdc/GovernanceActionEngineException.java +++ /dev/null @@ -1,59 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ -/* Copyright Contributors to the ODPi Egeria project. */ -package org.odpi.openmetadata.frameworks.governanceaction.ffdc; - -import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; -import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; - -/** - * GovernanceActionEngineException indicates there is a problem with a request to a specific governance action engine. The - * error codes and messages indicate the cause of the problem and guidance on finding a remedy. - */ -public class GovernanceActionEngineException extends OCFCheckedExceptionBase -{ - private static final long serialVersionUID = 1L; - - /** - * This is the typical constructor used for creating a GovernanceActionEngineException. - * - * @param messageDefinition content of message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - */ - public GovernanceActionEngineException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription) - { - super(messageDefinition, className, actionDescription); - } - - - /** - * This is the constructor used for creating a GovernanceActionEngineException in response to a previous exception. - * - * @param messageDefinition content of message - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param caughtError the error that resulted in this exception. - */ - public GovernanceActionEngineException(ExceptionMessageDefinition messageDefinition, - String className, - String actionDescription, - Throwable caughtError) - { - super(messageDefinition, className, actionDescription, caughtError); - } - - - /** - * This is the copy/clone constructor used for creating an exception. - * - * @param errorMessage associated message - * @param template object to copy - */ - public GovernanceActionEngineException(String errorMessage, - OCFCheckedExceptionBase template) - { - super(errorMessage, template); - } -} diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/ffdc/GovernanceServiceException.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/ffdc/GovernanceServiceException.java index 86e702cd9d2..26123420f05 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/ffdc/GovernanceServiceException.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/ffdc/GovernanceServiceException.java @@ -6,12 +6,15 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; + /** * GovernanceServiceException indicates there is a problem with a request to a specific governance engine. The * error codes and messages indicate the cause of the problem and guidance on finding a remedy. */ public class GovernanceServiceException extends ConnectorCheckedException { + @Serial private static final long serialVersionUID = 1L; /** diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/fileclassifier/FileClassifier.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/fileclassifier/FileClassifier.java index ec911d42ef9..2eed5d9fabe 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/fileclassifier/FileClassifier.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/fileclassifier/FileClassifier.java @@ -13,7 +13,9 @@ import org.odpi.openmetadata.frameworks.governanceaction.properties.ValidMetadataValue; import java.io.File; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * Manages different types of classifications for a single file. @@ -34,74 +36,63 @@ public class FileClassifier private final static String folderDivider = "/"; private final static String fileExtensionDivider = "\\."; + private final static Map fileNameReferenceDataCache = new HashMap<>(); + private final static Map fileExtensionReferenceDataCache = new HashMap<>(); + /** - * Retrieves the extension from a file name. For example, if the file name is "three.txt", the method - * returns "txt". If the path name has multiple extensions, such as "my-jar.jar.gz", the final extension is returned (ie "gz"). - * Null is returned if there is no file extension in the file name. + * Retrieve the reference data for a particular type of file. * - * @param fileName short name - * @return file extension + * @param fileName name of the file + * @param fileExtension file extension + * @param openMetadataStore client for retrieving + * @return file reference data + * @throws InvalidParameterException invalid parameter + * @throws PropertyServerException problem connecting to the open metadata repositories + * @throws UserNotAuthorizedException insufficient access */ - public static String getFileExtension(String fileName) + static synchronized FileReferenceDataCache getFileReferenceDataCache(String fileName, + String fileExtension, + OpenMetadataStore openMetadataStore) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException { - String result = null; + FileReferenceDataCache fileReferenceDataCache = fileNameReferenceDataCache.get(fileName); - if ((fileName != null) && (! fileName.isEmpty())) + if (fileReferenceDataCache == null) { - String[] tokens = fileName.split(fileExtensionDivider); - - if (fileName.startsWith(".")) - { - if (tokens.length > 2) - { - result = tokens[tokens.length - 1]; - } - } - else - { + fileReferenceDataCache = fileExtensionReferenceDataCache.get(fileExtension); + } - if (tokens.length > 1) - { - result = tokens[tokens.length - 1]; - } - } + if (fileReferenceDataCache == null) + { + fileReferenceDataCache = lookupFileReferenceData(fileName, fileExtension, openMetadataStore); } - return result; + return fileReferenceDataCache; } - private static final String fileTypeCategory = - OpenMetadataValidValues.constructValidValueCategory(OpenMetadataType.DATA_FILE.typeName, - OpenMetadataProperty.FILE_TYPE.name, - null); - private static final String deployedImplementationTypeCategory = - OpenMetadataValidValues.constructValidValueCategory(OpenMetadataType.DATA_FILE.typeName, - OpenMetadataProperty.DEPLOYED_IMPLEMENTATION_TYPE.name, - null); - - /** - * Use the valid values to classify the file. + * Retrieve the reference data for a particular type of file. * - * @param openMetadataStore open metadata where the valid values are stored. - * @param file file to analyse + * @param fileName name of the file + * @param fileExtension file extension + * @param openMetadataStore client for retrieving + * @return file reference data * @throws InvalidParameterException invalid parameter * @throws PropertyServerException problem connecting to the open metadata repositories * @throws UserNotAuthorizedException insufficient access */ - public FileClassifier (OpenMetadataStore openMetadataStore, - File file) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException + static private FileReferenceDataCache lookupFileReferenceData(String fileName, + String fileExtension, + OpenMetadataStore openMetadataStore) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException { - this.fileName = file.getName(); - this.pathName = file.getAbsolutePath(); - this.fileExtension = getFileExtension(file.getName()); - this.canRead = file.canRead(); - this.canWrite = file.canWrite(); - this.canExecute = file.canExecute(); + FileReferenceDataCache fileReferenceDataCache = new FileReferenceDataCache(); + boolean fileNameMatched = false; + boolean fileExtensionMatched = false; /* * Is the file name or file extension recognized? @@ -111,7 +102,7 @@ public FileClassifier (OpenMetadataStore openMetadataStore, { validMetadataValue = openMetadataStore.getValidMetadataValue(OpenMetadataType.DATA_FILE.typeName, OpenMetadataProperty.FILE_NAME.name, - file.getName()); + fileName); } catch (InvalidParameterException notKnown) { @@ -128,16 +119,17 @@ public FileClassifier (OpenMetadataStore openMetadataStore, validMetadataValue.getPreferredValue(), 0, 5); + fileNameMatched = true; } else { - if (this.fileExtension != null) + if (fileExtension != null) { try { validMetadataValue = openMetadataStore.getValidMetadataValue(OpenMetadataType.DATA_FILE.typeName, OpenMetadataProperty.FILE_EXTENSION.name, - this.fileExtension); + fileExtension); } catch (InvalidParameterException notKnown) { @@ -152,6 +144,8 @@ public FileClassifier (OpenMetadataStore openMetadataStore, validMetadataValue.getPreferredValue(), 0, 5); + + fileExtensionMatched = true; } } } @@ -168,18 +162,18 @@ public FileClassifier (OpenMetadataStore openMetadataStore, { if (fileTypeCategory.equals(consistentValue.getCategory())) { - this.fileType = consistentValue.getPreferredValue(); + fileReferenceDataCache.fileType = consistentValue.getPreferredValue(); if (consistentValue.getAdditionalProperties() != null) { if (consistentValue.getAdditionalProperties().get(OpenMetadataValidValues.ASSET_SUB_TYPE_NAME) != null) { - this.assetTypeName = consistentValue.getAdditionalProperties().get(OpenMetadataValidValues.ASSET_SUB_TYPE_NAME); + fileReferenceDataCache.assetTypeName = consistentValue.getAdditionalProperties().get(OpenMetadataValidValues.ASSET_SUB_TYPE_NAME); } if (consistentValue.getAdditionalProperties().get(OpenMetadataProperty.ENCODING.name) != null) { - this.encoding = consistentValue.getAdditionalProperties().get(OpenMetadataProperty.ENCODING.name); + fileReferenceDataCache.encoding = consistentValue.getAdditionalProperties().get(OpenMetadataProperty.ENCODING.name); } } @@ -199,7 +193,7 @@ public FileClassifier (OpenMetadataStore openMetadataStore, { if (deployedImplementationTypeCategory.equals(consistentFileTypeValue.getCategory())) { - this.deployedImplementationType = consistentFileTypeValue.getPreferredValue(); + fileReferenceDataCache.deployedImplementationType = consistentFileTypeValue.getPreferredValue(); } } } @@ -208,6 +202,104 @@ public FileClassifier (OpenMetadataStore openMetadataStore, } } } + + if (fileNameMatched) + { + fileNameReferenceDataCache.put(fileName, fileReferenceDataCache); + } + if (fileExtensionMatched) + { + fileExtensionReferenceDataCache.put(fileExtension, fileReferenceDataCache); + } + + return fileReferenceDataCache; + } + + + /** + * Retrieves the extension from a file name. For example, if the file name is "three.txt", the method + * returns "txt". If the path name has multiple extensions, such as "my-jar.jar.gz", the final extension is returned (ie "gz"). + * Null is returned if there is no file extension in the file name. + * + * @param fileName short name + * @return file extension + */ + public static String getFileExtension(String fileName) + { + String result = null; + + if ((fileName != null) && (! fileName.isEmpty())) + { + String[] tokens = fileName.split(fileExtensionDivider); + + if (fileName.startsWith(".")) + { + if (tokens.length > 2) + { + result = tokens[tokens.length - 1]; + } + } + else + { + + if (tokens.length > 1) + { + result = tokens[tokens.length - 1]; + } + } + } + + return result; + } + + + /** + * Construct the name used to find the file type reference value + */ + private static final String fileTypeCategory = + OpenMetadataValidValues.constructValidValueCategory(OpenMetadataType.DATA_FILE.typeName, + OpenMetadataProperty.FILE_TYPE.name, + null); + + /** + * Construct the name used to find the deployed implementation type reference value + */ + private static final String deployedImplementationTypeCategory = + OpenMetadataValidValues.constructValidValueCategory(OpenMetadataType.DATA_FILE.typeName, + OpenMetadataProperty.DEPLOYED_IMPLEMENTATION_TYPE.name, + null); + + + /** + * Use the valid values to classify the file. + * + * @param openMetadataStore open metadata where the valid values are stored. + * @param file file to analyse + * @throws InvalidParameterException invalid parameter + * @throws PropertyServerException problem connecting to the open metadata repositories + * @throws UserNotAuthorizedException insufficient access + */ + public FileClassifier (OpenMetadataStore openMetadataStore, + File file) throws InvalidParameterException, + PropertyServerException, + UserNotAuthorizedException + { + this.fileName = file.getName(); + this.pathName = file.getAbsolutePath(); + this.fileExtension = getFileExtension(file.getName()); + this.canRead = file.canRead(); + this.canWrite = file.canWrite(); + this.canExecute = file.canExecute(); + + FileReferenceDataCache fileReferenceDataCache = getFileReferenceDataCache(fileName, + fileExtension, + openMetadataStore); + + this.fileType = fileReferenceDataCache.fileType; + this.encoding = fileReferenceDataCache.encoding; + this.assetTypeName = fileReferenceDataCache.assetTypeName; + this.deployedImplementationType = fileReferenceDataCache.deployedImplementationType; + } @@ -320,4 +412,15 @@ public boolean isCanExecute() return canExecute; } + + /** + * Supports the caching of file reference data. + */ + static class FileReferenceDataCache + { + String fileType; + String assetTypeName; + String encoding; + String deployedImplementationType; + } } diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/mapper/OpenMetadataType.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/mapper/OpenMetadataType.java index 845d7c59805..7a9a9683bc1 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/mapper/OpenMetadataType.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/mapper/OpenMetadataType.java @@ -3888,11 +3888,13 @@ public enum OpenMetadataType public static final int REQUESTED_EA_STATUS_ORDINAL = 0; public static final int APPROVED_EA_STATUS_ORDINAL = 1; public static final int WAITING_EA_STATUS_ORDINAL = 2; + public static final int ACTIVATING_EA_STATUS_ORDINAL = 3; public static final int IN_PROGRESS_EA_STATUS_ORDINAL = 4; public static final int ACTIONED_EA_STATUS_ORDINAL = 10; public static final int INVALID_EA_STATUS_ORDINAL = 11; public static final int IGNORED_EA_STATUS_ORDINAL = 12; public static final int FAILED_EA_STATUS_ORDINAL = 13; + public static final int CANCELLED_EA_STATUS_ORDINAL = 14; public static final int OTHER_EA_STATUS_ORDINAL = 99; public static final String ENGINE_ACTION_TYPE_GUID = "c976d88a-2b11-4b40-b972-c38d41bfc6be"; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ActionTargetElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ActionTargetElement.java index a18e904f191..ae09ffda987 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ActionTargetElement.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/ActionTargetElement.java @@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; +import java.io.Serial; import java.util.Date; +import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; @@ -19,14 +21,16 @@ @JsonIgnoreProperties(ignoreUnknown=true) public class ActionTargetElement extends NewActionTarget { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; - private EngineActionStatus status = null; - private Date startDate = null; - private Date completionDate = null; - private String completionMessage = null; + private String actionTargetRelationshipGUID = null; + private EngineActionStatus status = null; + private Date startDate = null; + private Date completionDate = null; + private String completionMessage = null; - private OpenMetadataElement targetElement = null; + private OpenMetadataElement targetElement = null; /** @@ -49,6 +53,7 @@ public ActionTargetElement(ActionTargetElement template) if (template != null) { + actionTargetRelationshipGUID = template.getActionTargetRelationshipGUID(); status = template.getStatus(); startDate = template.getStartDate(); completionDate = template.getCompletionDate(); @@ -58,9 +63,30 @@ public ActionTargetElement(ActionTargetElement template) } + /** + * Return the unique identifier of the ActionTarget relationship. + * + * @return guid + */ + public String getActionTargetRelationshipGUID() + { + return actionTargetRelationshipGUID; + } + + + /** + * Set up the unique identifier of the ActionTarget relationship. + * + * @param actionTargetRelationshipGUID guid + */ + public void setActionTargetRelationshipGUID(String actionTargetRelationshipGUID) + { + this.actionTargetRelationshipGUID = actionTargetRelationshipGUID; + } + /** * Return the current status of the action target. The default value is the status is derived from - * the governance action service. However, if it has to process many target elements, then these values can + * the engine action. However, if it has to process many target elements, then these values can * be used to show progress. * * @return status enum @@ -190,6 +216,7 @@ public String toString() { return "ActionTargetElement{" + "status=" + status + + ", relationshipGUID=" + actionTargetRelationshipGUID + ", startDate=" + startDate + ", completionDate=" + completionDate + ", completionMessage='" + completionMessage + '\'' + @@ -209,41 +236,18 @@ public String toString() @Override public boolean equals(Object objectToCompare) { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof ActionTargetElement)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + if (!super.equals(objectToCompare)) return false; ActionTargetElement that = (ActionTargetElement) objectToCompare; - - if (status != that.status) - { - return false; - } - if (startDate != null ? ! startDate.equals(that.startDate) : that.startDate != null) - { - return false; - } - if (completionDate != null ? ! completionDate.equals(that.completionDate) : that.completionDate != null) - { - return false; - } - if (completionMessage != null ? ! completionMessage.equals(that.completionMessage) : that.completionMessage != null) - { - return false; - } - return targetElement != null ? targetElement.equals(that.targetElement) : that.targetElement == null; + return Objects.equals(actionTargetRelationshipGUID, that.actionTargetRelationshipGUID) && + status == that.status && + Objects.equals(startDate, that.startDate) && + Objects.equals(completionDate, that.completionDate) && + Objects.equals(completionMessage, that.completionMessage) && + Objects.equals(targetElement, that.targetElement); } - /** * Create a hash code for this element type. * @@ -252,12 +256,6 @@ public boolean equals(Object objectToCompare) @Override public int hashCode() { - int result = super.hashCode(); - result = 31 * result + (status != null ? status.hashCode() : 0); - result = 31 * result + (startDate != null ? startDate.hashCode() : 0); - result = 31 * result + (completionDate != null ? completionDate.hashCode() : 0); - result = 31 * result + (completionMessage != null ? completionMessage.hashCode() : 0); - result = 31 * result + (targetElement != null ? targetElement.hashCode() : 0); - return result; + return Objects.hash(super.hashCode(), actionTargetRelationshipGUID, status, startDate, completionDate, completionMessage, targetElement); } } diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/EngineActionStatus.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/EngineActionStatus.java index 5117e1971d6..710ca1f90d7 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/EngineActionStatus.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/EngineActionStatus.java @@ -10,7 +10,7 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; /** - * EngineActionStatus defines the current status for a governance action. + * EngineActionStatus defines the current status for a engine action. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @@ -18,54 +18,59 @@ public enum EngineActionStatus { /** - * The governance action has been created and is pending. + * The engine action has been created and is pending. */ - REQUESTED (0, 0, "Requested", "The governance action has been created and is pending."), + REQUESTED (0, 0, "Requested", "The engine action has been created and is pending."), /** - * The governance action is approved to run. + * The engine action is approved to run. This means that the mandatory guards have been satisfied. */ - APPROVED (1, 1, "Approved", "The governance action is approved to run."), + APPROVED (1, 1, "Approved", "The engine action is approved to run. This means that the mandatory guards have been satisfied."), /** - * The governance action is waiting for its start time or the right conditions to run. + * The engine action is waiting for its start time or the engine host to claim it. */ - WAITING (2, 2, "Waiting", "The governance action is waiting for its start time or the right conditions to run."), + WAITING (2, 2, "Waiting", "The engine action is waiting for its start time or the right conditions to run."), /** - * The governance action service for the governance action is being initialized in the governance engine. + * The governance service for the engine action is being initialized in the governance engine. */ - ACTIVATING (3, 3, "Activating", "The governance action service for the governance action is being initialized in the governance engine."), + ACTIVATING (3, 3, "Activating", "The governance service for the engine action is being initialized in the governance engine."), /** - * The governance engine is running the associated governance action service for the governance action. + * The governance engine is running the associated governance service for the engine action. */ - IN_PROGRESS (4, 4, "In Progress","The governance engine is running the associated governance action service for the governance action."), + IN_PROGRESS (4, 4, "In Progress","The governance engine is running the associated governance service for the engine action."), /** - * The governance action service for the governance action has successfully completed processing. + * The governance service for the engine action has successfully completed processing. */ - ACTIONED (5, 10, "Actioned", "The governance action service for the governance action has successfully completed processing."), + ACTIONED (5, 10, "Actioned", "The governance service for the engine action has successfully completed processing."), /** - * The governance action has not been run because it is not appropriate (for example, a false positive). + * The engine action has not been run because it is not appropriate (for example, a false positive). */ - INVALID (6, 11, "Invalid", "The governance action has not been run because it is not appropriate (for example, a false positive)."), + INVALID (6, 11, "Invalid", "The engine action has not been run because it is not appropriate (for example, a false positive)."), /** - * The governance action has not been run because a different governance action was chosen. + * The engine action has not been run because a different engine action was chosen. */ - IGNORED (7, 12, "Ignored", "The governance action has not been run because a different governance action was chosen."), + IGNORED (7, 12, "Ignored", "The engine action has not been run because a different engine action was chosen."), /** - * The governance action service for the governance action failed to execute. + * The governance service for the engine action failed to execute. */ - FAILED (8, 13, "Failed", "The governance action service for the governance action failed to execute."), + FAILED (8, 13, "Failed", "The governance service for the engine action failed to execute."), /** - * Undefined or unknown governance action status. + * The engine action was cancelled by an external caller. */ - OTHER (99, 99, "Other", "Undefined or unknown governance action status."); + CANCELLED (9, 14, "Cancelled", "The engine action was cancelled by an external caller."), + + /** + * Undefined or unknown engine action status. + */ + OTHER (99, 99, "Other", "Undefined or unknown engine action status."); private static final String ENUM_TYPE_GUID = "a6e698b0-a4f7-4a39-8c80-db0bb0f972e"; private static final String ENUM_TYPE_NAME = "EngineActionStatus"; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/FirstGovernanceActionProcessStepElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/FirstGovernanceActionProcessStepElement.java new file mode 100644 index 00000000000..c783b99d80f --- /dev/null +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/FirstGovernanceActionProcessStepElement.java @@ -0,0 +1,171 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.governanceaction.properties; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * FirstGovernanceActionProcessStepElement contains the properties and header for a governance action process step entity plus the + * properties of a NextGovernanceActionProcessStep relationship retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class FirstGovernanceActionProcessStepElement +{ + private GovernanceActionProcessStepElement element = null; + private String linkGUID = null; + private String guard = null; + + + + /** + * Default constructor + */ + public FirstGovernanceActionProcessStepElement() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public FirstGovernanceActionProcessStepElement(FirstGovernanceActionProcessStepElement template) + { + if (template != null) + { + element = template.getElement(); + linkGUID = template.getLinkGUID(); + guard = template.getGuard(); + } + } + + + /** + * Return details of the first governance action process step + * + * @return governance action process step properties + */ + public GovernanceActionProcessStepElement getElement() + { + return element; + } + + + /** + * Set up details of the first governance action process step + * + * @param element governance action process step properties + */ + public void setElement(GovernanceActionProcessStepElement element) + { + this.element = element; + } + + + /** + * Return the unique identifier of the relationship. + * + * @return string guid + */ + public String getLinkGUID() + { + return linkGUID; + } + + + /** + * Set up the unique identifier of the relationship. + * + * @param linkGUID string guid + */ + public void setLinkGUID(String linkGUID) + { + this.linkGUID = linkGUID; + } + + + /** + * Return the triggering guard (or null for any guard). + * + * @return string name + */ + public String getGuard() + { + return guard; + } + + + /** + * Set up the triggering guard (or null for any guard). + * + * @param guard string name + */ + public void setGuard(String guard) + { + this.guard = guard; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "FirstGovernanceActionProcessStepElement{" + + "nextProcessStep=" + element + + ", nextProcessStepLinkGUID='" + linkGUID + '\'' + + ", guard='" + guard + '\'' + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + FirstGovernanceActionProcessStepElement that = (FirstGovernanceActionProcessStepElement) objectToCompare; + return Objects.equals(element, that.element) && + Objects.equals(linkGUID, that.linkGUID) && + Objects.equals(guard, that.guard); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(element, linkGUID, guard); + } +} diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessGraph.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessGraph.java new file mode 100644 index 00000000000..3aff4a66f49 --- /dev/null +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessGraph.java @@ -0,0 +1,189 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.governanceaction.properties; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.List; +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * GovernanceActionProcessGraph contains the complete flow of a governance action process. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class GovernanceActionProcessGraph +{ + private GovernanceActionProcessElement governanceActionProcess = null; + private FirstGovernanceActionProcessStepElement firstProcessStep = null; + private List nextProcessSteps = null; + private List processStepLinks = null; + + + /** + * Default Constructor + */ + public GovernanceActionProcessGraph() + { + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public GovernanceActionProcessGraph(GovernanceActionProcessGraph template) + { + if (template != null) + { + this.governanceActionProcess = template.getGovernanceActionProcess(); + this.firstProcessStep = template.getFirstProcessStep(); + this.nextProcessSteps = template.getNextProcessSteps(); + this.processStepLinks = template.getProcessStepLinks(); + } + } + + + /** + * Return the descriptive information for a governance action process. + * + * @return element + */ + public GovernanceActionProcessElement getGovernanceActionProcess() + { + return governanceActionProcess; + } + + + /** + * Set up descriptive information for a governance action process. + * + * @param governanceActionProcess element + */ + public void setGovernanceActionProcess(GovernanceActionProcessElement governanceActionProcess) + { + this.governanceActionProcess = governanceActionProcess; + } + + + /** + * Return the first process step + * + * @return process step + */ + public FirstGovernanceActionProcessStepElement getFirstProcessStep() + { + return firstProcessStep; + } + + + /** + * Set up the first process step. + * + * @param firstProcessStep first process step + */ + public void setFirstProcessStep(FirstGovernanceActionProcessStepElement firstProcessStep) + { + this.firstProcessStep = firstProcessStep; + } + + + /** + * Return the list of process steps in the process. + * + * @return list of step elements + */ + public List getNextProcessSteps() + { + return nextProcessSteps; + } + + + /** + * Set up the list of process steps in the process. + * + * @param nextProcessSteps list of step elements + */ + public void setNextProcessSteps(List nextProcessSteps) + { + this.nextProcessSteps = nextProcessSteps; + } + + + /** + * Return the list of links between process steps. + * + * @return list of step links + */ + public List getProcessStepLinks() + { + return processStepLinks; + } + + + /** + * Set up the list of links between process steps. + * + * @param processStepLinks list of step links + */ + public void setProcessStepLinks(List processStepLinks) + { + this.processStepLinks = processStepLinks; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "GovernanceActionProcessGraph{" + + "governanceActionProcess=" + governanceActionProcess + + ", firstProcessStep" + firstProcessStep + + ", NextProcessSteps=" + nextProcessSteps + + ", processStepLinks=" + processStepLinks + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + GovernanceActionProcessGraph that = (GovernanceActionProcessGraph) objectToCompare; + return Objects.equals(governanceActionProcess, that.governanceActionProcess) && + Objects.equals(firstProcessStep, that.firstProcessStep) && + Objects.equals(nextProcessSteps, that.nextProcessSteps) && + Objects.equals(processStepLinks, that.processStepLinks); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(governanceActionProcess, firstProcessStep, nextProcessSteps, processStepLinks); + } +} diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessProperties.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessProperties.java index d4ce7cfb3e3..1e0411dde7e 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessProperties.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionProcessProperties.java @@ -12,25 +12,22 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; /** - * Process properties defines the properties of a process. A process is a series of steps and decisions in operation - * in the organization. It is typically an automated process but may be performed by a person. - * Only set the implementationLanguage if the process is automated. + * GovernanceActionProcessProperties defines the properties of a governance action process. + * A governance action process is a series of steps and decisions. It is implemented as + * an automated process. Each step in the process calls a governance service running in a engine host. */ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) public class GovernanceActionProcessProperties extends ReferenceableProperties { - private String displayName = null; - private String summary = null; - private String description = null; - private String abbreviation = null; - private String usage = null; - private String technicalName = null; - private String versionIdentifier = null; - private String technicalDescription = null; - private String formula = null; - private String implementationLanguage = null; + private int domainIdentifier = 0; + private String displayName = null; + private String description = null; + private String versionIdentifier = null; + private String formula = null; + private String formulaType = null; + /** * Default constructor @@ -52,69 +49,66 @@ public GovernanceActionProcessProperties(GovernanceActionProcessProperties templ if (template != null) { + domainIdentifier = template.getDomainIdentifier(); + displayName = template.getDisplayName(); - summary = template.getSummary(); description = template.getDescription(); - abbreviation = template.getAbbreviation(); - usage = template.getUsage(); - technicalName = template.getTechnicalName(); versionIdentifier = template.getVersionIdentifier(); - technicalDescription = template.getTechnicalDescription(); formula = template.getFormula(); - implementationLanguage = template.getImplementationLanguage(); + formulaType = template.getFormulaType(); } } /** - * Returns the stored display name property for the technical element. - * If no display name is available then null is returned. + * Return the identifier of the governance domain that this action belongs to (0=ALL/ANY). * - * @return String name + * @return int */ - public String getDisplayName() + public int getDomainIdentifier() { - return displayName; + return domainIdentifier; } /** - * Set up the stored display name property for the technical element. + * Set up the identifier of the governance domain that this action belongs to (0=ALL/ANY). * - * @param displayName String name + * @param domainIdentifier int */ - public void setDisplayName(String displayName) + public void setDomainIdentifier(int domainIdentifier) { - this.displayName = displayName; + this.domainIdentifier = domainIdentifier; } /** - * Return the short (1-2 sentence) description of the technical element. + * Returns the stored display name property for the process. + * If no display name is available then null is returned. * - * @return string text + * @return String name */ - public String getSummary() + public String getDisplayName() { - return summary; + return displayName; } /** - * Set up the short (1-2 sentence) description of the technical element. + * Set up the stored display name property for the process. * - * @param summary string text + * @param displayName String name */ - public void setSummary(String summary) + public void setDisplayName(String displayName) { - this.summary = summary; + this.displayName = displayName; } /** - * Returns the stored description property for the technical element. + * Returns the stored description property for the process. * If no description is provided then null is returned. * * @return String text @@ -126,7 +120,7 @@ public String getDescription() /** - * Set up the stored description property for the technical element. + * Set up the stored description property for the process. * * @param description String text */ @@ -137,75 +131,7 @@ public void setDescription(String description) /** - * Return the abbreviation used for this technical element. - * - * @return string text - */ - public String getAbbreviation() - { - return abbreviation; - } - - - /** - * Set up the abbreviation used for this technical element. - * - * @param abbreviation string text - */ - public void setAbbreviation(String abbreviation) - { - this.abbreviation = abbreviation; - } - - - /** - * Return details of the expected usage of this technical element. - * - * @return string text - */ - public String getUsage() - { - return usage; - } - - - /** - * Set up details of the expected usage of this technical element. - * - * @param usage string text - */ - public void setUsage(String usage) - { - this.usage = usage; - } - - - /** - * Returns the stored name property for the asset. This is the technical name of the asset rather than the name - * that it is commonly known as. If no technical name is available then null is returned. - * - * @return String name - */ - public String getTechnicalName() - { - return technicalName; - } - - - /** - * Set up the stored name property for the asset. This is the technical name of the asset rather than the name - * that it is commonly known as. - * - * @param technicalName String name - */ - public void setTechnicalName(String technicalName) - { - this.technicalName = technicalName; - } - - - /** - * Set up the version identifier of the resource. + * Set up the version identifier of the process. * * @return string version name */ @@ -216,7 +142,7 @@ public String getVersionIdentifier() /** - * Set up the version identifier of the resource. + * Set up the version identifier of the process. * * @param versionIdentifier string version name */ @@ -226,29 +152,6 @@ public void setVersionIdentifier(String versionIdentifier) } - /** - * Returns the stored technical description property for the asset. - * If no technical description is provided then null is returned. - * - * @return String text - */ - public String getTechnicalDescription() - { - return technicalDescription; - } - - - /** - * Set up the stored technical description property associated with the asset. - * - * @param description String text - */ - public void setTechnicalDescription(String description) - { - this.technicalDescription = description; - } - - /** * Return the description of the processing performed by this process. * @@ -269,24 +172,24 @@ public void setFormula(String formula) /** - * Return the name of the programming language that this process is implemented in. + * Return the name of the language that the formula is implemented in. * * @return string name */ - public String getImplementationLanguage() + public String getFormulaType() { - return implementationLanguage; + return formulaType; } /** - * Set up the name of the programming language that this process is implemented in. + * Set up the name of the language that the formula is implemented in. * - * @param implementationLanguage string name + * @param formulaType string name */ - public void setImplementationLanguage(String implementationLanguage) + public void setFormulaType(String formulaType) { - this.implementationLanguage = implementationLanguage; + this.formulaType = formulaType; } @@ -299,16 +202,12 @@ public void setImplementationLanguage(String implementationLanguage) public String toString() { return "GovernanceActionProcessProperties{" + - "displayName='" + displayName + '\'' + - ", summary='" + summary + '\'' + + "domainIdentifier=" + domainIdentifier + + ", displayName='" + displayName + '\'' + ", description='" + description + '\'' + - ", abbreviation='" + abbreviation + '\'' + - ", usage='" + usage + '\'' + - ", technicalName='" + technicalName + '\'' + ", versionIdentifier='" + versionIdentifier + '\'' + - ", technicalDescription='" + technicalDescription + '\'' + ", formula='" + formula + '\'' + - ", implementationLanguage='" + implementationLanguage + '\'' + + ", formulaType='" + formulaType + '\'' + ", qualifiedName='" + getQualifiedName() + '\'' + ", additionalProperties=" + getAdditionalProperties() + '}'; @@ -324,61 +223,18 @@ public String toString() @Override public boolean equals(Object objectToCompare) { - if (this == objectToCompare) - { - return true; - } - if (! (objectToCompare instanceof GovernanceActionProcessProperties)) - { - return false; - } - if (! super.equals(objectToCompare)) - { - return false; - } - + if (this == objectToCompare) return true; + if (objectToCompare == null || getClass() != objectToCompare.getClass()) return false; + if (!super.equals(objectToCompare)) return false; GovernanceActionProcessProperties that = (GovernanceActionProcessProperties) objectToCompare; - - if (displayName != null ? ! displayName.equals(that.displayName) : that.displayName != null) - { - return false; - } - if (summary != null ? ! summary.equals(that.summary) : that.summary != null) - { - return false; - } - if (description != null ? ! description.equals(that.description) : that.description != null) - { - return false; - } - if (abbreviation != null ? ! abbreviation.equals(that.abbreviation) : that.abbreviation != null) - { - return false; - } - if (usage != null ? ! usage.equals(that.usage) : that.usage != null) - { - return false; - } - if (technicalName != null ? ! technicalName.equals(that.technicalName) : that.technicalName != null) - { - return false; - } - if (versionIdentifier != null ? ! versionIdentifier.equals(that.versionIdentifier) : that.versionIdentifier != null) - { - return false; - } - if (technicalDescription != null ? ! technicalDescription.equals(that.technicalDescription) : that.technicalDescription != null) - { - return false; - } - if (formula != null ? ! formula.equals(that.formula) : that.formula != null) - { - return false; - } - return implementationLanguage != null ? implementationLanguage.equals(that.implementationLanguage) : that.implementationLanguage == null; + return domainIdentifier == that.domainIdentifier && + Objects.equals(displayName, that.displayName) && + Objects.equals(description, that.description) && + Objects.equals(versionIdentifier, that.versionIdentifier) && + Objects.equals(formula, that.formula) && + Objects.equals(formulaType, that.formulaType); } - /** * Return hash code for this object * @@ -387,7 +243,7 @@ public boolean equals(Object objectToCompare) @Override public int hashCode() { - return Objects.hash(super.hashCode(), displayName, summary, description, abbreviation, usage, technicalName, versionIdentifier, technicalDescription, - formula, implementationLanguage); + return Objects.hash(super.hashCode(), domainIdentifier, displayName, description, versionIdentifier, + formula, formulaType); } } diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionTypeProperties.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionTypeProperties.java index ea890dfdf3c..6dacd439986 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionTypeProperties.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/GovernanceActionTypeProperties.java @@ -26,7 +26,7 @@ public class GovernanceActionTypeProperties extends ReferenceableProperties private String displayName = null; private String description = null; - private List supportedGuards = null; + private List producedGuards = null; private String governanceEngineGUID = null; private String requestType = null; @@ -59,7 +59,7 @@ public GovernanceActionTypeProperties(GovernanceActionTypeProperties template) displayName = template.getDisplayName(); description = template.getDescription(); - supportedGuards = template.getSupportedGuards(); + producedGuards = template.getProducedGuards(); governanceEngineGUID = template.getGovernanceEngineGUID(); requestType = template.getRequestType(); @@ -141,20 +141,20 @@ public void setDescription(String description) * * @return list of guards */ - public List getSupportedGuards() + public List getProducedGuards() { - return supportedGuards; + return producedGuards; } /** * Set up the list of guards provided by the previous governance service. * - * @param supportedGuards list of guards + * @param producedGuards list of guards */ - public void setSupportedGuards(List supportedGuards) + public void setProducedGuards(List producedGuards) { - this.supportedGuards = supportedGuards; + this.producedGuards = producedGuards; } @@ -268,7 +268,7 @@ public String toString() "domainIdentifier=" + domainIdentifier + ", displayName='" + displayName + '\'' + ", description='" + description + '\'' + - ", supportedGuards=" + supportedGuards + + ", producedGuards=" + producedGuards + ", governanceEngineGUID='" + governanceEngineGUID + '\'' + ", requestType='" + requestType + '\'' + ", requestParameters=" + requestParameters + @@ -305,7 +305,7 @@ public boolean equals(Object objectToCompare) Objects.equals(displayName, that.displayName) && Objects.equals(description, that.description) && waitTime == that.waitTime && - Objects.equals(supportedGuards, that.supportedGuards) && + Objects.equals(producedGuards, that.producedGuards) && Objects.equals(governanceEngineGUID, that.governanceEngineGUID) && Objects.equals(requestType, that.requestType) && Objects.equals(requestParameters, that.requestParameters); @@ -321,6 +321,6 @@ public boolean equals(Object objectToCompare) public int hashCode() { return Objects.hash(super.hashCode(), domainIdentifier, displayName, description, - supportedGuards, governanceEngineGUID, requestType, requestParameters, waitTime); + producedGuards, governanceEngineGUID, requestType, requestParameters, waitTime); } } diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/NewActionTarget.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/NewActionTarget.java index 35c3e7ad320..86f1d55da38 100644 --- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/NewActionTarget.java +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/NewActionTarget.java @@ -6,8 +6,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import java.io.Serializable; -import java.util.Date; import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; @@ -19,10 +17,8 @@ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown=true) -public class NewActionTarget implements Serializable +public class NewActionTarget { - private static final long serialVersionUID = 1L; - private String actionTargetName = null; private String actionTargetGUID = null; diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/NextGovernanceActionProcessStepLink.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/NextGovernanceActionProcessStepLink.java new file mode 100644 index 00000000000..1c6fe2f95b5 --- /dev/null +++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/NextGovernanceActionProcessStepLink.java @@ -0,0 +1,226 @@ +/* SPDX-License-Identifier: Apache-2.0 */ +/* Copyright Contributors to the ODPi Egeria project. */ + +package org.odpi.openmetadata.frameworks.governanceaction.properties; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementStub; + +import java.util.Objects; + +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; +import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; + +/** + * NextGovernanceActionProcessStepLink contains the properties and ends of a NextGovernanceActionProcessStep + * relationship retrieved from the metadata repository. + */ +@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown=true) +public class NextGovernanceActionProcessStepLink +{ + + private ElementStub previousProcessStep = null; + private ElementStub nextProcessStep = null; + private String nextProcessStepLinkGUID = null; + private String guard = null; + private boolean mandatoryGuard = false; + + + + /** + * Default constructor + */ + public NextGovernanceActionProcessStepLink() + { + super(); + } + + + /** + * Copy/clone constructor + * + * @param template object to copy + */ + public NextGovernanceActionProcessStepLink(NextGovernanceActionProcessStepLink template) + { + if (template != null) + { + previousProcessStep = template.getPreviousProcessStep(); + nextProcessStep = template.getNextProcessStep(); + + nextProcessStepLinkGUID = template.getNextProcessStepLinkGUID(); + guard = template.getGuard(); + mandatoryGuard = template.getMandatoryGuard(); + } + } + + + /** + * Return details of the previous governance action process step + * + * @return governance action process step properties + */ + public ElementStub getPreviousProcessStep() + { + return nextProcessStep; + } + + + /** + * Set up details of the previous governance action process step + * + * @param nextProcessStep governance action process step properties + */ + public void setPreviousProcessStep(ElementStub nextProcessStep) + { + this.nextProcessStep = nextProcessStep; + } + + + /** + * Return details of the next governance action process step + * + * @return governance action process step properties + */ + public ElementStub getNextProcessStep() + { + return nextProcessStep; + } + + + /** + * Set up details of the next governance action process step + * + * @param nextProcessStep governance action process step properties + */ + public void setNextProcessStep(ElementStub nextProcessStep) + { + this.nextProcessStep = nextProcessStep; + } + + + /** + * Return the unique identifier of the relationship. + * + * @return string guid + */ + public String getNextProcessStepLinkGUID() + { + return nextProcessStepLinkGUID; + } + + + /** + * Set up the unique identifier of the relationship. + * + * @param nextProcessStepLinkGUID string guid + */ + public void setNextProcessStepLinkGUID(String nextProcessStepLinkGUID) + { + this.nextProcessStepLinkGUID = nextProcessStepLinkGUID; + } + + + /** + * Return the triggering guard (or null for any guard). + * + * @return string name + */ + public String getGuard() + { + return guard; + } + + + /** + * Set up the triggering guard (or null for any guard). + * + * @param guard string name + */ + public void setGuard(String guard) + { + this.guard = guard; + } + + + /** + * Return if the guard must be returned from the previous action for any of the next actions to progress. + * + * @return boolean flag + */ + public boolean getMandatoryGuard() + { + return mandatoryGuard; + } + + + /** + * Set up if the guard must be returned from the previous action for any of the next actions to progress. + * + * @param mandatoryGuard boolean flag + */ + public void setMandatoryGuard(boolean mandatoryGuard) + { + this.mandatoryGuard = mandatoryGuard; + } + + + /** + * JSON-style toString + * + * @return return string containing the property names and values + */ + @Override + public String toString() + { + return "NextGovernanceActionProcessStepLink{" + + "previousProcessStep=" + previousProcessStep + + ", nextProcessStep=" + nextProcessStep + + ", nextProcessStepLinkGUID='" + nextProcessStepLinkGUID + '\'' + + ", guard='" + guard + '\'' + + ", mandatoryGuard=" + mandatoryGuard + + '}'; + } + + + /** + * Return comparison result based on the content of the properties. + * + * @param objectToCompare test object + * @return result of comparison + */ + @Override + public boolean equals(Object objectToCompare) + { + if (this == objectToCompare) + { + return true; + } + if (objectToCompare == null || getClass() != objectToCompare.getClass()) + { + return false; + } + NextGovernanceActionProcessStepLink that = (NextGovernanceActionProcessStepLink) objectToCompare; + return mandatoryGuard == that.mandatoryGuard && + Objects.equals(previousProcessStep, that.previousProcessStep) && + Objects.equals(nextProcessStep, that.nextProcessStep) && + Objects.equals(nextProcessStepLinkGUID, that.nextProcessStepLinkGUID) && + Objects.equals(guard, that.guard); + } + + + /** + * Return hash code for this object + * + * @return int hash code + */ + @Override + public int hashCode() + { + return Objects.hash(previousProcessStep, nextProcessStep, nextProcessStepLinkGUID, guard, mandatoryGuard); + } +} diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/ConnectionCheckedException.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/ConnectionCheckedException.java index 7f2d56292ce..813ceb3bc9e 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/ConnectionCheckedException.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/ConnectionCheckedException.java @@ -6,6 +6,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.Serial; import java.util.Map; /** @@ -17,7 +18,8 @@ */ public class ConnectionCheckedException extends OCFCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; private static final Logger log = LoggerFactory.getLogger(ConnectionCheckedException.class); diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/ConnectorCheckedException.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/ConnectorCheckedException.java index 57d2a3ef2fe..032178946b0 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/ConnectorCheckedException.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/ConnectorCheckedException.java @@ -6,6 +6,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.Serial; import java.util.Map; @@ -19,7 +20,8 @@ */ public class ConnectorCheckedException extends OCFCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; private static final Logger log = LoggerFactory.getLogger(ConnectorCheckedException.class); diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/PropertyServerException.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/PropertyServerException.java index 86cba9e3f74..fe714c57735 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/PropertyServerException.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/PropertyServerException.java @@ -6,6 +6,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.Serial; import java.util.Arrays; import java.util.Map; @@ -18,8 +19,8 @@ */ public class PropertyServerException extends OCFCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; private static final Logger log = LoggerFactory.getLogger(PropertyServerException.class); /** diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/UserNotAuthorizedException.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/UserNotAuthorizedException.java index c2d77a31a9d..86923628c24 100644 --- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/UserNotAuthorizedException.java +++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ffdc/UserNotAuthorizedException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Arrays; import java.util.Map; import java.util.Objects; @@ -15,7 +16,9 @@ */ public class UserNotAuthorizedException extends OCFCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; + private String userId; diff --git a/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/ffdc/DiscoveryEngineException.java b/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/ffdc/DiscoveryEngineException.java index 0f86b091822..de2a8452afd 100644 --- a/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/ffdc/DiscoveryEngineException.java +++ b/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/ffdc/DiscoveryEngineException.java @@ -5,12 +5,15 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; + /** * DiscoveryEngineException indicates there is a problem with a request to a specific discovery engine. The * error codes and messages indicate the cause of the problem and guidance on finding a remedy. */ public class DiscoveryEngineException extends OCFCheckedExceptionBase { + @Serial private static final long serialVersionUID = 1L; /** diff --git a/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/ffdc/DiscoveryServiceException.java b/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/ffdc/DiscoveryServiceException.java index ffd6630bb1c..aff31dc0bf1 100644 --- a/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/ffdc/DiscoveryServiceException.java +++ b/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/ffdc/DiscoveryServiceException.java @@ -5,12 +5,15 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; +import java.io.Serial; + /** * DiscoveryServiceException indicates there has been a problem running a discovery service. The * error codes and messages indicate the cause of the problem and guidance on finding a remedy. */ public class DiscoveryServiceException extends ConnectorCheckedException { + @Serial private static final long serialVersionUID = 1L; /** diff --git a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyException.java b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyException.java index 14d6d38bb58..a84c761cd17 100644 --- a/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyException.java +++ b/open-metadata-implementation/governance-server-services/data-engine-proxy-services/data-engine-proxy-services-server/src/main/java/org/odpi/openmetadata/governanceservers/dataengineproxy/auditlog/DataEngineProxyException.java @@ -4,12 +4,15 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; + /** * DataEngineProxyException provides a checked exception for reporting errors found when using * the Data Engine Proxy. */ public class DataEngineProxyException extends OCFCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; /** * @param httpCode - http response code to use if this exception flows over a rest call * @param className - name of class reporting error diff --git a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/ffdc/EngineHostServicesAuditCode.java b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/ffdc/EngineHostServicesAuditCode.java index ef218c3dbf4..f65b3e758b7 100644 --- a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/ffdc/EngineHostServicesAuditCode.java +++ b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/ffdc/EngineHostServicesAuditCode.java @@ -431,6 +431,16 @@ public enum EngineHostServicesAuditCode implements AuditLogMessageSet "Review the error messages and resolve the cause of the problem. Once resolved, the engine host should retry its scan as part of its normal refresh processing. " + "However, if the problem was in hte engine host, you may need to restart it to clear the problem."), + /** + * ENGINE-HOST-SERVICES-0036 - Governance engine {0} is cancelling running governance service for engine action {1}; thread name is {2} + */ + ENGINE_ACTION_CANCELLED("ENGINE-HOST-SERVICES-0036", + AuditLogRecordSeverityLevel.INFO, + "Governance engine {0} is cancelling running governance service for engine action {1}; thread name is {2}", + "The governance engine has been requested to stop the execution of a governance service by a cancel request issued by an external user.", + "Validate that this request should have been cancelled. Check it shutdown correctly. Rerun the request if necessary."), + + /** * ENGINE-HOST-SERVICES-0150 - {0} in server {1} is not configured with the platform URL root for the {2} */ @@ -467,11 +477,30 @@ public enum EngineHostServicesAuditCode implements AuditLogMessageSet */ ACTION_PROCESSING_ERROR( "ENGINE-HOST-SERVICES-2000", AuditLogRecordSeverityLevel.ERROR, - "{0} caught an exception {1} while processing governance action {2}; the error message was {3}", - "The server is not able to run any services in this engine service. The engine service fails to start which causes " + - "the server to fail too.", - "Add the qualified name for at least one engine to the engine service in this server's configuration document " + - "and then restart the server."), + "{0} caught an exception {1} while processing engine action {2}; the error message was {3}", + "The server is not able to start or complete the requested processing related to the governance service for this engine action.", + "Follow the instructions for the message associated with the exception."), + + /** + * ENGINE-HOST-SERVICES-2000 - {0} caught an exception {1} while processing governance action {2}; the error message was {3} + */ + RESTART_SERVICE_ERROR( "ENGINE-HOST-SERVICES-2001", + AuditLogRecordSeverityLevel.ERROR, + "Unable to restart governance service for engine action {0} caught an exception {1} while processing governance action {2}; the error message was {3}", + "The server is not able to run any services in this engine service. The engine service fails to start which causes " + + "the server to fail too.", + "Add the qualified name for at least one engine to the engine service in this server's configuration document " + + "and then restart the server."), + + /** + * ENGINE-HOST-SERVICES-2002 - {0} caught an exception {1} while restarting incomplete engine actions; the error message was {2} + */ + UNEXPECTED_EXCEPTION_DURING_RESTART( "ENGINE-HOST-SERVICES-2002", + AuditLogRecordSeverityLevel.ERROR, + "{0} caught an exception {1} while restarting incomplete engine actions; the error message was {2}", + "The server is not able to complete the restart processing.", + "Follow the instructions for the message associated with the exception to resolve the error. You may need to restart the engine host."), + ; diff --git a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/admin/GovernanceEngineHandler.java b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/admin/GovernanceEngineHandler.java index 2dfa0b81a54..b0062583fe2 100644 --- a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/admin/GovernanceEngineHandler.java +++ b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/admin/GovernanceEngineHandler.java @@ -33,11 +33,13 @@ public abstract class GovernanceEngineHandler protected String governanceEngineName; /* Initialized in constructor */ protected String governanceEngineGUID = null; protected GovernanceEngineProperties governanceEngineProperties = null; - private GovernanceEngineElement governanceEngineElement = null; + private GovernanceEngineElement governanceEngineElement = null; + private boolean servicesToRestart = true; private String governanceEngineTypeName = null; private List governanceEngineSuperTypeNames = null; + private final Map engineActionThreadMap = new HashMap<>(); private final GovernanceEngineConfigurationClient configurationClient; /* Initialized in constructor */ @@ -61,7 +63,7 @@ public GovernanceEngineHandler(EngineConfig engineConfig, String serverUserId, String engineServiceName, GovernanceEngineConfigurationClient configurationClient, - GovernanceContextClient engineActionClient, + GovernanceContextClient engineActionClient, AuditLog auditLog, int maxPageSize) { @@ -77,7 +79,7 @@ public GovernanceEngineHandler(EngineConfig engineConfig, this.configurationClient = configurationClient; this.engineActionClient = engineActionClient; this.auditLog = auditLog; - this.maxPageSize = maxPageSize; + this.maxPageSize = maxPageSize; } @@ -92,6 +94,18 @@ public String getGovernanceEngineName() } + /** + * Return the governance engine element - used to determine if the governance + * engine is configured. + * + * @return governance engine element + */ + public GovernanceEngineElement getGovernanceEngineElement() + { + return governanceEngineElement; + } + + /** * Return a summary of the governance engine * @@ -356,6 +370,56 @@ protected void validateGovernanceEngineInitialized(String expectedTypeName, } + /** + * Restart any services that were running when the engine host shut down. + * + * @param governanceEngineElement governance engine description + */ + public void restartServices(GovernanceEngineElement governanceEngineElement) + { + final String methodName = "restartServices"; + + if ((servicesToRestart) && (governanceEngineElement != null)) + { + try + { + int startFrom = 0; + + List engineActionElements = engineActionClient.getActiveClaimedEngineActions(serverUserId, + governanceEngineElement.getElementHeader().getGUID(), + startFrom, + maxPageSize); + + servicesToRestart = false; + while (engineActionElements != null) + { + for (EngineActionElement engineActionElement : engineActionElements) + { + if (engineActionElement != null) + { + restartGovernanceService(engineActionElement); + } + } + + startFrom = startFrom + maxPageSize; + engineActionElements = engineActionClient.getActiveClaimedEngineActions(serverUserId, + governanceEngineElement.getElementHeader().getGUID(), + startFrom, + maxPageSize); + } + } + catch (Exception error) + { + auditLog.logException(methodName, + EngineHostServicesAuditCode.UNEXPECTED_EXCEPTION_DURING_RESTART.getMessageDefinition(methodName, + error.getClass().getName(), + error.getMessage()), + error); + } + } + } + + /** * Retrieve the governance service for the requested type. * @@ -427,7 +491,7 @@ synchronized List getGovernanceRequestTypes() /** - * Execute the requested governance action on or after the start time. + * Execute the requested engine action on or after the start time. * * @param engineActionGUID unique identifier of potential governance action to run. */ @@ -443,7 +507,6 @@ public void executeEngineAction(String engineActionGUID) { engineActionClient.claimEngineAction(serverUserId, engineActionGUID); - engineActionClient.updateEngineActionStatus(serverUserId, engineActionGUID, EngineActionStatus.IN_PROGRESS); runGovernanceService(engineActionGUID, @@ -453,6 +516,11 @@ public void executeEngineAction(String engineActionGUID) latestEngineActionElement.getRequestSourceElements(), latestEngineActionElement.getActionTargetElements()); } + else if ((latestEngineActionElement.getActionStatus() == EngineActionStatus.CANCELLED) && + (serverUserId.equals(latestEngineActionElement.getProcessingEngineUserId()))) + { + cancelGovernanceService(engineActionGUID); + } } catch (Exception error) { @@ -467,7 +535,7 @@ public void executeEngineAction(String engineActionGUID) /** - * Run an instance of a governance service in its own thread and return the handler (for disconnect processing). + * Run an instance of a governance service in its own thread and register the handler (for disconnect processing). * * @param engineActionGUID unique identifier of the engine action * @param governanceRequestType governance request type to use when calling the governance engine @@ -489,6 +557,85 @@ public abstract void runGovernanceService(String engineActio UserNotAuthorizedException, PropertyServerException; + /** + * Restart an instance of a governance service in its own thread and register the handler (for disconnect processing). + * This can be overridden by an engine service if restart needs different logic to the first time + * a governance service starts for an engine action. + * + * @param engineActionElement details of the engine action + */ + public void restartGovernanceService(EngineActionElement engineActionElement) + { + final String methodName = "restartGovernanceService"; + + try + { + runGovernanceService(engineActionElement.getElementHeader().getGUID(), + engineActionElement.getRequestType(), + engineActionElement.getStartTime(), + engineActionElement.getRequestParameters(), + engineActionElement.getRequestSourceElements(), + engineActionElement.getActionTargetElements()); + } + catch (Exception error) + { + auditLog.logException(methodName, + EngineHostServicesAuditCode.ACTION_PROCESSING_ERROR.getMessageDefinition(methodName, + error.getClass().getName(), + engineActionElement.getElementHeader().getGUID(), + error.getMessage()), + error); + } + } + + + /** + * Start the execution of the governance service on a new thread. + * + * @param engineActionGUID unique identifier of the engine action that initiated this request. + * @param serviceToRun runnable packed with details of the governance service + * @param threadName name of the thread for diagnostic purposes + */ + protected synchronized void startServiceExecutionThread(String engineActionGUID, + Runnable serviceToRun, + String threadName) + { + Thread thread = new Thread(serviceToRun, threadName); + + engineActionThreadMap.put(engineActionGUID, thread); + + thread.start(); + } + + + /** + * Cancelling a running governance service. + * + * @param engineActionGUID unique identifier of the engine action + */ + private synchronized void cancelGovernanceService(String engineActionGUID) + { + final String methodName = "cancelGovernanceService"; + + Thread governanceServiceThread = engineActionThreadMap.get(engineActionGUID); + + if (governanceServiceThread != null) + { + auditLog.logMessage(methodName, + EngineHostServicesAuditCode.ENGINE_ACTION_CANCELLED.getMessageDefinition(governanceEngineName, + engineActionGUID, + governanceServiceThread.getName())); + + /* + * This interrupt should cause an exception to be received by the + * governance service thread + */ + governanceServiceThread.interrupt(); + } + } + + + /** * Confirms termination of the governance engine. */ diff --git a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/admin/GovernanceServiceHandler.java b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/admin/GovernanceServiceHandler.java index d158f7ff95b..a7669a1376d 100644 --- a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/admin/GovernanceServiceHandler.java +++ b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/admin/GovernanceServiceHandler.java @@ -27,18 +27,20 @@ */ public abstract class GovernanceServiceHandler implements Runnable { - protected GovernanceEngineProperties governanceEngineProperties; - protected String governanceEngineGUID; - protected String engineHostUserId; - protected String governanceServiceGUID; - protected String governanceServiceName; + protected final GovernanceEngineProperties governanceEngineProperties; + protected final String governanceEngineGUID; + protected final String engineHostUserId; + protected final String governanceServiceGUID; + protected final String governanceServiceName; + protected final Connector governanceService; + protected final String engineActionGUID; + protected final String serviceRequestType; + protected final AuditLog auditLog; private final GovernanceContextClient engineActionClient; + private final Date startDate; + - protected Connector governanceService; - protected String engineActionGUID; - protected String serviceRequestType; - protected AuditLog auditLog; /** @@ -55,6 +57,7 @@ public abstract class GovernanceServiceHandler implements Runnable * @param governanceServiceGUID unique identifier of the governance service * @param governanceServiceName name of this governance service - used for message logging * @param governanceService implementation of governance service + * @param startDate date/time that the governance service should start executing * @param auditLog destination for log messages */ protected GovernanceServiceHandler(GovernanceEngineProperties governanceEngineProperties, @@ -66,6 +69,7 @@ protected GovernanceServiceHandler(GovernanceEngineProperties governanceEnginePr String governanceServiceGUID, String governanceServiceName, Connector governanceService, + Date startDate, AuditLog auditLog) { this.governanceEngineProperties = governanceEngineProperties; @@ -77,6 +81,7 @@ protected GovernanceServiceHandler(GovernanceEngineProperties governanceEnginePr this.engineActionClient = engineActionClient; this.serviceRequestType = serviceRequestType; this.governanceService = governanceService; + this.startDate = startDate; this.auditLog = auditLog; } @@ -114,13 +119,34 @@ public String getGovernanceEngineName() } + /** + * If the service request has a start time in the future, wait for the start time. + */ + protected void waitForStartDate() + { + Date now = new Date(); + + while ((startDate != null) && (startDate.after(now))) + { + try + { + Thread.sleep(startDate.getTime()-now.getTime()); + } + catch (InterruptedException interruptedException) + { + now = new Date(); + } + } + } + + /** * Update the status of a specific action target. By default, these values are derived from - * the values for the governance action service. However, if the governance action service has to process name + * the values for the governance action service. However, if the governance service has to process name * target elements, then setting the status on each individual target will show the progress of the * governance action service. * - * @param actionTargetGUID unique identifier of the governance action service. + * @param actionTargetGUID unique identifier of the action target relationship. * @param status status enum to show its progress * @param startDate date/time that the governance action service started processing the target * @param completionDate date/time that the governance process completed processing this target. diff --git a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/enginemap/GovernanceEngineMap.java b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/enginemap/GovernanceEngineMap.java index a784f91d24a..c10c91367b9 100644 --- a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/enginemap/GovernanceEngineMap.java +++ b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-registration/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/enginemap/GovernanceEngineMap.java @@ -202,6 +202,7 @@ private GovernanceEngineHandler createGovernanceEngineHandler(GovernanceEngineEl auditLog, maxPageSize); + /* * Save the engine handler. */ diff --git a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/server/EngineHostOperationalServices.java b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/server/EngineHostOperationalServices.java index 423b160676d..8fbd57ae065 100644 --- a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/server/EngineHostOperationalServices.java +++ b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/server/EngineHostOperationalServices.java @@ -246,6 +246,8 @@ else if (((configuration.getEngineList() == null) || (configuration.getEngineLis configurationRefreshThread, governanceEngineHandlers); + + auditLog.logMessage(actionDescription, EngineHostServicesAuditCode.SERVER_INITIALIZED.getMessageDefinition(localServerName)); return activatedServiceList; diff --git a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/threads/EngineConfigurationRefreshThread.java b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/threads/EngineConfigurationRefreshThread.java index ee087aa49c2..aff01e30356 100644 --- a/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/threads/EngineConfigurationRefreshThread.java +++ b/open-metadata-implementation/governance-server-services/engine-host-services/engine-host-services-server/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/threads/EngineConfigurationRefreshThread.java @@ -143,6 +143,11 @@ public void run() if (governanceEngineHandler != null) { governanceEngineHandler.refreshConfig(); + + /* + * Restart any services that were incomplete when the engine host shutdown. + */ + governanceEngineHandler.restartServices(governanceEngineHandler.getGovernanceEngineElement()); } } catch (Exception error) diff --git a/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/lineage/connector/LineageIntegratorContext.java b/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/lineage/connector/LineageIntegratorContext.java index b641d779bcb..a100ba31c90 100644 --- a/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/lineage/connector/LineageIntegratorContext.java +++ b/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/lineage/connector/LineageIntegratorContext.java @@ -11,6 +11,7 @@ import org.odpi.openmetadata.accessservices.assetmanager.client.exchange.LineageExchangeClient; import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.*; import org.odpi.openmetadata.accessservices.assetmanager.properties.*; +import org.odpi.openmetadata.accessservices.assetmanager.properties.ProcessStatus; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectionCheckedException; import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException; @@ -19,10 +20,7 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; -import org.odpi.openmetadata.frameworks.governanceaction.properties.EngineActionElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.GovernanceActionProcessStepElement; -import org.odpi.openmetadata.frameworks.governanceaction.properties.NextGovernanceActionProcessStepElement; +import org.odpi.openmetadata.frameworks.governanceaction.properties.*; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; @@ -3448,15 +3446,15 @@ public GovernanceActionProcessStepElement getGovernanceActionProcessStepByGUID(S * * @param processGUID unique identifier of the governance action process * - * @return properties of the governance action process step + * @return properties of the first governance action process step * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceActionProcessStepElement getFirstProcessStep(String processGUID) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + public FirstGovernanceActionProcessStepElement getFirstProcessStep(String processGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException { return openGovernanceClient.getFirstActionProcessStep(userId, processGUID); } diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/ClassificationErrorException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/ClassificationErrorException.java index 21e58af9638..1068c0e781b 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/ClassificationErrorException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/ClassificationErrorException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,7 +13,8 @@ */ public class ClassificationErrorException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; /** diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityConflictException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityConflictException.java index 85e723f5a49..cdf5b26c22b 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityConflictException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityConflictException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,7 +13,8 @@ */ public class EntityConflictException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; /** diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityNotDeletedException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityNotDeletedException.java index 56eee3a62d1..1e89e11a79f 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityNotDeletedException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityNotDeletedException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,7 +13,8 @@ */ public class EntityNotDeletedException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; /** diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityNotKnownException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityNotKnownException.java index 99a7285b72f..31c3b649778 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityNotKnownException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityNotKnownException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,7 +13,8 @@ */ public class EntityNotKnownException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; /** diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityProxyOnlyException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityProxyOnlyException.java index e3abbef96e7..3a5004fa548 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityProxyOnlyException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/EntityProxyOnlyException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,7 +13,8 @@ */ public class EntityProxyOnlyException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; /** diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/FunctionNotSupportedException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/FunctionNotSupportedException.java index ff6b1c104cb..b6d5554465d 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/FunctionNotSupportedException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/FunctionNotSupportedException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class FunctionNotSupportedException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/HomeEntityException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/HomeEntityException.java index d2c52324063..eecb940a6da 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/HomeEntityException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/HomeEntityException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class HomeEntityException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/HomeRelationshipException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/HomeRelationshipException.java index 8251362eba8..96c05be4fb5 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/HomeRelationshipException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/HomeRelationshipException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class HomeRelationshipException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidEntityException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidEntityException.java index 7d94fb8b474..5c400a63874 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidEntityException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidEntityException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class InvalidEntityException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidParameterException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidParameterException.java index 67f5db72fdb..76a3478d90d 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidParameterException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidParameterException.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Map; /** @@ -13,7 +14,8 @@ */ public class InvalidParameterException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; private String parameterName = null; diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidRelationshipException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidRelationshipException.java index 209a55b5e2e..a381c766e78 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidRelationshipException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidRelationshipException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class InvalidRelationshipException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidTypeDefException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidTypeDefException.java index 2507a234060..6cb6092b7c9 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidTypeDefException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/InvalidTypeDefException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class InvalidTypeDefException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/OMRSCheckedExceptionBase.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/OMRSCheckedExceptionBase.java index c6b53781b95..29771b40861 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/OMRSCheckedExceptionBase.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/OMRSCheckedExceptionBase.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Map; /** @@ -17,8 +18,8 @@ */ public abstract class OMRSCheckedExceptionBase extends OCFCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/PagingErrorException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/PagingErrorException.java index f4dfb706e89..2efa87d93ca 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/PagingErrorException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/PagingErrorException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,7 +13,8 @@ */ public class PagingErrorException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; /** diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/PatchErrorException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/PatchErrorException.java index ebd5f925df6..6d6fe91ac8d 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/PatchErrorException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/PatchErrorException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class PatchErrorException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/PropertyErrorException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/PropertyErrorException.java index cc9e38a51b1..bab4f958f48 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/PropertyErrorException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/PropertyErrorException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class PropertyErrorException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RelationshipConflictException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RelationshipConflictException.java index 3ac73b0c2a9..87841b3e92b 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RelationshipConflictException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RelationshipConflictException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class RelationshipConflictException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RelationshipNotDeletedException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RelationshipNotDeletedException.java index e93d6002b2a..fe74d1fbc00 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RelationshipNotDeletedException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RelationshipNotDeletedException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -13,8 +14,8 @@ */ public class RelationshipNotDeletedException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RelationshipNotKnownException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RelationshipNotKnownException.java index cef75673cd4..7da056e17ed 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RelationshipNotKnownException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RelationshipNotKnownException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -13,8 +14,8 @@ */ public class RelationshipNotKnownException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RepositoryErrorException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RepositoryErrorException.java index 34e3e861ea3..d758f207ce0 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RepositoryErrorException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RepositoryErrorException.java @@ -6,6 +6,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Map; /** @@ -15,8 +16,8 @@ */ public class RepositoryErrorException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RepositoryTimeoutException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RepositoryTimeoutException.java index ad790852b29..1de38f98652 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RepositoryTimeoutException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/RepositoryTimeoutException.java @@ -6,6 +6,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Map; /** @@ -16,8 +17,8 @@ */ public class RepositoryTimeoutException extends RepositoryErrorException { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/StatusNotSupportedException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/StatusNotSupportedException.java index 8e090dc4972..e99c2147223 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/StatusNotSupportedException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/StatusNotSupportedException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -13,7 +14,8 @@ */ public class StatusNotSupportedException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; /** diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefConflictException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefConflictException.java index 5d880d14679..3fc20a79ed5 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefConflictException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefConflictException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class TypeDefConflictException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefInUseException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefInUseException.java index bf0a20678cf..f68b691af3d 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefInUseException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefInUseException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class TypeDefInUseException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefKnownException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefKnownException.java index 4b3aa537bb8..3f12cc59075 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefKnownException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefKnownException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,7 +13,8 @@ */ public class TypeDefKnownException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; /** diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefNotKnownException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefNotKnownException.java index 9251499f44e..3e4e74ceee3 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefNotKnownException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefNotKnownException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class TypeDefNotKnownException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefNotSupportedException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefNotSupportedException.java index dc090fe75a8..a01700e87ae 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefNotSupportedException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeDefNotSupportedException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class TypeDefNotSupportedException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeErrorException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeErrorException.java index 624dd25f9cb..cb8d93672dc 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeErrorException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/TypeErrorException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; /** @@ -12,8 +13,8 @@ */ public class TypeErrorException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; - + @Serial + private static final long serialVersionUID = 1L; /** * This is the typical constructor used for creating an exception. diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/UserNotAuthorizedException.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/UserNotAuthorizedException.java index 9b05643cfc3..89000513671 100644 --- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/UserNotAuthorizedException.java +++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/ffdc/exception/UserNotAuthorizedException.java @@ -4,6 +4,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; +import java.io.Serial; import java.util.Map; import java.util.Objects; @@ -13,9 +14,11 @@ */ public class UserNotAuthorizedException extends OMRSCheckedExceptionBase { - private static final long serialVersionUID = 1L; + @Serial + private static final long serialVersionUID = 1L; - private String userId = null; + + private String userId; /** * This is the typical constructor used for creating an UserNotAuthorizedException. diff --git a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/admin/AssetCatalogAdmin.java b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/admin/AssetCatalogAdmin.java index d087f9ec3ee..e2f9653e63d 100644 --- a/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/admin/AssetCatalogAdmin.java +++ b/open-metadata-implementation/view-services/asset-catalog/asset-catalog-server/src/main/java/org/odpi/openmetadata/viewservices/assetcatalog/admin/AssetCatalogAdmin.java @@ -72,7 +72,7 @@ public void initialize(String serverName, auditLog)); auditLog.logMessage(actionDescription, - AssetCatalogAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName), + AssetCatalogAuditCode.SERVICE_INITIALIZED.getMessageDefinition(), viewServiceConfig.toString()); } diff --git a/open-metadata-implementation/view-services/automated-curation/Egeria-automated-curation-omvs.http b/open-metadata-implementation/view-services/automated-curation/Egeria-automated-curation-omvs.http index f80c6c56f42..a3a7ace736c 100644 --- a/open-metadata-implementation/view-services/automated-curation/Egeria-automated-curation-omvs.http +++ b/open-metadata-implementation/view-services/automated-curation/Egeria-automated-curation-omvs.http @@ -1,6 +1,599 @@ # Egeria-automated-curation-view-service +@baseURL=https://localhost:9443 +@viewServer=view-server + +### +# ===================================================================================================================== +# Managed the authentication token. Run this request to create/refresh the token. + +# @name Token (RequestBody) +POST {{baseURL}}/api/token +Content-Type: application/json + +{ + "userId" : "peterprofile", + "password" : "secret" +} + +> {% client.global.set("token", response.body); %} + + +### +# ===================================================================================================================== +# A Governance Action Type describes a call to a specific request-type of a Governance Engine. This results +# in an Engine Action that calls the Governance Service running in an engine host. + +### +# This is the unique identifier of the governance action type that is returned on the create request +@governanceActionTypeGUID=xyz + +### +# @name createGovernanceActionType +# Create a new metadata element to represent a governance action type. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-types +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "GovernanceActionTypeProperties", + "qualifiedName" : "GovernanceActionType: .....", + "domainIdentifier" : 0, + "displayName" : "", + "description" : "", + "supportedGuards" : [ "", "" ], + "governanceEngineGUID" : "", + "requestType" : "", + "requestParameters" : { + "propertyName1" : "propertyValue", + "propertyName2" : "propertyValue" + }, + "waitTime" : 0, + "additionalProperties" : { + "propertyName1" : "propertyValue", + "propertyName2" : "propertyValue" + } +} + + +### +# @name updateGovernanceActionType +# Update the metadata element representing a governance action type. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-types/{{governanceActionTypeGUID}}/update +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "UpdateGovernanceActionTypeRequestBody", + "mergeUpdate" : true, + "properties" : { + "class" : "GovernanceActionTypeProperties", + "qualifiedName" : "GovernanceActionType: .....", + "domainIdentifier" : 0, + "displayName" : "", + "description" : "", + "supportedGuards" : [ "", "" ], + "governanceEngineGUID" : "", + "requestType" : "", + "requestParameters" : { + "propertyName1" : "propertyValue", + "propertyName2" : "propertyValue" + }, + "waitTime" : 0, + "additionalProperties" : { + "propertyName1" : "propertyValue", + "propertyName2" : "propertyValue" + } + } +} + + +### +# @name removeGovernanceActionType +# Remove the metadata element representing a governance action type. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-types/{{governanceActionTypeGUID}}/remove +Authorization: Bearer {{token}} + + +### +# @name findGovernanceActionTypes +# Retrieve the list of governance action type metadata elements that contain the search string. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-types/by-search-string?startFrom=0&pageSize=0&startsWith=false&endsWith=false&ignoreCase=true +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "string" : "add string here" +} + + +### +# @name getGovernanceActionTypesByName +# Retrieve the list of governance action type metadata elements with a matching qualified or display name. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-types/by-name?startFrom=0&pageSize=0 +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "string" : "add string here" +} + + +### +# @name getGovernanceActionTypeByGUID +# Retrieve the governance action type metadata element with the supplied unique identifier. +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-types/{{governanceActionTypeGUID}} +Authorization: Bearer {{token}} + + +### +# ===================================================================================================================== +# A governance action process describes a well-defined series of steps that gets something done. +# The steps are defined using GovernanceActionProcessSteps. + +# This is the unique identifier of the governance action process +@processGUID = guid + + +### +# @name createGovernanceActionProcess +# Create a new metadata element to represent a governance action process. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "NewGovernanceActionProcessRequestBody", + "processStatus" : "ACTIVE", + "properties" : { + "class" : "GovernanceActionProcessProperties", + "qualifiedName" : "GovernanceActionProcess: ...", + "domainIdentifier" : 0, + "displayName" : "", + "description" : "", + "versionIdentifier" : "1.0", + "formula": "", + "formulaType": "", + "additionalProperties" : { + "propertyName1" : "propertyValue", + "propertyName2" : "propertyValue" + } + } +} + + +### +# @name updateGovernanceActionProcess +# Update the metadata element representing a governance action process. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes/{{processGUID}}/update +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "UpdateGovernanceActionProcessRequestBody", + "mergeUpdate": true, + "processStatus" : "ACTIVE", + "properties" : { + "class" : "GovernanceActionProcessProperties", + "qualifiedName" : "GovernanceActionProcess: ...", + "domainIdentifier" : 0, + "displayName" : "", + "description" : "", + "versionIdentifier" : "1.0", + "waitTime" : 0, + "formula": "", + "formulaType": "", + "additionalProperties" : { + "propertyName1" : "propertyValue", + "propertyName2" : "propertyValue" + } + } +} + + +### +# @name publishGovernanceActionProcess +# Update the zones for the governance action process (asset) so that it becomes visible to consumers. +# (The zones are set to the list of zones in the publishedZones option configured for each +# instance of an Open Metadata Access Service (OMAS)). +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes/{{processGUID}}/publish +Authorization: Bearer {{token}} + + +### +# @name withdrawGovernanceActionProcess +# Update the zones for the asset so that it is no longer visible to consumers. +# (The zones are set to the list of zones in the defaultZones option configured for each +# instance of an Open Metadata AccessService (OMAS). This is also the setting for the zones when the process is first created.) +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes/{{processGUID}}/withdraw +Authorization: Bearer {{token}} + + +### +# @name removeGovernanceActionProcess +# Remove the metadata element representing a governance action process. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes/{{processGUID}}/remove +Authorization: Bearer {{token}} + + +### +# @name findGovernanceActionProcesses +# Retrieve the list of governance action process metadata elements that contain the search string. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes/by-search-string? + startFrom=0&pageSize=0&startsWith=false&endsWith=false&ignoreCase=true +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "string" : "add string here" +} + + +### +# @name getGovernanceActionProcessesByName +# Retrieve the list of governance action process metadata elements with a matching qualified or display name. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes/by-name? + startFrom=0&pageSize=0 +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "string" : "add string here" +} + + +### +# @name getGovernanceActionProcessByGUID +# Retrieve the governance action process metadata element with the supplied unique identifier. +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes/{{processGUID}} +Authorization: Bearer {{token}} + + +### +# @name getGovernanceActionProcessGraph +# Retrieve the governance action process metadata element with the supplied unique identifier +# along with the flow definition describing its implementation. +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes/{{processGUID}}/graph +Authorization: Bearer {{token}} + + +### +# ===================================================================================================================== +# A governance action process step describes a step in a governance action process +# + +@processStepGUID=guid +@nextProcessStepGUID=guid +@relationshipGUID=guid + + +### +# @name createGovernanceActionProcessStep +# Create a new metadata element to represent a governance action process step. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-process-steps +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "GovernanceActionProcessStepProperties", + "qualifiedName" : "GovernanceActionProcessStep: .....", + "domainIdentifier" : 0, + "displayName" : "", + "description" : "", + "producedGuards" : [ "", "" ], + "governanceEngineGUID" : "", + "requestType" : "", + "requestParameters" : { + "propertyName1" : "propertyValue", + "propertyName2" : "propertyValue" + }, + "waitTime" : 0, + "additionalProperties" : { + "propertyName1" : "propertyValue", + "propertyName2" : "propertyValue" + }, + "ignoreMultipleTriggers": false +} + + +### +# @name updateGovernanceActionProcessStep +# Update the metadata element representing a governance action process step. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-process-steps/{{processStepGUID}}/update +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "UpdateGovernanceActionProcessStepRequestBody", + "mergeUpdate": true, + "properties": { + "class" : "GovernanceActionProcessStepProperties", + "qualifiedName" : "GovernanceActionProcessStep: .....", + "domainIdentifier" : 0, + "displayName" : "", + "description" : "", + "producedGuards" : [ "", "" ], + "governanceEngineGUID" : "", + "requestType" : "", + "requestParameters" : { + "propertyName1" : "propertyValue", + "propertyName2" : "propertyValue" + }, + "waitTime" : 0, + "additionalProperties" : { + "propertyName1" : "propertyValue", + "propertyName2" : "propertyValue" + }, + "ignoreMultipleTriggers": false + } +} + + +### +# @name removeGovernanceActionProcessStep +# Remove the metadata element representing a governance action process step. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-process-steps/{{processStepGUID}}/remove +Authorization: Bearer {{token}} + + +### +# @name findGovernanceActionProcessSteps +# Retrieve the list of governance action process step metadata elements that contain the search string. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-process-steps/by-search-string? + startFrom=0&pageSize=0&startsWith=false&endsWith=false&ignoreCase=true +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "string" : "add string here" +} + + +### +# @name getGovernanceActionProcessStepsByName +# Retrieve the list of governance action process step metadata elements with a matching qualified or display name. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-process-steps/by-name? + startFrom=0&pageSize=0 +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "string" : "add string here" +} + + ### -# @name Get My Profile -GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation +# @name getGovernanceActionProcessStepByGUID +# Retrieve the governance action process step metadata element with the supplied unique identifier. +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-process-steps/{{processStepGUID}} Authorization: Bearer {{token}} + + +### +# @name setupFirstActionProcessStep +# Set up a link between a governance action process and a governance action process step. This defines the first +# step in the process. The request body is optional. It contains the name of the guard to pass to the first step +# in the process. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes/{{processGUID}}/first-process-step/{{processStepGUID}} +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "string" : "add name of guard" +} + +### +# @name getFirstActionProcessStep +# Return the governance action process step that is the first step in a governance action process. +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes/{processGUID}/first-process-step +Authorization: Bearer {{token}} + + +### +# @name removeFirstActionProcessStep +# Remove the link between a governance process and that governance action process step that defines its first step. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes/{{processGUID}}/first-process-step/remove + + +### +# @name setupNextActionProcessStep +# Add one of the links between two governance action process steps to show that one follows on from the other when a +# governance action process is executing. The guard identifies one of the possible guards that triggers the action. +# If mandatoryGuard=true then +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-process-steps/{{processStepGUID}}/next-process-steps/{{nextProcessStepGUID}} +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "NextGovernanceActionProcessStepRequestBody", + "guard" : "Add name of guard that could trigger the next step", + "mandatoryGuard" : false +} + + +### +# @name updateNextActionProcessStep +# Update the properties of the link between two governance action process steps that shows that one follows on from the other when a governance +# action process is executing. + +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-process-steps/next-process-steps/{{relationshipGUID}}/update +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "NextGovernanceActionProcessStepRequestBody", + "guard" : "Add name of guard that could trigger the next step", + "mandatoryGuard" : false +} + + +### +# @name getNextProcessSteps +# Return the list of next process steps defined for the governance action process. +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-process-steps/{{processStepGUID}}/next-process-steps?startFrom=0&pageSize=0 +Authorization: Bearer {{token}} + + + +### +# @name removeNextActionProcessStep +# Remove a follow-on step from a governance action process. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-process-steps/next-process-step/{{relationshipGUID}}/remove +Authorization: Bearer {{token}} + +### + +@governanceEngineName=AssetSurvey + +### +# @name initiateEngineAction +# Create an engine action in the metadata store that will trigger the governance service +# associated with the supplied request type. The engine action remains to act as a record +# of the actions taken for auditing. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-engines/{{governanceEngineName}}/engine-actions/initiate +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "InitiateEngineActionRequestBody", + "qualifiedName" : "EngineAction: .....", + "domainIdentifier" : 0, + "displayName" : "", + "description" : "", + "requestSourceGUIDs": [ "" ], + "actionTargets": [ + { + "class" : "NewActionTarget", + "actionTargetName" : "", + "actionTargetGUID" : "" + } ], + "receivedGuards": [ "" ], + "startDate" : "", + "requestType": "", + "requestParameters": { + "parameterName1" : "parameterValue1", + "parameterName2" : "parameterValue2" + }, + "processName": "", + "requestSourceName": "", + "originatorServiceName": "", + "originatorEngineName": "" +} + + +### +# @name initiateGovernanceActionType +# Using the named governance action process as a template, initiate a chain of engine actions. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-types/initiate +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "InitiateGovernanceActionTypeRequestBody", + "governanceActionTypeQualifiedName": "Egeria:GovernanceActionType:2adeb8f1-0f59-4970-b6f2-6cc25d4d2402survey-folder", + "actionTargets": [ + { + "class" : "NewActionTarget", + "actionTargetName": "folderToSurvey", + "actionTargetGUID": "bb9aebfe-5412-4512-b5b8-602c21465b09" + } ] +} + + +### +# Full request body for initiateGovernanceActionType +#{ +# "class" : "InitiateGovernanceActionTypeRequestBody", +# "governanceActionTypeQualifiedName": "Egeria:GovernanceActionType:2adeb8f1-0f59-4970-b6f2-6cc25d4d2402survey-folder", +# "requestParameters": { +# "parameterName1" : "parameterValue1", +# "parameterName2" : "parameterValue2" +# }, +# "requestSourceGUIDs": [ "" ], +# "actionTargets": [ +# { +# "class" : "NewActionTarget", +# "actionTargetName": "folderToSurvey", +# "actionTargetGUID": "ec35133e-bff9-4a2f-9ff1-18fda8c81396" +# } ], +# "startDate": "", +# "originatorServiceName": "", +# "originatorEngineName": "" +#} + +### +# @name initiateGovernanceActionProcess +# Using the named governance action process as a template, initiate a chain of engine actions. + +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/governance-action-processes/initiate +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "class" : "InitiateGovernanceActionProcessRequestBody", + "processQualifiedName": "", + "requestParameters": { + "parameterName1" : "parameterValue1", + "parameterName2" : "parameterValue2" + }, + "requestSourceGUIDs": [ "" ], + "actionTargets": [ + { + "class" : "NewActionTarget", + "actionTargetName" : "", + "actionTargetGUID" : "" + } ], + "startDate": "", + "originatorServiceName": "", + "originatorEngineName": "" +} + +### + +@engineActionGUID=ba70c389-3398-4a18-afc7-4711ec63d08d + +### +# @name getEngineAction +# Request the status and properties of an engine action request. +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/engine-actions/{{engineActionGUID}} +Authorization: Bearer {{token}} + + +### +# @name getEngineActions +# Retrieve the engine actions that are known to the server. +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/engine-actions?startFrom=0&pageSize=0 +Authorization: Bearer {{token}} + + +### +# @name getActiveEngineActions +# Retrieve the engine actions that are still in process. +GET {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/engine-actions/active?startFrom=0&pageSize=0 +Authorization: Bearer {{token}} + + +### +# @name findEngineActions +# Retrieve the list of engine action metadata elements that contain the search string. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/engine-actions/by-search-string? + startFrom=0&pageSize=0&startsWith=false&endsWith=false&ignoreCase=true +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "string" : "add string here" +} + + +### +# @name getEngineActionsByName +# Retrieve the list of engine action metadata elements with a matching qualified or display name. +POST {{baseURL}}/servers/{{viewServer}}/api/open-metadata/automated-curation/engine-actions/by-name? + startFrom=0&pageSize=0 +Authorization: Bearer {{token}} +Content-Type: application/json + +{ + "string" : "add string here" +} \ No newline at end of file diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/admin/AutomatedCurationAdmin.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/admin/AutomatedCurationAdmin.java index da0531f5448..2114128ff27 100644 --- a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/admin/AutomatedCurationAdmin.java +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/admin/AutomatedCurationAdmin.java @@ -68,7 +68,7 @@ public void initialize(String serverName, viewServiceConfig.getOMAGServerPlatformRootURL()); auditLog.logMessage(actionDescription, - AutomatedCurationAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName), + AutomatedCurationAuditCode.SERVICE_INITIALIZED.getMessageDefinition(), viewServiceConfig.toString()); } diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRESTServices.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRESTServices.java index 04ed7e6ef61..23c3427bee0 100644 --- a/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRESTServices.java +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-server/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/AutomatedCurationRESTServices.java @@ -199,7 +199,6 @@ public VoidResponse removeGovernanceActionType(String serverName, /** * Retrieve the list of governance action type metadata elements that contain the search string. - * The search string is treated as a regular expression. * * @param serverName name of the service to route the request to * @param startsWith does the value start with the supplied string? @@ -617,7 +616,6 @@ public VoidResponse removeGovernanceActionProcess(String serverName, /** * Retrieve the list of governance action process metadata elements that contain the search string. - * The search string is treated as a regular expression. * * @param serverName name of the service to route the request to * @param startsWith does the value start with the supplied string? @@ -777,6 +775,49 @@ public GovernanceActionProcessElementResponse getGovernanceActionProcessByGUID(S } + /** + * Retrieve the governance action process metadata element with the supplied unique identifier + * along with the flow definition describing its implementation. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the requested metadata element + * + * @return requested metadata element or + * InvalidParameterException one of the parameters is invalid + * UserNotAuthorizedException the user is not authorized to issue this request + * PropertyServerException there is a problem reported in the open metadata server(s) + */ + public GovernanceActionProcessGraphResponse getGovernanceActionProcessGraph(String serverName, + String processGUID) + { + final String methodName = "getGovernanceActionProcessGraph"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + GovernanceActionProcessGraphResponse response = new GovernanceActionProcessGraphResponse(); + AuditLog auditLog = null; + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + response.setElement(handler.getGovernanceActionProcessGraph(userId, processGUID)); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + /* ===================================================================================================================== * A governance action process step describes a step in a governance action process @@ -935,7 +976,6 @@ public VoidResponse removeGovernanceActionProcessStep(String serverName /** * Retrieve the list of governance action process step metadata elements that contain the search string. - * The search string is treated as a regular expression. * * @param serverName name of the service to route the request to * @param startsWith does the value start with the supplied string? @@ -1109,10 +1149,10 @@ public GovernanceActionProcessStepResponse getGovernanceActionProcessStepByGUID( * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public VoidResponse setupFirstActionProcessStep(String serverName, - String processGUID, - String processStepGUID, - String requestBody) + public VoidResponse setupFirstActionProcessStep(String serverName, + String processGUID, + String processStepGUID, + StringRequestBody requestBody) { final String methodName = "setupFirstActionProcessStep"; @@ -1130,7 +1170,14 @@ public VoidResponse setupFirstActionProcessStep(String serverName, auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); - handler.setupFirstActionProcessStep(userId, processGUID, processStepGUID, requestBody); + if (requestBody != null) + { + handler.setupFirstActionProcessStep(userId, processGUID, processStepGUID, requestBody.getString()); + } + else + { + handler.setupFirstActionProcessStep(userId, processGUID, processStepGUID, null); + } } catch (Exception error) { @@ -1153,14 +1200,14 @@ public VoidResponse setupFirstActionProcessStep(String serverName, * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - public GovernanceActionProcessStepResponse getFirstActionProcessStep(String serverName, - String processGUID) + public FirstGovernanceActionProcessStepResponse getFirstActionProcessStep(String serverName, + String processGUID) { final String methodName = "getFirstActionProcessStep"; RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); - GovernanceActionProcessStepResponse response = new GovernanceActionProcessStepResponse(); + FirstGovernanceActionProcessStepResponse response = new FirstGovernanceActionProcessStepResponse(); AuditLog auditLog = null; try @@ -1485,6 +1532,49 @@ public EngineActionElementResponse getEngineAction(String serverName, } + /** + * Request that an engine action is stopped. + * + * @param serverName name of server instance to route request to + * @param engineActionGUID identifier of the engine action request. + * + * @return engine action properties and status or + * InvalidParameterException one of the parameters is null or invalid. + * UserNotAuthorizedException user not authorized to issue this request. + * PropertyServerException there was a problem detected by the metadata store. + */ + public VoidResponse cancelEngineAction(String serverName, + String engineActionGUID) + { + final String methodName = "cancelEngineAction"; + + RESTCallToken token = restCallLogger.logRESTCall(serverName, methodName); + + AuditLog auditLog = null; + VoidResponse response = new VoidResponse(); + + try + { + String userId = super.getUser(instanceHandler.getServiceName(), methodName); + + restCallLogger.setUserId(token, userId); + + auditLog = instanceHandler.getAuditLog(userId, serverName, methodName); + + OpenGovernanceClient handler = instanceHandler.getOpenGovernanceClient(userId, serverName, methodName); + + handler.cancelEngineAction(userId, engineActionGUID); + } + catch (Exception error) + { + restExceptionHandler.captureExceptions(response, error, methodName, auditLog); + } + + restCallLogger.logRESTCallReturn(token, response.toString()); + return response; + } + + /** * Retrieve the engine actions that are known to the server. * @@ -1579,7 +1669,6 @@ public EngineActionElementsResponse getActiveEngineActions(String serverName, /** * Retrieve the list of engine action metadata elements that contain the search string. - * The search string is treated as a regular expression. * * @param serverName name of the service to route the request to * @param startsWith does the value start with the supplied string? @@ -1713,7 +1802,7 @@ public EngineActionElementsResponse getEngineActionsByName(String serve */ public GUIDResponse initiateEngineAction(String serverName, String governanceEngineName, - EngineActionRequestBody requestBody) + InitiateEngineActionRequestBody requestBody) { final String methodName = "initiateEngineAction"; @@ -1742,7 +1831,7 @@ public GUIDResponse initiateEngineAction(String serverName, requestBody.getRequestSourceGUIDs(), requestBody.getActionTargets(), requestBody.getReceivedGuards(), - requestBody.getStartTime(), + requestBody.getStartDate(), governanceEngineName, requestBody.getRequestType(), requestBody.getRequestParameters(), @@ -1778,7 +1867,7 @@ public GUIDResponse initiateEngineAction(String serverName, * PropertyServerException there is a problem with the metadata store */ public GUIDResponse initiateGovernanceActionType(String serverName, - GovernanceActionTypeRequestBody requestBody) + InitiateGovernanceActionTypeRequestBody requestBody) { final String methodName = "initiateGovernanceActionType"; @@ -1803,7 +1892,7 @@ public GUIDResponse initiateGovernanceActionType(String requestBody.getGovernanceActionTypeQualifiedName(), requestBody.getRequestSourceGUIDs(), requestBody.getActionTargets(), - requestBody.getStartTime(), + requestBody.getStartDate(), requestBody.getRequestParameters(), requestBody.getOriginatorServiceName(), requestBody.getOriginatorEngineName())); @@ -1835,7 +1924,7 @@ public GUIDResponse initiateGovernanceActionType(String * PropertyServerException there is a problem with the metadata store */ public GUIDResponse initiateGovernanceActionProcess(String serverName, - GovernanceActionProcessRequestBody requestBody) + InitiateGovernanceActionProcessRequestBody requestBody) { final String methodName = "initiateGovernanceActionProcess"; @@ -1860,7 +1949,7 @@ public GUIDResponse initiateGovernanceActionProcess(String requestBody.getProcessQualifiedName(), requestBody.getRequestSourceGUIDs(), requestBody.getActionTargets(), - requestBody.getStartTime(), + requestBody.getStartDate(), requestBody.getRequestParameters(), requestBody.getOriginatorServiceName(), requestBody.getOriginatorEngineName())); diff --git a/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/spring/AutomatedCurationResource.java b/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/spring/AutomatedCurationResource.java index 0b75bb3f7da..a38c633c66d 100644 --- a/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/spring/AutomatedCurationResource.java +++ b/open-metadata-implementation/view-services/automated-curation/automated-curation-spring/src/main/java/org/odpi/openmetadata/viewservices/automatedcuration/server/spring/AutomatedCurationResource.java @@ -57,7 +57,7 @@ public AutomatedCurationResource() * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - @PostMapping(path = "/governance-action-types/new") + @PostMapping(path = "/governance-action-types") @Operation(summary="createGovernanceActionType", description="Create a new metadata element to represent a governance action type.", externalDocs=@ExternalDocumentation(description="Further Information", @@ -124,7 +124,6 @@ public VoidResponse removeGovernanceActionType(@PathVariable S /** * Retrieve the list of governance action type metadata elements that contain the search string. - * The search string is treated as a regular expression. * * @param serverName name of the service to route the request to * @param startsWith does the value start with the supplied string? @@ -141,7 +140,7 @@ public VoidResponse removeGovernanceActionType(@PathVariable S */ @PostMapping(path = "/governance-action-types/by-search-string") @Operation(summary="findGovernanceActionTypes", - description="Retrieve the list of governance action type metadata elements that contain the search string. The search string is treated as a regular expression.", + description="Retrieve the list of governance action type metadata elements that contain the search string.", externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/governance-action-type")) @@ -229,7 +228,7 @@ public GovernanceActionTypeResponse getGovernanceActionTypeByGUID(@PathVariable * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - @PostMapping(path = "/governance-action-processes/new") + @PostMapping(path = "/governance-action-processes") @Operation(summary="createGovernanceActionProcess", description="Create a new metadata element to represent a governance action process.", externalDocs=@ExternalDocumentation(description="Further Information", @@ -352,7 +351,6 @@ public VoidResponse removeGovernanceActionProcess(@PathVariable /** * Retrieve the list of governance action process metadata elements that contain the search string. - * The search string is treated as a regular expression. * * @param serverName name of the service to route the request to * @param startsWith does the value start with the supplied string? @@ -369,7 +367,7 @@ public VoidResponse removeGovernanceActionProcess(@PathVariable */ @PostMapping(path = "/governance-action-processes/by-search-string") @Operation(summary="findGovernanceActionProcesses", - description="Retrieve the list of governance action process metadata elements that contain the search string. The search string is treated as a regular expression.", + description="Retrieve the list of governance action process metadata elements that contain the search string.", externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/governance-action-process")) @@ -442,6 +440,32 @@ public GovernanceActionProcessElementResponse getGovernanceActionProcessByGUID(@ } + /** + * Retrieve the governance action process metadata element with the supplied unique identifier + * along with the flow definition describing its implementation. + * + * @param serverName name of the service to route the request to + * @param processGUID unique identifier of the requested metadata element + * + * @return requested metadata element or + * InvalidParameterException one of the parameters is invalid + * UserNotAuthorizedException the user is not authorized to issue this request + * PropertyServerException there is a problem reported in the open metadata server(s) + */ + @GetMapping(path = "/governance-action-processes/{processGUID}/graph") + @Operation(summary="getGovernanceActionProcessGraph", + description="Retrieve the governance action process metadata element with the supplied " + + "unique identifier along with the flow definition describing its implementation.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/governance-action-process")) + + public GovernanceActionProcessGraphResponse getGovernanceActionProcessGraph(@PathVariable String serverName, + @PathVariable String processGUID) + { + return restAPI.getGovernanceActionProcessGraph(serverName, processGUID); + } + + /* ===================================================================================================================== * A governance action process step describes a step in a governance action process */ @@ -457,7 +481,7 @@ public GovernanceActionProcessElementResponse getGovernanceActionProcessByGUID(@ * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - @PostMapping(path = "/governance-action-process-steps/new") + @PostMapping(path = "/governance-action-process-steps") @Operation(summary="createGovernanceActionProcessStep", description="Create a new metadata element to represent a governance action process step.", externalDocs=@ExternalDocumentation(description="Further Information", @@ -524,7 +548,6 @@ public VoidResponse removeGovernanceActionProcessStep(@PathVariable /** * Retrieve the list of governance action process step metadata elements that contain the search string. - * The search string is treated as a regular expression. * * @param serverName name of the service to route the request to * @param startsWith does the value start with the supplied string? @@ -541,7 +564,7 @@ public VoidResponse removeGovernanceActionProcessStep(@PathVariable */ @PostMapping(path = "/governance-action-process-steps/by-search-string") @Operation(summary="findGovernanceActionProcessSteps", - description="Retrieve the list of governance action process step metadata elements that contain the search string. The search string is treated as a regular expression.", + description="Retrieve the list of governance action process step metadata elements that contain the search string.", externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/governance-action-process")) @@ -627,16 +650,16 @@ public GovernanceActionProcessStepResponse getGovernanceActionProcessStepByGUID( * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - @PostMapping(path = "/governance-action-processes/{processGUID}/first-process-step/{processStepGUID}/new") + @PostMapping(path = "/governance-action-processes/{processGUID}/first-process-step/{processStepGUID}") @Operation(summary="setupFirstActionProcessStep", description="Set up a link between a governance action process and a governance action process step. This defines the first step in the process.", externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/governance-action-process")) - public VoidResponse setupFirstActionProcessStep(@PathVariable String serverName, - @PathVariable String processGUID, - @PathVariable String processStepGUID, - @RequestBody (required = false) String requestBody) + public VoidResponse setupFirstActionProcessStep(@PathVariable String serverName, + @PathVariable String processGUID, + @PathVariable String processStepGUID, + @RequestBody (required = false) StringRequestBody requestBody) { return restAPI.setupFirstActionProcessStep(serverName, processGUID, processStepGUID, requestBody); } @@ -659,8 +682,8 @@ public VoidResponse setupFirstActionProcessStep(@PathVariable externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/governance-action-process")) - public GovernanceActionProcessStepResponse getFirstActionProcessStep(@PathVariable String serverName, - @PathVariable String processGUID) + public FirstGovernanceActionProcessStepResponse getFirstActionProcessStep(@PathVariable String serverName, + @PathVariable String processGUID) { return restAPI.getFirstActionProcessStep(serverName, processGUID); } @@ -707,7 +730,7 @@ public VoidResponse removeFirstProcessStep(@PathVariable Strin * UserNotAuthorizedException the user is not authorized to issue this request * PropertyServerException there is a problem reported in the open metadata server(s) */ - @PostMapping(path = "/governance-action-process-steps/{currentProcessStepGUID}/next-process-steps/{nextProcessStepGUID}/new") + @PostMapping(path = "/governance-action-process-steps/{currentProcessStepGUID}/next-process-steps/{nextProcessStepGUID}") @Operation(summary="removeFirstActionProcessStep", description="Remove the link between a governance process and that governance action process step that defines its first step.", externalDocs=@ExternalDocumentation(description="Further Information", @@ -823,9 +846,9 @@ public VoidResponse removeNextActionProcessStep(@PathVariable externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/engine-action")) - public GUIDResponse initiateEngineAction(@PathVariable String serverName, - @PathVariable String governanceEngineName, - @RequestBody EngineActionRequestBody requestBody) + public GUIDResponse initiateEngineAction(@PathVariable String serverName, + @PathVariable String governanceEngineName, + @RequestBody InitiateEngineActionRequestBody requestBody) { return restAPI.initiateEngineAction(serverName, governanceEngineName, requestBody); } @@ -849,7 +872,7 @@ public GUIDResponse initiateEngineAction(@PathVariable String s url="https://egeria-project.org/concepts/governance-action-type")) public GUIDResponse initiateGovernanceActionType(@PathVariable String serverName, - @RequestBody GovernanceActionTypeRequestBody requestBody) + @RequestBody InitiateGovernanceActionTypeRequestBody requestBody) { return restAPI.initiateGovernanceActionType(serverName, requestBody); } @@ -873,7 +896,7 @@ public GUIDResponse initiateGovernanceActionType(@PathVariable String url="https://egeria-project.org/concepts/governance-action-process")) public GUIDResponse initiateGovernanceActionProcess(@PathVariable String serverName, - @RequestBody GovernanceActionProcessRequestBody requestBody) + @RequestBody InitiateGovernanceActionProcessRequestBody requestBody) { return restAPI.initiateGovernanceActionProcess(serverName, requestBody); } @@ -903,6 +926,31 @@ public EngineActionElementResponse getEngineAction(@PathVariable String serverNa } + + /** + * Request that an engine action request is cancelled and any running governance service is stopped. + * + * @param serverName name of server instance to route request to + * @param engineActionGUID identifier of the engine action request. + * + * @return engine action properties and status or + * InvalidParameterException one of the parameters is null or invalid. + * UserNotAuthorizedException user not authorized to issue this request. + * PropertyServerException there was a problem detected by the metadata store. + */ + @GetMapping(path = "/engine-actions/{engineActionGUID}/cancel") + @Operation(summary="cancelEngineAction", + description="Request that an engine action request is cancelled and any running governance service is stopped.", + externalDocs=@ExternalDocumentation(description="Further Information", + url="https://egeria-project.org/concepts/engine-action")) + + public VoidResponse cancelEngineAction(@PathVariable String serverName, + @PathVariable String engineActionGUID) + { + return restAPI.cancelEngineAction(serverName, engineActionGUID); + } + + /** * Retrieve the engine actions that are known to the server. * @@ -957,7 +1005,6 @@ public EngineActionElementsResponse getActiveEngineActions(@PathVariable String /** * Retrieve the list of engine action metadata elements that contain the search string. - * The search string is treated as a regular expression. * * @param serverName name of the service to route the request to * @param startsWith does the value start with the supplied string? @@ -974,7 +1021,7 @@ public EngineActionElementsResponse getActiveEngineActions(@PathVariable String */ @PostMapping(path = "/engine-actions/by-search-string") @Operation(summary="findEngineActions", - description="Retrieve the list of engine action metadata elements that contain the search string. The search string is treated as a regular expression.", + description="Retrieve the list of engine action metadata elements that contain the search string.", externalDocs=@ExternalDocumentation(description="Further Information", url="https://egeria-project.org/concepts/engine-action")) diff --git a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/admin/CollectionManagerAdmin.java b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/admin/CollectionManagerAdmin.java index d9e28beab93..7b09bea92ea 100644 --- a/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/admin/CollectionManagerAdmin.java +++ b/open-metadata-implementation/view-services/collection-manager/collection-manager-server/src/main/java/org/odpi/openmetadata/viewservices/collectionmanager/admin/CollectionManagerAdmin.java @@ -68,7 +68,7 @@ public void initialize(String serverName, viewServiceConfig.getOMAGServerPlatformRootURL()); auditLog.logMessage(actionDescription, - CollectionManagerAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName), + CollectionManagerAuditCode.SERVICE_INITIALIZED.getMessageDefinition(), viewServiceConfig.toString()); } diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewServiceException.java b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewServiceException.java index 231d6cb1f2f..ea49d820de3 100644 --- a/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewServiceException.java +++ b/open-metadata-implementation/view-services/dino-view/dino-view-api/src/main/java/org/odpi/openmetadata/viewservices/dino/api/ffdc/DinoViewServiceException.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Arrays; @@ -17,6 +18,8 @@ */ public class DinoViewServiceException extends OCFCheckedExceptionBase { + @Serial + private static final long serialVersionUID = 1L; /* * Constructor diff --git a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/admin/DinoViewAdmin.java b/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/admin/DinoViewAdmin.java index 5281eb7b6f4..cd04dcc1bde 100644 --- a/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/admin/DinoViewAdmin.java +++ b/open-metadata-implementation/view-services/dino-view/dino-view-server/src/main/java/org/odpi/openmetadata/viewservices/dino/admin/DinoViewAdmin.java @@ -117,7 +117,7 @@ public void initialize(String serverName, this.serverName = serverName; auditLog.logMessage(actionDescription, - DinoViewAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName), + DinoViewAuditCode.SERVICE_INITIALIZED.getMessageDefinition(), viewServiceConfig.toString()); if (log.isDebugEnabled()) { diff --git a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/auditlog/GlossaryAuthorViewAuditCode.java b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/auditlog/GlossaryAuthorViewAuditCode.java index 2f51adfefb5..fb669a4de24 100644 --- a/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/auditlog/GlossaryAuthorViewAuditCode.java +++ b/open-metadata-implementation/view-services/glossary-author-view/glossary-author-view-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryauthor/auditlog/GlossaryAuthorViewAuditCode.java @@ -39,7 +39,7 @@ public enum GlossaryAuthorViewAuditCode implements AuditLogMessageSet */ SERVICE_INITIALIZED("OMVS-GLOSSARY-AUTHOR-0002", OMRSAuditLogRecordSeverity.STARTUP, - "The Glossary Author View Service (OMVS) is initialized", + "The Glossary Author View Service (OMVS) is initialized in server {0}", "The Glossary Author OMVS has completed initialization. Calls will be accepted by this service, if OMRS is also configured and the view server has been started. ", "No action is required. This is part of the normal operation of the Glossary Author OMVS. Once the OMRS is configured and the server is started, Glossary Author view service requests can be accepted."), diff --git a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/admin/GlossaryBrowserAdmin.java b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/admin/GlossaryBrowserAdmin.java index 76a53664ecc..f0b15d4460b 100644 --- a/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/admin/GlossaryBrowserAdmin.java +++ b/open-metadata-implementation/view-services/glossary-browser/glossary-browser-server/src/main/java/org/odpi/openmetadata/viewservices/glossarybrowser/admin/GlossaryBrowserAdmin.java @@ -68,7 +68,7 @@ public void initialize(String serverName, viewServiceConfig.getOMAGServerPlatformRootURL()); auditLog.logMessage(actionDescription, - GlossaryBrowserAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName), + GlossaryBrowserAuditCode.SERVICE_INITIALIZED.getMessageDefinition(), viewServiceConfig.toString()); } diff --git a/open-metadata-implementation/view-services/glossary-workflow/glossary-workflow-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryworkflow/admin/GlossaryWorkflowAdmin.java b/open-metadata-implementation/view-services/glossary-workflow/glossary-workflow-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryworkflow/admin/GlossaryWorkflowAdmin.java index 6ab28664d43..292ef725c5e 100644 --- a/open-metadata-implementation/view-services/glossary-workflow/glossary-workflow-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryworkflow/admin/GlossaryWorkflowAdmin.java +++ b/open-metadata-implementation/view-services/glossary-workflow/glossary-workflow-server/src/main/java/org/odpi/openmetadata/viewservices/glossaryworkflow/admin/GlossaryWorkflowAdmin.java @@ -29,7 +29,7 @@ public GlossaryWorkflowAdmin() /** - * Initialize the Glossary Workflowview service. + * Initialize the Glossary Workflow view service. * * @param serverName name of the local server * @param viewServiceConfig specific configuration properties for this view service. @@ -68,7 +68,7 @@ public void initialize(String serverName, viewServiceConfig.getOMAGServerPlatformRootURL()); auditLog.logMessage(actionDescription, - GlossaryWorkflowAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName), + GlossaryWorkflowAuditCode.SERVICE_INITIALIZED.getMessageDefinition(), viewServiceConfig.toString()); } diff --git a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/admin/MyProfileAdmin.java b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/admin/MyProfileAdmin.java index bf1fdd0a146..9176c9fe7ba 100644 --- a/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/admin/MyProfileAdmin.java +++ b/open-metadata-implementation/view-services/my-profile/my-profile-server/src/main/java/org/odpi/openmetadata/viewservices/myprofile/admin/MyProfileAdmin.java @@ -68,7 +68,7 @@ public void initialize(String serverName, viewServiceConfig.getOMAGServerPlatformRootURL()); auditLog.logMessage(actionDescription, - MyProfileAuditCode.SERVICE_INITIALIZED.getMessageDefinition(serverName), + MyProfileAuditCode.SERVICE_INITIALIZED.getMessageDefinition(), viewServiceConfig.toString()); } diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewServiceException.java b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewServiceException.java index bad5729e584..20066fdf1af 100644 --- a/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewServiceException.java +++ b/open-metadata-implementation/view-services/rex-view/rex-view-api/src/main/java/org/odpi/openmetadata/viewservices/rex/api/ffdc/RexViewServiceException.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Arrays; @@ -17,6 +18,9 @@ */ public class RexViewServiceException extends OCFCheckedExceptionBase { + @Serial + private static final long serialVersionUID = 1L; + /* * Constructor diff --git a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewServiceException.java b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewServiceException.java index 714288ea40f..613ca4c7ce4 100644 --- a/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewServiceException.java +++ b/open-metadata-implementation/view-services/server-author-view/server-author-view-api/src/main/java/org/odpi/openmetadata/viewservices/serverauthor/api/ffdc/ServerAuthorViewServiceException.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Arrays; @@ -17,6 +18,8 @@ */ public class ServerAuthorViewServiceException extends OCFCheckedExceptionBase { + @Serial + private static final long serialVersionUID = 1L; /** * Constructor diff --git a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewServiceException.java b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewServiceException.java index 4d910885457..8f3bb8c2c02 100644 --- a/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewServiceException.java +++ b/open-metadata-implementation/view-services/tex-view/tex-view-api/src/main/java/org/odpi/openmetadata/viewservices/tex/api/ffdc/TexViewServiceException.java @@ -5,6 +5,7 @@ import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition; import org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase; +import java.io.Serial; import java.util.Arrays; @@ -17,6 +18,9 @@ */ public class TexViewServiceException extends OCFCheckedExceptionBase { + @Serial + private static final long serialVersionUID = 1L; + /* * Constructor diff --git a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive2_6.java b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive2_6.java index b2e8299391b..9bea49a996e 100644 --- a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive2_6.java +++ b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive2_6.java @@ -1464,6 +1464,17 @@ private EnumDef getEngineActionStatusEnum() element8DescriptionGUID); elementDefs.add(elementDef); + final int element10Ordinal = 14; + final String element10Value = "Cancelled"; + final String element10Description = "The engine action was cancelled by an external caller."; + final String element10DescriptionGUID = null; + + elementDef = archiveHelper.getEnumElementDef(element10Ordinal, + element10Value, + element10Description, + element10DescriptionGUID); + elementDefs.add(elementDef); + final int element99Ordinal = 99; final String element99Value = "Other"; final String element99Description = "Undefined or unknown governance engine status."; diff --git a/open-metadata-resources/open-metadata-deployment/sample-configs/BuildSampleConfigs.http b/open-metadata-resources/open-metadata-deployment/sample-configs/BuildSampleConfigs.http index 388c4f79569..251875e0561 100644 --- a/open-metadata-resources/open-metadata-deployment/sample-configs/BuildSampleConfigs.http +++ b/open-metadata-resources/open-metadata-deployment/sample-configs/BuildSampleConfigs.http @@ -147,8 +147,8 @@ Content-Type: application/json }, { "class": "EngineConfig", - "engineId": "1a86651a-c9c1-4aee-8a83-4c028d89f774", - "engineQualifiedName": "AssetGovernance", + "engineId": "6a86651a-c9c1-4aee-8a83-4c028d89f775", + "engineQualifiedName": "AssetOnboarding", "engineUserId": "generalnpa" } ], diff --git a/open-metadata-resources/open-metadata-deployment/sample-configs/engine-host/config/engine-host.config b/open-metadata-resources/open-metadata-deployment/sample-configs/engine-host/config/engine-host.config index 8276b69faec..2090cb6d4aa 100644 --- a/open-metadata-resources/open-metadata-deployment/sample-configs/engine-host/config/engine-host.config +++ b/open-metadata-resources/open-metadata-deployment/sample-configs/engine-host/config/engine-host.config @@ -1 +1 @@ -{"class":"OMAGServerConfig","versionId":"V2.0","localServerId":"b07b01d0-26cb-450a-8701-5edef36c129f","localServerName":"engine-host","localServerURL":"https://localhost:9443","localServerUserId":"OMAGServer","maxPageSize":1000,"repositoryServicesConfig":{"class":"RepositoryServicesConfig","auditLogConnections":[{"class":"Connection","headerVersion":0,"qualifiedName":"Console- default","displayName":"Console","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.repositoryservices.auditlogstore.console.ConsoleAuditLogStoreProvider"},"configurationProperties":{"supportedSeverities":["Unknown","Information","Decision","Action","Error","Exception","Security","Startup","Shutdown","Asset","Cohort"]}}]},"engineHostServicesConfig":{"class":"EngineHostServicesConfig","engineList":[{"class":"EngineConfig","engineId":"4fe58760-ec4c-4f23-89c2-f7ae979e0e8b","engineQualifiedName":"AssetSurvey","engineUserId":"generalnpa"},{"class":"EngineConfig","engineId":"a80b17a8-ce6f-4cbc-b8bc-ff71b594f175","engineQualifiedName":"FileProvisioning","engineUserId":"generalnpa"},{"class":"EngineConfig","engineId":"1a86651a-c9c1-4aee-8a83-4c028d89f774","engineQualifiedName":"AssetGovernance","engineUserId":"generalnpa"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"}} \ No newline at end of file +{"class":"OMAGServerConfig","versionId":"V2.0","localServerId":"b07b01d0-26cb-450a-8701-5edef36c129f","localServerName":"engine-host","localServerURL":"https://localhost:9443","localServerUserId":"OMAGServer","maxPageSize":1000,"repositoryServicesConfig":{"class":"RepositoryServicesConfig","auditLogConnections":[{"class":"Connection","headerVersion":0,"qualifiedName":"Console- default","displayName":"Console","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.repositoryservices.auditlogstore.console.ConsoleAuditLogStoreProvider"},"configurationProperties":{"supportedSeverities":["Unknown","Information","Decision","Action","Error","Exception","Security","Startup","Shutdown","Asset","Cohort"]}}]},"engineHostServicesConfig":{"class":"EngineHostServicesConfig","engineList":[{"class":"EngineConfig","engineId":"4fe58760-ec4c-4f23-89c2-f7ae979e0e8b","engineQualifiedName":"AssetSurvey","engineUserId":"generalnpa"},{"class":"EngineConfig","engineId":"a80b17a8-ce6f-4cbc-b8bc-ff71b594f175","engineQualifiedName":"FileProvisioning","engineUserId":"generalnpa"},{"class":"EngineConfig","engineId":"6a86651a-c9c1-4aee-8a83-4c028d89f775","engineQualifiedName":"AssetOnboarding","engineUserId":"generalnpa"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"}} \ No newline at end of file diff --git a/open-metadata-resources/open-metadata-deployment/sample-configs/view-server/config/view-server.config b/open-metadata-resources/open-metadata-deployment/sample-configs/view-server/config/view-server.config index 00ec34f0317..473253df685 100644 --- a/open-metadata-resources/open-metadata-deployment/sample-configs/view-server/config/view-server.config +++ b/open-metadata-resources/open-metadata-deployment/sample-configs/view-server/config/view-server.config @@ -1 +1 @@ -{"class":"OMAGServerConfig","versionId":"V2.0","localServerId":"8ccb63db-dbe9-4727-a10b-cdd39ce7f263","localServerName":"view-server","localServerURL":"https://localhost:9443","localServerUserId":"OMAGServer","maxPageSize":1000,"viewServicesConfig":[{"class":"IntegrationViewServiceConfig","viewServiceId":800,"viewServiceDevelopmentStatus":"IN_DEVELOPMENT","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.glossaryauthor.admin.GlossaryAuthorViewAdmin","viewServiceName":"Glossary Author","viewServiceFullName":"Glossary Author OMVS","viewServiceURLMarker":"glossary-author","viewServiceDescription":"View Service for glossary authoring.","viewServiceWiki":"https://egeria-project.org/services/omvs/glossary-author/overview","viewServicePartnerService":"Subject Area OMAS","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":803,"viewServiceDevelopmentStatus":"TECHNICAL_PREVIEW","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.dino.admin.DinoViewAdmin","viewServiceName":"Dynamic Infrastructure and Operations","viewServiceFullName":"Dynamic Infrastructure and Operations OMVS","viewServiceURLMarker":"dino","viewServiceDescription":"Explore and operate an open metadata ecosystem.","viewServiceWiki":"https://egeria-project.org/services/omvs/dino/overview","viewServicePartnerService":"Server Operations","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":801,"viewServiceDevelopmentStatus":"TECHNICAL_PREVIEW","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.rex.admin.RexViewAdmin","viewServiceName":"Repository Explorer","viewServiceFullName":"Repository Explorer OMVS","viewServiceURLMarker":"rex","viewServiceDescription":"Explore open metadata instances.","viewServiceWiki":"https://egeria-project.org/services/omvs/rex/overview","viewServicePartnerService":"Open Metadata Repository Services (OMRS)","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":806,"viewServiceDevelopmentStatus":"TECHNICAL_PREVIEW","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.glossaryworkflow.admin.GlossaryWorkflowAdmin","viewServiceName":"Glossary Workflow","viewServiceFullName":"Glossary Workflow OMVS","viewServiceURLMarker":"glossary-workflow","viewServiceDescription":"Create glossary terms and organize them into categories as part of a controlled workflow process. It supports the editing glossary and multiple states.","viewServiceWiki":"https://egeria-project.org/services/omvs/glossary-workflow/overview/","viewServicePartnerService":"Asset Manager OMAS","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":807,"viewServiceDevelopmentStatus":"IN_DEVELOPMENT","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.myprofile.admin.MyProfileAdmin","viewServiceName":"My Profile","viewServiceFullName":"My Profile OMVS","viewServiceURLMarker":"my-profile","viewServiceDescription":"Manage information about the logged on user as well as their preferences.","viewServiceWiki":"https://egeria-project.org/services/omvs/my-profile/overview/","viewServicePartnerService":"Community Profile OMAS","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":802,"viewServiceDevelopmentStatus":"TECHNICAL_PREVIEW","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.tex.admin.TexViewAdmin","viewServiceName":"Type Explorer","viewServiceFullName":"Type Explorer OMVS","viewServiceURLMarker":"tex","viewServiceDescription":"Explore the open metadata types in a repository or cohort.","viewServiceWiki":"https://egeria-project.org/services/omvs/tex/overview","viewServicePartnerService":"Open Metadata Repository Services (OMRS)","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":804,"viewServiceDevelopmentStatus":"IN_DEVELOPMENT","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.serverauthor.admin.ServerAuthorViewAdmin","viewServiceName":"Server Author","viewServiceFullName":"Server Author OMVS","viewServiceURLMarker":"server-author","viewServiceDescription":"Author server configuration.","viewServiceWiki":"https://egeria-project.org/services/omvs/server-author/overview/","viewServicePartnerService":"Administration Services","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":805,"viewServiceDevelopmentStatus":"TECHNICAL_PREVIEW","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.glossarybrowser.admin.GlossaryBrowserAdmin","viewServiceName":"Glossary Browser","viewServiceFullName":"Glossary Browser OMVS","viewServiceURLMarker":"glossary-browser","viewServiceDescription":"View glossary terms and categories within a glossary.","viewServiceWiki":"https://egeria-project.org/services/omvs/glossary-browser/overview/","viewServicePartnerService":"Asset Manager OMAS","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":808,"viewServiceDevelopmentStatus":"IN_DEVELOPMENT","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.assetcatalog.admin.AssetCatalogAdmin","viewServiceName":"Asset Catalog","viewServiceFullName":"Asset Catalog OMVS","viewServiceURLMarker":"asset-catalog","viewServiceDescription":"Search and understand your assets.","viewServiceWiki":"https://egeria-project.org/services/omvs/asset-catalog/overview/","viewServicePartnerService":"Asset Consumer OMAS","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"}],"repositoryServicesConfig":{"class":"RepositoryServicesConfig","auditLogConnections":[{"class":"Connection","headerVersion":0,"qualifiedName":"Console- default","displayName":"Console","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.repositoryservices.auditlogstore.console.ConsoleAuditLogStoreProvider"},"configurationProperties":{"supportedSeverities":["Unknown","Information","Decision","Action","Error","Exception","Security","Startup","Shutdown","Asset","Cohort"]}}]},"auditTrail":["Mon Feb 12 21:00:05 GMT 2024 garygeeke updated configuration for view services."]} \ No newline at end of file +{"class":"OMAGServerConfig","versionId":"V2.0","localServerId":"bac416a9-91ac-427e-a7fd-28c14d30b7f9","localServerName":"view-server","localServerURL":"https://localhost:9443","localServerUserId":"OMAGServer","maxPageSize":1000,"viewServicesConfig":[{"class":"IntegrationViewServiceConfig","viewServiceId":809,"viewServiceDevelopmentStatus":"IN_DEVELOPMENT","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.automatedcuration.admin.AutomatedCurationAdmin","viewServiceName":"Automated Curation","viewServiceFullName":"Automated Curation OMVS","viewServiceURLMarker":"automated-curation","viewServiceDescription":"Manage Egeria's automation services.","viewServiceWiki":"https://egeria-project.org/services/omvs/automated-curation/overview/","viewServicePartnerService":"Asset Owner OMAS","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":800,"viewServiceDevelopmentStatus":"IN_DEVELOPMENT","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.glossaryauthor.admin.GlossaryAuthorViewAdmin","viewServiceName":"Glossary Author","viewServiceFullName":"Glossary Author OMVS","viewServiceURLMarker":"glossary-author","viewServiceDescription":"View Service for glossary authoring.","viewServiceWiki":"https://egeria-project.org/services/omvs/glossary-author/overview","viewServicePartnerService":"Subject Area OMAS","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":803,"viewServiceDevelopmentStatus":"TECHNICAL_PREVIEW","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.dino.admin.DinoViewAdmin","viewServiceName":"Dynamic Infrastructure and Operations","viewServiceFullName":"Dynamic Infrastructure and Operations OMVS","viewServiceURLMarker":"dino","viewServiceDescription":"Explore and operate an open metadata ecosystem.","viewServiceWiki":"https://egeria-project.org/services/omvs/dino/overview","viewServicePartnerService":"Server Operations","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":801,"viewServiceDevelopmentStatus":"TECHNICAL_PREVIEW","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.rex.admin.RexViewAdmin","viewServiceName":"Repository Explorer","viewServiceFullName":"Repository Explorer OMVS","viewServiceURLMarker":"rex","viewServiceDescription":"Explore open metadata instances.","viewServiceWiki":"https://egeria-project.org/services/omvs/rex/overview","viewServicePartnerService":"Open Metadata Repository Services (OMRS)","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":806,"viewServiceDevelopmentStatus":"TECHNICAL_PREVIEW","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.glossaryworkflow.admin.GlossaryWorkflowAdmin","viewServiceName":"Glossary Workflow","viewServiceFullName":"Glossary Workflow OMVS","viewServiceURLMarker":"glossary-workflow","viewServiceDescription":"Create glossary terms and organize them into categories as part of a controlled workflow process. It supports the editing glossary and multiple states.","viewServiceWiki":"https://egeria-project.org/services/omvs/glossary-workflow/overview/","viewServicePartnerService":"Asset Manager OMAS","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":807,"viewServiceDevelopmentStatus":"IN_DEVELOPMENT","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.myprofile.admin.MyProfileAdmin","viewServiceName":"My Profile","viewServiceFullName":"My Profile OMVS","viewServiceURLMarker":"my-profile","viewServiceDescription":"Manage information about the logged on user as well as their preferences.","viewServiceWiki":"https://egeria-project.org/services/omvs/my-profile/overview/","viewServicePartnerService":"Community Profile OMAS","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":802,"viewServiceDevelopmentStatus":"TECHNICAL_PREVIEW","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.tex.admin.TexViewAdmin","viewServiceName":"Type Explorer","viewServiceFullName":"Type Explorer OMVS","viewServiceURLMarker":"tex","viewServiceDescription":"Explore the open metadata types in a repository or cohort.","viewServiceWiki":"https://egeria-project.org/services/omvs/tex/overview","viewServicePartnerService":"Open Metadata Repository Services (OMRS)","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":804,"viewServiceDevelopmentStatus":"IN_DEVELOPMENT","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.serverauthor.admin.ServerAuthorViewAdmin","viewServiceName":"Server Author","viewServiceFullName":"Server Author OMVS","viewServiceURLMarker":"server-author","viewServiceDescription":"Author server configuration.","viewServiceWiki":"https://egeria-project.org/services/omvs/server-author/overview/","viewServicePartnerService":"Administration Services","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":805,"viewServiceDevelopmentStatus":"TECHNICAL_PREVIEW","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.glossarybrowser.admin.GlossaryBrowserAdmin","viewServiceName":"Glossary Browser","viewServiceFullName":"Glossary Browser OMVS","viewServiceURLMarker":"glossary-browser","viewServiceDescription":"View glossary terms and categories within a glossary.","viewServiceWiki":"https://egeria-project.org/services/omvs/glossary-browser/overview/","viewServicePartnerService":"Asset Manager OMAS","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"},{"class":"IntegrationViewServiceConfig","viewServiceId":808,"viewServiceDevelopmentStatus":"IN_DEVELOPMENT","viewServiceAdminClass":"org.odpi.openmetadata.viewservices.assetcatalog.admin.AssetCatalogAdmin","viewServiceName":"Asset Catalog","viewServiceFullName":"Asset Catalog OMVS","viewServiceURLMarker":"asset-catalog","viewServiceDescription":"Search and understand your assets.","viewServiceWiki":"https://egeria-project.org/services/omvs/asset-catalog/overview/","viewServicePartnerService":"Asset Consumer OMAS","viewServiceOperationalStatus":"ENABLED","resourceEndpoints":[{"class":"ResourceEndpointConfig","resourceCategory":"Platform","description":"This is the default OMAG Server Platform.","platformRootURL":"https://localhost:9443","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with XTDB repository and supporting Apache Kafka notifications.","serverName":"active-metadata-store","serverInstanceName":"Active Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Metadata server with in-memory repository and no event notifications.","serverName":"simple-metadata-store","serverInstanceName":"Simple Metadata Access Store","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Integration daemon supporting the synchronization of metadata with third party platforms and tools.","serverName":"integration-daemon","serverInstanceName":"Integration Daemon","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"Engine host server running the AssetSurvey and Asset Governance governance engines.","serverName":"engine-host","serverInstanceName":"Engine Host","platformName":"Platform:9443"},{"class":"ResourceEndpointConfig","resourceCategory":"Server","description":"View server providing REST API support to user interfaces and non-Java environments.","serverName":"view-server","serverInstanceName":"View Server","platformName":"Platform:9443"}],"omagserverPlatformRootURL":"https://localhost:9443","omagserverName":"active-metadata-store"}],"repositoryServicesConfig":{"class":"RepositoryServicesConfig","auditLogConnections":[{"class":"Connection","headerVersion":0,"qualifiedName":"Console- default","displayName":"Console","connectorType":{"class":"ConnectorType","headerVersion":0,"connectorProviderClassName":"org.odpi.openmetadata.adapters.repositoryservices.auditlogstore.console.ConsoleAuditLogStoreProvider"},"configurationProperties":{"supportedSeverities":["Unknown","Information","Decision","Action","Error","Exception","Security","Startup","Shutdown","Asset","Cohort"]}}]},"auditTrail":["Sun Feb 25 19:01:37 GMT 2024 garygeeke updated configuration for view services."]} \ No newline at end of file