Repeat Until
BPMN Implementation: Repeat Pattern
The Repeat Until activity executes an activity repeatedly until its condition evaluates to true. In contrast to the While activity, the Repeat Until loop executes the contained activity at least once.
To build a Repeat Until:
- 1. From the Control Flow palette, drag a Repeat Pattern activity to the Process Editor canvas.
- 2. Double-click the Repeat Until to open the Condition Builder and build a Boolean expression. For details, see Using the Expression Builder.
- 3. Drag an activity, such as a Scope or Invoke, inside the Repeat Until.
- 4. Specify all the properties for each activity in the Repeat Until.
XML Syntax
<repeatUntil standard-attributes>
standard-elements
activity
<condition expressionLanguage="anyURI"?>
bool-expr
</condition>
</repeatUntil>
Example:
<repeatUntil>
<condition
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:
xpath1.0">$counter > 0
</condition>
<sequence>
<assign name="IncrementCounter">
<copy>
<from>$counter + 1</from>
<to variable="counter"/>
</copy>
</assign>
<wait name="WaitTwoSeconds">
<for expressionLanguage=
"urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">
'PT2S'
</for>
</wait>
</sequence>
</repeatUntil>