Skip to content

While

The While activity executes a contained activity repeatedly as long as, at the beginning of each iteration, its condition evaluates to true. If this condition is not true at the start, then the contained activities do not execute at all.

The While activity is similar to Repeat Until in that it provides conditional repetition, but there are two important differences:

  • The While activity evaluates the looping condition before executing the contained activities, while the Repeat Until activity evaluates a condition after executing the contained activities.
  • The While activity's condition indicates whether or not execution should proceed, while the Repeat Until's condition indicates whether or not execution should stop.

To build a While activity:

  1. From the palette, drag a While activity on to the BPEL Editor.
  2. Select the While, and in the Properties view, specify a condition for the While. You can do this by either manually typing an expression in the Expression field or by clicking toolbar button to open the XPath Expression Editor.
  3. Drag an activity, such as a Scope or Invoke, inside the While.
  4. Specify all the properties for each activity in the While.

More Information