Approval Coordinator workflow activity

  • Release version: Yokohama
  • Updated January 30, 2025
  • 3 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Approval Coordinator workflow activity

    The Approval Coordinator activity in ServiceNow workflows enables the creation of an approval process whose overall outcome depends on the results of one or more child approval activities. These child activities can be user, group, or manual approvals. This activity is specifically designed for workflows running on tables that extend the Task table.

    Show full answer Show less

    Once configured and submitted in the workflow canvas, the Approval Coordinator allows you to specify child approval activities. Upon completion, any pending approvals created by these child activities are automatically set to "No Longer Required." Additionally, if a single user is assigned multiple approval roles within the same workflow, subsequent approvals for that user are skipped after the first one.

    Key Features

    • Result Determination: The activity's final result can be Approved, Rejected, Deleted, or Cancelled, based on the child approvals and the conditions set.
    • Wait For Input Variable: Defines the approval completion logic with options such as:
      • Any child activity approved
      • All child activities approved
      • First approval or rejection received
      • Custom script-based condition
    • Handling Rejections: When waiting for all or any child activities, you can specify whether the Approval Coordinator should immediately reject upon any child rejection or wait for all responses before deciding.
    • Approval Script: If a script-based condition is chosen, a script is executed to evaluate the approval status dynamically, using counts of total, approved, rejected, and pending child approvals.
    • Conditions for Workflow Transitions: The workflow advances based on whether the Approval Coordinator result is Approved or Rejected, adhering to the specified Wait For rules.
    • Activity States: Includes Executing, Waiting, Finished, Cancelled, and Error states to manage workflow progression and error handling.

    Practical Use for ServiceNow Customers

    By leveraging the Approval Coordinator activity, ServiceNow customers can streamline complex approval processes involving multiple approvers or groups, with flexible rules on how approvals are aggregated and handled. This ensures workflows can dynamically respond to approvals or rejections, improving process efficiency and clarity.

    Customers can expect:

    • Centralized management of multiple approval activities within a single workflow step
    • Configurable logic to define when approvals are considered complete
    • Automatic handling of redundant approvals when a user has multiple roles
    • Clear workflow state transitions based on approval outcomes

    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.

    Note:
    This activity is only available when the workflow runs on a table that extends Task.
    To create an Approval Coordinator activity, first drag the activity onto the workflow canvas, causing the activity form to display. On the activity form, fill in the appropriate fields, then click Submit.

    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

    The result value of the Approval Coordinator activity depends on the approval actions taken by the approvers and the approval conditions specified in the Wait for field. Possible result values are:
    • Approved
    • Rejected
    • Deleted
    • Cancelled

    Input variables

    Input variables determine the initial behavior of the activity.

    Table 1. Approval Coordinator activity input variables
    Field Description
    Wait for
    Indicate what to wait for to indicate that the approval activity is approved or rejected. Options are:
    • Any child activity to be approved: Any child activity (User, Group, or Manual Approval) that completes with a result of approved causes the Approval Coordinator activity to complete with a result of approved.
    • All child activities to be approved: All child activities of the Approval Coordinator activity must complete with a a result of approved to cause the Approval Coordinator activity to complete with a result of approved.
    • The first approval or rejection from any child activity: The first child activity that completes with a result of approved or rejected causes the Approval Coordinator activity to complete with the same result.
    • Condition based on script:Call a script to determine how to manage an approval or rejection.
    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:
    • Reject the approval: Immediately complete the Approval Coordinator activity with a result of rejected.
    • Wait for other responses before deciding: Wait until we get other responses from other child activities before making an approval or rejection decision.

      This allows users to change their minds until a decision is made.

      In addition, if Wait for is set to Any child activity to approve then a single child activity completion with a result of approved will cause the Approval Coordinator activity to complete with a result of approved even if other child activities have completed with a result of rejected.

    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:
    counts.total = total number of child approval activities that are part of this approval
          counts.approved = # of child approval activities that approved so far
          counts.rejected = # of child approval activities that rejected so far
          counts.requested = # of child approval activities that are pending approval

    Conditions

    The conditions determine which transition runs after this activity.
    Note:
    Approval activities run as the user whose actions match the approve or reject conditions the workflow was waiting for and advances the workflow.
    Table 2. Approval Coordinator activity 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

    The activity state tells the workflow engine what to do with the activity.
    Table 3. Approval Coordinator activity 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.