Approval Coordinator workflow activity
Summarize
Summary of Approval Coordinator workflow activity
The Approval Coordinator workflow activity in ServiceNow orchestrates approvals whose outcomes depend on multiple child approval activities, such as Approval - User, Approval - Group, and Manual Approval activities. It is designed to run only on tables that extend the Task table. This activity simplifies managing complex approval processes by consolidating multiple approval results into a single decision point within a workflow.
Show less
After placement on the workflow canvas and configuration via its activity form, the Approval Coordinator allows you to specify child approval activities. Upon completion, it automatically cancels any pending approvals created by its child activities to streamline approval management. Additionally, if a single user is assigned multiple approval roles within the same workflow, subsequent approvals for that user are skipped to avoid redundant approvals.
Key Features
- Configurable Wait Conditions: Define how the approval outcome is determined using the Wait for input variable with options such as:
- Any child activity approved
- All child activities approved
- First approval or rejection received
- Custom script-based condition
- Rejection Handling: When configured to wait for all or any child approvals, specify behavior on rejection:
- Reject immediately and complete the activity
- Wait for other responses before deciding, allowing users to reconsider
- Script-Based Approval Logic: For advanced scenarios, use a script to dynamically determine approval outcomes based on the counts of approved, rejected, and pending child activities.
- Automatic Cleanup: Pending approvals created by child activities are marked as No Longer Required once the Approval Coordinator completes, ensuring clean approval statuses.
Input Variables
The activity’s behavior is controlled by input variables, primarily:
- Wait for: Determines which child activity outcomes trigger the Approval Coordinator’s completion.
- When a rejection occurs: Specifies how to handle rejections depending on the Wait for setting.
- Approval script: Used if Wait for is set to a script-based condition, enabling customized approval logic.
Results and Conditions
The final result of the Approval Coordinator can be Approved, Rejected, Deleted, or Cancelled, based on the child approval outcomes and configured rules.
The activity provides conditions such as Approved and Rejected that determine workflow transitions based on the aggregated approval status.
Activity States
The Approval Coordinator activity progresses through states that the workflow engine uses to manage its lifecycle:
- Executing: Activity execution has started.
- Waiting: Activity is paused until a triggering event occurs.
- Finished: Activity has completed, with results available.
- Cancelled: The activity or entire workflow was cancelled.
- Error: A JavaScript error occurred; logs should be reviewed.
Practical Benefits for ServiceNow Customers
This activity enables customers to efficiently manage complex approval workflows involving multiple approvers and diverse approval types. It centralizes approval coordination, reduces redundant user approvals, and provides flexible configuration options to align with business policies. The automatic cleanup of pending approvals and script-based customization enhance workflow accuracy and responsiveness, ensuring streamlined approval processes within ServiceNow workflows.
The Approval Coordinator activity creates an approval whose outcome depends on the outcome of one or more child activities, including one or more Approval - User, Approval - Group, and/or Manual Approval activities.
After you click Submit, the activity appears on the workflow canvas. From there, specify the child activities by clicking the links that appear on the body of the activity.
When the Approval Coordinator activity completes, all pending approvals that were created by any of the Approval Coordinator approval activities are immediately set to No Longer Required. If a single user is called as an approver twice by the same workflow, such as when a single user is both a product approver and an executive approver, any approvals for that user after the first are skipped.Results
- Approved
- Rejected
- Deleted
- Cancelled
Input variables
Input variables determine the initial behavior of the activity.
| Field | Description |
|---|---|
| Wait for | Indicate what to wait for to indicate that the approval activity is approved or
rejected. Options are:
|
| When a rejection occurs Only appears if Wait for is set to All child activities to be approved or Any child activity to be approved. |
Specify what the coordinator should do when it sees a rejection from any one of
the child activities. Options are:
|
| Approval script Only appears if Wait for is set to Condition based on script. |
If the Wait for variable is set to Condition
based on script this script is called to determine how to handle an
approval or rejection. The script needs to set the variable
answer to , approved or rejected to indicate the overall
approval status for this approval. When called, the following variable is available
to the
script: |
Conditions
| Condition | Description |
|---|---|
| Approved | The users from the groups have approved the request based on the Wait for rules. |
| Rejected | The users from the groups have rejected the request based on the Wait for rules. |
States
| State | Description |
|---|---|
| Executing | The workflow engine starts the execute function of the activity. |
| Waiting | The workflow engine ignores the activity until a specific event to restart the activity is fired. |
| Finished | The activity finished running. See the result value for the outcome of the activity. |
| Cancelled | This activity, or the workflow that contains this activity, was canceled. |
| Error | A JavaScript error occurred. Review the logs for error details. |