Approval Coordinator workflow activity

The Approval Coordinator activity manages the overall approval that results from one or more approval activities contained within it.

The Approval Coordinator contains one or more Approval - User, Approval - Group and Manual Approval activities. It waits for all approval activities contained within it before deciding whether it should complete with a result of approved or rejected.

When the Approval Coordinator activity completes, it sets all pending approvals created by any of the contained activities to No Longer Required. If a workflow calls a single user as an approver more than once, such as when a user is both a product- and an executive-approver, it skips any approvals for that user after the first.

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. Indicate what happens when any of the child activities completes with a result of rejected. 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 mind 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.

  • 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. Indicate what happens if any of the child activities completes with a result of rejected. (Options are described in previous bullet point.)
  • 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.
Approval 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.
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.