Class ObjectLifecycleWorkflowRequest
- Vault API Coverage:
- https://developer.veevavault.com/api/25.2/#object-lifecycle-amp-workflows
-
Field Summary
Fields inherited from class com.veeva.vault.vapil.api.request.VaultRequest
HTTP_HEADER_AUTHORIZATION, HTTP_HEADER_REFERENCE_ID, HTTP_HEADER_VAULT_CLIENT_ID, referenceId, requestClientId, vaultClient
-
Method Summary
Modifier and TypeMethodDescriptioninitiateMultiRecordWorkflow
(String workflowName) Initiate Multi-Record Workflow
Initiate a multi-record workflow on a set of records.initiateObjectActionOnASingleRecord
(String objectName, String recordId, String actionName) Initiate Object Action on a Single RecordinitiateObjectActionOnMultipleRecords
(String objectName, Set<String> recordIds, String actionName) Initiate Object Action on Multiple RecordsinitiateWorkflowAction
(int workflowId, String workflowAction) Initiate Workflow Action
Initiate a workflow action on a specific object workflow.initiateWorkflowTaskAction
(int taskId, String taskAction) Initiate Workflow Task ActionretrieveMultiRecordWorkflowDetails
(String workflowName) Retrieve Multi-Record Workflow Details
Retrieves the fields required to initiate a specific multi-record workflow.Retrieve Multi-Record Workflows
Retrieve all available multi-record workflows which: The authenticated user has permissions to view or initiate Can be initiated through the APIretrieveObjectRecordUserActionDetails
(String objectName, String recordId, String actionName) Retrieve Object User Action DetailsretrieveObjectRecordUserActions
(String objectName, String recordId) Retrieve Object Record User ActionsretrieveObjectWorkflowTaskActionDetails
(int taskId, String taskAction) Retrieve Workflow Tasks Actions DetailsretrieveObjectWorkflowTaskActions
(int taskId) Retrieve Workflow Tasks ActionsretrieveObjectWorkflowTaskDetails
(int taskId) Retrieve Workflow Tasks DetailsretrieveObjectWorkflowTasks
(String object, String recordId, String assignee) Retrieve Workflow Tasks, Retrieve Object Workflow TasksretrieveWorkflowActionDetails
(int workflowId, String workflowAction) Retrieve Workflow Action Details
Retrieve details about a workflow action.retrieveWorkflowActions
(int workflowId) Retrieve Workflow Action
Retrieve the details for a specific object workflow.retrieveWorkflowDetails
(int workflowId) Retrieve Workflow Details
Retrieve the details for a specific object workflow.retrieveWorkflows
(String object, String recordId, String participant) Retrieve WorkflowsretrieveWorkflowsByPage
(String pageUrl) Retrieve Workflows (By Page)setBodyParams
(Map<String, Object> bodyParams) Single record form ObjectRecordRequest with name/value body parameterssetDocumentIds
(List<Integer> documentIdList) Set the documents__sys body parameter to initiate actions on specific documents in a document workflowsetLoc
(boolean loc) Set the locsetOffset
(int offset) Set the offsetsetPageSize
(int pageSize) Set the page sizeSet the statusMethods inherited from class com.veeva.vault.vapil.api.request.VaultRequest
getBaseObjectMapper, send, send, sendReturnBinary, sendReturnBinary, sendToFile, sendToFile, setHeaderClientId, setHeaderReferenceId, setVaultClient
-
Method Details
-
retrieveObjectRecordUserActions
public ObjectRecordActionResponse retrieveObjectRecordUserActions(String objectName, String recordId) Retrieve Object Record User ActionsRetrieve all available user actions that can be initiated on a specific object record. Returned data can be retrieved via the "getActions" method.
- Parameters:
objectName
- The object name The object namerecordId
- The object record id- Returns:
- ObjectRecordActionResponse
- Vault API Endpoint:
GET /api/{version}/vobjects/{object_name}/{object_record_id}/actions
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#retrieve-object-record-user-actions
- Example Request:
ObjectRecordActionResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class) .retrieveObjectRecordUserActions("tt_claim__c", "OOW000000000501");
- Example Response:
if (resp.getData() != null) { System.out.println("Actions Exist\n"); for (Action action : resp.getData()) { System.out.println("------------------------------"); System.out.println("Name " + action.getName()); System.out.println("Label " + action.getLabel()); System.out.println("Type " + action.getType()); for (Link link : action.getLinks()) { System.out.println("Rel " + link.getRel()); System.out.println("Accept " + link.getAccept()); System.out.println("Href " + link.getHref()); System.out.println("Method " + link.getMethod()); System.out.println(""); } } } else System.out.println("No Actions Exist\n"); }
-
retrieveObjectRecordUserActionDetails
public ObjectRecordActionResponse retrieveObjectRecordUserActionDetails(String objectName, String recordId, String actionName) Retrieve Object User Action DetailsRetrieve the details for a specific user action.
Returned data can be retrieved via the "getActions" method. Note that the an array is returned instead of a single entity for a consistent response class. Responses with data will have an array of size one.
- Parameters:
objectName
- The object namerecordId
- The object record idactionName
- Obtained from the Retrieve User Actions requestretrieveObjectRecordUserActions(java.lang.String, java.lang.String)
- Returns:
- ObjectRecordActionResponse
- Vault API Endpoint:
GET /api/{version}/vobjects/{object_name}/{object_record_id}/actions/{action_name}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#retrieve-object-user-action-details
- Example Request:
ObjectRecordActionResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class) .retrieveObjectRecordUserActionDetails(objectName, recordId, actionName);
- Example Response:
if (resp.getData() != null) { System.out.println("Actions Exist\n"); for (Action action : resp.getData()) { System.out.println("------------------------------"); System.out.println("Name " + action.getName()); System.out.println("Label " + action.getLabel()); System.out.println("Type " + action.getType()); for (Link link : action.getLinks()) { System.out.println("Rel " + link.getRel()); System.out.println("Accept " + link.getAccept()); System.out.println("Href " + link.getHref()); System.out.println("Method " + link.getMethod()); System.out.println(""); } } }
-
initiateObjectActionOnASingleRecord
public ObjectRecordActionResponse initiateObjectActionOnASingleRecord(String objectName, String recordId, String actionName) Initiate Object Action on a Single Record- Parameters:
objectName
- The object namerecordId
- The object record idactionName
- Obtained from the Retrieve User Actions requestretrieveObjectRecordUserActions(java.lang.String, java.lang.String)
- Returns:
- ObjectRecordActionResponse
- Vault API Endpoint:
POST /api/{version}/vobjects/{object_name}/{object_record_id}/actions/{action_name}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#initiate-object-action-on-a-single-record
- Example Request:
ObjectRecordActionResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class) .initiateObjectActionOnASingleRecord(objectName, recordId, actionName);
- Example Response:
System.out.println(resp.getResponseStatus()); System.out.println(resp.getResponse());
-
initiateObjectActionOnMultipleRecords
public ObjectRecordActionBulkResponse initiateObjectActionOnMultipleRecords(String objectName, Set<String> recordIds, String actionName) Initiate Object Action on Multiple RecordsInitiate an object user action on multiple records. Maximum 500 records per batch.
- Parameters:
objectName
- The object namerecordIds
- Set of record ids to perform the action upon. Up to 500 entries per callactionName
- Obtained from the Retrieve User Actions requestretrieveObjectRecordUserActions(java.lang.String, java.lang.String)
- Returns:
- ObjectRecordActionBulkResponse
- Vault API Endpoint:
POST /api/{version}/vobjects/{object_name}/actions/{action_name}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#initiate-object-action-on-multiple-records
- Example Request:
ObjectRecordActionResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class) .initiateObjectActionOnMultipleRecords(objectName, ids, actionName);
,ObjectRecordActionBulkResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class) .initiateObjectActionOnMultipleRecords(objectName, ids, actionName);
- Example Response:
System.out.println(resp.getResponseStatus()); System.out.println(resp.getResponse());
,System.out.println(resp.getResponseStatus()); System.out.println(resp.getResponse());
-
retrieveWorkflows
Retrieve WorkflowsRetrieve all workflows for a specific object and object record or from a specific workflow participant.
- Parameters:
object
- To retrieve all workflows configured on an object.recordId
- Object record id field values e.g object__v={name__v}&record_id__v={id}. object__v=product__v&record_id__v=00P07551participant
- To retrieve all workflows available to a particular user, include the user id field value as ?participant={id}. To retrieve your own workflows, set this value to participant=me. This parameter is required when the object__v and record_id__v parameters are not used.- Returns:
- ObjectWorkflowResponse
- Vault API Endpoint:
GET /api/{version}/objects/objectworkflows
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#retrieve-workflows
- Example Request:
ObjectWorkflowResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class).setPageSize(0).setOffset(0) .retrieveWorkflows(object, recordId, participant);
- Example Response:
System.out.println(resp.getResponseStatus()); System.out.println(resp.getResponse()); Object.ObjectReference objInfo = resp.getResponseDetails().getObject(); System.out.println("-----------Response Details -------------------"); System.out.println("Total: " + resp.getResponseDetails().getTotal()); System.out.println("Offset: " + resp.getResponseDetails().getOffset()); System.out.println("PageSize: " + resp.getResponseDetails().getPageSize()); resp.getResponseDetails().getOffset(); System.out.println("-----------Object Info -------------------"); System.out.println("Name: " + objInfo.getName()); System.out.println("Label: " + objInfo.getLabel()); System.out.println("URL: " + objInfo.getUrl()); System.out.println("Label Plural: " + objInfo.getLabelPlural()); List<ObjectWorkflow> objectWorkflowDetail = resp.getData(); for (ObjectWorkflow workflowDetail : objectWorkflowDetail) { System.out.println("-----------Data -------------------"); System.out.println("Get ID: " + workflowDetail.getId()); System.out.println("Get Label: " + workflowDetail.getLabel()); System.out.println("Get StartDate: " + workflowDetail.getStartedDate()); System.out.println("Get Object: " + workflowDetail.getObject()); System.out.println("Get RecordID: " + workflowDetail.getRecordId()); System.out.println("Get Initiator: " + workflowDetail.getInitiator()); System.out.println("Get Due Date: " + workflowDetail.getDueDate()); }
-
retrieveWorkflowsByPage
Retrieve Workflows (By Page)Retrieve all workflows using the previous_page or next_page parameter of a previous request
- Parameters:
pageUrl
- The URL from the previous_page or next_page parameter- Returns:
- ObjectWorkflowResponse
- Vault API Endpoint:
GET /api/{version}/objects/objectworkflows
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#retrieve-workflows
- Example Request:
ObjectWorkflowResponse paginatedResponse = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class) .retrieveWorkflowsByPage(response.getResponseDetails().getNextPage());
- Example Response:
System.out.println(paginatedResponse.getResponseStatus());
-
retrieveWorkflowDetails
Retrieve Workflow Details
Retrieve the details for a specific object workflow.- Parameters:
workflowId
- The workflow id.- Returns:
- ObjectWorkflowResponse
- Vault API Endpoint:
GET /api/{version}/objects/objectworkflows/{workflow_id}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#retrieve-workflow-details
- Example Request:
ObjectWorkflowResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class).setLoc(true) .retrieveWorkflowDetails(workflowId);
- Example Response:
System.out.println(resp.getResponseStatus()); System.out.println(resp.getResponse()); Object.ObjectReference objInfo = resp.getResponseDetails().getObject(); System.out.println("-----------Response Details -------------------"); System.out.println("URL: " + resp.getResponseDetails().getUrl()); resp.getResponseDetails().getOffset(); System.out.println("-----------Object Info -------------------"); System.out.println("Name: " + objInfo.getName()); System.out.println("Label: " + objInfo.getLabel()); System.out.println("URL: " + objInfo.getUrl()); System.out.println("Label Plural: " + objInfo.getLabelPlural()); List<ObjectWorkflow> objectWorkflowDetail = resp.getData(); for (ObjectWorkflow workflowDetail : objectWorkflowDetail) { System.out.println("-----------Data -------------------"); System.out.println("Get ID: " + workflowDetail.getId()); System.out.println("Get Label: " + workflowDetail.getLabel()); System.out.println("Get StartDate: " + workflowDetail.getStartedDate()); System.out.println("Get Object: " + workflowDetail.getObject()); System.out.println("Get RecordID: " + workflowDetail.getRecordId()); System.out.println("Get Initiator: " + workflowDetail.getInitiator()); System.out.println("Get Due Date: " + workflowDetail.getDueDate()); }
-
retrieveWorkflowActions
Retrieve Workflow Action
Retrieve the details for a specific object workflow.- Parameters:
workflowId
- The workflow id.- Returns:
- ObjectWorkflowActionResponse
- Vault API Endpoint:
GET /api/{version}/objects/objectworkflows/{workflow_id}/actions
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#retrieve-workflow-actions
- Example Request:
ObjectWorkflowActionResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class).setLoc(false) .retrieveWorkflowActions(workflowId);
- Example Response:
System.out.println("Response Status: " + resp.getResponseStatus()); System.out.println("Response :" + resp.getResponse()); List<WorkflowAction> objectWorkflowDetail = resp.getData(); if (resp.getData() != null) { for (WorkflowAction workflowDetail : objectWorkflowDetail) { System.out.println("Name: " + workflowDetail.getName()); System.out.println("Label: " + workflowDetail.getLabel()); } }
-
retrieveWorkflowActionDetails
public ObjectWorkflowActionDetailsResponse retrieveWorkflowActionDetails(int workflowId, String workflowAction) Retrieve Workflow Action Details
Retrieve details about a workflow action. For example, the prompts needed to complete a workflow action.- Parameters:
workflowId
- The workflow id.workflowAction
- The name of the workflow action. To get this value, You can Retrieve Workflow Actions.- Returns:
- ObjectWorkflowActionDetailsResponse
- Vault API Endpoint:
GET /api/{version}/objects/objectworkflows/{workflow_id}/actions/{workflow_action}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#retrieve-workflow-action-details
- Example Request:
ObjectWorkflowActionDetailsResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class).setLoc(false) .retrieveWorkflowActionDetails(workflowId, workflowName);
- Example Response:
System.out.println("Response Status: " + resp.getResponseStatus()); System.out.println("Response :" + resp.getResponse()); List<Control> controls = resp.getData().getControls(); if (controls != null) { for (Control control : controls) { System.out.println("Type: " + control.getType()); System.out.println("Class: " + control.getClass()); List<CurrentValue> currentValue = control.getCurrentValues(); for (CurrentValue cValue : currentValue) { System.out.println("Class: " + cValue.getDocumentId()); } } }
-
initiateWorkflowAction
Initiate Workflow Action
Initiate a workflow action on a specific object workflow.- Parameters:
workflowId
- The workflow id.workflowAction
- The name of the workflow action.- Returns:
- VaultResponse
- Vault API Endpoint:
POST /api/{version}/objects/objectworkflows/{workflow_id}/actions/{workflow_action}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#initiate-workflow-action
- Example Request:
VaultResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class) .setBodyParams(bodyParams) .initiateWorkflowAction(workflowId, workflowName);
- Example Response:
System.out.println("Response Status: " + resp.getResponseStatus()); System.out.println("Response :" + resp.getResponse());
-
retrieveMultiRecordWorkflows
Retrieve Multi-Record Workflows
Retrieve all available multi-record workflows which: The authenticated user has permissions to view or initiate Can be initiated through the API- Returns:
- ObjectMultiRecordWorkflowsResponse
- Vault API Endpoint:
GET /objects/objectworkflows/actions
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#multi-record-workflows
- Example Request:
ObjectMultiRecordWorkflowsResponse response = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class) .retrieveMultiRecordWorkflows();
- Example Response:
System.out.println("Response Status: " + response.getResponseStatus()); System.out.println("Response: " + response.getResponse()); for (ObjectMultiRecordWorkflowsResponse.MultiRecordWorkflow workflow : response.getData()) { System.out.println("Name: " + workflow.getName()); System.out.println("Label: " + workflow.getLabel()); System.out.println("Type: " + workflow.getType()); System.out.println("Cardinality: " + workflow.getCardinality()); }
-
retrieveMultiRecordWorkflowDetails
public ObjectMultiRecordWorkflowDetailsResponse retrieveMultiRecordWorkflowDetails(String workflowName) Retrieve Multi-Record Workflow Details
Retrieves the fields required to initiate a specific multi-record workflow.- Parameters:
workflowName
- The workflow name.- Returns:
- ObjectMultiRecordWorkflowDetailsResponse
- Vault API Endpoint:
GET /api/{version}/objects/objectworkflows/actions/{workflow_name}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#retrieve-multi-record-workflow-details
- Example Request:
ObjectMultiRecordWorkflowDetailsResponse response = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class) .retrieveMultiRecordWorkflowDetails(workflowName);
- Example Response:
System.out.println("Response Status: " + resp.getResponseStatus()); System.out.println("Response :" + resp.getResponse()); System.out.println("Name: " + response.getData().getName()); System.out.println("Label: " + response.getData().getLabel()); System.out.println("Type: " + response.getData().getType()); System.out.println("Cardinality: " + response.getData().getCardinality()); if (response.getData().getControls() != null) { System.out.println("Controls: "); for (Control control : response.getData().getControls()) { System.out.println(" Control Label: " + control.getLabel()); System.out.println(" Control Type: " + control.getType()); System.out.println(" Prompts: "); for (Prompt prompt : control.getPrompts()) { System.out.println(" Prompt Label: " + prompt.getLabel()); System.out.println(" Prompt Name: " + prompt.getName()); } } }
-
initiateMultiRecordWorkflow
Initiate Multi-Record Workflow
Initiate a multi-record workflow on a set of records.- Parameters:
workflowName
- The workflow name.- Returns:
- InitiateMultiRecordWorkflowResponse
- Vault API Endpoint:
POST /api/{version}/objects/objectworkflows/actions/{workflow_name}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#initiate-multi-record-workflow
- Example Request:
InitiateMultiRecordWorkflowResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class) .setBodyParams(bodyParams) .initiateMultiRecordWorkflow(workflowName);
- Example Response:
System.out.println("Response Status: " + resp.getResponseStatus()); System.out.println("Response :" + resp.getResponse());
-
retrieveObjectWorkflowTasks
public ObjectWorkflowTaskResponse retrieveObjectWorkflowTasks(String object, String recordId, String assignee) Retrieve Workflow Tasks, Retrieve Object Workflow TasksNote: Tasks associated with document workflows will not appear in API versions earlier than v18.3.
- Parameters:
object
- To retrieve all workflows configured on an object.recordId
- Object record id field values e.g object__v={name__v}&record_id__v={id}. object__v=product__v&record_id__v=00P07551assignee
- To retrieve all workflow tasks available to a particular user, include the user id field value as ?assignee__v={id}. To retrieve your own workflow tasks, set this value to ?assignee__v=me. This parameter is required when the object__v and record_id__v parameters are not used.- Returns:
- ObjectWorkflowTaskResponse
- Vault API Endpoint:
GET /api/{version}/objects/objectworkflows/tasks
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#retrieve-object-workflow-tasks
- Example Request:
ObjectWorkflowTaskResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class).setPageSize(0) .setOffset(0).retrieveObjectWorkflowTasks(object, recordId, assignee);
- Example Response:
System.out.println(resp.getResponseStatus()); System.out.println(resp.getResponse()); Object.ObjectReference objInfo = resp.getResponseDetails().getObject(); System.out.println("-----------Response Details -------------------"); System.out.println("Total: " + resp.getResponseDetails().getTotal()); System.out.println("Offset: " + resp.getResponseDetails().getOffset()); System.out.println("PageSize: " + resp.getResponseDetails().getPageSize()); resp.getResponseDetails().getOffset(); System.out.println("-----------Object Info -------------------"); System.out.println("Name: " + objInfo.getName()); System.out.println("Label: " + objInfo.getLabel()); System.out.println("URL: " + objInfo.getUrl()); System.out.println("Label Plural: " + objInfo.getLabelPlural()); List<ObjectWorkflowTask> tasks = resp.getData(); for (ObjectWorkflowTask workflowTask : tasks) { System.out.println("-----------Data -------------------"); System.out.println("Get ID: " + workflowTask.getId()); System.out.println("Get Label: " + workflowTask.getLabel()); System.out.println("Get CreatedDate: " + workflowTask.getCreatedDate()); System.out.println("Get Object: " + workflowTask.getObject()); System.out.println("Get RecordID: " + workflowTask.getRecordId()); System.out.println("Get Instructions: " + workflowTask.getInstructions()); System.out.println("Get Due Date: " + workflowTask.getDueDate()); }
-
retrieveObjectWorkflowTaskDetails
Retrieve Workflow Tasks Details- Parameters:
taskId
- id of task- Returns:
- ObjectWorkflowTaskResponse
- Vault API Endpoint:
GET /api/{version}/objects/objectworkflows/tasks/{task_id}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#retrieve-workflow-task-details
- Example Request:
ObjectWorkflowTaskResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class) .retrieveObjectWorkflowTaskDetails(taskId);
- Example Response:
System.out.println(resp.getResponseStatus()); System.out.println(resp.getResponse()); Object.ObjectReference objInfo = resp.getResponseDetails().getObject(); System.out.println("-----------Response Details -------------------"); System.out.println("URL: " + resp.getResponseDetails().getUrl()); resp.getResponseDetails().getOffset(); System.out.println("-----------Object Info -------------------"); System.out.println("Name: " + objInfo.getName()); System.out.println("Label: " + objInfo.getLabel()); System.out.println("URL: " + objInfo.getUrl()); System.out.println("Label Plural: " + objInfo.getLabelPlural()); List<ObjectWorkflowTask> tasks = resp.getData(); for (ObjectWorkflowTask workflowTask : tasks) { System.out.println("-----------Data -------------------"); System.out.println("Get ID: " + workflowTask.getId()); System.out.println("Get Label: " + workflowTask.getLabel()); System.out.println("Get CreatedDate: " + workflowTask.getCreatedDate()); System.out.println("Get Object: " + workflowTask.getObject()); System.out.println("Get RecordID: " + workflowTask.getRecordId()); System.out.println("Get Instructions: " + workflowTask.getInstructions()); System.out.println("Get Assigned Date: " + workflowTask.getAssignedDate()); }
-
retrieveObjectWorkflowTaskActions
Retrieve Workflow Tasks Actions- Parameters:
taskId
- id of task- Returns:
- ObjectWorkflowActionResponse
- Vault API Endpoint:
GET /api/{version}/objects/objectworkflows/tasks/{task_id}/actions
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#retrieve-workflow-task-actions
- Example Request:
ObjectWorkflowActionResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class).setLoc(false) .retrieveObjectWorkflowTaskActions(taskId);
- Example Response:
System.out.println("Response Status: " + resp.getResponseStatus()); System.out.println("Response :" + resp.getResponse()); List<WorkflowAction> objectWorkflowTask = resp.getData(); if (resp.getData() != null) { for (WorkflowAction workflowDetail : objectWorkflowTask) { System.out.println("Name: " + workflowDetail.getName()); System.out.println("Label: " + workflowDetail.getLabel()); } }
-
retrieveObjectWorkflowTaskActionDetails
public ObjectWorkflowTaskActionDetailsResponse retrieveObjectWorkflowTaskActionDetails(int taskId, String taskAction) Retrieve Workflow Tasks Actions Details- Parameters:
taskId
- The task id field value.taskAction
- The name of the task action retrieved from Retrieve Workflow Task Actions.- Returns:
- ObjectWorkflowTaskActionDetailsResponse
- Vault API Endpoint:
GET /api/{version}/objects/objectworkflows/tasks/{task_id}/actions/{task_action}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#retrieve-workflow-task-action-details
- Example Request:
ObjectWorkflowTaskActionDetailsResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class).setLoc(false) .retrieveObjectWorkflowTaskActionDetails(taskId, taskAction);
- Example Response:
System.out.println("Response Status: " + resp.getResponseStatus()); System.out.println("Response :" + resp.getResponse()); List<ObjectWorkflowTaskActionDetails> actionDetails = resp.getData(); if (actionDetails != null) { for (ObjectWorkflowTaskActionDetails workflowTaskActionDetails : actionDetails) { System.out.println("-----------Data -------------------"); System.out.println("Get ID: " + workflowTaskActionDetails.getName()); System.out.println("Get Label: " + workflowTaskActionDetails.getLabel()); System.out.println("Get Type: " + workflowTaskActionDetails.getType()); System.out.println("Get Description: " + workflowTaskActionDetails.getDescription()); if (workflowTaskActionDetails.getControls() != null) { List<Control> controls = workflowTaskActionDetails.getControls(); if (controls != null) { for (Control taskControl : controls) { System.out.println("-----------Controls -------------------"); System.out.println("Get Label: " + taskControl.getLabel()); System.out.println("Get Type: " + taskControl.getType()); System.out.println("Get Instructions " + taskControl.getInstructions()); List<Verdict> verdicts = taskControl.getVerdicts(); if (verdicts != null) { for (Verdict verdict : verdicts) { System.out.println("-----------Verdict -------------------"); System.out.println("Get Name: " + verdict.getName()); System.out.println("Get Label: " + verdict.getLabel()); List<Prompt> prompts = verdict.getPrompts(); if (prompts != null) { for (Prompt prompt : prompts) { System.out.println("-----------Prompts -------------------"); System.out.println("Get Prompt Name: " + prompt.getName()); System.out.println("Get Prompt Label: " + prompt.getLabel()); System.out.println("Get Prompt Required: " + prompt.getRequired()); System.out.println("Get Prompt MultiValue: " + prompt.getMultiValue()); System.out.println("Get Prompt Type: " + prompt.getType()); } } } } } } } } }
-
initiateWorkflowTaskAction
Initiate Workflow Task ActionInitiate an object workflow task action on a specific object record. On SUCCESS, the specified object workflow task action is initiated on the object record.
- Parameters:
taskId
- The task id field value.taskAction
- The name of the task action retrieved from Retrieve Workflow Task Actions.- Returns:
- VaultResponse
- Vault API Endpoint:
POST /api/{version}/objects/objectworkflows/tasks/{task_id}/actions/{task_action}
- Vault API Help Link:
- https://developer.veevavault.com/api/25.2/#initiate-workflow-task-action
- Example Request:
VaultResponse resp = vaultClient.newRequest(ObjectLifecycleWorkflowRequest.class) .setBodyParams(bodyParams) .initiateWorkflowTaskAction(taskId, taskAction);
- Example Response:
System.out.println("Response Status: " + resp.getResponseStatus()); System.out.println("Response :" + resp.getResponse());
-
setBodyParams
Single record form ObjectRecordRequest with name/value body parameters- Parameters:
bodyParams
- map of body params- Returns:
- The Request
-
setDocumentIds
Set the documents__sys body parameter to initiate actions on specific documents in a document workflow- Parameters:
documentIdList
- List of document IDs- Returns:
- The request
-
setLoc
Set the loc- Parameters:
loc
- loc- Returns:
- The Request
-
setOffset
Set the offset- Parameters:
offset
- offset- Returns:
- The Request
-
setPageSize
Set the page size- Parameters:
pageSize
- page size- Returns:
- The Request
-
setStatus
Set the status- Parameters:
status
- status- Returns:
- The Request
-