Task Iterations in a Flow
Use the Submit Another Task task to automatically repeat a flow task multiple times with a single submission of the flow.
Define rules to control the task iteration. For example, define a rule to automatically submit a report task for each PSU within your organization.
There are no predefined flows that you can use directly for task iterations. To iterate a task, you must create a flow and include the 'Submit Another Task' task in the flow.
Consider using a standard flow pattern when your task submission rules are based on a static parameter such as TRU and you have a requirement to manage each task individually.
Consider these points before you create a flow and include Submit Another Task to initiate task iterations.
Task Name
Submit Another Task takes the task name as the input parameter and uses the repeat formula to execute multiple iterations of the task.
Task Iteration Name
To differentiate the multiple iterations and easily identify an iteration counter in the Submit Another Task UI, it's recommended that the formula you use for the iterations include a meaningful label name for each iteration.
Use the Task Repeat formula to return an iteration label that includes the task iteration name appended with the parameter on which the iterations are executed.
For example for a flow iteration to roll back Calculate Payroll processed for different payroll relationship groups, you can use the formula to return the iteration names as Roll Back Payroll Relationship Group A, Roll Back Payroll Relationship Group B, and so on. The task name is constant for the task iterations, but the parameter on which the iterations are executed is dynamic.
Task Repeat Formula
The Task Repeat Formula is a prerequisite for the flow and it decides the repetition logic and drives the iteration. When you create the repeat formula, use the formula type of Task Repeat.
The input parameters are predefined for an input task. You can add them as flow parameters during flow creation. The formula return values are used to validate the task parameters.
Maximum Repeat Counter
Specify a threshold limit for the maximum number of instances that can be executed for a single submission of the task. If the iteration runs into an error, this parameter prevents the process from getting into an infinite loop. A repeat counter N indicates one parent and N-1 child submissions or iterations.
Repeat Flow Parameter
The repeat flow parameter indicates when the task iteration should stop. A repeat flow instance is submitted only if the repeat flow parameter is set to Y.
Execute in Parallel
- For parallel submissions, the number of threads is taken into consideration. A number of submissions equivalent to the number of threads is submitted in parallel.
- For serial submissions, number of submissions equivalent to the Repeat Counter is executed one after the other.
If you have set the Execute in Parallel parameter to Yes, you must specify a value for the Maximum Parallel Threads. This parameter is used for a parallel submission.
Parent Log File
- Click on the Process ID on the first row to view the log output details of the flow.
- Click on the Process ID on the second row or any other row below to view the log output of a task iteration or child submission.