BPMN in Action: Which event wins?

Most BPMN models contain splits in the control flow. Most frequently used is probably the exclusive gateway. Such a gateway decides which way to go – based on data, such as the value of an order. An event-based gateway, on the other hand, decides on the basis of events. This gateway waits for several events to occur. The event that occurs first, „wins“ – and the path of this event is selected.

The process presented in the video contains a typical example of how to use an event-based gateway. At the gateway, the process waits for a message to arrive. If it isn’t received within a certain time span, a reaction is triggered, such as reminding the partner of the overdue message.

Unfortunately, the BPM-system Bonita – which is used for creating the examples in this series – doesn’t support event-based gateways. The video shows how to achieve the same behavior in a different way.

Link to the video


BPMN in Action: When to Use Multi-Instance Activities?

A BPMN activity marked with three small lines, is a multi-instance activity. As the name already indicates, such an activity can be performed several times. Other than with a loop, you don’t need to carry out the activity instances one after the other, until a certain condition is fulfilled. Instead, a multi-instance activity is performed for each element of a list. This can be done in parallel, i. e. in any arbitrary order, or even simultaneously (e. g. by different users).

The video shows an example with an order that contains several line items. Each line item is inspected separately. You can download the model and execute it in the free community edition of Bonita.


BPMN in Action: Process Communication via a Message Queue

In the last post I have shown how a process running on a process engine can communicate with a second process that is installed on a different process engine. For the communication, the REST interface of the second process engine was used. Since there isn’t any standard for process engines‘ REST interfaces, the calls must be adapted to the specifics of the second engine’s interface.

A more flexible approach is the use of a message queue (MQ). Such a message queue ist provided by a message broker. The involved processes communicate by inserting and removing messages from a queue. With this approach it is easier to exchange one of the process engines with a different engine. It is even possible that a process communicates with an entirely different system, such as an ERP system. For this example, a small Java class has been written that is used as a replacement for the second process.


BPMN in Action: Collaboration of Two Process Engines

In the previous post I have shown how to model separate BPMN processes that communicate using message flow. In order to execute such a process collaboration, all processes need to run in the same process engine. However, if you have processes from different business partners with their own BPM systems, the processes are executed in different process engines.

The video shows how to implement the communication between processes in different systems, using a REST interface. One of the processes is executed in Bonita, the other one in Camunda. The Bonita process exchanges messages with a support process that handles the communication with the Camunda process via Camunda’s REST interface.


The following zip file contains the Bonita project file as well as the BPMN process for camunda.


BPMN in Action: Process Collaboration & Message Flow

A special feature of BPMN compared to other process modelling notation is the possibility to model process collaborations. A collaboration consists of two or more separate processes that communicate via message flow. A process can send a message that starts another process, or a message is sent to an existing process instance that has already been waiting for this message at a message-catching intermediate event.

It is common to use collaborations for modelling the interactions between different business partners, e. g. between the procurement process of a customer and the order handling process of a supplier. However, business partners usually don’t use a shared BPMS platform. Does it also make sense to use collaborations within a single organization – although the same behaviour could be achieved by modeling a single process with several lanes?

The answer is yes, since the separation into different processes supports loose coupling, process re-use and separation of concerns.

The video presents a model of a collaboration and its execution by a processes engine. It also shows how to use a correlation in order to make sure that messages are received by the correct process instances.


BPMN in Action: Subprocesses/Call Activities

What happens in the execution of a BPMN process, when an activity is reached that is marked with a small plus-symbol (+)? The plus-symbol indicates that the activity has another, detailed BPMN model attached. When the activity is reached, the process engine starts executing the attached model. When this detailed process is finished, the execution of the main process continues.

BPMN distinguishes between „real“ subprocesses and call activities. A subprocess is part of the top level process and can directly access its data. A call activity, on the other hand, calls a separate process. Therefore it is necessary to specify the data to be transferred to this process, as well as the data to be returned to the top level process.

Other than subprocesses, independent processes can be called by different call activities in different processes. Therefore it is possible to re-use processes with the help of call activities.

Since call activities are more flexible, some BPM systems don’t support subprocesses as a separate concept. The example in the video also contains a call activity.


BPMN: Inclusive Gateways Must Be Clever

In the previous post I have shown how the three most important gateway types behave when they are executed by a process engine. The inclusive gateway is very flexible. At an inclusive split, one or more exits can be selected. A corresponding inclusive merge waits until all selected paths have been completed.

However, what happens when there is another splitting gateway in one of these paths, so that in some cases the inclusive merge may not be reached via this path anymore? In order to ensure that such processes do not get stuck, inclusive gateways must be clever, since they need to determine via which paths they still can be reached.

In order to test this behavior, i have inserted a splitting exclusive gateway in the previous example.


BPMN Gateways in Action

It is hard to find a serious BPMN model without any splits in the control flow. Splits are modeled with gateways, represented by diamond symbols. The following video shows three variations of a little example process. First, we use an exclusive gateway in this process, then a parallel gateway, and finally an inclusive gateway. The execution of each process variant shows the different behaviours of the three gateway types.

If you want to try out these examples for yourself, you can download and execute them, using the community edition of the „Bonita“ platform.


Process Automation with BPM – Introductory Example

What exactly does it mean to execute a BPMN process? What else other than a process model is required for a useful process? I have created a little example for newcomers. It is explained in two videos. The project file can also be downloaded and executed in the community edition of the platform “Bonita”.

In the first video, the BPMN model is deployed to a process engine and executed. The video also shows how other required contents are specified: organization, data, user forms, decision rules and the integration of external systems.


Connecting BPMS with RPA – using Bonita and UIPath

Robotic Process Automation (RPA) is very popular for automating routine tasks. However, RPA is not very good at controlling entire end-to-end-processes. This is the realm of Workflow or Business Process Management Systems. Therefore, it can be a good idea to connect BPMS with RPA. The BPMS manages the overall process flow. The different tasks in the process can either be user tasks or system calls via interfaces – or tasks that are performed by RPA bots.

The latest version of the BPMS Bonita (community edition) contains connectors to the RPA system UIPath. Vice versa, UIPath also provides connectors to Bonita. I have tested this integration using the following two examples:

  1. In the first example, order data are provided as Excel sheets. They are read by an RPA bot. Then the bot starts a Bonita process and hands over the order data.
  2. In the second example, a Bonita process calls an RPA bot in order to retrieve a currency exchange rate from a website.