Package com.veeva.vault.sdk.api.workflow
Interface WorkflowReplaceOwnerOperation
public interface WorkflowReplaceOwnerOperation
A sequence of instructions that can be chained together, building a workflow replace owner execution operation
that can be executed with
execute()
.
Supplying a success handler via onSuccess(Consumer)
is optional.
Supplying a failure handler via onError(Consumer)
is optional, but errors will throw an exception.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Executes this workflow replace owner operation.onError
(Consumer<WorkflowActionError> errorHandler) Sets the function called when replacing the owner of an active workflow has errors.onSuccess
(Consumer<WorkflowActionResponse> successHandler) Sets the function called when replacing the owner of an active workflow succeeds.
-
Method Details
-
onSuccess
Sets the function called when replacing the owner of an active workflow succeeds.- Parameters:
successHandler
- function to call after successful execution- Returns:
- this
WorkflowReplaceOwnerOperation
-
onError
Sets the function called when replacing the owner of an active workflow has errors.- Parameters:
errorHandler
- function to call after failed execution- Returns:
- this
WorkflowReplaceOwnerOperation
-
execute
void execute()Executes this workflow replace owner operation.If a failure handler is not supplied, then any user-facing errors resulting from subsequent actions that are executed will be propagated through a thrown RuntimeException.
If a failure handler is not supplied and the request does not have the correct permission, or if the parameters are not valid values, or if the required parameters are not set, then a RuntimeException may also be thrown.- Throws:
RuntimeException
- only if a failure handler is not supplied.
-