Package com.veeva.vault.sdk.api.workflow
Interface WorkflowInstanceService
- All Superinterfaces:
Service
Provides methods to retrieve information for and update workflow instances.
-
Method Summary
Modifier and TypeMethodDescriptionCreates aWorkflowAddParticipantsOperation, which can be used to add participants to an active workflow based on the providedWorkflowAddParticipantsRequest.cancelWorkflow(WorkflowCancelRequest request) Creates aWorkflowCancelOperation, which can be used to cancel an active workflow based on the providedWorkflowCancelRequest.Gets the available workflow actions for the provided workflow instance.Retrieves aWorkflowInstanceon the given workflow ID.Retrieves a list of workflow instances on the given search options.getWorkflowItems(String workflowId) Retrieves aWorkflowItemsResponsecontaining the items in the active workflow this action is executing against.getWorkflowParticipantGroups(String workflowId) Retrieves aWorkflowParticipantGroupResponsecontaining workflow participant groups in the given active workflow.newParticipantGroupUpdate(WorkflowParticipantGroup participantGroup) Creates a newWorkflowParticipantGroupUpdateto allow membership updates to a participant group.Creates aWorkflowAddParticipantsRequest.Builder.Creates aWorkflowCancelRequest.Builder.Creates anWorkflowInstanceCollectionRequest.Builder.Creates aWorkflowInstanceRequest.Builder.Creates aWorkflowParticipantInputParameter.Builder.Creates aWorkflowRemoveItemsRequest.Builder.Creates aWorkflowReplaceOwnerRequest.Builder.Creates aWorkflowStartInstanceRequest.Builder.Creates aWorkflowUpdateDueDateRequest.Builder.removeItems(WorkflowRemoveItemsRequest request) Creates aWorkflowRemoveItemsOperation, which can be used to remove items in an active workflow based on the providedWorkflowRemoveItemsRequest.Creates aWorkflowReplaceOwnerOperation, which can be used to replace the owner of an active workflow based on the providedWorkflowReplaceOwnerRequest.Starts the workflow with the workflow name, list of document IDs or record IDs, and input parameters.voidupdateParticipantGroup(WorkflowParticipantGroupUpdate participantGroupUpdate) Updates a specific participant group for a workflow instance.Creates aWorkflowUpdateDueDateOperation, which can be used to update the due date of an active workflow based on the providedWorkflowUpdateDueDateRequest.
-
Method Details
-
newParticipantGroupUpdate
Creates a newWorkflowParticipantGroupUpdateto allow membership updates to a participant group.- Parameters:
participantGroup- the participant group that should be updated- Returns:
WorkflowParticipantGroupUpdateobject
-
updateParticipantGroup
Updates a specific participant group for a workflow instance. This method ignores any role restrictions previously configured by the workflow Start step's participant control.This method cannot update participant groups if the Participants control on the Start step is configured with Use roles as participants, Use user reference field as participants, or Use Vault user group as participants.
- Parameters:
participantGroupUpdate- theWorkflowParticipantGroupUpdatecontaining updated membership for a specific participant group
-
newWorkflowStartRequestBuilder
WorkflowStartInstanceRequest.Builder newWorkflowStartRequestBuilder()Creates aWorkflowStartInstanceRequest.Builder.- Returns:
- a
WorkflowStartInstanceRequest.Builder
-
newWorkflowParticipantInputParameterBuilder
WorkflowParticipantInputParameter.Builder newWorkflowParticipantInputParameterBuilder()Creates aWorkflowParticipantInputParameter.Builder.- Returns:
- a
WorkflowParticipantInputParameter.Builder
-
startWorkflow
WorkflowStartInstanceOperation<WorkflowStartInstanceResponse> startWorkflow(WorkflowStartInstanceRequest request) Starts the workflow with the workflow name, list of document IDs or record IDs, and input parameters.- Parameters:
request- theWorkflowStartInstanceRequestcontaining the information needed to start the workflow. Requires workflow name, list of document or record IDs, and input parameters. Cannot be null.- Returns:
- a
WorkflowStartInstanceOperationcontaining aWorkflowStartInstanceResponsewith the execution status and workflow ID
-
newWorkflowInstanceRequestBuilder
WorkflowInstanceRequest.Builder newWorkflowInstanceRequestBuilder()Creates aWorkflowInstanceRequest.Builder.- Returns:
- a
WorkflowInstanceRequest.Builder
-
getWorkflowInstance
Retrieves aWorkflowInstanceon the given workflow ID.- Parameters:
request- theWorkflowInstanceRequestcontaining the information needed to retrieve the workflow instance. Requires workflow id.- Returns:
- a
WorkflowInstancecontaining workflow details. Throws a runtime exception if the workflow cannot be found.
-
newWorkflowInstanceCollectionRequestBuilder
WorkflowInstanceCollectionRequest.Builder newWorkflowInstanceCollectionRequestBuilder()Creates anWorkflowInstanceCollectionRequest.Builder.- Returns:
- an
WorkflowInstanceCollectionRequest.Builder
-
getWorkflowInstances
Retrieves a list of workflow instances on the given search options.- Parameters:
request- theWorkflowInstanceCollectionRequestcontaining the information needed to retrieve the list of workflow instances. Cannot be null.- Returns:
- a
WorkflowInstanceCollectionResponsecontaining the list of workflow instances
-
getAvailableWorkflowInstanceActions
AvailableWorkflowInstanceActionsResponse getAvailableWorkflowInstanceActions(WorkflowInstanceRequest request) Gets the available workflow actions for the provided workflow instance.- Parameters:
request- theWorkflowInstanceRequestcontaining the information needed to retrieve the available actions for the workflow instance. Requires workflow id.- Returns:
- a
AvailableWorkflowInstanceActionsResponsecontaining the available workflow actions.
-
newWorkflowAddParticipantsRequestBuilder
WorkflowAddParticipantsRequest.Builder newWorkflowAddParticipantsRequestBuilder()Creates aWorkflowAddParticipantsRequest.Builder.- Returns:
- a
WorkflowAddParticipantsRequest.Builder
-
newWorkflowParticipantGroupInputParameterBuilder
WorkflowParticipantGroupInputParameter.Builder newWorkflowParticipantGroupInputParameterBuilder() -
addParticipants
Creates aWorkflowAddParticipantsOperation, which can be used to add participants to an active workflow based on the providedWorkflowAddParticipantsRequest. UseWorkflowAddParticipantsOperation.execute()to add participants to the workflow. For example:workflowInstanceService.addParticipants(workflowAddParticipantsRequest) .onSuccess(response -> { ... }) .onFailure(response -> { ... }) .execute()- Parameters:
request- theWorkflowAddParticipantsRequestcontaining the information needed to add participants to the workflow. Requires an active workflow, participant group name, and a minimum of one user or group IDs.- Returns:
- a
WorkflowAddParticipantsOperation, which can be used to add participants to the workflow.
-
newWorkflowCancelRequestBuilder
WorkflowCancelRequest.Builder newWorkflowCancelRequestBuilder()Creates aWorkflowCancelRequest.Builder.- Returns:
- a
WorkflowCancelRequest.Builder
-
cancelWorkflow
Creates aWorkflowCancelOperation, which can be used to cancel an active workflow based on the providedWorkflowCancelRequest.Use
WorkflowCancelOperation.execute()to cancel the workflow. For example:workflowInstanceService.cancelWorkflow(workflowCancelRequest) .onSuccess(response -> { ... }) .onFailure(response -> { ... }) .execute()- Parameters:
request- theWorkflowCancelRequestcontaining the information needed to cancel the workflow. Requires an active workflow. Cannot be null.- Returns:
- a
WorkflowCancelOperation, which can be used to cancel the workflow
-
newWorkflowRemoveItemsRequestBuilder
WorkflowRemoveItemsRequest.Builder newWorkflowRemoveItemsRequestBuilder()Creates aWorkflowRemoveItemsRequest.Builder.- Returns:
- a
WorkflowRemoveItemsRequest.Builder
-
removeItems
Creates aWorkflowRemoveItemsOperation, which can be used to remove items in an active workflow based on the providedWorkflowRemoveItemsRequest. UseWorkflowRemoveItemsOperation.execute()to remove items in the workflow. For example:workflowInstanceService.removeItems(workflowRemoveItemsRequest) .onSuccess(response -> { ... }) .onFailure(response -> { ... }) .execute()- Parameters:
request- theWorkflowRemoveItemsRequestcontaining the information needed to remove items in the workflow. Requires an active workflow and a list of document or record IDs.- Returns:
- a
WorkflowRemoveItemsOperation, which can be used to remove items in the workflow.
-
newWorkflowReplaceOwnerRequestBuilder
WorkflowReplaceOwnerRequest.Builder newWorkflowReplaceOwnerRequestBuilder()Creates aWorkflowReplaceOwnerRequest.Builder.- Returns:
- a
WorkflowReplaceOwnerRequest.Builder
-
replaceWorkflowOwner
Creates aWorkflowReplaceOwnerOperation, which can be used to replace the owner of an active workflow based on the providedWorkflowReplaceOwnerRequest. UseWorkflowReplaceOwnerOperation.execute()to replace the owner of the workflow. For example:workflowInstanceService.replaceWorkflowOwner(workflowReplaceOwnerRequest) .onSuccess(response -> { ... }) .onFailure(response -> { ... }) .execute()- Parameters:
request- theWorkflowReplaceOwnerRequestcontaining the information needed to replace the owner of the workflow. Requires an active workflow and the id of the new workflow owner.- Returns:
- a
WorkflowReplaceOwnerOperation, which can be used to replace the owner of the workflow.
-
newWorkflowUpdateDueDateRequestBuilder
WorkflowUpdateDueDateRequest.Builder newWorkflowUpdateDueDateRequestBuilder()Creates aWorkflowUpdateDueDateRequest.Builder.- Returns:
- a
WorkflowUpdateDueDateRequest.Builder
-
updateWorkflowDueDate
Creates aWorkflowUpdateDueDateOperation, which can be used to update the due date of an active workflow based on the providedWorkflowUpdateDueDateRequest. UseWorkflowUpdateDueDateOperation.execute()to update the workflow due date and dependent tasks due dates that are based on the workflow due date. For example:workflowInstanceService.updateWorkflowDueDate(workflowUpdateDueDateRequest) .onSuccess(response -> { ... }) .onFailure(response -> { ... }) .execute()- Parameters:
request- theWorkflowUpdateDueDateRequestcontaining the information needed to update the workflow due date. Requires an active workflow. Cannot be null.- Returns:
- a
WorkflowUpdateDueDateOperation, which can be used to update the workflow due date.
-
getWorkflowParticipantGroups
Retrieves aWorkflowParticipantGroupResponsecontaining workflow participant groups in the given active workflow.- Parameters:
workflowId- the ID of the active workflow to retrieve workflow participant groups- Returns:
- a
WorkflowParticipantGroupResponsecontaining the current workflow participant groups
-
getWorkflowItems
Retrieves aWorkflowItemsResponsecontaining the items in the active workflow this action is executing against. Returned values reflect the items in the current transaction right before the call to the action method.- Parameters:
workflowId- the ID of the active workflow to retrieve workflow items- Returns:
- a
WorkflowItemsResponsecontaining the list of workflow items
-