The For Each activity iterates through recurring elements of a variable, performing other activities during each iteration cycle.
When you drop a For Each activity onto an orchestration, Studio creates the following two variables:
Where X is equal to the number of For Each activities that have been dropped on the orchestration. For example, when the first For Each activity is dropped on an orchestration, the variables called loopvalue_1 and loopcounter_1 are created.
To use a For Each activity complete the following steps:
An XPath expression that refers to the recurring element is displayed in the Element Name field. The Variable Name field is automatically populated with the loopvalue_X variable created for this For Each activity. You can edit the generated XPath expression in the Element Name field.
You can add other activities within the For Each loop. Use the Break Loop and Continue activities to control iterations of the For Each loop.