Submit an Attestation Form
The Submit Business Process Form Data (POST /v1/platform/workflow/business_processes/tasks/forms
) operation allows an employee to use your application to respond to an attestation question.
In this example, we submit an employee's response to the workflow initiated in the previous step.
The request:
- uses the
processInstanceId
andtaskId
to identify the user workflow executed in the previous step. These IDs are returned in the Initiate a User Workflow response body. - uses
action
to define the next step - whether to submit and record the user's answer and proceed with completing the attestation process, or looping through additional user workflow questions. In that case, you would pass theSubmitAndNext
action. - uses
attestationProcessId
to identify the specific Attestation process initiated by the employee who started the attestation process - uses the
fields
array to define a series ofid
,value
pairs composed of questions and answers. In this example, the employee selected the button in your application with the IDpositive_answer
defined as one of the answer options in theformStructureData
property of the previous step's response body.
Example request
Call the Submit Business Process Form Data (POST /v1/platform/workflow/business_processes/tasks/forms
) operation with the following request payload.
{
"processInstanceId": 7009,
"taskId": 7031,
"action": "Submit",
"attestationProcessId": 9,
"fields": [
{
"id": "questiontextplaceholder",
"value": "positive_answer"
}
]
}
Example response
A success response returns HTTP status code 200 and a response body similar to the following example.
{
"message": "success"
}
Response analysis
Note that the response model is identical between the Execute Business Process response in the previous step and the Submit Business Process Form Data response in this step.
The formValueData
response property represents the status of all the execution variables. formValueData
is not returned by default, but can be returned if the request payload Boolean returnProcessVariables
is set to true and the workflow action
is SubmitAndNext
for a multiuser task model.
If no further actions exist in the flow, the response body is simply a success message as shown in this example.
If subsequent tasks exist, formStructureData
and other properties are returned in the response, which will strongly resemble the Execute Business Process (POST /v1/platform/workflow/business_processes/execute
) operation's response example in the previous step. Loop through each additional task until all actions are complete.
Once all actions are complete, proceed to the final step to Complete the Attestation Process.
Updated over 1 year ago