Camunda external task Robot Framework execution scheduler
Project description
Camunda external task Robot Framework execution scheduler
Technology preview.
carrot-executor
is an opinionated decoupled Camunda external task executor concept for orchestrating Robot Framework RPA tasks with Camunda. The concept decouples task locking and execution scheduling from bot execution.
In this concept, the Carrot external task client, based on camunda-external-task-client-js, fetches configured external tasks from Camunda, schedules their execution, and keeps the tasks locked at Camunda until their execution has been completed. The Carrot external task client only completes tasks itself (with creating incident) when the scheduling fails for some very unexpected reason. Any other interaction with Camunda is done by the scheduled Robot Framework bot, mostly using a dedicated Robot Framework listener library.
This initial preview provides support for local parallel task execution, but the concept is designed to support also remote executors, like parameterized Nomad tasks, CI systems, Docker or even Robocloud API.
Requirements:
-
Docker with Docker Compose for Camunda
-
Python >= 3.8 for executing Robot Framework
$ python --version Python 3.8.8
-
NodeJS >= 12 for executing the external task client
$ node --version v12.21.0
Trying it out
While carrot-executor
itself can be installed from PyPI, trying out the concept requires setting up Camunda BPM Platform and having the example Robot Framework task suites.
The easiest way for all this is to clone or download the project repository and starting the preconfigured Camunda with Docker Compose:
$ git clone https://github.com/datakurre/carrot-executor
$ cd carrot-executor
$ docker-compose up
After everything is ready, there should be Camunda running at http://localhost:8080/camunda with username demo
and password demo
.
By default, our Camunda container has both theirs and ours demo processes deployed. Let's get rid of their demo processes:
- Open Camunda Tasklist: http://localhost:8080/camunda/app/tasklist/default/
- Choose Start process
- Choose Reset Camunda to clear state and
- Press Start
The started process could now be completed with the help of carrot-executor
. For that we need to create a new Python environment with our package:
$ python -m venv my-carrot-executor
$ source my-carrot-executor/bin/activate
$ pip install carrot-executor
The executor may now be started with parameterizing it to complete tasks from the process we started:
$ CAMUNDA_API_PATH=http://localhost:8080/engine-rest ROBOT_SUITE=$(pwd)/robot/reset.robot CAMUNDA_TOPIC="Delete all tasklist filters,Delete all deployments" carrot-executor
polling
✓ subscribed to topic Delete all tasklist filters
✓ subscribed to topic Delete all deployments
polling
✓ polled 2 tasks
polling
✓ polled 0 tasks
By default, the executor executes the task name matching with the subscribed topic name. This can be overridden with environment variable ROBOT_TASK
. Setting the variable empty, should execute full suite.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file carrot-executor-0.6.6.tar.gz
.
File metadata
- Download URL: carrot-executor-0.6.6.tar.gz
- Upload date:
- Size: 101.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.8.9 Linux/5.4.112
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 993cf4e7a613f0fd917d215311db1fb356c5076ce3984025880fe97f3dbefde4 |
|
MD5 | a56163fb1a280a31c9dbe685323f4356 |
|
BLAKE2b-256 | dee3f728c1a2be204d9877e9b615bae71b43fe34b04cc5a833cd8e40663f0be5 |
File details
Details for the file carrot_executor-0.6.6-py3-none-any.whl
.
File metadata
- Download URL: carrot_executor-0.6.6-py3-none-any.whl
- Upload date:
- Size: 101.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.8.9 Linux/5.4.112
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4866cd12b20f2d4b7cc267df793cb7120e38f1e84942b70aa5cde6340177d985 |
|
MD5 | a7363d44b108b7b4a7f2b67209b5e737 |
|
BLAKE2b-256 | 974b8ec0bf69683109cfe95845c90dfba5fe7669602fbc915ac4653c9da6d35c |