OverviewCopy link to clipboard
The Cancel Process Smart Service allows you to halt all process flow and cancel all tasks associated with a process.
Permissions neededCopy link to clipboard
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.
PropertiesCopy link to clipboard
-
Category: Process Management
-
Icon:
-
Assignment Options: Unattended/Attended
Configuration optionsCopy link to clipboard
This section contains tab configuration details specific to this smart service. For more information about common configurations see the Process Node Properties page.
Data tabCopy link to clipboard
Node inputsCopy link to clipboard
Input | Data Type | Description | Required | Multiple |
---|---|---|---|---|
Process Id | Number (Integer) | The Id of the process to cancel | Yes | No |
Node outputsCopy link to clipboard
Output | Data Type | Description |
---|---|---|
Already Closed | Boolean | true if the process was already closed prior to execution of this smart service, otherwise false |
a!cancelProcess()Copy link to clipboard
The Cancel Process smart service is available as an expression function that can be executed inside a saveInto on a Interface Component or as part of a Web API.
SyntaxCopy link to clipboard
a!cancelProcess( processId, onSuccess, onError )
ParametersCopy link to clipboard
Keyword | Type | Description |
---|---|---|
|
Number(Integer) |
The id of the process to cancel. |
|
Any Type |
A list of saves or an HTTP response to execute after the smart service executes successfully. Created with |
|
Any Type |
A list of saves or an HTTP response to execute when the smart service does not execute successfully. Created with |
Runtime BehaviorCopy link to clipboard
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 Monitor 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.
Feature compatibilityCopy link to clipboard
The table below lists this smart service function's compatibility with various features in Appian.
Feature | Compatibility | Note |
---|---|---|
Portals | Partially compatible | Can be used with Appian Portals if it is connected using an integration and web API. |
Offline Mobile | Incompatible | |
Sync-Time Custom Record Fields | Incompatible | |
Real-Time Custom Record Fields | Incompatible | Custom record fields that evaluate in real time must be configured using one or more Custom Field functions. |
Process Reports | Incompatible | Cannot be used to configure a process report. |
Process Events | Incompatible | Cannot be used to configure a process event node, such as a start event or timer event. |
Old versionsCopy link to clipboard
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 |
---|---|
a!cancelProcess_17r3 | 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 use the latest version of the smart service node:
- Drag in a new Cancel Process Smart Service node from the palette, and place it on the same connector as the current node.
- Configure the new node with settings matching your current, older node.
- Delete the old Cancel Process Smart Service node.
To learn more about how Appian handles this kind of versioning, see the Function and Component Versions page.