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.

Download

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

Weiterlesen

BPMN in Action: Zusammenspiel zweier Process Engines

Wie im vorangegangenen Beitrag gezeigt wurde, kann man mit BPMN separate Prozesse modellieren, die über Nachrichtenflüsse kommunizieren. Damit eine solche Kollaboration mehrerer Prozesse ausgeführt werden kann, müssen sie beide in ein und derselben Process Engine laufen. Gehören die Prozesse, die zusammenspielen sollen, jedoch zu verschiedenen Geschäftspartnern mit ihren jeweils eigenen BPM-Systemen, dann laufen die Prozesse in verschiedenen Process Engines.

Im Video wird gezeigt, wie die Kommunikation über eine REST-Schnittstelle erfolgen kann. Hierbei wird der eine Prozess in Bonita ausgeführt, der andere in Camunda. Der Bonita-Prozess tauscht Nachrichten mit einem Hilfsprozess aus, der sich um die Kommunikation mit dem Camunda-Prozess über die von Camunda bereitgestellte REST-Schnittstelle kümmert.

Download

Die folgende zip-Datei enthält die Bonita-Projektdatei und den BPMN-Prozess für camunda.

Weiterlesen

BPMN in Action: Zusammenspiel von Prozessen mit Nachrichtenflüssen

Eine Besonderheit von BPMN gegenüber anderen Prozessmodellierungsnotationen besteht darin, dass man Kollaborationen modellieren kann – also das Zusammenspiel von zwei oder mehr eigenständigen Prozessen, die Nachrichten miteinander austauschen. So kann ein Prozess eine Nachricht verschicken und dadurch einen anderen Prozess starten, oder es wird eine Nachricht an eine existierende Prozessinstanz verschickt, die an einem nachrichtenempfangenden Zwischenereignis bereits auf diese Nachricht gewartet hat.

Oft nutzt man Nachrichtenflüsse um das Zusammenspiel der Prozesse unterschiedlicher Geschäftspartner zu modellieren, z. B. zwischen dem Beschaffungsprozess eines Kunden und dem Angebotsprozess eines Lieferanten. Allerdings nutzen diese in der Regel nicht gemeinsam dasselbe BPM-System. Ist es auch sinnvoll, Kollaborationen innerhalb einer Organisation zu verwenden – obwohl man dasselbe Verhalten meist auch durch einen einzigen Prozess mit mehreren Lanes erzielen könnte?

Durchaus – die Aufteilung in separate Prozesse unterstützt lose Kopplung, Wiederverwendung und Trennung von Verantwortlichkeiten.

Im Video wird die Modellierung und Ausführung einer Kollaboration gezeigt. Außerdem wird erläutert, wie man mit Hilfe einer Korrelation dafür sorgt, dass die Nachrichten bei den richtigen Prozessinstanzen ankommen.

Weiterlesen

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.

Weiterlesen

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.

Weiterlesen

BPMN in Action: Unterprozesse/Aufrufaktivitäten

Was passiert bei der Ausführung eines BPMN-Prozesses, wenn eine Aktivität erreicht wird, die am unteren Rand mit einem Plus-Symbol (+) markiert ist? Das Plus-Symbol bedeutet, dass dieser Aktivität ein detaillierteres BPMN-Modell hinterlegt ist. Beim Erreichen der Aktivität beginnt die Ausführung des hinterlegten Modells. Wenn dieser Detailprozess beendet ist, wird die Ausführung des Hauptprozesses fortgesetzt.

Man unterscheidet „echte“ Unterprozesse und Aufrufaktivitäten. Ein Unterprozess ist Teil des übergeordneten Prozesses und kann auch auf dessen Daten zugreifen. Eine Aufrufaktivität hingegen ruft einen separaten Prozess auf. Diesem werden beim Aufruf die benötigten Daten explizit übergeben. Ebenso kann der aufgerufene Prozess nach Beendigung Daten an den Hauptprozess zurückgeben. Anders als bei Unterprozessen ist es bei Aufrufaktivitäten möglich, ein und denselben Prozess aus verschiedenen anderen Prozessen heraus aufzurufen. Somit kann der aufgerufene Prozess wiederverwendet werden.

Da das Konzept der Aufrufaktivitäten flexibler ist, verzichten manche BPM-Systeme darauf, Unterprozesse als separates Konzept zu unterstützen. In dem Beispiel in dem Video wird ebenfalls eine Aufrufaktivität verwendet.

Weiterlesen

BPMN: Inklusive Gateways müssen schlau sein

Im vorangehenden Beitrag wurde gezeigt, welche Unterschiede die drei wichtigsten Gateway-Typen in der Ausführung durch eine Process Engine haben. Besonderes flexibel ist der inklusive Gateway. An einer inklusiven Verzweigung können ein oder mehrere Ausgänge gewählt werden. Entsprechend wird an einer inklusiven Zusammenführung darauf gewartet, dass alle gewählten Pfade abgeschlossen sind.

Was aber, wenn einer dieser Pfade eine Abzweigung enthält, und daher die Zusammenführung über diesen Pfad möglicherweise gar nicht mehr erreicht wird? Damit Prozesse in solchen Fällen nicht hängen bleiben, müssen inklusive Gateways schlau sein und überprüfen, über welche Pfade noch etwas ankommen kann.

Um dies auszuprobieren, habe ich in den Prozess aus dem vorigen Beispiel eine Abzweigung eingefügt.

Weiterlesen

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.

Weiterlesen

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.

Weiterlesen

BPMN-Gateways in Aktion

Kaum ein BPMN-Modell kommt ohne Verzweigungen aus. Modelliert werden sie mit Hilfe von Gateways, dargestellt durch Rautensymbole. In einen kleinen Beispielprozess werden nacheinander die wichtigsten unterschiedlichen Gateway-Typen (exklusiv, parallel und inklusiv) eingebaut. Die Ausführung in einer Process Engine macht deutlich, welches Verhalten jeweils erzielt wird.

Wer die Beispiele selbst ausprobieren möchte, kann sie wieder herunterladen und in der Community-Edition der Plattform „Bonita“ ausführen.

Weiterlesen