Table of Contents

Search

  1. Preface
  2. Part 1: Using Process Developer
  3. Part 2: Creating and Modifying Processes
  4. Part 3: Functions, Events, Errors, and Correlation
  5. Part 4: Testing and Deployment
  6. Part 5: Process Central and Process Server (On-Premises)

Process Developer

Process Developer

If

If

BPMN Implementation: Conditional Pattern
An If container executes an activity based on one or more conditions defined by the If and optional Else If elements, followed by an optional else element. The conditions are evaluated in order, and the first one to evaluate to true has its activity executed. The if container is a good choice if all conditionals can be evaluated to a true or false condition.
If you do not define a branch, an implied Else executes an empty activity.
Required Properties
Optional Properties
If Condition
Suppress Join Failure. See Process Properties
Extension Attributes and Extension Elements. See Declaring Extension Elements and Attributes.
Extension Attributes and Elements. See Declaring Extension Elements and Attributes.
To build an If:
  1. From the
    Control Flow
    palette, drag a
    Conditional Pattern
    activity to the Process Editor canvas.
  2. Double-click the
    If Condition
    container to open the Expression Builder.
    Alternately, in the Properties view, click the
    Dialog (...) Button
    next to If Expression.
  3. Select the variables, functions and operators to build a Boolean expression. For details, see Using the Expression Builder.
  4. From the
    Activity
    palette, drag an activity to the If Condition container, and select activity properties.
  5. Repeat Steps 2 through 5 for the
    Else If
    or
    Else
    branches, if desired.
The following illustration shows an example of an If activity.
XML Syntax
<if standard-attributes> standard-elements <condition expressionlanguage="anyURI"?> bool-expr </condition> activity <elseif>* <condition expressionlanguage="anyURI"?> bool-expr </condition> activity </elseif> <else>? activity </else> </if>
Example:
<if xmlns:inventory="http://supply-chain.org/inventory" xmlns:FLT="http://example.com/faults"> <condition> bpel:getVariableProperty('stockResult', 'inventory:level') > 100 </condition> <flow> <!-- perform fulfillment work --> </flow> <elseif> <condition> <bpel:getVariableProperty('stockResult', 'inventory:level') >= 0 </condition> <throw faultName="FLT:OutOfStock" variable="RestockEstimate" /> </elseif> <else> <throw faultName="FLT:ItemDiscontinued" /> </else> </if>

0 COMMENTS

We’d like to hear from you!