Have you ever had requests to change workflow approvers when there are 10 items pending approvals. If yes, i can show you how to create a workflow without having to change the workflow where the task is located. In this scenario you will use two workflow. Two is always better than one in case of nintex if one is too big.
OK, here we go.
- First, create the first workflow starting with a parallel branch and place you different scenarios in there. In my scenario approvers were set based on different companies.
- So for each companies add a branch.
- For each branch add a run if action and set that to run if based on company.
- Next create a text variable to store the name of the approvers, mine is txtDynamicApprovers.
- Inside the run if action, add a set variable action and set the txtDynamicApprovers to hard code the name of the approver(s)
- Now, go ahead and create second workflow for the same list.This workflow should not run on item creation or modified and make sure to check start manually.
- Drag a task action of your choice, in my case it is a flexi task
- Create a variable to store txtDynamicApprovers, mine is txtDynamicApproversVariablePassed
- Make sure the txtDynamicApproversVariablePassed is check to show on start form (this is the trick i guess)
- Setup the rest and publish the workflow.
- Move to the first workflow
- Drag a start workflow action and configure the action to set txtDynamicApprovers as txtDynamicApproversVariablePassed
- Publish the workflow
This is it. Now you have a dynamic approvers workflow for which you do not have to modify the task workflow or have to wait for task workflow to complete. You can always go and change the first workflow to change approvers.
Note: Make sure you are not passing the group name or else it will not work (it did not in my case). We are doing this to avoid SharePoint groups also.