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.

The rule-based nature of the 'Submit Another Task' task enables you to support submission rules based on fluid parameter details. For example, before calculating your regular payroll run, you can automatically roll back all QuickPay runs you have created and submitted for payroll validation purpose. In this instance, the rollback task is automatically resubmitted for all the QuickPay runs in the payroll period.
Note: You can't iterate a manual task. For example, you can't use the Submit Another Task option to iterate a QuickPay task and submit multiple QuickPay runs.

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

Execute the submissions in parallel or serial.
  • 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.

For example, if you specify a value of X, during a submission, the application processes X instances of the task initially. The parent task waits for X child submissions to complete, evaluates the fast formula and executes another set of X child submissions to complete. This cycle continues till the Maximum Repeat Counter submissions are completed or the Repeat Flow value is 'N'.
Note: It is recommended to execute the flow with parallel threads, especially for large volumes of data.

Parent Log File

After completion of the flow, use the Task Iterations page from the Process Results Summary and view the ESS Log file to view the details of the input parameters for each job submission. The Output and Log Files section displays one set of flow instance details and parameter values for the parent submission and similar set of values for each subsequent child submission.
  • 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.