OR gateway use case

Using an OR gateway is convenient, if your process may follow all the outgoing transitions (like when you use a parallel gateway) or only those transitions, whose conditions are met.

One of its specific features is that any process must include two OR gateways: one opening and one closing. The opening gateway defines transition conditions, and the closing gateway stops the process until the conditions are fulfilled, i.e. until all the tasks in all the flows, which satisfy the conditions, are completed.

Consider an example of a business process with this type of gateway and specific parameters. A company provides electrical installation and maintenance.

When logging a client's request, a specialist enters the following information:

  • client status: new/repeat;
  • request cost;
  • complaints and claims during the maintenance period.

This information affects the process execution:

  • if this is a new client, the specialist has to log the client data to the database, prepare a contract for installation/maintenance and have it signed;
  • if the contract amount is more than one thousand dollars, the client is gifted a lamp from partners;
  • if a repeat customer had complaints or claims during the maintenance period, a claim assessor has to prepare a report, specifying what claims have been worked on, and interview the client to assess the current satisfaction level.

The process diagram with an OR gateway looks like this (fig. 1).

Fig. 1. A process with an OR gateway

After the first OR gateway, the process may follow one, two or all three flows. It depends on whether the conditions on the gateway transitions are met:

  1. The sales rep will receive "Create a repeat customer card" task if the client status is "New" (fig. 2).

Fig. 2. The condition on the first transition of the OR gateway

  1. The warehouse employee will receive the "Order a partnership program gift" task if the request amount is more than one thousand dollars (fig. 3).

 

Fig. 3. The condition on the first transition of the OR gateway

  1. The claim assessor will receive the "Prepare a report" task if the client had complaints concerning the equipment. A script identifies whether there were any complaints (fig. 4).

Fig. 4. The condition on the first transition of the OR gateway

A specific feature of an OR gateway is that the process model check operation does not track the gateway transition conditions.

Therefore it is important that at least one of the conditions is met in the process instance, and at least one of the transitions is activated. Otherwise, the process will follow the transition, which was created first.

For example, if a repeat client's order is less than one thousand dollars and there are no complaints from the client, none of the conditions is met. The process will follow the transition, which was created first.

In this case, a task will be assigned to the sales rep. Which means that even if none of the conditions is satisfied, the sales rep will receive the task to create a repeat customer card, even in the case when the request is created for a repeat customer. Only after the process goes through the closing gateway it will continue and the manager will receive the last task to "Sign the contract".

For such situations, you should first add the transition, which is executed in most process instances or foresee all the process execution variants.

For instance, in this example, the claim assessor prepares reports in most cases, therefore this transition should be added first.

To do so, delete all the outgoing transitions of the opening gateway (fig. 5) and create them again, starting with the transition to the claim assessor's task.

Fig. 5. Process map with deleted outgoing transitions

In this case, if the conditions are not met, the claim assessor will receive the task to prepare a report. Even if this is a repeat client without complaints during the reporting period, and the order amount is less than one thousand dollars.     

Most imporantly, you need to specify the conditions on all the new transitions, because they are deleted when you delete the transitions.