ForEach Tab

Working with ForEach Workflows is slightly different. When defining them take the following into account:

General Information on ForEach Workflows

ForEach workflows process tasks multiple times and therefore, they represent a loop. The user must specify the number of loop iterations that will take place and the tasks that should be repeated. They can contain any executable object except Schedules (JSCH). It is also possible to embed other ForEach Workflows in them.

The Workflow page contains by default a predetermined loop construction to which you can add tasks. This construction comprises a START object in which you can define the loop and an END object which will be processed when the loop has been ended.

The tasks that should be repeated must be assigned to the loop line (this is the line that goes from and to the START object). They will automatically be linked and arranged in sequential order. For more complex structures, you can create subordinate workflows.

The tasks will only be processed when the loop condition has been evaluated. If the loop definition does not result in a loop cycle, the END object is immediately processed. The tasks are skipped and obtain the UNPROCESSED status within the workflow. In this case no tasks are created.

The content of the Process page is processed exactly once. The number of loop iterations is irrelevant.

Adding Tasks

To add a task to a ForEach workflow you also drag and drop one or several objects from the Objects pane to the editor. However, they can be added to the loop line only.

The length of the loop line changes dynamically as you add tasks.

Linking Tasks

Links cannot be linked manually. They are linked to each other automatically when they are added. This is why the connector lines are not available here.

Deleting Tasks

You can delete tasks in the same way as for other workflows. However, the connector lines in ForEach Workflows are predefined and cannot be deleted.

Moving Tasks

You can change the order in which the tasks are arranged along the loop line as you like. However, the tasks that are included in a branch can only be arranged in sequential order.

To create more complex structures you must embed workflows.

The For Each Tab

Runtime task properties

Iteration Source Description
Variable object

The VARA object is used as the source for the number of loop iterations.

The ForEach task chain is processed once for each column entry of a Variable object.

If the column or variable does not include an entry, the START object is in EMPTY status . The tasks are skipped and obtain the UNPROCESSED status within the workflow. This means that neither tasks are created nor RunIDs are assigned.

If the variable cannot be accessed because its agent is not available, the workflow switches to "Waiting for Agent" status.

Prompt Set/Script array

An array is used as the source.

The task is processed once per element (value) of the specified array.

You can create arrays using either PromptSet objects (use the elements checkbox and checklist) or a script.

Name

Name of the variable object or array, depending on the selected source.

For variables: You cannot limit the selection to a variable type.

For arrays: It must be specified without a leading & character. You can use empty index brackets [].

Column

Available only if the source is a variable object.

Column of the selected Variable object. Specifying a value is mandatory.

The value 0 must not be used here. If you do so, the system changes it to 1.

Specifying column 1 has the effect that the Key column (in static VARA objects) or the result column (in dynamic variables) will be used.

Publish Value as

The name of the Variable object that is used to provide the source value to the workflow.

Depending on the source this will be either the entry of the Variable object or the value of the array that is currently used and complies with the loop cycle.

Since the object variable is passed on to the workflow, it can be used within the workflow tasks.

Requirements: The Inherit from Parent setting must be activated in the objects. It is not possible to use this value to change the alias of a task in the workflow.