In the previous posts I have described the first answer applies workflow and multi-approval/multi-reject workflow.
In this scenario a number of rejection votes or approval votes are needed to approve or reject the item. For example – 3 approvals are needed for the item to be approved and 2 rejections are needed for the item to be rejected.
Note that when setting up this kind of scenario you need to make sure that the voting algorithm will not cause a clinch where item cannot be accepted nor rejected. If you have 6 or more users, then 3 approvals or 2 rejections model is fine. If you have less than 6 users, then in some situations workflow could end in dead point.
To create a workflow that will meet this scenario:
- Create a role "Approvers" and add selected users (you can assign users, domain groups or SharePoint groups). You can also add users later on with the activity "Add to role".
- Create a state "Waiting for approval".
- Add four actions – two named "Approve" and two named "Reject". One “Approve” and one “Reject” action must lead back to the “Waiting for approval” state (we are creating a loop). The other pair can lead to where you want, for example to the ending state.
- Assign the "Approvers" role to all “Approve” and “Reject” actions.
- Create 2 variables – “Approved votes” and “Rejected votes” – set both to “integer” type.
- In the looping actions add “Add to role” activity. Use it to add the “Current user” (use lookups to go to SharePoint -> Current -> Current user) to “Denied” members of the “Approvers” role. Note: use activity clipboard to copy the activity.
- In the looping “Approve” action use the “Set variable” activity to set the “Approved votes” variable to “Approved votes”+1.
- In the looping “Reject” action use the “Set variable” activity to set the “Rejected votes” variable to “Rejected votes”+1.
- In the non-looping actions add “Approve/reject item” activity and set it to approve/reject the current item.
- In the looping “Approve” action set action launch conditions to “Approved votes < 2”.
- In the looping “Reject” action set action launch conditions to “Rejected votes < 1”.
- In the non-looping “Approve” action set action launch conditions to “Approved votes >= 2”.
- In the non-looping “Reject” action set action launch conditions to “Rejected votes >= 1”.
What's going to happen in the workflow:
- Workflow enters the "Waiting for approval" state
- Members of "Approvers" role have 2 looping actions "Approve" and "Reject" – both “Approved votes” and “Rejected votes” variables are smaller than 2.
- Until two people chose “Reject” or “Approve” only the looping actions are available
- Every time the looping action is launched, a vote counter is raised by one and the workflow is entering the “Waiting for approval state”
- If 2 people have approved, then the looping “Approve” action will disappear and the other “Approve” action will be visible. This way the third approval action will be the one doing the final approval.
- If someone has already rejected, then the looping “Reject” action will disappear and the other “Reject” action will be visible. This way the second rejection action will be the one doing the final rejection.
- When the non-looping action is launched, workflow exits the "Waiting for approval" state and item approval status is set to “approved” or “rejected”.