If a customer needs to automate and streamline business processes and does not have an extensive information system to cover them, deploying a BPMN engine is an optimal solution.
In the previous blog, How the IT Guys Can Help or a Brief Guide to Process Analysis, we used the BPMN standard to document the current State of the process and also to design a new method in which we solved the customer’s problems and requirements.
This is made possible by the so-called BPMN engines. A BPMN engine is a software component that can interpret a drawn BPMN model. It provides tools for engaging systems responsible for solving a process’s technical tasks and support for the specification and processing of user tasks by user-defined roles. If a customer needs to automate and streamline business processes and does not have a more extensive information system to cover them, deploying a BPMN engine is the optimal solution.
Several BPMN implementations, built on different technologies and of varying quality, are available on the market. See, for example, the comparison at https://www.itcentralstation.com/categories/business-process-management. In the past, we used jBPM, but in the last few years, we switched to the Camunda solution and are thrilled with it.
Camunda is a package of tools called the Camunda platform, which covers activities ranging from process analysis (DESIGN) through the deployment of modelled processes as part of information systems (AUTOMATE) to the optimisation of their performance (IMPROVE):
As usual, the Camunda platform is available in free Community and paid Enterprise versions. I have marked the different tools in the previous figure with colour:
The great thing is that the Community version is so broad, functional, and documented that we have successfully implemented several projects with it.
This blog is about using the Community version of the Camunda platform. I will introduce you to:
I won’t introduce the tasklist, as this one is too austere for commercial use, but we’ll implement our nicer tasklist using Angular.
Camunda Modeler is a very nice, fully functional BPMN editor. It provides all the elements of the BPMN 2.0 standard:
The different parts of the Camunda Modeler:
In Camunda Modeler, it is possible to edit BPMN models drawn using other analysis tools as long as they meet the BPMN 2.0 standard. For example, we have successfully tested it with the widely used Enterprise Architect tool. In addition to saving to BPMN files, drawn models can be exported as images, a handy functionality when creating documentation.
Vendor-recommended components working with the BPMN engine (the so-called technology stack) are sufficient for most medium-demanding projects:
The different layers of the architecture:
| Browser | Camunda Tasklist – GUI for viewing user lists created within running process instances and Camunda Cockpit – an administrative GUI for monitoring the Camunda Process Engine and addressing incidents – are implemented as a web client that can be used from the following supported web browsers:
|
| Camunda REST | The interface implemented as a REST API provides services for:
|
| Camunda Engine | Camunda Process Engine – the main component of the architecture – is implemented in Java. Supported Java versions:
|
| Relational Database | A relational database is used to persist the current state of individual process instances. Communication between the Process Engine and the database is done via the JDBC interface. Supported relational databases:
|
The State of a given process instance persisted in the relational database and was changed in database transactions bound by the executing process’s wait states. For example:
In this process, the persistent State of the process is altered if the operations from the completed user task (Provide shipping address) are successfully executed
To the timer (wait until the next business day). If an exception occurs within these operations, the process run continues processing this exception or remains in an error state = incident.
Wait states that separate transactions of the process they are waiting for:
Transactions can also be controlled by BPMNelement parameters, but that is beyond the scope of this blog.
Depending on the size, architecture and requirements of the system on which the Camunda Engine is deployed, three deployment options are supported:
Factors that define Camunda Engine hardware requirements:
| FACTOR | IMPACT | |
| #1 | The average time between the start of process instances is necessary to estimate the number of process instances started per second. |
|
| #2 | Average runtime of a single process instance. In conjunction with factor #1, it determines the number of concurrently active process instances. |
|
| #3 | Number of concurrently accessing clients: The number of users working in parallel on user tasks and accessing external modules and systems. |
|
| #4 | History Level Configuration of the detail level recorded for executing process instances. |
|
Recommended hardware configurations as required:
| Degree | ||
| Low | A small server is sufficient for most cases. Running fewer than 100 process instances per second. |
|
| Medium | Medium-sized server. Running more than 100 process instances per second. |
|
| High | Large server for extreme cases. |
|
Camunda Cockpit is an administration interface implemented in the form of a web client, through which it is possible to monitor running process instances and resolve their incidents. After logging in to Camunda Cockpit, a general overview of the Camunda Engine status is displayed:
Displays the number of deployed processes, running instances, the current number of incidents, instances of processes stuck in an error state, and the number of user jobs entered. Selecting Running Process Instances (highlighted in red) will take you to a breakdown of the deployed processes:
Meaning of table columns:
When you click on (Name) of the selected process, the process model is displayed:
Elements that are defined as pending (see the Database Transactions chapter) are showing as
If the element is a subprocess, these numbers are the sum of its wait elements. We can nest into it and see the distribution of its instances and incidents in detail:
The table below lists these instances. By clicking on the ID of the selected instance, we can view the current values of the process variables, change their values, and resolve incidents in this way.