The Cancel Process Smart Service allows you to halt all process flow and cancel all tasks associated with a process.
The user running the smart service must have administrator rights to the selected process. 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
This section contains tab configuration details specific to this smart service. For more information about common configurations see the Process Node Properties page.
|Process Id||Number (Integer)||The Id of the process to cancel||Yes||No|
a!cancelProcess(processId, onSuccess, onError)
a!httpResponse(). The following function variable is available when configuring this input:
When this smart service runs, the specified process will be canceled. This matches the behavior as if the user clicked the Cancel button from the Monitoring view, which means that all process flow stops, all tasks for the process are removed from user's task lists, and the end events of the process do not execute. The user who executed the smart service will be listed in the process's history as having canceled the process. Additionally, for processes that have already been canceled, an error will not be thrown.
There are older versions of this Smart Service. You can identify older versions by looking at the name to see if there is a version suffix. If you are using an old version, be sure to refer to the corresponding documentation from the list below.
|Old Versions||Reason for Update|
This function was updated to handle scenarios where the selected process has already been canceled or completed. Instead of throwing an error in these cases, a new function variable, fv!alreadyClosed, will be set to true and available for use in your logic.
To learn more about how Appian handles this kind of versioning, see the Function and Component Versions page.