Class StewardshipAction

java.lang.Object
org.odpi.openmetadata.frameworks.integration.context.StewardshipAction

public class StewardshipAction extends Object
StewardshipAction defines methods that are used to request help for a situation that the caller can not handle.
  • Constructor Details

    • StewardshipAction

      public StewardshipAction(OpenMetadataClient openMetadataStore, ActionControlInterface actionControlInterface, String userId, String originatorGUID)
      The constructor needs an implementation of the open metadata store.
      Parameters:
      openMetadataStore - client implementation
      actionControlInterface - interface for creating governance actions
      userId - calling user
      originatorGUID - unique identifier of the source of the to do
  • Method Details

    • createIncidentReport

      public String createIncidentReport(String qualifiedName, int domainIdentifier, String background, List<IncidentImpactedElement> impactedResources, List<IncidentDependency> previousIncidents, Map<String,Integer> incidentClassifiers, Map<String,String> additionalProperties, String originatorGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create an incident report to capture the situation detected by this governance action service. This incident report will be processed by other governance activities.
      Parameters:
      qualifiedName - unique identifier to give this new incident report
      domainIdentifier - governance domain associated with this action (0=ALL)
      background - description of the situation
      impactedResources - details of the resources impacted by this situation
      previousIncidents - links to previous incident reports covering this situation
      incidentClassifiers - initial classifiers for the incident report
      additionalProperties - additional arbitrary properties for the incident reports
      originatorGUID - the unique identifier of the person or process that created the incident
      Returns:
      unique identifier of the resulting incident report
      Throws:
      InvalidParameterException - null or non-unique qualified name for the incident report
      UserNotAuthorizedException - this governance action service is not authorized to create an incident report
      PropertyServerException - there is a problem with the metadata store
    • openToDo

      public String openToDo(String qualifiedName, String title, String instructions, String category, int priority, Date dueDate, Map<String,String> additionalProperties, String assignToGUID, String sponsorGUID, List<NewActionTarget> actionTargets) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create a "To Do" request for someone to work on.
      Parameters:
      qualifiedName - unique name for the to do. (Could be the engine name and a guid?)
      title - short meaningful phrase for the person receiving the request
      instructions - further details on what to do
      category - a category of to dos (for example, "data error", "access request")
      priority - priority value (based on organization's scale)
      dueDate - date/time this needs to be completed
      additionalProperties - additional arbitrary properties for the incident reports
      assignToGUID - unique identifier the Actor element for the recipient
      sponsorGUID - unique identifier of the element that describes the rule, project that this is on behalf of
      actionTargets - the list of elements that should be acted upon
      Returns:
      unique identifier of new to do element
      Throws:
      InvalidParameterException - either todoQualifiedName or assignedTo are null or not recognized
      UserNotAuthorizedException - the governance action service is not authorized to create a "to do" entity
      PropertyServerException - there is a problem connecting to (or inside) the metadata store
    • initiateEngineAction

      public String initiateEngineAction(String qualifiedName, int domainIdentifier, String displayName, String description, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, List<String> receivedGuards, Date startTime, String governanceEngineName, String requestType, Map<String,String> requestParameters, String processName, String requestSourceName, String originatorServiceName, String originatorEngineName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Create an engine action in the metadata store which will trigger the governance service associated with the supplied request type. The engine action remains to act as a record of the actions taken for auditing.
      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
      requestSourceGUIDs - request source elements for the resulting governance service
      actionTargets - list of action target names to GUIDs for the resulting governance service
      receivedGuards - list of guards to initiate the engine action
      startTime - future start time or null for "as soon as possible"
      governanceEngineName - name of the governance engine that should execute the request
      requestType - governance request type from the caller
      requestParameters - properties to pass to the governance service
      processName - name of the process that this action is a part of
      requestSourceName - source of the request
      originatorServiceName - unique name of the requesting governance service (if initiated by a governance engine).
      originatorEngineName - optional unique name of the requesting governance engine (if initiated by a governance engine).
      Returns:
      unique identifier of the engine action
      Throws:
      InvalidParameterException - null qualified name
      UserNotAuthorizedException - the caller is not authorized to create an engine action
      PropertyServerException - there is a problem with the metadata store
    • initiateGovernanceActionType

      public String initiateGovernanceActionType(String governanceActionTypeQualifiedName, List<String> requestSourceGUIDs, 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.
      Parameters:
      governanceActionTypeQualifiedName - unique name of the governance action type to use
      requestSourceGUIDs - request source elements for the resulting governance service
      actionTargets - list of action target names to GUIDs for the resulting governance service
      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, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime, Map<String,String> requestParameters, String originatorServiceName, String originatorEngineName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Using the named governance action process as a template, initiate a chain of engine actions.
      Parameters:
      processQualifiedName - unique name of the governance action process to use
      requestSourceGUIDs - request source elements for the resulting governance service
      actionTargets - list of action target names to GUIDs for the resulting governance service
      startTime - future start time or null for "as soon as possible".
      requestParameters - request properties to be passed to the first 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 governance action process instance
      Throws:
      InvalidParameterException - null or unrecognized qualified name of the process
      UserNotAuthorizedException - the caller is not authorized to create a governance action process
      PropertyServerException - there is a problem with the metadata store
    • getEngineAction

      Request the status of an executing engine action request.
      Parameters:
      engineActionGUID - identifier of the engine action request.
      Returns:
      status enum
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - there was a problem detected by the metadata store.
    • cancelEngineAction

      public void cancelEngineAction(String engineActionGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Request that execution of an engine action is stopped.
      Parameters:
      engineActionGUID - identifier of the engine action request.
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - there was a problem detected by the metadata store.
    • getEngineActions

      public List<EngineActionElement> getEngineActions(int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the engine actions known to the server.
      Parameters:
      startFrom - starting from element
      pageSize - maximum elements to return
      Returns:
      list of engine action elements
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - there was a problem detected by the metadata store.
    • getActiveEngineActions

      public List<EngineActionElement> getActiveEngineActions(int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the engine actions that are still in process.
      Parameters:
      startFrom - starting from element
      pageSize - maximum elements to return
      Returns:
      list of engine action elements
      Throws:
      InvalidParameterException - one of the parameters is null or invalid.
      UserNotAuthorizedException - user not authorized to issue this request.
      PropertyServerException - there was a problem detected by the metadata store.
    • findEngineActions

      public List<EngineActionElement> findEngineActions(String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of engine action metadata elements that contain the search string. The search string is treated as a regular expression.
      Parameters:
      searchString - string to find in the properties
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of matching metadata elements
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)
    • getEngineActionsByName

      public List<EngineActionElement> getEngineActionsByName(String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
      Retrieve the list of engine action metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Parameters:
      name - name to search for
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of matching metadata elements
      Throws:
      InvalidParameterException - one of the parameters is invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - there is a problem reported in the open metadata server(s)