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

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 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 server
      localServiceName - name of the service to call
      externalSourceGUID - metadata collection unique id
      externalSourceName - metadata collection unique name
      connectorId - id of this connector instance
      connectorName - name of this connector instance
      connectorUserId - userId to use when issuing open metadata requests
      connectorGUID - 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 store
      auditLog - logging destination
      maxPageSize - max number of results
      deleteMethod - default delete method
      engineActionGUID - unique identifier of the engine action that triggered this governance service
      requestType - unique identifier of the asset that the annotations should be attached to
      requestParameters - name-value properties to control the governance action service
      requesterUserId - original user requesting this governance service
      requestSourceElements - metadata elements associated with the request to the governance action service
      actionTargetElements - metadata elements that need to be worked on by the governance action service
      actionControlClient - client to the open governance services for use by the governance action service
      duplicateManagementClient - client to the open governance services for use by the governance action service
      governanceActionProcessClient - client to the open governance services for use by the governance action service
      governanceCompletionClient - client to the open governance services for use by the governance action service
      watchdogEventClient - client to the open governance services for use by the governance action service
  • Method Details

    • getEngineActionGUID

      public String getEngineActionGUID()
      Return the unique identifier of the governance action that this service request is associated with.
      Specified by:
      getEngineActionGUID in interface GovernanceContext
      Returns:
      string guid
    • getRequestType

      public String getRequestType()
      Return the type of request.
      Specified by:
      getRequestType in interface GovernanceContext
      Returns:
      string guid
    • getRequestParameters

      public Map<String,String> getRequestParameters()
      Return the properties that hold the parameters used to drive the governance action service's processing.
      Specified by:
      getRequestParameters in interface GovernanceContext
      Returns:
      property map
    • getRequesterUserId

      public String getRequesterUserId()
      Return the userId of the original person, process, service that requested this action.
      Specified by:
      getRequesterUserId in interface GovernanceContext
      Returns:
      string userId
    • getRequestSourceElements

      public List<RequestSourceElement> 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 interface GovernanceContext
      Returns:
      list of request source elements
    • getActionTargetElements

      public List<ActionTargetElement> getActionTargetElements()
      Return the list of elements that this governance action service should work on.
      Specified by:
      getActionTargetElements in interface GovernanceContext
      Returns:
      cached list of action target metadata elements
    • getConnectorConfigClient

      public ConnectorConfigClient getConnectorConfigClient()
      Return the client for managing the metadata associated with running connectors, governance engines and governance services.
      Specified by:
      getConnectorConfigClient in interface GovernanceContext
      Returns:
      connector context client
    • getDuplicateManagementClient

      public DuplicateManagementClient getDuplicateManagementClient()
      Return the client that manages deduplication.
      Specified by:
      getDuplicateManagementClient in interface GovernanceContext
      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 interface GovernanceContext
      Parameters:
      actionTargetGUID - unique identifier of the governance action service.
      status - status enum to show its progress
      startDate - date/time that the governance action service started processing the target
      completionDate - 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 recognized
      UserNotAuthorizedException - the governance action service is not authorized to update the action target properties
      PropertyServerException - 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 interface GovernanceContext
      Parameters:
      status - completion status enum value
      outputGuards - optional guard strings for triggering subsequent action(s)
      Throws:
      InvalidParameterException - the completion status is null
      UserNotAuthorizedException - the governance action service is not authorized to update the governance action service completion status
      PropertyServerException - 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 interface GovernanceContext
      Parameters:
      status - completion status enum value
      outputGuards - 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 null
      UserNotAuthorizedException - the governance action service is not authorized to update the governance action service completion status
      PropertyServerException - 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, PropertyServerException
      Declare that all the processing for the governance action service is finished and the status of the work.
      Specified by:
      recordCompletionStatus in interface GovernanceContext
      Parameters:
      status - completion status enum value
      outputGuards - optional guard strings for triggering subsequent action(s)
      newRequestParameters - additional request parameters. These override/augment any request parameters defined for the next invoked service
      newActionTargets - list of action target names to GUIDs for the resulting governance action service
      Throws:
      InvalidParameterException - the completion status is null
      UserNotAuthorizedException - the governance action service is not authorized to update the governance action service completion status
      PropertyServerException - 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, PropertyServerException
      Declare that all the processing for the governance action service is finished and the status of the work.
      Specified by:
      recordCompletionStatus in interface GovernanceContext
      Parameters:
      status - completion status enum value
      outputGuards - optional guard strings for triggering subsequent action(s)
      newRequestParameters - additional request parameters. These override/augment any request parameters defined for the next invoked service
      newActionTargets - list of action target names to GUIDs for the resulting governance action service
      completionMessage - message to describe completion results or reasons for failure
      Throws:
      InvalidParameterException - the completion status is null
      UserNotAuthorizedException - the governance action service is not authorized to update the governance action service completion status
      PropertyServerException - 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, PropertyServerException
      Declare that all the processing for the governance action service is finished and the status of the work.
      Specified by:
      recordCompletionStatus in interface GovernanceContext
      Parameters:
      status - completion status enum value
      outputGuards - optional guard strings for triggering subsequent action(s)
      newRequestParameters - additional request parameters. These override/augment any request parameters defined for the next invoked service
      newActionTargets - list of action target names to GUIDs for the resulting governance action service
      completionMessage - message to describe completion results or reasons for failure
      Throws:
      InvalidParameterException - the completion status is null
      UserNotAuthorizedException - the governance action service is not authorized to update the governance action service completion status
      PropertyServerException - there is a problem connecting to the metadata store
    • getCompletionStatus

      public CompletionStatus getCompletionStatus()
      Return any completion status from the governance action service.
      Specified by:
      getCompletionStatus in interface GovernanceContext
      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 interface ProvisioningGovernanceContext
      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 asset
      name - the technical display name of the asset
      description - the description of the asset
      Returns:
      unique identifier of the new asset
      Throws:
      InvalidParameterException - the type name or qualified name is null or invalid
      UserNotAuthorizedException - this governance action service is not authorized to create an asset
      PropertyServerException - 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 interface ProvisioningGovernanceContext
      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 asset
      name - the technical display name of the resource
      versionIdentifier - version of the resource
      description - the description of the resource
      extendedProperties - attributes introduced by subtypes of Asset
      Returns:
      unique identifier of the new asset
      Throws:
      InvalidParameterException - the type name or qualified name is null or invalid
      UserNotAuthorizedException - this governance action service is not authorized to create an asset
      PropertyServerException - 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 interface ProvisioningGovernanceContext
      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 asset
      name - the technical display name of the asset
      description - the description of the asset
      Returns:
      unique identifier of the new asset
      Throws:
      InvalidParameterException - the type name or qualified name is null or invalid
      UserNotAuthorizedException - this governance action service is not authorized to create an asset
      PropertyServerException - 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 interface ProvisioningGovernanceContext
      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 asset
      name - the technical display name of the asset
      versionIdentifier - version of the resource
      description - the description of the asset
      extendedProperties - attributes introduced by subtypes of Asset
      Returns:
      unique identifier of the new asset
      Throws:
      InvalidParameterException - the type name or qualified name is null or invalid
      UserNotAuthorizedException - this governance action service is not authorized to create an asset
      PropertyServerException - 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 interface ProvisioningGovernanceContext
      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 process
      qualifiedName - the unique name of the new process
      name - the technical display name of the process
      description - the description of the process
      Returns:
      unique identifier of the new process
      Throws:
      InvalidParameterException - the type name or qualified name is null or invalid
      UserNotAuthorizedException - this governance action service is not authorized to create a process
      PropertyServerException - 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 interface ProvisioningGovernanceContext
      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 process
      qualifiedName - the unique name of the new process
      name - the technical display name of the process
      versionIdentifier - version of the resource
      description - the description of the process
      formula - expression that describes the behaviour of the process
      extendedProperties - attributes introduced by subtypes of Process
      Returns:
      unique identifier of the new process
      Throws:
      InvalidParameterException - the type name or qualified name is null or invalid
      UserNotAuthorizedException - this governance action service is not authorized to create a process
      PropertyServerException - 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 interface ProvisioningGovernanceContext
      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 process
      qualifiedName - the unique name of the new process
      name - the technical display name of the process
      description - the description of the process
      Returns:
      unique identifier of the new process
      Throws:
      InvalidParameterException - the type name or qualified name is null or invalid
      UserNotAuthorizedException - this governance action service is not authorized to create a process
      PropertyServerException - 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 interface ProvisioningGovernanceContext
      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 process
      qualifiedName - the unique name of the new process
      name - the technical display name of the process
      versionIdentifier - version of the resource
      description - the description of the process
      formula - expression that describes the behaviour of the process
      extendedProperties - attributes introduced by subtypes of Process
      Returns:
      unique identifier of the new process
      Throws:
      InvalidParameterException - the type name or qualified name is null or invalid
      UserNotAuthorizedException - this governance action service is not authorized to create a process
      PropertyServerException - 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 interface ProvisioningGovernanceContext
      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 process
      qualifiedName - the unique name of the new process
      name - the technical display name of the process
      description - the description of the process
      parentGUID - 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 invalid
      UserNotAuthorizedException - this governance action service is not authorized to create a process
      PropertyServerException - 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 interface ProvisioningGovernanceContext
      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 process
      qualifiedName - the unique name of the new process
      name - the technical display name of the process
      versionIdentifier - version of the resource
      description - the description of the process
      formula - expression that describes the behaviour of the process
      extendedProperties - attributes introduced by subtypes of Process
      parentGUID - 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 invalid
      UserNotAuthorizedException - this governance action service is not authorized to create a process
      PropertyServerException - 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 interface ProvisioningGovernanceContext
      Parameters:
      processGUID - unique identifier of the process
      qualifiedName - unique name for the port
      displayName - display name for the port
      portType - 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 invalid
      UserNotAuthorizedException - the governance action service is not authorized to create this type of element
      PropertyServerException - 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 interface ProvisioningGovernanceContext
      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 invalid
      UserNotAuthorizedException - the governance action service is not authorized to create this type of relationship
      PropertyServerException - 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 interface ProvisioningGovernanceContext
      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 chain
      label - label for when the lineage relationship is visualized
      formula - expression summary
      formulaType - language used to express the formula
      queryId - identifier for the process query - DataMapping Relationship
      query - the process query - DataMapping Relationship
      guard - value that indicated a control path to take - ControlFlow relationship
      lineNumber - line number where the call is made - ProcessCall Relationship
      targetElementGUID - 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 invalid
      UserNotAuthorizedException - the governance action service is not authorized to create this type of relationship
      PropertyServerException - 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 interface WatchdogGovernanceContext
      Parameters:
      listener - listener object to receive events
      interestingEventTypes - types of events that should be passed to the listener
      interestingMetadataTypes - types of elements that are the subject of the interesting event types
      specificInstance - 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 interface WatchdogGovernanceContext
    • 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, PropertyServerException
      Create 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 interface WatchdogGovernanceContext
      Parameters:
      qualifiedName - unique identifier to give this engine action
      domainIdentifier - governance domain associated with this action (0=ALL)
      displayName - display name for this action
      description - description for this action
      actionSourceGUIDs - request source elements for the resulting engine action
      actionCauseGUIDs - request cause elements for the resulting engine action
      actionTargets - list of action target names to GUIDs for the resulting engine action
      startTime - future start time or null for "as soon as possible".
      governanceEngineName - name of the governance engine to run the request
      requestType - request type to identify the governance action service to run
      requestParameters - properties to pass to the governance action service
      Returns:
      unique identifier of the governance action
      Throws:
      InvalidParameterException - null qualified name
      UserNotAuthorizedException - this governance action service is not authorized to create a governance action
      PropertyServerException - 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, PropertyServerException
      Create 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 interface WatchdogGovernanceContext
      Parameters:
      qualifiedName - unique identifier to give this governance action
      domainIdentifier - governance domain associated with this action (0=ALL)
      displayName - display name for this action
      description - description for this action
      actionSourceGUIDs - request source elements for the resulting engine action
      actionCauseGUIDs - request cause elements for the resulting engine action
      actionTargets - list of action target names to GUIDs for the resulting engine action
      startTime - future start time or null for "as soon as possible".
      governanceEngineName - name of the governance engine to run the request
      requestType - request type to identify the governance action service to run
      requestParameters - properties to pass to the governance action service
      processName - name of the process that this action is a part of
      Returns:
      unique identifier of the governance action
      Throws:
      InvalidParameterException - null qualified name
      UserNotAuthorizedException - this governance action service is not authorized to create a governance action
      PropertyServerException - 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, PropertyServerException
      Using the named governance action type as a template, initiate an engine action.
      Specified by:
      initiateGovernanceActionType in interface WatchdogGovernanceContext
      Parameters:
      governanceActionTypeQualifiedName - unique name of the governance action type to use
      actionSourceGUIDs - request source elements for the resulting engine action
      actionCauseGUIDs - request cause elements for the resulting engine action
      actionTargets - list of action target names to GUIDs for the resulting engine action
      startTime - future start time or null for "as soon as possible".
      requestParameters - request properties to be passed to the engine action
      originatorServiceName - 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 type
      UserNotAuthorizedException - the caller is not authorized to create an engine action
      PropertyServerException - 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, PropertyServerException
      Using the named governance action process as a template, initiate a chain of governance actions.
      Specified by:
      initiateGovernanceActionProcess in interface WatchdogGovernanceContext
      Parameters:
      processQualifiedName - unique name of the governance action process to use
      requestParameters - request parameters to pass to the governance actions called in the governance action process
      actionSourceGUIDs - request source elements for the resulting engine action
      actionCauseGUIDs - request cause elements for the resulting engine action
      actionTargets - list of action target names to GUIDs for the resulting engine action
      startTime - 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 process
      UserNotAuthorizedException - this governance action service is not authorized to create a governance action process
      PropertyServerException - there is a problem with the metadata store
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class Object
      Returns:
      print out of variables in a JSON-style