Class GovernanceEngineResource
java.lang.Object
org.odpi.openmetadata.viewservices.governanceengine.server.spring.GovernanceEngineResource
@RestController
@RequestMapping("/servers/{serverName}/api/open-metadata/governance-engine")
public class GovernanceEngineResource
extends Object
The GovernanceEngineResource provides the Spring API endpoints of the Governance Engine Open Metadata View Service (OMVS).
It is for governance engines that run engine actions outside of Egeria, while Egeria coordinates the
engine actions, for example through a governance action process.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclaimEngineAction(String serverName, String engineActionGUID) Request that execution of an engine action is allocated to the caller.getActiveClaimedEngineActions(String serverName, String governanceEngineGUID, int startFrom, int pageSize) Retrieve the engine actions that are still in process and that have been claimed by this caller's userId.getApprovedEngineActions(String serverName, String governanceEngineGUID, int startFrom, int pageSize) Retrieve the engine actions that are approved to run on a governance engine and that no engine has claimed yet.recordCompletionStatus(String serverName, String engineActionGUID, CompletionStatusRequestBody requestBody) Declare that all the processing for the engine action is finished and the status of the work.updateActionTargetStatus(String serverName, ActionTargetStatusRequestBody requestBody) Update the status of a specific action target.updateEngineActionStatus(String serverName, String engineActionGUID, EngineActionStatusRequestBody requestBody) Update the status of the engine action - providing the caller is permitted.
-
Constructor Details
-
GovernanceEngineResource
public GovernanceEngineResource()Default constructor
-
-
Method Details
-
getApprovedEngineActions
@GetMapping(path="/governance-engines/{governanceEngineGUID}/engine-actions/approved") public EngineActionElementsResponse getApprovedEngineActions(@PathVariable String serverName, @PathVariable String governanceEngineGUID, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize) Retrieve the engine actions that are approved to run on a governance engine and that no engine has claimed yet. The caller then claims the ones it is going to run.- Parameters:
serverName- name of server instance to route request togovernanceEngineGUID- unique identifier of governance enginestartFrom- starting from positionpageSize- maximum elements to return- Returns:
- list of engine action elements or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException the user is not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
-
claimEngineAction
@PostMapping(path="/engine-actions/{engineActionGUID}/claim") public VoidResponse claimEngineAction(@PathVariable String serverName, @PathVariable String engineActionGUID) Request that execution of an engine action is allocated to the caller. This is only permitted if no other caller has claimed it.- Parameters:
serverName- name of server instance to route request toengineActionGUID- identifier of the engine action request- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException the user is not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
-
getActiveClaimedEngineActions
@GetMapping(path="/governance-engines/{governanceEngineGUID}/engine-actions/active-claimed") public EngineActionElementsResponse getActiveClaimedEngineActions(@PathVariable String serverName, @PathVariable String governanceEngineGUID, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize) Retrieve the engine actions that are still in process and that have been claimed by this caller's userId. This call is used when the caller restarts.- Parameters:
serverName- name of server instance to route request togovernanceEngineGUID- unique identifier of governance enginestartFrom- starting from positionpageSize- maximum elements to return- Returns:
- list of engine action elements or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException the user is not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
-
updateEngineActionStatus
@PostMapping(path="/engine-actions/{engineActionGUID}/status/update") public VoidResponse updateEngineActionStatus(@PathVariable String serverName, @PathVariable String engineActionGUID, @RequestBody EngineActionStatusRequestBody requestBody) Update the status of the engine action - providing the caller is permitted.- Parameters:
serverName- name of server instance to route request toengineActionGUID- identifier of the engine action requestrequestBody- new status enum- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException the user is not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
-
updateActionTargetStatus
@PostMapping(path="/engine-actions/action-targets/update") public VoidResponse updateActionTargetStatus(@PathVariable String serverName, @RequestBody ActionTargetStatusRequestBody requestBody) Update the status of a specific action target. By default, these values are derived from the values for the engine action. However, if the governance service has to process many target elements, then setting the status on each individual target will show the progress of the governance service.- Parameters:
serverName- name of server instance to route request torequestBody- the action target and its new status- Returns:
- void or InvalidParameterException the action target GUID is not recognized. UserNotAuthorizedException the user is not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
-
recordCompletionStatus
@PostMapping(path="/engine-actions/{engineActionGUID}/completion-status") public VoidResponse recordCompletionStatus(@PathVariable String serverName, @PathVariable String engineActionGUID, @RequestBody CompletionStatusRequestBody requestBody) Declare that all the processing for the engine action is finished and the status of the work. If the engine action is part of a governance action process, the output guards determine which steps of the process run next.- Parameters:
serverName- name of server instance to route request toengineActionGUID- unique identifier of the associated engine actionrequestBody- completion status, output guards, new action targets and completion message- Returns:
- void or InvalidParameterException the completion status is null. UserNotAuthorizedException the user is not authorized to issue this request. PropertyServerException there was a problem detected by the metadata store.
-