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.


BPMN: What to do without event-based gateways

Order from warehouse - event-based gateway_smA process with an event-based gateway (click to enlarge)

If you want to model the reactions to different events in a BPMN process, the event-based gateway is very useful. At a normal exclusive splitting gateway, a sequence flow is selected based on data. It is therefore called data-based gateway. For example, a procurement request may be routed to a manager for approval if the total amount exceeds a certain limit. At an event-based gateway, on the other hand, a sequence flow is selected based on the occurence of an event.


How to Model Parallel Checks in BPMN

One of the modeling patterns I describe in the new edition of the BPMN book, is „Parallel Checks“. When different persons need to check applications, requests, etc. according to different criteria, these checks can be carried out in parallel. There are two different ways to model this. The simple solution only requires basic BPMN elements, while the more sophisticated solution requires a sub-process and a terminate end event. We start with the simple solution.