The Counter task allows you to count the number of times that it has been completed. This allows you to define rules that limit the number of iterations of other tasks in your process. For example, if you have a loop-back situation (i.e. Needs more information), you can limit the number of times that a path starting with 'Needs More Information' will happen. You can also define another branch of your workflow that will start based on the number of times the Counter task has been completed. Also, you can optionally configure the Counter task to delay the start of other tasks-usually this task should only be used for a few seconds. For longer periods, we recommend use of the Timeout setting and task status. We'll use the example below to illustrate.
First, drag the Counter task into your process flow. Here we have added the Counter task to start after the 'Needs More Information' Milestone task has completed.
If you want to delay the start of the Counter task, select 'Configure Task' from the Counter task menu.
You can then add a delay in seconds for the Counter task to start. We'll leave it at 0.
In this example, we added another escalated approval branch that will only occur if the Counter task has gone through 2 iterations. By having the Counter task starting when the 'Needs More Information' task is completed, we are also counting the number of times the 'Needs More Information' task has been completed. So, after 2 iterations of the 'Needs More Information' task occuring, we are starting the 'Escalated' task and then another 'Director Approval' task.
To define how this happens, select 'Configure Rules' on the Escalated Milestone task. You can then add the following rule:
From within the 'Escalated' Milestone rules builder window, we will start the 'Escalated' Milestone task when the Counter task is completed AND the data from the Counter task is 2. You can also choose other operators like, Is Not, Is Greater Than, etc...
Next, we have limited the number of times the initial form task will be sent back to the requester by defining a rule for the initial form task as shown above. In this case, when the Counter task IS NOT 2.
Now, let's see how the results look when the process is executed:
As you can see, the first Manager Approval result was 'Needs More Information' and it went back to the initial form task. The 2nd Manager Approval result was also 'Needs More Information' and then the Counter task triggered the Escalated Milestone task.