Designer 10.7 | webMethods Service Development Help | Building Flow Services | The LOOP Step | About the Pipeline for a LOOP Step
 
About the Pipeline for a LOOP Step
In the body of a LOOP step, the field used as the input array is reduced dimensionally. For example, if the input array is a String list, the input is represented as a String within the body of the LOOP. If the input array is a String table, the input is a String list within the body of the LOOP. This is because a LOOP step operates on each element in the input array.
The field used as the output array is also reduced dimensionally within the body of a LOOP step. While the LOOP step produces an array, each iteration of the LOOP step produces one element in the array. If the output array is a String list, within the body of the LOOP it is a String. If the output array is a String table, within the body of the LOOP the output is a String list.
In the following example, the LOOP step executes the pub.math:addInts service for each item in the input array named myInputList. The LOOP step collects the output into an array named myOutputList. Inside the LOOP step, the pub.math:addInts service operates on one element of myInputList and produces one element of myOutputList. That is, the pub.math:addInts service takes a String as input and produces a String as output. Consequently, in the pub.math:addInts service pipeline, the input is a String named myInputList and the output is a String named myOutputList. If you viewed the pipeline after the LOOP step completes, myInputList and myOutputList would appear as String lists.