You can configure the For Array loop, which iterates once for
each element of the array.
From the Flow section of the action bar,
click Loop and drop it on the process diagram.
Double-click Loop.
The Loop Editor appears.
From the Loop Type list, click For
Array.
Select a Subflow parameter.
This parameter must be a scalar parameter or element of an array parameter with the
same data type as the array.
In the Array Parameter list, select a parameter or click to create
a parameter.
In the Mapping Direction list, select one of the
following:
Option
Description
To subflow
Copies elements of the array to a scalar variable in the subflow before the
subflow executes.
This is the default option for an input array
parameter.
To/From subflow
Copies each element of the array into a variable in the subflow, runs the
subflow, and copies the scalar variable’s resulting value back into the array element.
This is the default option for an input/output array parameter.
From subflow
Copies the value of the scalar variable into an element of the array after the
subflow runs.
This is the default option for an output array
parameter.
Click to create a
mapping from your selection and add it in the mapping table.
The loop iterates through these mappings.
Note:
You can delete a mapping from the table by selecting a mapping and clicking .
By default, the loop executes once for each element of the array.
If there are several arrays and the arrays have different sizes, the loop executes once
for each element of the smallest array. The extra elements in the other arrays are not
used or modified.
Repeat Step 3 through Step 7 to add additional arrays.
There is no limit to the number of arrays that you can map to a For
Array loop.
Click Design Matrix to view the values that will be used for
each subflow run.
The design matrix shows only the input and input/output mappings. The first column
contains the run number, and the other columns contain the values of the scalar subflow
variables for that run.
Click OK to close the Design Matrix
dialog box and to return to the Loop Editor.
Optional:
Click Limit the number of loops.
Typically, you can use this option to limit the number of iterations.
Select one of the following options for If a run in a loop fails
then:
Option
Description
Fail Loop
Select this option if you want the Loop adapter to fail when the subflow fails.
Ignore run and Continue
Select this option if you want the run to continue after a subflow fails.
This option applies to both parallel and sequential execution.
Click Execute all iterations in parallelto run all submitted
subflows simultaneously rather than sequentially.