A New Out-of-the-box RPA Connector for Camunda
Camunda Platform 7.14 introduces an out-of-the-box integration of robotic process automation (RPA) Bots via RPA Bridge. With the mateo Camunda Bridge, it’s now possible to address the RPA robot, mateo, directly from Camunda.
mateo is a framework for creating, executing, and evaluating test cases and automated processes as a human would manually. mateo makes it possible to create cross-application test cases and automated processes. It’s based exclusively on open-source libraries, and is thus inexpensive. The greatest strength of mateo is its open architecture and resulting easy extensibility.
mateo Camunda Bridge
The mateo Camunda Bridge is a Spring Boot application serving as a connector between Camunda BPM Runtime and mateo (RPA). It uses the external task pattern to enable orchestration and exchange variables and states between Camunda and mateo.
For this to work, you need at least:
- A running mateo instance >= 3.7.3 on-premises or in the cloud
- Camunda BPM 7.14+
- Java 11 or later installed (if supported by Camunda) on the machine running the mateo Camunda Bridge
- A BPMN model with connection information to mateo
Adding an RPA task to your BPMN model works similarly to adding an external task. Only a few additional settings must be created:
The topic of the external task must match the topic defined in the mateo Camunda Bridge. Furthermore, a setting with the key MATEO_SCRIPT must be added, which contains the job name to be executed. For the input and output variables, two lists must be defined (extIn_mateoParams, extOut_mateoParams):
<bpmn:serviceTask id="myMateoRPAtask" name="Unicorn RPA" camunda:type="external" camunda:topic="mateo"> <bpmn:extensionElements> <camunda:properties> <camunda:property name="MATEO_SCRIPT" value="UnicornScript.mateo" /> </camunda:properties> <camunda:inputOutput> <camunda:inputParameter name="extIn_mateoParams"> <camunda:map /> </camunda:inputParameter> <camunda:inputParameter name="extOut_mateoParams"> <camunda:list /> </camunda:inputParameter> </camunda:inputOutput> </bpmn:extensionElements> </bpmn:serviceTask>
The bridge picks up the external task, starts the specified RPA process with mateo, and passes the result back to the engine as process variable extOut_mateoScriptResult once the job has executed successfully or failed. This allows you to orchestrate all your RPA bots in an end-to-end process and create greater overall transparency for your RPA workflows.
The mateo Camunda Bridge is available as an open-source project on GitHub. There you can also find a detailed description of the configuration options of the bridge, such as setting the retry behavior or error handling.
Assume an RPA job already exists, which outputs the corresponding Unicorn-name from a first name and date of birth. This RPA job is now integrated into a BPMN process and executed. First, the data is entered into a form before the RPA job is executed. After the job is executed, the result is again output using a form:
The RPA job is defined by means of an external service task. For this purpose, the topic name from the settings of the mateo Camunda Bridge must be entered as the topic in Camunda (default topic name is mateo).
Under Extensions, specify the RPA job which should be executed (e.g. UnicornScript.mateo). For this purpose, a property with the key MATEO_SCRIPT is created. Optionally, a retry behavior can be specified (key: RETRY_CONFIG).
The variables that should be available in the test script are specified in the tab Input/Output under Input Parameters as map extIn_mateoParam. In our example, we pass the variables’ userName and userMonth to the RPA job. The values were previously created in the user task as process variables extIn_userName and extIn_UserBirthdayMont:
The variables to be written from the test script into the process are specified in the tab Input/Output under Input Parameters as a list extOut_mateoParams. In our example, we get the variable unicornName back from the RPA job, which is then available as a process variable in the process:
Specify the map and list for correct error handling. However, it is not necessary to specify parameters. In any case, a new process variable extOut_mateoScriptResult is created which contains the result of the test script.
A BPMN error happens when:
- The test script was not completed with success
- An error occurred while reading the variables
This error can be caught by using BoundaryEvent (see sample process). The default error code is mateoError and can be changed in the settings of the mateo Camunda Bridge.
mateo demo version
If you don’t have a mateo instance, you can use the free demo version in the cloud here.
The credentials are:
- Username: pubdemo
- Password: 45sj1Pz705rLer32
As we have seen, mateo scripts can be executed out-of-the-box from the Camunda engine and the results processed in the process. This allows for the creation of end-to-end process diagrams that include RPA tasks in addition to BPMN tasks. Camunda thus enables the coordination and orchestration of multiple RPA bots within automated processes, alongside operational visibility of RPA bot activities.