For Each
See Also
The For Each element repeatedly executes the activities contained inside a Scope
activity N+1 times, where N equals the Final Counter Value minus
the Start Counter Value. The activities are executed sequentially, in the order they appear on the diagram.
When the For Each activity starts, the expressions in the Start Counter Value and the Final Counter Values are evaluated for the first and only time. Once the two values are returned, they remain constant for the lifespan of the activity. If the Start Counter Value is less than or equal to the Final Counter Value, no activity is performed.
To use the For Each element:
- In the Design view, drag the For Each element from the Palette to the diagram.
- Drag one or more activities that will be repeatedly executed within For Each and configure their properties.
Note that a Scope element is implicitly added to the diagram when you add activities inside the For Each element.
- Select the For Each element on the diagram.
The
Properties window shows the For Each properties (Ctrl-Shift-7).
- (Optional) In the Properties window, enter the name for the For Each element.
- In the Properties window, configure the following For Each properties:
- Counter Variable Name. Click the ellipsis button (...) and enter an arbitrary counter
variable name.
- Start Counter Value. Use the BPEL Mapper to generate an integer value
expression.
- Final Counter Value. Use the BPEL Mapper to generate an integer value
expression.
- Completion Condition (Optional). Set an integer value
expression to define a condition under which the For Each activity might be terminated without completing all the specified branches, or iterations. Without the specified Completion Condition, the For Each activity waits until all enclosed activities complete for the specified number of times.
- Count Completed Branches Only (Optional). If set to yes, it
tells the runtime to only count the branches that have completed
successfully. If set to no, all branches, completed successfully or
unsuccessfuly, will be counted. The default value is no.
- See Also
- About the BPEL Mapper
- Scope
- BPEL Designer Palette: Structured Activities
- About the Design View of the BPEL Designer
Legal Notices