The Complete Task Smart Service allows you to complete a task belonging to another process from your current process.
The user running the smart service must have rights to complete the selected task. Attempting to complete this task without the proper user rights generates an error message for the process administrator and pauses the process.
Category: Process Management
Assignment Options: Unattended/Attended - Note: When this smart service is attended, the form that the user sees is the form configured on the node, not the form for the specified task.
|Task Id||Number (Integer)||The id of the task to complete||Yes||No|
|Task Inputs||Any Type||A dictionary containing keys and values that corresponds to the task’s inputs.||No||No|
The Task Inputs property is a dictionary that must contain entries for any required parameters for the selected task. It may also contain fields for optional parameters for the task. If any required parameters are missing or if the dictionary contains any entries that do not match parameters of the selected task, the target task will not be completed and this node will pause.
For example, if you have a task that is a part of an employee review cycle, it might have a required parameter named
employeeId and optional parameters named
To successfully complete this task, the Task Inputs input would look like one of the following:
In the below examples, the target task does not complete. For the first two cases, the reason is that the required task input,
employeeId, was not provided. For the third case the reason is that an entry in the task input,
supervisorId, did not match any of the inputs of the task.
a!completeTask(taskId, taskInputs, onSuccess, onError)