BPMN in Action: Communicating With an External System Using RPA

In this post, I describe another example of the interaction between executable processes and Robotic Process Automation (RPA). The last post was about an RPA bot starting a process and transferring data from an Excel file to it. In today’s example, a bot is to carry out a task within a process and transfer data to an external system.

The external system used here is „Odoo“, a comprehensive business software. As there is no suitable connector in the Bonita BPM system for calling this software, the bot logs into the system like a human and enters the data via the user interface.

As RPA system I use Microsoft Power Automate Desktop again. In a similar example developed some time ago, I had used the RPA system UI-Path. Since UI-Path provides a REST interface, I just called the bot via this interface. Unfortunately, it turned out that the free version of Power Automate Desktop does not have a suitable interface.

Weiterlesen

BPMN in Action: Kommunikation mit einem externen System mittels RPA

Im Folgenden stelle ich ein weiteres Beispiel für das Zusammenspiel von ausführbaren Prozessen und Robotic-Process-Automation (RPA) vor. Im letzten Post ging es darum, dass ein RPA-Bot einen Prozess startet und ihm Daten aus einer Excel-Datei übergibt. Im heutigen Beispiel soll ein Bot einen Arbeitsschritt innerhalb eines Prozesses durchführen und dabei Daten an ein externes System übermitteln.

Da es im BPM-System Bonita keinen geeigneten Konnektor für den Aufruf der verwendeten Unternehmenssoftware „Odoo“ gibt, loggt sich der Bot wie ein Mensch in das System ein und trägt die Daten in der Benutzungsoberfläche ein.

Als RPA-System nutze ich wieder Microsoft Power Automate Desktop. Bei einem ähnlichen Beispiel, das ich vor längerer Zeit entwickelt hatte, hatte ich den Bot einfach über die REST-Schnittstelle des damals verwendeten RPA-Systems UI-Path aufgerufen. Leider hat sich herausgestellt, dass die kostenlose Version von Power Automate Desktop über keine geeignete Schnittstelle verfügt.

Weiterlesen

BPMN in Action: An RPA Bot Starts a Process

I created this example of a connection between an executable BPMN process and RPA (Robotic Process Automation) some time ago. As described in this blog post, I had connected the BPM system „Bonita“ with the RPA system „UIPath“. Over time, new versions have been released and my examples no longer work with the current UIPath version. Since the handling of UIPath is a bit cumbersome if you only want to implement one or two mini-examples, I have now used the free version of Microsoft Power Automate instead. This makes it quite easy to create simple automations that should only run on your own desktop. There are some restrictions in the free version, but these are not problematic for the example presented here.

In the scenario under consideration, orders that are provided in the form of Excel files are to be handled by an executable process. To do this, it is necessary to transfer the data from the Excel file into the process. Without RPA, the data would have to be entered manually. This task is now performed by the bot. It reads the Excel file, converts the data into a suitable structure, logs into the BPMS, starts the order handling process and hands over the order data.

Weiterlesen

BPMN in Action: Ein RPA-Bot startet einen Prozess

Dieses Beispiel einer Verbindung eines ausführbaren BPMN-Prozesses mit RPA (Robotic-Process-Automation) hatte ich vor längerer Zeit schon einmal erstellt. Wie in diesem Blogbeitrag beschrieben, hatte ich das BPM-System „Bonita“ mit dem RPA-System „UIPath“ verbunden. Im Laufe der Zeit sind neue Versionen erschienen und mittlerweile funktionieren meine Beispiele nicht mehr mit der aktuellen UIPath-Version. Da das Handling von UIPath etwas umständlich ist, wenn man nur ein oder zwei Mini-Beispiele umsetzen möchte, habe ich stattdessen nun die kostenlose Version von Microsoft Power Automate verwendet. Damit ist es recht leicht möglich, einfache Automatisierungen zu erstellen, die nur auf dem eigenen Desktop laufen sollen. In der kostenlosen Version gibt es einige Einschränkungen, die für das hier vorgestellte Beispiel aber nicht problematisch sind.

In dem betrachteten Szenario sollen Aufträge, die in Form von Exceldateien vorliegen, in einem ausführbaren Prozess verarbeitet werden. Hierfür ist es erforderlich die Daten aus der Excel-Datei in den Prozess zu übernehmen. Ohne RPA müssten sie manuell erfasst werden. Diese Aufgabe wird nun von dem Bot übernommen. Er liest die Excel-Datei ein, wandelt die Daten in eine geeignete Struktur um, loggt sich in das BPMS ein, startet dort den Auftragsverarbeitungsprozess und übergibt ihm die Auftragsdaten.

Weiterlesen

BPMN in Action: Welches Ereignis gewinnt?

In den meisten BPMN-Prozessmodellen gibt es Verzweigungen. Wohl am häufigsten werden exklusive Gateways verwendet. Dort wird anhand von Daten – z. B. die Höhe einer Auftragssumme – entschieden, welcher Weg gewählt wird. Im Gegensatz dazu erfolgt die Entscheidung bei einem ereignisbasierten Gateway anhand von Ereignissen. Dabei wird auf das Eintreten mehrerer Ereignisse gewartet. Das Ereignis, das zuerst eintrifft, „gewinnt“ – und sein Pfad wird ausgewählt.

Unten wird ein typisches Beispiel für den Einsatz eines ereignisbasierten Gateways gezeigt. Dabei wird auf das Eintreffen einer Nachricht gewartet. Trifft sie nicht innerhalb einer bestimmten Frist ein, wird im Prozess reagiert, z. B. indem bei dem betreffenden Partner nachgefragt wird.

Leider verfügt das BPM-System Bonita, mit dem die Beispiele dieser Serie erstellt wurden, nicht über den ereignisbasierten Gateway. Im Video wird gezeigt, wie man dasselbe Verhalten auch auf andere Weise erreichen kann.

Weiterlesen

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

Weiterlesen

BPMN in Action: Wozu sind Mehrfachaktivitäten da?

Bei einer mit drei kleinen Strichen markierten BPMN-Aktivität handelt es sich um eine Mehrfachaktivität, englisch Multi-Instance-Aktivität. Wie der Name schon sagt, kann eine solche Aktivität mehrfach ausgeführt werden. Anders als bei einer Schleife muss dies jedoch nicht streng nacheinander erfolgen, bis eine bestimmte Bedingung erfüllt ist. Stattdessen wird eine Mehrfachaktivität für jedes Element einer Liste ausgeführt. Dies kann auch parallel, d. h. in beliebiger Reihenfolge, oder sogar zeitgleich (z. B. durch verschiedene Benutzer) erfolgen.

In Video wird dies am Beispiel eines Auftrags mit beliebig vielen Auftragspositionen gezeigt, die einzeln geprüft werden sollen. Das in der kostenlosen Community-Edition von Bonita ausführbare Modell steht wieder zum Download zur Verfügung.

Weiterlesen

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.

Weiterlesen

BPMN in Action: Kommunikation von Prozessen über eine Message Queue

Im letzten Beitrag ging es darum, dass ein auf einer Process Engine ausgeführter Prozess mit einem zweiten Prozess kommuniziert, der auf einer anderen Process Engine installiert ist. Dabei wurde die REST-Schnittstelle der zweiten Process Engine genutzt. Da die REST-Schnittstellen von Process Engines nicht standardisiert sind, müssen die Aufrufe speziell an die zweite Engine angepasst werden.

Flexibler ist der im folgenden Beispiel gezeigte Ansatz, bei der eine Message Queue (Nachrichtenwarteschlange) genutzt wird. Dabei stellen die beteiligten Prozesse gesendete Nachrichten in eine von einem Message Broker verwaltete Warteschlange hinein und entnehmen für sie bestimmten Nachrichten daraus. Mit diesem Verfahren ist es auch einfacher, eine der beteiligten Process Engines auszutauschen. Ebenso kann ein Prozess mit einem komplett anderen System kommunizieren, z. B. einem ERP-System. Dies wird im Beispiel mit Hilfe einer kleinen, selbst geschriebenen Java-Klasse gezeigt, die die Rolle des zweiten Prozesses übernimmt.

Weiterlesen

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.

Weiterlesen