public class MultiDocumentWorkflowsRequest extends VaultRequest
HTTP_HEADER_AUTHORIZATION, HTTP_HEADER_VAULT_CLIENT_ID, vaultClient
Modifier and Type | Method and Description |
---|---|
InitiateMultiDocumentWorkflowResponse |
initiateMultiDocumentWorkflow(String workflowName,
List<String> documents,
Map<String,String> participantName,
String description)
Initiate Multi-Document Workflow
Initiate a multi-document workflow on a set of documents. |
MultiDocumentWorkflowsResponse |
retrieveAllMultiDocumentWorkflows()
Retrieve All Multi-Document Workflows
Retrieve all available multi-document workflows that can be initiated on a set of documents |
MultiDocumentWorkflowDetailsResponse |
retrieveMultiDocumentWorkflowDetails(String workflowName)
Retrieve Multi-Document Workflow Details
Retrieves the details for a specific multi-document workflow. |
MultiDocumentWorkflowsRequest |
setAcceptJSON()
Set the Header Accept to return JSON
|
MultiDocumentWorkflowsRequest |
setLoc(Boolean loc)
When localized (translated) strings are available, retrieve them by setting
loc to true
|
getBaseObjectMapper, send, send, sendReturnBinary, sendReturnBinary, sendToFile, sendToFile, setVaultClient
public MultiDocumentWorkflowsResponse retrieveAllMultiDocumentWorkflows()
GET /api/{version}/objects/documents/actions
MultiDocumentWorkflowsResponse resp = vaultClient.newRequest(MultiDocumentWorkflowsRequest.class) .retrieveAllMultiDocumentWorkflows();
if (resp.getData() != null) { for (MultiDocWorkflow workflow : resp.getData()) { System.out.println("------------------------------"); System.out.println("Name " + workflow.getName()); System.out.println("Label " + workflow.getLabel()); System.out.println("Type " + workflow.getType()); } }
public MultiDocumentWorkflowDetailsResponse retrieveMultiDocumentWorkflowDetails(String workflowName)
workflowName
- The multi-document workflow name value. Obtained from the
Retrieve All MultiDocument Workflows request
retrieveAllMultiDocumentWorkflows()
GET /api/{version}/objects/documents/actions/{workflow_name}
MultiDocumentWorkflowDetailsResponse resp = vaultClient.newRequest(MultiDocumentWorkflowsRequest.class) .retrieveMultiDocumentWorkflowDetails(workflowName);
if (resp.getData() != null) { MultiDocumentWorkflowDetailsResponse.MultiDocumentWorkflow workflow = resp.getData(); System.out.println("Workflow Name " + workflow.getName()); System.out.println("------------------------------"); for (Control con : workflow.getControls()) { System.out.println("Control Exist\n"); System.out.println("------------------------------"); System.out.println("Control Instruction " + con.getInstructions()); System.out.println("Control Label " + con.getLabel()); System.out.println("Control Type " + con.getType()); for (Prompt prompts : con.getPrompts()) { System.out.println("\tPrompts Exist\n"); System.out.println("------------------------------"); System.out.println("\tPrompt Lable " + prompts.getLabel()); System.out.println("\tPrompt Name " + prompts.getName()); System.out.println("\tPrompt Multivalue " + prompts.getMultiValue()); } } }
public InitiateMultiDocumentWorkflowResponse initiateMultiDocumentWorkflow(String workflowName, List<String> documents, Map<String,String> participantName, String description)
workflowName
- The multi-document workflow name value. Obtained from the
Retrieve All MultiDocument Workflows request
retrieveAllMultiDocumentWorkflows()
documents
- Input a comma-separated list of document id field values.participantName
- Enter the participant name and input the user or group id value. For example, approvers__c: user:123,group:234.description
- Description of the workflow. Maximum 1,000 characters.POST /api/{version}/objects/documents/actions/{workflow_name}
InitiateMultiDocumentWorkflowResponse resp = vaultClient.newRequest(MultiDocumentWorkflowsRequest.class) .initiateMultiDocumentWorkflow(workflowName, documents,participantName,description);
System.out.println("Status = " + resp.getResponseStatus()); if (resp.isSuccessful()) { System.out.println("Record ID " + resp.getData().getRecordId()); System.out.println("Record URL " + resp.getData().getRecordUrl()); System.out.println("Workflow ID " + resp.getData().getWorkflowId()); }
public MultiDocumentWorkflowsRequest setLoc(Boolean loc)
loc
- Set to true to retrieve localized (translated) strings (if
available)public MultiDocumentWorkflowsRequest setAcceptJSON()
Copyright © 2021. All rights reserved.