Class GovernanceActionContext
java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextBase
org.odpi.openmetadata.frameworks.opengovernance.GovernanceActionContext
- All Implemented Interfaces:
GovernanceContext
,ProvisioningGovernanceContext
,VerificationGovernanceContext
,WatchdogGovernanceContext
public class GovernanceActionContext
extends ConnectorContextBase
implements GovernanceContext, ProvisioningGovernanceContext, VerificationGovernanceContext, WatchdogGovernanceContext
GovernanceContext provides the governance action service with access to information about
the governance request along with the open metadata repository interfaces.
The abstract methods are implemented by the technology that supports the real metadata store.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextBase
auditLog, connectorActivityReportWriter, connectorGUID, connectorId, connectorName, connectorUserId, defaultDeleteMethod, externalSourceGUID, externalSourceName, fileClassifier, generateIntegrationReport, governanceDefinitionClient, localServerName, localServiceName, maxPageSize, openMetadataClient, openMetadataStore
-
Constructor Summary
ConstructorsConstructorDescriptionGovernanceActionContext
(String localServerName, String localServiceName, String externalSourceGUID, String externalSourceName, String connectorId, String connectorName, String connectorUserId, String connectorGUID, boolean generateIntegrationReport, OpenMetadataClient openMetadataClient, AuditLog auditLog, int maxPageSize, DeleteMethod deleteMethod, String engineActionGUID, String requestType, Map<String, String> requestParameters, String requesterUserId, List<RequestSourceElement> requestSourceElements, List<ActionTargetElement> actionTargetElements, GovernanceConfiguration governanceConfiguration, ActionControlInterface actionControlClient, OpenGovernanceClient duplicateManagementClient, GovernanceActionProcessInterface governanceActionProcessClient, GovernanceCompletionInterface governanceCompletionClient, WatchDogEventInterface watchdogEventClient) Constructor sets up the key parameters for processing the request to the governance action service. -
Method Summary
Modifier and TypeMethodDescriptioncreateAsset
(String assetTypeName, String qualifiedName, String name, String description) Create an asset such as a data file, database, API or server.createAsset
(String assetTypeName, String qualifiedName, String name, String versionIdentifier, String description, ElementProperties extendedProperties) Create an asset such as a data file, database, API or server.createAssetFromTemplate
(String templateGUID, String qualifiedName, String name, String description) Create an asset such as a data file, database, API or server.createAssetFromTemplate
(String assetTypeName, String templateGUID, String qualifiedName, String name, String versionIdentifier, String description, ElementProperties extendedProperties) Create an asset such as a data file, database, API or server.createChildProcess
(String processTypeName, ElementStatus initialStatus, String qualifiedName, String name, String description, String parentGUID) Create a process that represents the processing instance of this governance action.createChildProcess
(String processTypeName, ElementStatus initialStatus, String qualifiedName, String name, String versionIdentifier, String description, String formula, ElementProperties extendedProperties, String parentGUID) Create a process that represents the processing instance of this governance action.createLineageRelationship
(String sourceElementGUID, String targetElementGUID) Create a lineage mapping relationship between a source and target element.createLineageRelationship
(String relationshipName, String sourceElementGUID, String iscQualifiedName, String label, String description, String formula, String formulaType, String queryId, String query, String guard, String lineNumber, String targetElementGUID) Create a lineage relationship between a source and target element.createPort
(String processGUID, String qualifiedName, String displayName, PortType portType) Add a port to a process.createProcess
(String processTypeName, ElementStatus initialStatus, String qualifiedName, String name, String description) Create a new process to represent the processing of this governance action process.createProcess
(String processTypeName, ElementStatus initialStatus, String qualifiedName, String name, String versionIdentifier, String description, String formula, ElementProperties extendedProperties) Create a new process to represent the processing of this governance action process.createProcessFromTemplate
(String templateGUID, ElementStatus initialStatus, String qualifiedName, String name, String description) Create a new process to represent the processing of this governance action process.createProcessFromTemplate
(String templateGUID, ElementStatus initialStatus, String qualifiedName, String name, String versionIdentifier, String description, String formula, ElementProperties extendedProperties) Create a new process to represent the processing of this governance action process.void
Unregister the listener permanently from the event infrastructure.Return the list of elements that this governance action service should work on.Return any completion status from the governance action service.Return the client for managing the metadata associated with running connectors, governance engines and governance services.Return the client that manages deduplication.Return the unique identifier of the governance action that this service request is associated with.Return the userId of the original person, process, service that requested this action.Return the properties that hold the parameters used to drive the governance action service's processing.Return the list of metadata elements associated with the request to the governance action service.Return the type of request.initiateEngineAction
(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, Date startTime, String governanceEngineName, String requestType, Map<String, String> requestParameters) Create a governance action in the metadata store which will trigger the governance action service associated with the supplied request type.initiateEngineAction
(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, Date startTime, String governanceEngineName, String requestType, Map<String, String> requestParameters, String processName) Create a governance action in the metadata store which will trigger the governance action service associated with the supplied request type.initiateGovernanceActionProcess
(String processQualifiedName, Map<String, String> requestParameters, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, Date startTime) Using the named governance action process as a template, initiate a chain of governance actions.initiateGovernanceActionType
(String governanceActionTypeQualifiedName, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, Date startTime, Map<String, String> requestParameters, String originatorServiceName, String originatorEngineName) Using the named governance action type as a template, initiate an engine action.void
recordCompletionStatus
(CompletionStatus status, List<String> outputGuards) Declare that all the processing for the governance action service is finished and the status of the work.void
recordCompletionStatus
(CompletionStatus status, List<String> outputGuards, List<NewActionTarget> newActionTargets) Declare that all the processing for the governance action service is finished and the status of the work.void
recordCompletionStatus
(CompletionStatus status, List<String> outputGuards, Map<String, String> newRequestParameters, List<NewActionTarget> newActionTargets) Declare that all the processing for the governance action service is finished and the status of the work.void
recordCompletionStatus
(CompletionStatus status, List<String> outputGuards, Map<String, String> newRequestParameters, List<NewActionTarget> newActionTargets, String completionMessage) Declare that all the processing for the governance action service is finished and the status of the work.void
recordCompletionStatus
(CompletionStatus status, List<String> outputGuards, Map<String, String> newRequestParameters, List<NewActionTarget> newActionTargets, AuditLogMessageDefinition completionMessage) Declare that all the processing for the governance action service is finished and the status of the work.void
registerListener
(WatchdogGovernanceListener listener, List<OpenMetadataEventType> interestingEventTypes, List<String> interestingMetadataTypes, String specificInstance) Register a listener to receive events about changes to metadata elements in the open metadata store.toString()
Standard toString method.void
updateActionTargetStatus
(String actionTargetGUID, ActivityStatus status, Date startDate, Date completionDate, String completionMessage) Update the status of a specific action target.Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextBase
createIncidentReport, disconnect, getActorProfileClient, getActorRoleClient, getAnchorGUID, getAnchorGUID, getAssetClient, getAssetClient, getConnectionClient, getConnectorId, getConnectorName, getConnectorTypeClient, getEndpointClient, getFileClassifier, getGlossaryClient, getGlossaryTermClient, getGovernanceDefinitionClient, getGovernanceDefinitionClient, getLocalServerName, getLocalServiceName, getMaxPageSize, getMultiLanguageClient, getMyUserId, getOpenMetadataStore, getSchemaAttributeClient, getSchemaAttributeClient, getSchemaTypeClient, getSchemaTypeClient, getSoftwareCapabilityClient, getSoftwareCapabilityClient, getValidMetadataValuesClient, getValidValueDefinitionClient, isTypeOf, isTypeOf, openToDo, openToDo, publishReport, registerContextEvent, registerDirectoryListener, registerDirectoryTreeListener, registerFileListener, reportElementCreation, reportElementDelete, reportElementUpdate, setActiveReportPublishing, startRecording, unregisterDirectoryListener, unregisterDirectoryTreeListener, unregisterFileListener, validateIsActive
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.odpi.openmetadata.frameworks.opengovernance.GovernanceContext
getMaxPageSize
-
Constructor Details
-
GovernanceActionContext
public GovernanceActionContext(String localServerName, String localServiceName, String externalSourceGUID, String externalSourceName, String connectorId, String connectorName, String connectorUserId, String connectorGUID, boolean generateIntegrationReport, OpenMetadataClient openMetadataClient, AuditLog auditLog, int maxPageSize, DeleteMethod deleteMethod, String engineActionGUID, String requestType, Map<String, String> requestParameters, String requesterUserId, List<RequestSourceElement> requestSourceElements, List<ActionTargetElement> actionTargetElements, GovernanceConfiguration governanceConfiguration, ActionControlInterface actionControlClient, OpenGovernanceClient duplicateManagementClient, GovernanceActionProcessInterface governanceActionProcessClient, GovernanceCompletionInterface governanceCompletionClient, WatchDogEventInterface watchdogEventClient) Constructor sets up the key parameters for processing the request to the governance action service.- Parameters:
localServerName
- name of local serverlocalServiceName
- name of the service to callexternalSourceGUID
- metadata collection unique idexternalSourceName
- metadata collection unique nameconnectorId
- id of this connector instanceconnectorName
- name of this connector instanceconnectorUserId
- userId to use when issuing open metadata requestsconnectorGUID
- unique identifier of the connector element that describes this connector in the open metadata store(s)generateIntegrationReport
- should the context generate an integration report?openMetadataClient
- client to access open metadata storeauditLog
- logging destinationmaxPageSize
- max number of resultsdeleteMethod
- default delete methodengineActionGUID
- unique identifier of the engine action that triggered this governance servicerequestType
- unique identifier of the asset that the annotations should be attached torequestParameters
- name-value properties to control the governance action servicerequesterUserId
- original user requesting this governance servicerequestSourceElements
- metadata elements associated with the request to the governance action serviceactionTargetElements
- metadata elements that need to be worked on by the governance action serviceactionControlClient
- client to the open governance services for use by the governance action serviceduplicateManagementClient
- client to the open governance services for use by the governance action servicegovernanceActionProcessClient
- client to the open governance services for use by the governance action servicegovernanceCompletionClient
- client to the open governance services for use by the governance action servicewatchdogEventClient
- client to the open governance services for use by the governance action service
-
-
Method Details
-
getEngineActionGUID
Return the unique identifier of the governance action that this service request is associated with.- Specified by:
getEngineActionGUID
in interfaceGovernanceContext
- Returns:
- string guid
-
getRequestType
Return the type of request.- Specified by:
getRequestType
in interfaceGovernanceContext
- Returns:
- string guid
-
getRequestParameters
Return the properties that hold the parameters used to drive the governance action service's processing.- Specified by:
getRequestParameters
in interfaceGovernanceContext
- Returns:
- property map
-
getRequesterUserId
Return the userId of the original person, process, service that requested this action.- Specified by:
getRequesterUserId
in interfaceGovernanceContext
- Returns:
- string userId
-
getRequestSourceElements
Return the list of metadata elements associated with the request to the governance action service. This list will not change during the lifetime of the service.- Specified by:
getRequestSourceElements
in interfaceGovernanceContext
- Returns:
- list of request source elements
-
getActionTargetElements
Return the list of elements that this governance action service should work on.- Specified by:
getActionTargetElements
in interfaceGovernanceContext
- Returns:
- cached list of action target metadata elements
-
getConnectorConfigClient
Return the client for managing the metadata associated with running connectors, governance engines and governance services.- Specified by:
getConnectorConfigClient
in interfaceGovernanceContext
- Returns:
- connector context client
-
getDuplicateManagementClient
Return the client that manages deduplication.- Specified by:
getDuplicateManagementClient
in interfaceGovernanceContext
- Returns:
- deduplication manager
-
updateActionTargetStatus
public void updateActionTargetStatus(String actionTargetGUID, ActivityStatus status, Date startDate, Date completionDate, String completionMessage) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException 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 target elements, then setting the status on each individual target will show the progress of the governance action service.- Specified by:
updateActionTargetStatus
in interfaceGovernanceContext
- Parameters:
actionTargetGUID
- unique identifier of the governance action service.status
- status enum to show its progressstartDate
- date/time that the governance action service started processing the targetcompletionDate
- date/time that the governance process completed processing this target.completionMessage
- message to describe completion results or reasons for failure- Throws:
InvalidParameterException
- the action target GUID is not recognizedUserNotAuthorizedException
- the governance action service is not authorized to update the action target propertiesPropertyServerException
- there is a problem connecting to the metadata store
-
recordCompletionStatus
public void recordCompletionStatus(CompletionStatus status, List<String> outputGuards) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Declare that all the processing for the governance action service is finished and the status of the work.- Specified by:
recordCompletionStatus
in interfaceGovernanceContext
- Parameters:
status
- completion status enum valueoutputGuards
- optional guard strings for triggering subsequent action(s)- Throws:
InvalidParameterException
- the completion status is nullUserNotAuthorizedException
- the governance action service is not authorized to update the governance action service completion statusPropertyServerException
- there is a problem connecting to the metadata store
-
recordCompletionStatus
public void recordCompletionStatus(CompletionStatus status, List<String> outputGuards, List<NewActionTarget> newActionTargets) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Declare that all the processing for the governance action service is finished and the status of the work.- Specified by:
recordCompletionStatus
in interfaceGovernanceContext
- Parameters:
status
- completion status enum valueoutputGuards
- optional guard strings for triggering subsequent action(s)newActionTargets
- list of action target names to GUIDs for the resulting governance action service- Throws:
InvalidParameterException
- the completion status is nullUserNotAuthorizedException
- the governance action service is not authorized to update the governance action service completion statusPropertyServerException
- there is a problem connecting to the metadata store
-
recordCompletionStatus
public void recordCompletionStatus(CompletionStatus status, List<String> outputGuards, Map<String, String> newRequestParameters, List<NewActionTarget> newActionTargets) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionDeclare that all the processing for the governance action service is finished and the status of the work.- Specified by:
recordCompletionStatus
in interfaceGovernanceContext
- Parameters:
status
- completion status enum valueoutputGuards
- optional guard strings for triggering subsequent action(s)newRequestParameters
- additional request parameters. These override/augment any request parameters defined for the next invoked servicenewActionTargets
- list of action target names to GUIDs for the resulting governance action service- Throws:
InvalidParameterException
- the completion status is nullUserNotAuthorizedException
- the governance action service is not authorized to update the governance action service completion statusPropertyServerException
- there is a problem connecting to the metadata store
-
recordCompletionStatus
public void recordCompletionStatus(CompletionStatus status, List<String> outputGuards, Map<String, String> newRequestParameters, List<NewActionTarget> newActionTargets, String completionMessage) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionDeclare that all the processing for the governance action service is finished and the status of the work.- Specified by:
recordCompletionStatus
in interfaceGovernanceContext
- Parameters:
status
- completion status enum valueoutputGuards
- optional guard strings for triggering subsequent action(s)newRequestParameters
- additional request parameters. These override/augment any request parameters defined for the next invoked servicenewActionTargets
- list of action target names to GUIDs for the resulting governance action servicecompletionMessage
- message to describe completion results or reasons for failure- Throws:
InvalidParameterException
- the completion status is nullUserNotAuthorizedException
- the governance action service is not authorized to update the governance action service completion statusPropertyServerException
- there is a problem connecting to the metadata store
-
recordCompletionStatus
public void recordCompletionStatus(CompletionStatus status, List<String> outputGuards, Map<String, String> newRequestParameters, List<NewActionTarget> newActionTargets, AuditLogMessageDefinition completionMessage) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionDeclare that all the processing for the governance action service is finished and the status of the work.- Specified by:
recordCompletionStatus
in interfaceGovernanceContext
- Parameters:
status
- completion status enum valueoutputGuards
- optional guard strings for triggering subsequent action(s)newRequestParameters
- additional request parameters. These override/augment any request parameters defined for the next invoked servicenewActionTargets
- list of action target names to GUIDs for the resulting governance action servicecompletionMessage
- message to describe completion results or reasons for failure- Throws:
InvalidParameterException
- the completion status is nullUserNotAuthorizedException
- the governance action service is not authorized to update the governance action service completion statusPropertyServerException
- there is a problem connecting to the metadata store
-
getCompletionStatus
Return any completion status from the governance action service.- Specified by:
getCompletionStatus
in interfaceGovernanceContext
- Returns:
- completion status enum
-
createAsset
public String createAsset(String assetTypeName, String qualifiedName, String name, String description) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create an asset such as a data file, database, API or server. This interface includes an optional templateGUID to copy the structure of an existing asset of the same type.- Specified by:
createAsset
in interfaceProvisioningGovernanceContext
- Parameters:
assetTypeName
- the type name of the asset. This is the name of an open metadata type that inherits from "Asset".qualifiedName
- the unique name of the new assetname
- the technical display name of the assetdescription
- the description of the asset- Returns:
- unique identifier of the new asset
- Throws:
InvalidParameterException
- the type name or qualified name is null or invalidUserNotAuthorizedException
- this governance action service is not authorized to create an assetPropertyServerException
- there is a problem connecting to the metadata store
-
createAsset
public String createAsset(String assetTypeName, String qualifiedName, String name, String versionIdentifier, String description, ElementProperties extendedProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create an asset such as a data file, database, API or server.- Specified by:
createAsset
in interfaceProvisioningGovernanceContext
- Parameters:
assetTypeName
- the type name of the asset. This is the name of an open metadata type that inherits from "Asset".qualifiedName
- the unique name of the new assetname
- the technical display name of the resourceversionIdentifier
- version of the resourcedescription
- the description of the resourceextendedProperties
- attributes introduced by subtypes of Asset- Returns:
- unique identifier of the new asset
- Throws:
InvalidParameterException
- the type name or qualified name is null or invalidUserNotAuthorizedException
- this governance action service is not authorized to create an assetPropertyServerException
- there is a problem connecting to the metadata store
-
createAssetFromTemplate
public String createAssetFromTemplate(String templateGUID, String qualifiedName, String name, String description) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create an asset such as a data file, database, API or server. This interface includes an optional templateGUID to copy the structure of an existing asset of the same type.- Specified by:
createAssetFromTemplate
in interfaceProvisioningGovernanceContext
- Parameters:
templateGUID
- the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema, connection etc)qualifiedName
- the unique name of the new assetname
- the technical display name of the assetdescription
- the description of the asset- Returns:
- unique identifier of the new asset
- Throws:
InvalidParameterException
- the type name or qualified name is null or invalidUserNotAuthorizedException
- this governance action service is not authorized to create an assetPropertyServerException
- there is a problem connecting to the metadata store
-
createAssetFromTemplate
public String createAssetFromTemplate(String assetTypeName, String templateGUID, String qualifiedName, String name, String versionIdentifier, String description, ElementProperties extendedProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create an asset such as a data file, database, API or server. This is used if the provisioning governance action service has created a new asset as part of the provisioning process. This interface includes an optional templateGUID to copy the structure of an existing asset of the same type.- Specified by:
createAssetFromTemplate
in interfaceProvisioningGovernanceContext
- Parameters:
assetTypeName
- the type name of the asset. This is the name of an open metadata type that inherits from "Asset".templateGUID
- the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema, connection etc)qualifiedName
- the unique name of the new assetname
- the technical display name of the assetversionIdentifier
- version of the resourcedescription
- the description of the assetextendedProperties
- attributes introduced by subtypes of Asset- Returns:
- unique identifier of the new asset
- Throws:
InvalidParameterException
- the type name or qualified name is null or invalidUserNotAuthorizedException
- this governance action service is not authorized to create an assetPropertyServerException
- there is a problem connecting to the metadata store
-
createProcess
public String createProcess(String processTypeName, ElementStatus initialStatus, String qualifiedName, String name, String description) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new process to represent the processing of this governance action process.- Specified by:
createProcess
in interfaceProvisioningGovernanceContext
- Parameters:
processTypeName
- the type name of the process. This is the name of an open metadata type that inherits from "Process".initialStatus
- status value of the processqualifiedName
- the unique name of the new processname
- the technical display name of the processdescription
- the description of the process- Returns:
- unique identifier of the new process
- Throws:
InvalidParameterException
- the type name or qualified name is null or invalidUserNotAuthorizedException
- this governance action service is not authorized to create a processPropertyServerException
- there is a problem connecting to the metadata store
-
createProcess
public String createProcess(String processTypeName, ElementStatus initialStatus, String qualifiedName, String name, String versionIdentifier, String description, String formula, ElementProperties extendedProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new process to represent the processing of this governance action process.- Specified by:
createProcess
in interfaceProvisioningGovernanceContext
- Parameters:
processTypeName
- the type name of the process. This is the name of an open metadata type that inherits from "Process".initialStatus
- status value of the processqualifiedName
- the unique name of the new processname
- the technical display name of the processversionIdentifier
- version of the resourcedescription
- the description of the processformula
- expression that describes the behaviour of the processextendedProperties
- attributes introduced by subtypes of Process- Returns:
- unique identifier of the new process
- Throws:
InvalidParameterException
- the type name or qualified name is null or invalidUserNotAuthorizedException
- this governance action service is not authorized to create a processPropertyServerException
- there is a problem connecting to the metadata store
-
createProcessFromTemplate
public String createProcessFromTemplate(String templateGUID, ElementStatus initialStatus, String qualifiedName, String name, String description) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new process to represent the processing of this governance action process.- Specified by:
createProcessFromTemplate
in interfaceProvisioningGovernanceContext
- Parameters:
templateGUID
- the unique identifier of the existing process to copy (this will copy all the attachments such as ports, nested content, schema, connection etc)initialStatus
- status value of the processqualifiedName
- the unique name of the new processname
- the technical display name of the processdescription
- the description of the process- Returns:
- unique identifier of the new process
- Throws:
InvalidParameterException
- the type name or qualified name is null or invalidUserNotAuthorizedException
- this governance action service is not authorized to create a processPropertyServerException
- there is a problem connecting to the metadata store
-
createProcessFromTemplate
public String createProcessFromTemplate(String templateGUID, ElementStatus initialStatus, String qualifiedName, String name, String versionIdentifier, String description, String formula, ElementProperties extendedProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new process to represent the processing of this governance action process.- Specified by:
createProcessFromTemplate
in interfaceProvisioningGovernanceContext
- Parameters:
templateGUID
- the unique identifier of the existing process to copy (this will copy all the attachments such as ports, nested content, schema, connection etc)initialStatus
- status value of the processqualifiedName
- the unique name of the new processname
- the technical display name of the processversionIdentifier
- version of the resourcedescription
- the description of the processformula
- expression that describes the behaviour of the processextendedProperties
- attributes introduced by subtypes of Process- Returns:
- unique identifier of the new process
- Throws:
InvalidParameterException
- the type name or qualified name is null or invalidUserNotAuthorizedException
- this governance action service is not authorized to create a processPropertyServerException
- there is a problem connecting to the metadata store
-
createChildProcess
public String createChildProcess(String processTypeName, ElementStatus initialStatus, String qualifiedName, String name, String description, String parentGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a process that represents the processing instance of this governance action.- Specified by:
createChildProcess
in interfaceProvisioningGovernanceContext
- Parameters:
processTypeName
- the type name of the process. This is the name of an open metadata type that inherits from "Process".initialStatus
- status value of the processqualifiedName
- the unique name of the new processname
- the technical display name of the processdescription
- the description of the processparentGUID
- the unique identifier of the existing process to copy (this will copy all the attachments such as ports, nested content, schema, connection etc)- Returns:
- unique identifier of the new process
- Throws:
InvalidParameterException
- the type name or qualified name is null or invalidUserNotAuthorizedException
- this governance action service is not authorized to create a processPropertyServerException
- there is a problem connecting to the metadata store
-
createChildProcess
public String createChildProcess(String processTypeName, ElementStatus initialStatus, String qualifiedName, String name, String versionIdentifier, String description, String formula, ElementProperties extendedProperties, String parentGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a process that represents the processing instance of this governance action.- Specified by:
createChildProcess
in interfaceProvisioningGovernanceContext
- Parameters:
processTypeName
- the type name of the process. This is the name of an open metadata type that inherits from "Process".initialStatus
- status value of the processqualifiedName
- the unique name of the new processname
- the technical display name of the processversionIdentifier
- version of the resourcedescription
- the description of the processformula
- expression that describes the behaviour of the processextendedProperties
- attributes introduced by subtypes of ProcessparentGUID
- the unique identifier of the existing process to copy (this will copy all the attachments such as ports, nested content, schema, connection etc)- Returns:
- unique identifier of the new process
- Throws:
InvalidParameterException
- the type name or qualified name is null or invalidUserNotAuthorizedException
- this governance action service is not authorized to create a processPropertyServerException
- there is a problem connecting to the metadata store
-
createPort
public String createPort(String processGUID, String qualifiedName, String displayName, PortType portType) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Add a port to a process.- Specified by:
createPort
in interfaceProvisioningGovernanceContext
- Parameters:
processGUID
- unique identifier of the processqualifiedName
- unique name for the portdisplayName
- display name for the portportType
- type of port (direction of data flow)- Returns:
- unique identifier of the new port
- Throws:
InvalidParameterException
- the processGUID or qualified name is null or is invalidUserNotAuthorizedException
- the governance action service is not authorized to create this type of elementPropertyServerException
- there is a problem with the metadata store
-
createLineageRelationship
public String createLineageRelationship(String sourceElementGUID, String targetElementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a lineage mapping relationship between a source and target element. This could be between two assets, two process ports or two schema elements.- Specified by:
createLineageRelationship
in interfaceProvisioningGovernanceContext
- Parameters:
sourceElementGUID
- unique identifier of the element that describes the source of the data.targetElementGUID
- unique identifier of the element that describes the destination of the data.- Returns:
- unique identifier of the relationship
- Throws:
InvalidParameterException
- one of the GUIDs is null or is invalidUserNotAuthorizedException
- the governance action service is not authorized to create this type of relationshipPropertyServerException
- there is a problem with the metadata store
-
createLineageRelationship
public String createLineageRelationship(String relationshipName, String sourceElementGUID, String iscQualifiedName, String label, String description, String formula, String formulaType, String queryId, String query, String guard, String lineNumber, String targetElementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a lineage relationship between a source and target element. This could be between two assets, two process ports or two schema elements.- Specified by:
createLineageRelationship
in interfaceProvisioningGovernanceContext
- Parameters:
relationshipName
- either LineageMapping, ProcessCall, DataFlow, ControlFlow.sourceElementGUID
- unique identifier of the element that describes the source of the data.iscQualifiedName
- qualifiedName of the information supply chainlabel
- label for when the lineage relationship is visualizedformula
- expression summaryformulaType
- language used to express the formulaqueryId
- identifier for the process query - DataMapping Relationshipquery
- the process query - DataMapping Relationshipguard
- value that indicated a control path to take - ControlFlow relationshiplineNumber
- line number where the call is made - ProcessCall RelationshiptargetElementGUID
- unique identifier of the element that describes the destination of the data.description
- description of the lineage activity- Returns:
- unique identifier of the relationship
- Throws:
InvalidParameterException
- one of the GUIDs is null or is invalidUserNotAuthorizedException
- the governance action service is not authorized to create this type of relationshipPropertyServerException
- there is a problem with the metadata store
-
registerListener
public void registerListener(WatchdogGovernanceListener listener, List<OpenMetadataEventType> interestingEventTypes, List<String> interestingMetadataTypes, String specificInstance) throws InvalidParameterException Register a listener to receive events about changes to metadata elements in the open metadata store. There can be only one registered listener. If this method is called more than once, the new parameters replace the existing parameters. This means the watchdog governance action service can change the listener and the parameters that control the types of events received while it is running.
The types of events passed to the listener are controlled by the combination of the interesting event types and the interesting metadata types. That is an event is only passed to the listener if it matches both the interesting event types and the interesting metadata types.
If specific instance, interestingEventTypes or interestingMetadataTypes are null, it defaults to "any". If the listener parameter is null, no more events are passed to the listener. The type name specified in the interestingMetadataTypes refers to the subject of the event - so it is the type of the metadata element for metadata element types, the type of the relationship for related elements events and the name of the classification for classification events.- Specified by:
registerListener
in interfaceWatchdogGovernanceContext
- Parameters:
listener
- listener object to receive eventsinterestingEventTypes
- types of events that should be passed to the listenerinterestingMetadataTypes
- types of elements that are the subject of the interesting event typesspecificInstance
- unique identifier of a specific instance (metadata element or relationship) to watch for- Throws:
InvalidParameterException
- one or more of the type names are unrecognized
-
disconnectListener
public void disconnectListener()Unregister the listener permanently from the event infrastructure.- Specified by:
disconnectListener
in interfaceWatchdogGovernanceContext
-
initiateEngineAction
public String initiateEngineAction(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, Date startTime, String governanceEngineName, String requestType, Map<String, String> requestParameters) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionCreate a governance action in the metadata store which will trigger the governance action service associated with the supplied request type. The governance action remains to act as a record of the actions taken for auditing.- Specified by:
initiateEngineAction
in interfaceWatchdogGovernanceContext
- Parameters:
qualifiedName
- unique identifier to give this engine actiondomainIdentifier
- governance domain associated with this action (0=ALL)displayName
- display name for this actiondescription
- description for this actionactionSourceGUIDs
- request source elements for the resulting engine actionactionCauseGUIDs
- request cause elements for the resulting engine actionactionTargets
- list of action target names to GUIDs for the resulting engine actionstartTime
- future start time or null for "as soon as possible".governanceEngineName
- name of the governance engine to run the requestrequestType
- request type to identify the governance action service to runrequestParameters
- properties to pass to the governance action service- Returns:
- unique identifier of the governance action
- Throws:
InvalidParameterException
- null qualified nameUserNotAuthorizedException
- this governance action service is not authorized to create a governance actionPropertyServerException
- there is a problem with the metadata store
-
initiateEngineAction
public String initiateEngineAction(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, Date startTime, String governanceEngineName, String requestType, Map<String, String> requestParameters, String processName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionCreate a governance action in the metadata store which will trigger the governance action service associated with the supplied request type. The governance action remains to act as a record of the actions taken for auditing.- Specified by:
initiateEngineAction
in interfaceWatchdogGovernanceContext
- Parameters:
qualifiedName
- unique identifier to give this governance actiondomainIdentifier
- governance domain associated with this action (0=ALL)displayName
- display name for this actiondescription
- description for this actionactionSourceGUIDs
- request source elements for the resulting engine actionactionCauseGUIDs
- request cause elements for the resulting engine actionactionTargets
- list of action target names to GUIDs for the resulting engine actionstartTime
- future start time or null for "as soon as possible".governanceEngineName
- name of the governance engine to run the requestrequestType
- request type to identify the governance action service to runrequestParameters
- properties to pass to the governance action serviceprocessName
- name of the process that this action is a part of- Returns:
- unique identifier of the governance action
- Throws:
InvalidParameterException
- null qualified nameUserNotAuthorizedException
- this governance action service is not authorized to create a governance actionPropertyServerException
- there is a problem with the metadata store
-
initiateGovernanceActionType
public String initiateGovernanceActionType(String governanceActionTypeQualifiedName, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, Date startTime, Map<String, String> requestParameters, String originatorServiceName, String originatorEngineName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionUsing the named governance action type as a template, initiate an engine action.- Specified by:
initiateGovernanceActionType
in interfaceWatchdogGovernanceContext
- Parameters:
governanceActionTypeQualifiedName
- unique name of the governance action type to useactionSourceGUIDs
- request source elements for the resulting engine actionactionCauseGUIDs
- request cause elements for the resulting engine actionactionTargets
- list of action target names to GUIDs for the resulting engine actionstartTime
- future start time or null for "as soon as possible".requestParameters
- request properties to be passed to the engine actionoriginatorServiceName
- unique name of the requesting governance service (if initiated by a governance engine).originatorEngineName
- optional unique name of the governance engine (if initiated by a governance engine).- Returns:
- unique identifier of the engine action
- Throws:
InvalidParameterException
- null or unrecognized qualified name of the typeUserNotAuthorizedException
- the caller is not authorized to create an engine actionPropertyServerException
- there is a problem with the metadata store
-
initiateGovernanceActionProcess
public String initiateGovernanceActionProcess(String processQualifiedName, Map<String, String> requestParameters, List<String> actionSourceGUIDs, List<String> actionCauseGUIDs, List<NewActionTarget> actionTargets, Date startTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionUsing the named governance action process as a template, initiate a chain of governance actions.- Specified by:
initiateGovernanceActionProcess
in interfaceWatchdogGovernanceContext
- Parameters:
processQualifiedName
- unique name of the governance action process to userequestParameters
- request parameters to pass to the governance actions called in the governance action processactionSourceGUIDs
- request source elements for the resulting engine actionactionCauseGUIDs
- request cause elements for the resulting engine actionactionTargets
- list of action target names to GUIDs for the resulting engine actionstartTime
- future start time or null for "as soon as possible".- Returns:
- unique identifier of the governance action process instance
- Throws:
InvalidParameterException
- null or unrecognized qualified name of the processUserNotAuthorizedException
- this governance action service is not authorized to create a governance action processPropertyServerException
- there is a problem with the metadata store
-
toString
Standard toString method.
-