IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Create a business process definition (BPD)

Converging and diverging flows

Gateways control the divergence and convergence of a sequence flow, determining branching and merging of the paths that a runtime process can take.

You can think of inclusive and exclusive gateways as questions that are asked at a particular point in the process flow. The question has a defined set of alternative answers, which act as gates. The process cannot proceed until a valid answer is provided. You can model questions by using JavaScript conditions, which are evaluated before the process is allowed to proceed.

You can model the following types of gateways in your process diagram:

Types of gateways that can be modeled in process diagrams
Component icon Gateway type Description

Parallel (AND)

Use a parallel, diverging gateway when you want the process to follow all available paths.

Use a parallel, converging gateway when you want to converge all available paths.

Inclusive (OR)

Use inclusive, diverging gateway when you want to follow one or more available paths based on conditions that you specify. Use downstream of an inclusive diverging gateway to converge multiple paths into a single path after all the active paths completed their runtime execution. The inclusive join looks upstream at each path to determine whether the path is active, in which case it waits. Otherwise, it passes the token through without waiting.

Exclusive (XOR) Use to model a point in the process execution where only one of several paths can be followed, depending on a condition, or to model a point in process execution when the token for one of several incoming paths is passed through the gateway.

Event Use to model a point in the process execution where only one of several paths can be followed, depending on events that occur. A specific event, such as the receipt of a message or timer event, determines the path to be taken. An event gateway must be modeled a certain way as described in Modeling event gateways.

Be aware of the following when using gateways:

For more information about implementing inclusive and exclusive gateways, see Example gateways.

To add gateways to a process diagram:


Procedure

  1. Drag a gateway from the palette and drop it onto the process diagram.

  2. In the box that displays over the gateway, type a name for the gateway.

  3. Using the Sequence Flow tool, create the necessary sequence flow to and from the gateway. The default sequence flow is the first sequence created from the gateway to a following activity. For a gateway, you can change the default flow by reordering the sequence flow in the implementation properties.

  4. Click the gateway in the process diagram, and then click the General option in the properties.

  5. In the Behavior section of the general properties, click the list and select a gateway type. The other fields described in the following table are optional:

    Optional fields in the Behavior section of the general properties
    Field Description
    Name visible By default, the name that you provide for the gateway displays in the process diagram. Clear this check box if you do not want the name displayed in the diagram.
    Presentation Icon If you want to use an icon other than the default provided by IBM BPM, provide the path name for the image that you want to use.
    Documentation Enter a description of the gateway.
    Gateway Type Ensure that the type of gateway you want to implement is selected from the list. The preceding table describes the types of gateways available.

  6. Configure the implementation for the gateway.

    1. For inclusive and exclusive gateways, click the Implementation tab. For each outgoing sequence line, a condition (in JavaScript) is required that controls whether the path is followed. (For more information about the types of conditions that you can define, see Example gateways.) Ensure that the sequence flow shown as the Default Line is the one that you want the process to follow if all conditions evaluate to false. If not, use the arrow icons to move the lines until the one that you want is designated the default. (The last line in the list is the default sequence flow.)

      A default sequence flow does not have a condition.

    2. For event gateways, see Modeling event gateways.

  7. Click Save in the main toolbar.

Create a business process definition (BPD)