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