Configure a Loop activity
- Add a Loop activity to the map. See Add an activity.
- On the Extended Properties page of the Loop activity, click the Configuration tab.
- Consume the complex variable in the Complex Variable box.
- To indicate the row where the loop should start the check, consume the Long type variable in the Start Index box.
-
To map the updated index count (the row+1), consume the variable
to the
Updated Index box.
Start Index.Usually, it is same as the
-
To check whether a row is found, consume the required variable to
the
Row Found box.
When a row is found at runtime, all process variables mapped to variable member columns are updated with the contents of the columns from the row indicated. For example, if complex variable data has a number of rows with email IDs for resources, when the row is found, the email ID value is set to the process variable member and that email ID is used to send email.
When a row is not found, all process variables display the same values they had prior to calling the node.
If you try to access a column that does not exist, the job is suspended and a message appears.
-
In the
Number of Columns box,
enter the number of columns to check within the loop and then click
Set Columns.
The specified number of columns appears in the Variable Members list.
-
Map the variables to the variable members by consuming the
variables in the
Mappings box.
Variable members are the actual variables to be set with the required data from complex variable data columns. The number of columns value should be equal to the number of variable members that exist while configuring the loop node. Each column of variable members must be mapped to a variable of the required type.
- Click Save.