Class GovernanceContextResource

java.lang.Object
org.odpi.openmetadata.frameworkservices.gaf.server.spring.GovernanceContextResource

@RestController @RequestMapping("/servers/{serverName}/open-metadata/framework-services/{serviceURLMarker}/governance-context-service/users/{userId}") public class GovernanceContextResource extends Object
GovernanceContextResource supports the REST APIs for running Governance Services.
  • Constructor Details

    • GovernanceContextResource

      public GovernanceContextResource()
  • Method Details

    • updateEngineActionStatus

      @PostMapping(path="/engine-actions/{engineActionGUID}/status/update") public VoidResponse updateEngineActionStatus(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @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 to
      serviceURLMarker - the identifier of the access service (for example asset-owner for the Asset Owner OMAS)
      userId - identifier of calling user
      engineActionGUID - identifier of the engine action request
      requestBody - new status ordinal
      Returns:
      void or 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.
    • getActiveClaimedEngineActions

      @GetMapping(path="/governance-engines/{governanceEngineGUID}/active-engine-actions") public EngineActionElementsResponse getActiveClaimedEngineActions(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @PathVariable String governanceEngineGUID, @RequestParam int startFrom, @RequestParam 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 to
      serviceURLMarker - the identifier of the access service (for example asset-owner for the Asset Owner OMAS)
      userId - userId of caller
      governanceEngineGUID - unique identifier of governance engine
      startFrom - starting from element
      pageSize - maximum elements to return
      Returns:
      list of governance engine elements or 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.
    • claimEngineAction

      @PostMapping(path="/engine-actions/{engineActionGUID}/claim") public VoidResponse claimEngineAction(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @PathVariable String engineActionGUID, @RequestBody(required=false) NullRequestBody requestBody)
      Request that execution of an engine action is allocated to the caller.
      Parameters:
      serverName - name of server instance to route request to
      serviceURLMarker - the identifier of the access service (for example asset-owner for the Asset Owner OMAS)
      userId - identifier of calling user
      engineActionGUID - identifier of the engine action request.
      requestBody - null request body
      Returns:
      void or 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.
    • updateActionTargetStatus

      @PostMapping(path="/engine-actions/action-targets/update") public VoidResponse updateActionTargetStatus(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @RequestBody ActionTargetStatusRequestBody requestBody)
      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.
      Parameters:
      serverName - name of server instance to route request to
      serviceURLMarker - the identifier of the access service (for example asset-owner for the Asset Owner OMAS)
      userId - caller's userId
      requestBody - relationship properties
      Returns:
      void or 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

      @PostMapping(path="/engine-actions/{governanceActionGUID}/completion-status") public VoidResponse recordCompletionStatus(@PathVariable String serverName, @PathVariable String serviceURLMarker, @PathVariable String userId, @PathVariable String governanceActionGUID, @RequestBody CompletionStatusRequestBody requestBody)
      Declare that all the processing for the governance action service is finished and the status of the work.
      Parameters:
      serverName - name of server instance to route request to
      serviceURLMarker - the identifier of the access service (for example asset-owner for the Asset Owner OMAS)
      userId - caller's userId
      governanceActionGUID - unique identifier of the governance action to update
      requestBody - completion status enum value, optional guard strings for triggering subsequent action(s) plus a list of additional elements to add to the action targets for the next phase
      Returns:
      void or InvalidParameterException the completion status is null UserNotAuthorizedException the governance action service is not authorized to update the governance action service status PropertyServerException there is a problem connecting to the metadata store