public class BulkActiveWorkflowActionRequest extends VaultRequest
HTTP_HEADER_AUTHORIZATION, HTTP_HEADER_VAULT_CLIENT_ID, vaultClient
Modifier and Type | Method and Description |
---|---|
BulkWorkflowJobStartResponse |
cancelWorkflows(List<Integer> workflowIds)
Cancel Active Workflows
|
BulkWorkflowJobStartResponse |
cancelWorkflowTasks()
Cancel Workflow Tasks
|
BulkWorkflowJobStartResponse |
reassignTasks(Integer currentTaskAssignee,
Integer newTaskAssignee)
Reassign Workflow Tasks
Note that this action can reassign a maximum of 500 tasks. |
BulkWorkflowJobStartResponse |
replaceWorkflowOwner(Integer currentWorkflowOwner,
Integer newWorkflowOwner)
Replace Workflow Owner
|
BulkWorkflowActionDetailsResponse |
retrieveBulkWorkflowActionDetails(String action)
Retrieve Cancel Workflow Action Details
|
BulkWorkflowActionsResponse |
retrieveBulkWorkflowActions()
Retrieve Bulk Workflow Actions
Retrieve All available workflow actions that can be initiated on a workflow which: The authenticated user has permissions to view or initiate Can be initiated through the API |
BulkActiveWorkflowActionRequest |
setTaskIds(List<Integer> taskIds) |
BulkActiveWorkflowActionRequest |
setUserIds(List<Integer> userIds) |
getBaseObjectMapper, send, send, sendReturnBinary, sendReturnBinary, sendToFile, sendToFile, setVaultClient
public BulkWorkflowJobStartResponse cancelWorkflowTasks()
POST /api/{version}/object/workflow/actions/canceltasks
Example 1 - Cancel By Task Ids List<Integer> ids = Arrays.asList(new Integer[]{1000,1001}); BulkWorkflowJobStartResponse response = vaultClient.newRequest(BulkActiveWorkflowActionRequest.class) .setTaskIds(ids) .cancelWorkflowTasks();,
Example 2 - Cancel By User Ids List<Integer> ids = Arrays.asList(new Integer[]{1000,1001}); BulkWorkflowJobStartResponse response = vaultClient.newRequest(BulkActiveWorkflowActionRequest.class) .setUserIds(ids) .cancelWorkflowTasks();
if (response.isSuccessful() { if (response.getData()) { System.out.println("JobId = " + response.getData().getJobId()); } }
public BulkWorkflowJobStartResponse cancelWorkflows(List<Integer> workflowIds)
workflowIds
- workflow_id__v field values. Maximum 500 workflows.POST /api/{version}/object/workflow/actions/cancelworkflows
List<String> ids = Arrays.asList(new String[]{"1","2","3"}); BulkWorkflowJobStartResponse response = vaultClient.newRequest(BulkActiveWorkflowActionRequest.class) .cancelWorkflows(ids);
if (response.isSuccessful() { if (response.getData()) { System.out.println("JobId = " + response.getData().getJobId()); } }
public BulkWorkflowJobStartResponse reassignTasks(Integer currentTaskAssignee, Integer newTaskAssignee)
currentTaskAssignee
- Input the user ID of the user whose tasks you wish to reassign. You cannot reassign specific tasks for a user, only all tasks currently assigned to a user.newTaskAssignee
- Input the user ID of the user who will receive the newly assigned tasks.POST /api/{version}/object/workflow/actions/reassigntasks
BulkWorkflowJobStartResponse response = vaultClient.newRequest(BulkActiveWorkflowActionRequest.class) .reassignTasks(12345, 67890);
if (response.isSuccessful() { if (response.getData()) { System.out.println("JobId = " + response.getData().getJobId()); } }
public BulkWorkflowJobStartResponse replaceWorkflowOwner(Integer currentWorkflowOwner, Integer newWorkflowOwner)
currentWorkflowOwner
- Input the ID of the user who will become the current workflow owner.newWorkflowOwner
- Input the ID of the user who will become the new workflow owner.POST /api/{version}/object/workflow/actions/replaceworkflowowner
BulkWorkflowJobStartResponse response = vaultClient.newRequest(BulkActiveWorkflowActionRequest.class) .replaceWorkflowOwner(12345, 67890);
if (response.isSuccessful() { if (response.getData()) { System.out.println("JobId = " + response.getData().getJobId()); } }
public BulkWorkflowActionDetailsResponse retrieveBulkWorkflowActionDetails(String action)
action
- The name of the workflow actionGET /api/{version}/object/workflow/actions/{action}
BulkWorkflowActionDetailsResponse resp = vaultClient.newRequest(BulkActiveWorkflowActionRequest.class) .retrieveBulkWorkflowActionDetails();
if (resp.isSuccessful() { if (resp.getDetails() != null) { System.out.println("Name " + resp.getName() +"\n"); if resp.getDetails().getControls() != null && !resp.getDetails().getControls().isEmpty()) { System.out.println("Controls Exist\n"); for (Control control : resp.getControls()) { System.out.println(" ------------------------------"); System.out.println(" Type " + control.getType()); System.out.println(" Label " + action.getLabel()); if control.getPrompts() != null && !control.getPrompts().isEmpty()) { System.out.println(" Prompts Exist"); System.out.println(" ------------------------------"); for (Prompt prompt : control.getPrompts()) { System.out.println(" Name " + prompt.getName()); System.out.println(" Label " + prompt.getLabel()); System.out.println(" Required " + prompt.getRequired()); System.out.println(" Multi-Value " + prompt.getMultiValue()); } } else { System.out.println(" No Prompts Exist"); } } else { System.out.println("No Controls Exist\n"); } } } }
public BulkWorkflowActionsResponse retrieveBulkWorkflowActions()
GET /api/{version}/object/workflow/actions
BulkWorkflowActionsResponse resp = vaultClient.newRequest(BulkActiveWorkflowActionRequest.class) .retrieveBulkWorkflowActions();
if (resp.isSuccessful() && resp.getActionsItems() != null && !resp.getActionsItems().isEmpty()) { System.out.println("Actions Exist\n"); for (ActionItem action : resp.getActionsItems()) { System.out.println("------------------------------"); System.out.println("Name " + action.getName()); System.out.println("Label " + action.getLabel()); } } else { System.out.println("No Actions Exist\n"); }
public BulkActiveWorkflowActionRequest setTaskIds(List<Integer> taskIds)
taskIds
- list of task idspublic BulkActiveWorkflowActionRequest setUserIds(List<Integer> userIds)
userIds
- list of user idsCopyright © 2021. All rights reserved.