
Dynamic Parallel Approval Workflow
Use
This workflow implements majority decisions of the form n from m . A total of m users receive a work item with the activity for approval at the same time. They can also agree or reject at the same time.
If the necessary number of n agreements required for an approval is reached, the object is regarded as having been approved.
The object is regarded as rejected when the number of users rejecting it renders it impossible for the necessary number of agreements to be reached.

A 2 from 4 approval procedure is implemented for a purchase order. A total of 4 recipients receive a work item for approval at the same time.
If 2 recipients agree, the purchase order is approved. Once 3 have rejected, the purchase order is rejected.
With this variant, the recipients n (necessary agreements) from m (total number of recipients) must agree. To implement this, the Workflow Wizard creates a workflow with table controlled, dynamic parallel processing in which the approvals are carried out.
The approval procedure is terminated once approval has been granted in n branches, or once the number of branches in which the object has been rejected renders it impossible for the number of necessary agreements to be reached.
At definition time for the dynamic parallel approval workflow, you define the
approval task and the type of the object to be approved.You do not determine the approving recipients and their number (m) until the workflow is executed. You can also assign
positions, jobs, organizational units, or work centers.Prerequisites
The object types that are to use an automatically created approval procedure must have an approval method. It is best if these object types support the
interface approval, which incorporates a method for approval and whose interface is ideal for the Workflow Wizard.The object type must always, however, have a method for displaying objects, which is to be entered as default method, because the Workflow Wizard integrates the default method of the object type to be approved into the approval step as a secondary method during instantiation.
Features
The users who are to approve the object are determined in the first step.
In the next steps, the two elements in the workflow container are initialized with the number of necessary approvals (container element
ApprovalState) or the number of necessary rejections (container element Rejections).The workflow definition then contains an activity for
table-driven, dynamic parallel processing. Each approval task can have Approved or Rejected as a result.In the event of approval, the approval counter (
ApprovalState) is decreased by one and checked to see whether it has reached zero.In the event of rejection, the rejection counter (
Rejections) is decreased by one and checked to see whether it has reached zero.If one of the check routines ascertains that the approval or rejection counter is less than or equal to zero, the table-driven dynamic parallel processing is terminated and the evaluation step is implemented.
For more information, see
Evaluation Part of All Approval Workflows.Enhancements to the workflow definition
You still need to enhance the workflow definition created by the Workflow Wizard, by adding steps in which the object to be approved is created or determined.
A reference to this object must be stored in the container element
ApprovalObject in the workflow container.Activities
The system adds the following container elements to the workflow container:
|
Data type |
Short description |
Explanation |
|
Object reference |
Approval object (ApprovalObject) |
Reference to the object to be approved. The object to be approved and the approval task must be determined at definition time. |
|
ABAP Dictionary reference |
Number of approvals ( ApprovalState) |
This container element counts the agreements. If the necessary number of agreements is reached, the workflow is set to approved. |
|
Number of rejections ( Rejections) |
This container element counts the rejections. If the necessary number of rejections is reached, the workflow is set to rejected. |
|
|
List of agents ( ApprovalAgents) |
The list of agents contains all users, positions, jobs, organizational units, and work centers that have been involved in the approval process. |
|
|
List of excluded agents ( ExcludedAgents) |
This list is used to exclude agents from approving the object. You can also include the workflow initiator in this list. This prevents applicants from being able to approve their own requests. |
|
|
Approval result ( Result) |
This field contains the result of the approval procedure after the workflow: A for approved |