Class StewardshipAction
java.lang.Object
org.odpi.openmetadata.frameworks.integration.context.StewardshipAction
StewardshipAction defines methods that are used to request help for a situation that the caller can not handle.
-
Constructor Summary
ConstructorDescriptionStewardshipAction
(OpenMetadataClient openMetadataStore, ActionControlInterface actionControlInterface, String userId, String originatorGUID) The constructor needs an implementation of the open metadata store. -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancelEngineAction
(String engineActionGUID) Request that execution of an engine action is stopped.createIncidentReport
(String qualifiedName, int domainIdentifier, String background, List<IncidentImpactedElement> impactedResources, List<IncidentDependency> previousIncidents, Map<String, Integer> incidentClassifiers, Map<String, String> additionalProperties, String originatorGUID) Create an incident report to capture the situation detected by this governance action service.findEngineActions
(String searchString, int startFrom, int pageSize) Retrieve the list of engine action metadata elements that contain the search string.getActiveEngineActions
(int startFrom, int pageSize) Retrieve the engine actions that are still in process.getEngineAction
(String engineActionGUID) Request the status of an executing engine action request.getEngineActions
(int startFrom, int pageSize) Retrieve the engine actions known to the server.getEngineActionsByName
(String name, int startFrom, int pageSize) Retrieve the list of engine action metadata elements with a matching qualified or display name.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) Create an engine action in the metadata store which will trigger the governance service associated with the supplied request type.initiateGovernanceActionProcess
(String processQualifiedName, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime, Map<String, String> requestParameters, String originatorServiceName, String originatorEngineName) Using the named governance action process as a template, initiate a chain of engine actions.initiateGovernanceActionType
(String governanceActionTypeQualifiedName, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime, Map<String, String> requestParameters, String originatorServiceName, String originatorEngineName) Using the named governance action type as a template, initiate an engine action.openToDo
(String qualifiedName, String title, String instructions, String category, int priority, Date dueDate, Map<String, String> additionalProperties, String assignToGUID, String sponsorGUID, List<NewActionTarget> actionTargets) Create a "To Do" request for someone to work on.
-
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 implementationactionControlInterface
- interface for creating governance actionsuserId
- calling useroriginatorGUID
- 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, throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionString> additionalProperties, String originatorGUID) 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 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 reportsoriginatorGUID
- 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 reportUserNotAuthorizedException
- this governance action service is not authorized to create an incident reportPropertyServerException
- 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, PropertyServerExceptionCreate 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 requestinstructions
- further details on what to docategory
- 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 completedadditionalProperties
- additional arbitrary properties for the incident reportsassignToGUID
- unique identifier the Actor element for the recipientsponsorGUID
- unique identifier of the element that describes the rule, project that this is on behalf ofactionTargets
- 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 recognizedUserNotAuthorizedException
- the governance action service is not authorized to create a "to do" entityPropertyServerException
- 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, PropertyServerExceptionCreate 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 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 serviceactionTargets
- list of action target names to GUIDs for the resulting governance servicereceivedGuards
- list of guards to initiate the engine actionstartTime
- future start time or null for "as soon as possible"governanceEngineName
- name of the governance engine that should execute the requestrequestType
- governance request type from the callerrequestParameters
- properties to pass to the governance serviceprocessName
- name of the process that this action is a part ofrequestSourceName
- source of the requestoriginatorServiceName
- 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 nameUserNotAuthorizedException
- the caller is not authorized to create an engine actionPropertyServerException
- 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, PropertyServerExceptionUsing the named governance action type as a template, initiate an engine action.- Parameters:
governanceActionTypeQualifiedName
- unique name of the governance action type to userequestSourceGUIDs
- request source elements for the resulting governance serviceactionTargets
- list of action target names to GUIDs for the resulting governance servicestartTime
- future start time or null for "as soon as possible".requestParameters
- request properties to be passed to the engine actionoriginatorServiceName
- unique name of the requesting governance service (if initiated by a governance engine).originatorEngineName
- optional unique name of the governance engine (if initiated by a governance engine).- Returns:
- unique identifier of the engine action
- Throws:
InvalidParameterException
- null or unrecognized qualified name of the typeUserNotAuthorizedException
- the caller is not authorized to create an engine actionPropertyServerException
- there is a problem with the metadata store
-
initiateGovernanceActionProcess
public String initiateGovernanceActionProcess(String processQualifiedName, List<String> requestSourceGUIDs, List<NewActionTarget> actionTargets, Date startTime, Map<String, String> requestParameters, String originatorServiceName, String originatorEngineName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionUsing the named governance action process as a template, initiate a chain of engine actions.- Parameters:
processQualifiedName
- unique name of the governance action process to userequestSourceGUIDs
- request source elements for the resulting governance serviceactionTargets
- list of action target names to GUIDs for the resulting governance servicestartTime
- future start time or null for "as soon as possible".requestParameters
- request properties to be passed to the first engine actionoriginatorServiceName
- unique name of the requesting governance service (if initiated by a governance engine).originatorEngineName
- optional unique name of the governance engine (if initiated by a governance engine).- Returns:
- unique identifier of the governance action process instance
- Throws:
InvalidParameterException
- null or unrecognized qualified name of the processUserNotAuthorizedException
- the caller is not authorized to create a governance action processPropertyServerException
- there is a problem with the metadata store
-
getEngineAction
public EngineActionElement getEngineAction(String engineActionGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException 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 elementpageSize
- 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 elementpageSize
- 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 propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- 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 forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-