Class GovernanceActionContext
java.lang.Object
org.odpi.openmetadata.frameworks.governanceaction.GovernanceActionContext
- All Implemented Interfaces:
GovernanceContext
,ProvisioningGovernanceContext
,RemediationGovernanceContext
,TriageGovernanceContext
,VerificationGovernanceContext
,WatchdogGovernanceContext
public class GovernanceActionContext
extends Object
implements GovernanceContext, ProvisioningGovernanceContext, RemediationGovernanceContext, TriageGovernanceContext, 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.
-
Constructor Summary
ConstructorsConstructorDescriptionGovernanceActionContext
(String userId, String governanceActionGUID, String requestType, Map<String, String> requestParameters, List<RequestSourceElement> requestSourceElements, List<ActionTargetElement> actionTargetElements, OpenMetadataClient openMetadataClient, OpenGovernanceClient openGovernanceClient) Constructor sets up the key parameters for processing the request to the governance action service. -
Method Summary
Modifier and TypeMethodDescriptionvoid
classifyMetadataElement
(String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, ElementProperties properties, Date effectiveTime) Add a new classification to the metadata element.void
classifyMetadataElement
(String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) Add a new classification to the metadata element.createAsset
(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.createIncidentReport
(String qualifiedName, int domainIdentifier, String background, List<IncidentImpactedElement> impactedResources, List<IncidentDependency> previousIncidents, Map<String, Integer> incidentClassifiers, Map<String, String> additionalProperties) Create an incident report to capture the situation detected by this governance action service.createLineageRelationship
(String sourceElementGUID, String targetElementGUID) Create a lineage mapping relationship between a source and target element.createLineageRelationship
(String relationshipName, String sourceElementGUID, String qualifiedName, String description, String formula, String targetElementGUID) Create a lineage relationship between a source and target element.createMetadataElement
(String metadataElementTypeName, ElementStatus initialStatus, Date effectiveFrom, Date effectiveTo, ElementProperties properties, String templateGUID) Create a new metadata element in the metadata store.createMetadataElement
(String metadataElementTypeName, ElementProperties properties, String templateGUID) Create a new metadata element in the metadata store.createPort
(String processGUID, String qualifiedName, String displayName, PortType portType, String templateGUID) 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.createRelatedElements
(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, ElementProperties properties, Date effectiveTime) Create a relationship between two metadata elements.createRelatedElements
(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) Create a relationship between two metadata elements.void
declassifyMetadataElement
(String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Remove the named classification from a specific metadata element.void
deleteMetadataElement
(String metadataElementGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Delete a specific metadata element.void
deleteRelatedElements
(String relationshipGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Delete a relationship between two metadata elements.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 unique identifier of the governance action that this service request is associated with.Return the client to access metadata from the open metadata repositories.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.initiateGovernanceAction
(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> requestSourceGUIDs, 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.initiateGovernanceAction
(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> requestSourceGUIDs, 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> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime) Using the named governance action process as a template, initiate a chain of governance actions.void
linkConsolidatedDuplicate
(String consolidatedElementGUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, List<String> sourceElementGUIDs) Identify an element that acts as a consolidated version for a set of duplicate elements.void
linkElementsAsPeerDuplicates
(String metadataElement1GUID, String metadataElement2GUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, boolean setKnownDuplicate) Link elements as peer duplicates.openToDo
(String toDoQualifiedName, String title, String instructions, int priority, Date dueDate, String assignTo) Create a To-Do request for someone to work on.void
reclassifyMetadataElement
(String metadataElementGUID, String classificationName, boolean replaceProperties, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) Update the properties of a classification that is currently attached to a specific metadata element.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
registerListener
(WatchdogGovernanceListener listener, List<WatchdogEventType> 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, GovernanceActionStatus status, Date startDate, Date completionDate, String completionMessage) Update the status of a specific action target.void
updateClassificationStatus
(String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, Date effectiveTime) Update the effectivity dates of a specific classification attached to a metadata element.void
updateMetadataElement
(String metadataElementGUID, boolean replaceProperties, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) Update the properties of a specific metadata element.void
updateMetadataElementEffectivity
(String metadataElementGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, Date effectiveTime) Update the status of specific metadata element.void
updateMetadataElementStatus
(String metadataElementGUID, boolean forLineage, boolean forDuplicateProcessing, ElementStatus newElementStatus, Date effectiveTime) Update the status of specific metadata element.void
updateRelatedElements
(String relationshipGUID, boolean replaceProperties, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) Update the properties associated with a relationship.void
updateRelatedElementsStatus
(String relationshipGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, Date effectiveTime) Update the effectivity dates of a specific relationship between metadata elements.
-
Constructor Details
-
GovernanceActionContext
public GovernanceActionContext(String userId, String governanceActionGUID, String requestType, Map<String, String> requestParameters, List<RequestSourceElement> requestSourceElements, List<ActionTargetElement> actionTargetElements, OpenMetadataClient openMetadataClient, OpenGovernanceClient openGovernanceClient) Constructor sets up the key parameters for processing the request to the governance action service.- Parameters:
userId
- calling usergovernanceActionGUID
- unique identifier of the governance 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 servicerequestSourceElements
- metadata elements associated with the request to the governance action serviceactionTargetElements
- metadata elements that need to be worked on by the governance action serviceopenGovernanceClient
- client to the metadata store for use by the governance action service
-
-
Method Details
-
getGovernanceActionGUID
Return the unique identifier of the governance action that this service request is associated with.- Specified by:
getGovernanceActionGUID
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
-
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
-
getOpenMetadataStore
Return the client to access metadata from the open metadata repositories. This enables the governance action service to retrieve more information about the metadata elements linked to the request source and action target elements.- Specified by:
getOpenMetadataStore
in interfaceGovernanceContext
- Returns:
- metadata store client
-
createIncidentReport
public String createIncidentReport(String qualifiedName, int domainIdentifier, String background, List<IncidentImpactedElement> impactedResources, List<IncidentDependency> previousIncidents, Map<String, Integer> incidentClassifiers, Map<String, throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionString> additionalProperties) Create an incident report to capture the situation detected by this governance action service. This incident report will be processed by other governance activities.- Specified by:
createIncidentReport
in interfaceGovernanceContext
- Parameters:
qualifiedName
- unique identifier to give this new incident reportdomainIdentifier
- governance domain associated with this action (0=ALL)background
- description of the situationimpactedResources
- details of the resources impacted by this situationpreviousIncidents
- links to previous incident reports covering this situationincidentClassifiers
- initial classifiers for the incident reportadditionalProperties
- additional arbitrary properties for the incident reports- Returns:
- unique identifier of the resulting incident report
- Throws:
InvalidParameterException
- null or non-unique qualified name for the incident reportUserNotAuthorizedException
- this governance action service is not authorized to create an incident reportPropertyServerException
- there is a problem with the metadata store
-
updateActionTargetStatus
public void updateActionTargetStatus(String actionTargetGUID, GovernanceActionStatus 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
-
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, String templateGUID) 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)templateGUID
- optional unique identifier of a template port to copy- 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 qualifiedName, String description, String formula, 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.qualifiedName
- qualifiedName of the information supply chaintargetElementGUID
- unique identifier of the element that describes the destination of the data.description
- description of the lineage activityformula
- expression summa- 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
-
createMetadataElement
public String createMetadataElement(String metadataElementTypeName, ElementProperties properties, String templateGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element in the metadata store. The type name comes from the open metadata types. The selected type also controls the names and types of the properties that are allowed. This metadata element will be given an initial status of ACTIVE which is sufficient for most types of elements.- Specified by:
createMetadataElement
in interfaceRemediationGovernanceContext
- Parameters:
metadataElementTypeName
- type name of the new metadata elementproperties
- properties of the new metadata elementtemplateGUID
- the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema connection etc)- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException
- the type name, status or one of the properties is invalidUserNotAuthorizedException
- the governance action service is not authorized to create this type of elementPropertyServerException
- there is a problem with the metadata store
-
createMetadataElement
public String createMetadataElement(String metadataElementTypeName, ElementStatus initialStatus, Date effectiveFrom, Date effectiveTo, ElementProperties properties, String templateGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element in the metadata store. The type name comes from the open metadata types. The selected type also controls the names and types of the properties that are allowed. This version of the method allows access to advanced features such as multiple states and effectivity dates.- Specified by:
createMetadataElement
in interfaceRemediationGovernanceContext
- Parameters:
metadataElementTypeName
- type name of the new metadata elementinitialStatus
- initial status of the metadata elementeffectiveFrom
- the date when this element is active - null for active on creationeffectiveTo
- the date when this element becomes inactive - null for active until deletedproperties
- properties of the new metadata elementtemplateGUID
- the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema connection etc)- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException
- the type name, status or one of the properties is invalidUserNotAuthorizedException
- the governance action service is not authorized to create this type of elementPropertyServerException
- there is a problem with the metadata store
-
updateMetadataElement
public void updateMetadataElement(String metadataElementGUID, boolean replaceProperties, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties of a specific metadata element. The properties must match the type definition associated with the metadata element when it was created. However, it is possible to update a few properties, or replace all them by the value used in the replaceProperties flag.- Specified by:
updateMetadataElement
in interfaceRemediationGovernanceContext
- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updatereplaceProperties
- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.forLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateproperties
- new properties for the metadata elementeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- either the unique identifier or the properties are invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
updateMetadataElementStatus
public void updateMetadataElementStatus(String metadataElementGUID, boolean forLineage, boolean forDuplicateProcessing, ElementStatus newElementStatus, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the status of specific metadata element. The new status must match a status value that is defined for the element's type assigned when it was created. The effectivity dates control the visibility of the element through specific APIs.- Specified by:
updateMetadataElementStatus
in interfaceRemediationGovernanceContext
- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicatenewElementStatus
- new status value - or null to leave as iseffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- either the unique identifier or the status are invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
updateMetadataElementEffectivity
public void updateMetadataElementEffectivity(String metadataElementGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the status of specific metadata element. The new status must match a status value that is defined for the element's type assigned when it was created. The effectivity dates control the visibility of the element through specific APIs.- Specified by:
updateMetadataElementEffectivity
in interfaceRemediationGovernanceContext
- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveFrom
- the date when this element is active - null for active noweffectiveTo
- the date when this element becomes inactive - null for active until deletedeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- either the unique identifier or the status are invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
deleteMetadataElement
public void deleteMetadataElement(String metadataElementGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Delete a specific metadata element.- Specified by:
deleteMetadataElement
in interfaceRemediationGovernanceContext
- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier is null or invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to delete this elementPropertyServerException
- there is a problem with the metadata store
-
classifyMetadataElement
public void classifyMetadataElement(String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Add a new classification to the metadata element. Note that only one classification with the same name can be attached to a metadata element.- Specified by:
classifyMetadataElement
in interfaceRemediationGovernanceContext
- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- name of the classification to add (if the classification is already present then use reclassify)forLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateproperties
- properties to store in the new classification. These must conform to the valid properties associated with the classification nameeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier or classification name is null or invalid in some way; properties do not match the valid properties associated with the classification's type definitionUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
classifyMetadataElement
public void classifyMetadataElement(String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Add a new classification to the metadata element. Note that only one classification with the same name can be attached to a metadata element.- Specified by:
classifyMetadataElement
in interfaceRemediationGovernanceContext
- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- name of the classification to add (if the classification is already present then use reclassify)forLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveFrom
- the date when this classification is active - null for active noweffectiveTo
- the date when this classification becomes inactive - null for active until deletedproperties
- properties to store in the new classification. These must conform to the valid properties associated with the classification nameeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier or classification name is null or invalid in some way; properties do not match the valid properties associated with the classification's type definitionUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
reclassifyMetadataElement
public void reclassifyMetadataElement(String metadataElementGUID, String classificationName, boolean replaceProperties, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties of a classification that is currently attached to a specific metadata element.- Specified by:
reclassifyMetadataElement
in interfaceRemediationGovernanceContext
- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- unique name of the classification to updatereplaceProperties
- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.forLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateproperties
- new properties for the classificationeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier or classification name is null or invalid in some way; properties do not match the valid properties associated with the classification's type definitionUserNotAuthorizedException
- the governance action service is not authorized to update this element/classificationPropertyServerException
- there is a problem with the metadata store
-
updateClassificationStatus
public void updateClassificationStatus(String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the effectivity dates of a specific classification attached to a metadata element. The effectivity dates control the visibility of the classification through specific APIs.- Specified by:
updateClassificationStatus
in interfaceRemediationGovernanceContext
- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- unique name of the classification to updateforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveFrom
- the date when this element is active - null for active noweffectiveTo
- the date when this element becomes inactive - null for active until deletedeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- either the unique identifier or the status are invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
declassifyMetadataElement
public void declassifyMetadataElement(String metadataElementGUID, String classificationName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the named classification from a specific metadata element.- Specified by:
declassifyMetadataElement
in interfaceRemediationGovernanceContext
- Parameters:
metadataElementGUID
- unique identifier of the metadata element to updateclassificationName
- unique name of the classification to removeforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier or classification name is null or invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to remove this classificationPropertyServerException
- there is a problem with the metadata store
-
createRelatedElements
public String createRelatedElements(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a relationship between two metadata elements. It is important to put the right element at each end of the relationship according to the type definition since this will affect how the relationship is interpreted.- Specified by:
createRelatedElements
in interfaceRemediationGovernanceContext
- Parameters:
relationshipTypeName
- name of the type of relationship to create. This will determine the types of metadata elements that can be related and the properties that can be associated with this relationship.metadataElement1GUID
- unique identifier of the metadata element at end 1 of the relationshipmetadataElement2GUID
- unique identifier of the metadata element at end 2 of the relationshipforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateproperties
- the properties of the relationshipeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Returns:
- unique identifier of the new relationship
- Throws:
InvalidParameterException
- the unique identifier's of the metadata elements are null or invalid in some way; the properties are not valid for this type of relationshipUserNotAuthorizedException
- the governance action service is not authorized to create this type of relationshipPropertyServerException
- there is a problem with the metadata store
-
createRelatedElements
public String createRelatedElements(String relationshipTypeName, String metadataElement1GUID, String metadataElement2GUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a relationship between two metadata elements. It is important to put the right element at each end of the relationship according to the type definition since this will affect how the relationship is interpreted.- Specified by:
createRelatedElements
in interfaceRemediationGovernanceContext
- Parameters:
relationshipTypeName
- name of the type of relationship to create. This will determine the types of metadata elements that can be related and the properties that can be associated with this relationship.metadataElement1GUID
- unique identifier of the metadata element at end 1 of the relationshipmetadataElement2GUID
- unique identifier of the metadata element at end 2 of the relationshipforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveFrom
- the date when this element is active - null for active noweffectiveTo
- the date when this element becomes inactive - null for active until deletedproperties
- the properties of the relationshipeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Returns:
- unique identifier of the new relationship
- Throws:
InvalidParameterException
- the unique identifier's of the metadata elements are null or invalid in some way; the properties are not valid for this type of relationshipUserNotAuthorizedException
- the governance action service is not authorized to create this type of relationshipPropertyServerException
- there is a problem with the metadata store
-
updateRelatedElements
public void updateRelatedElements(String relationshipGUID, boolean replaceProperties, boolean forLineage, boolean forDuplicateProcessing, ElementProperties properties, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties associated with a relationship.- Specified by:
updateRelatedElements
in interfaceRemediationGovernanceContext
- Parameters:
relationshipGUID
- unique identifier of the relationship to updatereplaceProperties
- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.forLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateproperties
- new properties for the relationshipeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier of the relationship is null or invalid in some way; the properties are not valid for this type of relationshipUserNotAuthorizedException
- the governance action service is not authorized to update this relationshipPropertyServerException
- there is a problem with the metadata store
-
updateRelatedElementsStatus
public void updateRelatedElementsStatus(String relationshipGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveFrom, Date effectiveTo, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the effectivity dates of a specific relationship between metadata elements. The effectivity dates control the visibility of the classification through specific APIs.- Specified by:
updateRelatedElementsStatus
in interfaceRemediationGovernanceContext
- Parameters:
relationshipGUID
- unique identifier of the relationship to updateforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveFrom
- the date when this element is active - null for active noweffectiveTo
- the date when this element becomes inactive - null for active until deletedeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- either the unique identifier or the status are invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to update this elementPropertyServerException
- there is a problem with the metadata store
-
deleteRelatedElements
public void deleteRelatedElements(String relationshipGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Delete a relationship between two metadata elements.- Specified by:
deleteRelatedElements
in interfaceRemediationGovernanceContext
- Parameters:
relationshipGUID
- unique identifier of the relationship to deleteforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- Throws:
InvalidParameterException
- the unique identifier of the relationship is null or invalid in some wayUserNotAuthorizedException
- the governance action service is not authorized to delete this relationshipPropertyServerException
- there is a problem with the metadata store
-
linkElementsAsPeerDuplicates
public void linkElementsAsPeerDuplicates(String metadataElement1GUID, String metadataElement2GUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, boolean setKnownDuplicate) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Link elements as peer duplicates. Create a simple relationship between two elements. If the relationship already exists, the properties are updated.- Specified by:
linkElementsAsPeerDuplicates
in interfaceRemediationGovernanceContext
- Parameters:
metadataElement1GUID
- unique identifier of the metadata element at end 1 of the relationshipmetadataElement2GUID
- unique identifier of the metadata element at end 2 of the relationshipstatusIdentifier
- what is the status of this relationship (negative means untrusted, 0 means unverified and positive means trusted)steward
- identifier of the stewardstewardTypeName
- type of element used to identify the stewardstewardPropertyName
- property name used to identify stewardsource
- source of the duplicate detection processingnotes
- notes for the stewardsetKnownDuplicate
- boolean flag indicating whether the KnownDuplicate classification should be set on the linked entities.- Throws:
InvalidParameterException
- the unique identifier's of the metadata elements are null or invalid in some way; the properties are not valid for this type of relationshipUserNotAuthorizedException
- the governance action service is not authorized to create this type of relationshipPropertyServerException
- there is a problem with the metadata store
-
linkConsolidatedDuplicate
public void linkConsolidatedDuplicate(String consolidatedElementGUID, int statusIdentifier, String steward, String stewardTypeName, String stewardPropertyName, String source, String notes, List<String> sourceElementGUIDs) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Identify an element that acts as a consolidated version for a set of duplicate elements. (The consolidated element is created using createMetadataElement.)- Specified by:
linkConsolidatedDuplicate
in interfaceRemediationGovernanceContext
- Parameters:
consolidatedElementGUID
- unique identifier of the metadata elementstatusIdentifier
- what is the status of this relationship (negative means untrusted, 0 means unverified and positive means trusted)steward
- identifier of the stewardstewardTypeName
- type of element used to identify the stewardstewardPropertyName
- property name used to identify stewardsource
- source of the duplicate detection processingnotes
- notes for the stewardsourceElementGUIDs
- List of the source elements that must be linked to the consolidated element. It is assumed that they already have the KnownDuplicateClassification.- Throws:
InvalidParameterException
- the unique identifier's of the metadata elements are null or invalid in some way; the properties are not valid for this type of relationshipUserNotAuthorizedException
- the governance action service is not authorized to create this type of relationshipPropertyServerException
- there is a problem with the metadata store
-
openToDo
public String openToDo(String toDoQualifiedName, String title, String instructions, int priority, Date dueDate, String assignTo) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a To-Do request for someone to work on.- Specified by:
openToDo
in interfaceTriageGovernanceContext
- Parameters:
toDoQualifiedName
- unique name for the to do. (Could be the engine name and a guid?)title
- short meaningful phrase for the person receiving the requestinstructions
- further details on what to dopriority
- priority value (based on organization's scale)dueDate
- date/time this needs to be completedassignTo
- qualified name of the PersonRole element for the recipient- Returns:
- unique identifier of new to do element
- Throws:
InvalidParameterException
- either todoQualifiedName or assignedTo are null or not recognizedUserNotAuthorizedException
- the governance action service is not authorized to create a to-doPropertyServerException
- there is a problem connecting to (or inside) the metadata store
-
registerListener
public void registerListener(WatchdogGovernanceListener listener, List<WatchdogEventType> 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
-
initiateGovernanceAction
public String initiateGovernanceAction(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> requestSourceGUIDs, 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:
initiateGovernanceAction
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 actionrequestSourceGUIDs
- request source elements for the resulting governance action serviceactionTargets
- map of action target names to GUIDs for the resulting governance action servicestartTime
- 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
-
initiateGovernanceAction
public String initiateGovernanceAction(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> requestSourceGUIDs, 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:
initiateGovernanceAction
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 actionrequestSourceGUIDs
- request source elements for the resulting governance action serviceactionTargets
- map of action target names to GUIDs for the resulting governance action servicestartTime
- 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
-
initiateGovernanceActionProcess
public String initiateGovernanceActionProcess(String processQualifiedName, Map<String, String> requestParameters, List<String> requestSourceGUIDs, 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 processrequestSourceGUIDs
- request source elements for the resulting governance action serviceactionTargets
- map of action target names to GUIDs for the resulting governance action servicestartTime
- future start time or null for "as soon as possible".- Returns:
- unique identifier of the first governance action of the process
- 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.
-