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

Example gateways

The following samples illustrate how to model several types of gateways.

When modeling processes in IBM BPM, you have several options for implementing gateways. See Converging and diverging flows to understand the available options and to see a sample implementation of a parallel gateway. Review the following samples to learn more about exclusive and inclusive gateways.

To implement exclusive and inclusive gateways in a business process definition (BPD), you need to declare variables for that BPD, as described in Declaring and passing variables.


Sample exclusive gateways

Use an exclusive gateway in a BPD when you need to model a point in the process in which only one of several paths can be followed, depending on a condition.

For example, you might have two exclusive gateways in a BPD diagram.

You can access the BPD (named HR Open New Position in this sample) in the Hiring Sample process application. See Hiring Sample Tutorial for IBM Process Designer for information.

The first gateway, named Need GM Approval?, determines which path to follow based on whether the submitted job requisition requires approval. To see how this works, click the Need GM Approval? gateway in the BPD diagram to select it and then click the Implementation option in the properties. The approval options are then shown under the Decisions section.

The Approval required path is followed to the Approve/reject requisition activity only when the tw.local.currentPosition.positionType variable is equal to "New". This logic ensures that those requisitions from Hiring Managers for new headcount are approved by General Managers before HR processing. If a position is not new, the process follows the default path to the Find job candidates activity. Notice in the BPD diagram that the default path is marked with a forward slash (/).

For inclusive and exclusive gateways, decisions in the Implementation properties are evaluated from top to bottom. The path for the first decision that evaluates to true is followed. If no decisions evaluate to true, the default path is followed.

The second gateway, named GM Approved?, determines which path to follow based on whether a new position is approved. To see how this works, click the GM Approved? gateway in the BPD diagram to select it, and then click the Implementation option in the properties. The approval information is then shown under the Decisions section.

The Approved --> proceed to HR path is followed to the Find job candidates activity only when the tw.local.requisition.gmApproval variable is equal to "Approved". This logic ensures that those requisitions that require approval are approved before HR processing.

If a requisition is not approved, the process follows the default path ( Rejected path) to the Notify hiring manager activity.


Sample inclusive gateway

Use an inclusive gateway in a BPD when you need to split or diverge the process along more than one path, and you want to follow one or more available paths based on conditions that you establish.

Inclusive gateways can follow a maximum of n–1 paths. So, if you model a conditional split with three paths, the process can follow two of those paths.

For example, suppose that you want to model a process where the steps are different based on whether the customer type is new or existing. For new customers, you want activities 1 and 2 to be completed. For existing customers, only activity 3 is needed. You can use an inclusive gateway (split) for this type of process so that two activities are set for new customers and a third activity is set for existing customers.

With exclusive gateways, only one available path is followed from the gateway. With inclusive gateways or splits like the one described in the preceding example, one or more paths from the gateway can be followed. The inclusive split gateway in the preceding example determines the path or paths to follow based on the type of customer that is processed. The conditions for this split are configured in the implementation properties for the gateway as follows:

Using this logic, you are able to run two separate activities for new customers and a different activity when the customer is an existing one.

Create a business process definition (BPD)