2.66 For Each Dialog - General Tab

Use to process multiple sets of activities in both parallel and serial fashion.

The forEach activity executes the contained scope activity N + 1 times, where N equals the final counter value minus the starting counter value that you specify on the Counter Values tab. While other structured activities such as a flow activity can have any type of activity as its contained activity, the forEach activity can only use a scope activity. When the forEach activity is started, the expressions for the starting counter and final counter values are evaluated. Once the two values are returned, they remain constant for the life of the activity. Both expressions must contain at least one character that can be validated as an xsd:unsignedInt. If these expressions do not return valid values, a fault is thrown. If the starting counter value is greater than the final counter value, the scope activity must not be performed and the forEach activity is considered complete.

Note: The forEach activity is supported in BPEL projects that support version 2.0 of the BPEL specification. This activity replaces the flowN activity that was supported in version 1.1 of the BPEL specification.

For more information about the forEach activity, see the Web Services Business Process Execution Language Version 2.0 Specification at http://www.oasis-open.org.

Element Description

Name

Enter a name or accept the default value of ForEachNumber. This name becomes the name for this activity in the designer.

Counter Name

Enter a name for the implicit counter variable or accept the default value of ForEachNumberCounter. For the first iteration of the scope, the counter variable is initialized to the starting counter value. For the next iteration of the scope, the counter variable is initialized to the starting counter value, plus one. Each subsequent iteration increments the previously initialized counter variable value by one, until the final iteration in which the counter is set to the final counter value. The counter variable is local to the enclosed scope. Although its value can be changed during an iteration, that value is lost at the end of each iteration. Therefore, the counter variable value does not impact the value of the next iteration's counter.

Parallel Execution

If this checkbox is selected, the activity is a parallel forEach, in which N +1 instances of the enclosed scope activity occur in parallel.

If this checkbox is not selected, the activity is a serial forEach. The enclosed activity must be executed N +1 times, with each instance starting only after the previous repetition has completed.

Related Topics

Processing Multiple Sets of Activities with the forEach Activity in BPEL 2.0 in Developing SOA Applications with Oracle SOA Suite

BPEL Process Activities and Services in Developing SOA Applications with Oracle SOA Suite