Skip to content

If

The If activity performs conditional execution. If a condition is true, then do something. If a different condition is true, then do something else. These conditions are described by the If, the optional Else If, and the optional Else elements and evaluated in order.

Choosing an If container makes sense if all the different conditions can be evaluated to true or false.

To build an If

  1. From the Palette, drag an If activity to the BPEL Editor.

  2. In the Properties view, on the Details tab, specify the conditions that must be met for the If condition to execute. You can manually write the necessary expression or click Toolbar button on the toolbar to open the XPath Expression Editor.

  3. Select the variables, functions and operators to build a Boolean expression. For details, see Using XPath.

  4. Click OK to close the XPath Expression Editor. The Properties view should now contain the correct XPath expression.

  5. (optional) Click Validate expression icon to validate the syntax of your XPath expression.

  6. From the Palette, drag an activity to the If Condition container, and select activity properties.

  7. To add an Else If or Else activity, right-click on the If and select the correct option.

More information