Skip to content

camunda/rpa-worker

Repository files navigation

Camunda RPA Worker

The Camunda RPA Runtime is designed to bridge the gap between Robotic Process Automation (RPA) bots and the Camunda workflow engine, enabling you to seamlessly integrate your task workers with Camunda.

Note
Experimental Features Notice: The code in this repository is in the experimental stage and may be unstable. Use at your own risk and avoid using in production environments.

Getting Started

Obtaining the RPA Worker

Downloads and details for container images are available on the Releases page.

Configuration

The RPA Worker can source its configuration either from a configuration file, or environment variables. The RPA Worker will look for a file named rpa-worker.properties in the current directory.

Zeebe

Connecting to a Camunda cluster requires providing the configuration for the Zeebe client. The RPA Worker uses the Spring Zeebe client, and so uses the same Configuration Properties.

Example Camunda local dev configuration
camunda.client.mode=selfmanaged
camunda.client.zeebe.grpc-address=http://zeebe.camunda.local
camunda.client.zeebe.rest-address=http://zeebe.camunda.local
Example Camunda SaaS configuration
camunda.client.mode=saas
camunda.client.auth.client-id=<client id>
camunda.client.auth.client-secret=<client secret>
camunda.client.cloud.cluster-id=<cluster id>
camunda.client.cloud.region=<region>

camunda.rpa.secrets.backend=camunda
Example custom/dev SaaS configuration
camunda.client.mode=selfmanaged

camunda.client.cloud.cluster-id=<cluster id>
camunda.client.cloud.region=<region>

camunda.client.auth.issuer=https://login.cloud.dev.ultrawombat.com/oauth/token
camunda.client.auth.client-id=<client id>
camunda.client.auth.client-secret=<client secret>

camunda.client.zeebe.rest-address=https://${camunda.client.cloud.cluster-id}.${camunda.client.cloud.region}.zeebe.dev.ultrawombat.com
camunda.client.zeebe.grpc-address=https://${camunda.client.cloud.cluster-id}.${camunda.client.cloud.region}.zeebe.dev.ultrawombat.com
camunda.client.zeebe.base-url=https://${camunda.client.cloud.region}.zeebe.dev.ultrawombat.com/${camunda.client.cloud.cluster-id}
camunda.client.zeebe.audience=zeebe.dev.ultrawombat.com

camunda.rpa.zeebe.auth-endpoint=https://login.cloud.dev.ultrawombat.com/oauth

camunda.rpa.secrets.backend=camunda
camunda.rpa.secrets.camunda.token-audience=secrets.dev.ultrawombat.com
camunda.rpa.secrets.camunda.secrets-endpoint=https://cluster-api.cloud.dev.ultrawombat.com
Tip
When creating an API client in the Camunda Cloud Console, the autogenerated configuration file provided contains most of the necessary configuration for connecting to production Camunda SaaS stacks.

Local-only Working

The Zeebe startup check and subscriptions can be disabled by setting camunda.client.zeebe.enabled to false. Although the Zeebe Client itself cannot be disabled and it will still log, the application will keep running allowing local working and these messages can be ignored.

Python

When the RPA Worker sets up its Python environment it will install a default set of dependencies.

Additional dependencies can be installed by providing a supplementary requirements.txt file with the camunda.rpa.python.extra-requirements property.

extra-requirements.txt
numpy==1.26.4
jmespath
rpa-worker.properties
camunda.rpa.python.extra-requirements=extra-requirements.txt

If the extra requirements files changes, the RPA Worker will install the new dependencies at the next restart, although no dependencies will be removed. If the Python environment is deleted then the RPA Worker will recreate it from scratch.

Robot Job Execution

The RPA Worker makes the following environment variables available to the Robot execution:

Variable Description

RPA_WORKSPACE_ID

The workspace ID of the current job

RPA_WORKSPACE

The full path to the workspace of the current job

RPA_SCRIPT

The name of the currently executing script

RPA_EXECUTION_KEY

The execution key of the currently executing script

RPA_ZEEBE_JOB_KEY

The Zeebe Job Key which triggered the Robot execution

RPA_ZEEBE_JOB_TYPE

The Zeebe Job type

RPA_ZEEBE_BPMN_PROCESS_ID

The current BPMN process ID

RPA_ZEEBE_PROCESS_INSTANCE_KEY

The current process instance key

Configuration Reference

Property Description Default Value

Python Properties

camunda.rpa.python.path

The directory in which the Python environment will be created

${user.dir}/python/venv/

camunda.rpa.python.download-url

The URL from which the portable Python will be downloaded if no system Python is available (Windows only)

https://github.com/winpython/winpython/releases/download/11.2.20241228final/Winpython64-3.13.1.0dot.zip

camunda.rpa.python.download-hash

The expected SHA-256 hash of the file at download-url

47b9a4ce75efb29d78dda80716d6c35f9a13621efd3a89ef8242a114ef8001a3

camunda.rpa.python.extra-requirements

The path to additional Python requirements that should be installed when setting up the Python environment

None

camunda.rpa.python.interpreter

Path to a specific Python interpreter to use, rather than searching the path

None

Robot Properties

camunda.rpa.robot.default-timeout

The default timeout to use when no other timeout is specified (ISO 8601 duration string)

PT5M (5 minutes)

camunda.rpa.robot.fail-fast

Stops task execution if any task fails

true

Sandbox Properties

camunda.rpa.sandbox.enabled

Whether the script evaluation API should be available

true

Zeebe Properties

camunda.client.zeebe.enabled

Whether the Zeebe integration should be enabled

true

camunda.rpa.zeebe.rpa-task-prefix

The prefix used to construct the task subscription key

camunda::RPA-Task::

camunda.rpa.zeebe.worker-tags

The worker tag(s) this worker should subscribe to (comma-separated)

default

camunda.rpa.zeebe.max-concurrent-jobs

How many Robot jobs from Zeebe to run concurrently

1

camunda.rpa.zeebe.auth-endpoint

The authentication endpoint that should be used for authenticating before sending requests

https://login.cloud.camunda.io/oauth

camunda.client.zeebe.audience

The token audience to use when authenticating for Zeebe

zeebe.camunda.io

camunda.client.cloud.region

The region for Camunda SaaS

None

camunda.client.cloud.cluster-id

The cluster ID for Camunda SaaS

None

camunda.client.zeebe.base-url

The region for Camunda SaaS

https://${camunda.client.cloud.region}.zeebe.camunda.io/${camunda.client.cloud.cluster-id}

camunda.client.auth.client-id

The client ID to use when authenticating with Zeebe

None

camunda.client.auth.client-secret

The client secret to use when authenticating with Zeebe

None

See the Spring Zeebe Configuration Reference for other supported properties

Secrets Properties - General

camunda.rpa.secrets.backend

The secrets provider backend

none (Secrets disabled)

Secrets Properties - Camunda (…​backend=camunda)

camunda.rpa.secrets.camunda.secrets-endpoint

The endpoint providing the Camunda secrets service

https://cluster-api.cloud.camunda.io

camunda.rpa.secrets.camunda.secrets.token-audience

The token audience to use when authenticating for secrets

secrets.camunda.io

General Properties

server.address

Network address to which the server should bind

localhost for standalone, any for container

Supported Configuration

The RPA Worker will source its configuration from configuration files and/or environment variables. The precedence order is documented in Spring’s Externalized Configuration documentation.

Configuration Files

A configuration file can be a Properties or a YAML document. It can have the name application or rpa-worker. It can be placed in the working directory of the Worker, or in a directory named config therein. The following are all valid paths to RPA Worker configuration files:

  • rpa-worker.properties

  • application.properties

  • rpa-worker.yaml

  • application.yaml

  • config/rpa-worker.properties

  • config/application.properties

  • etc

Environment Variables

Preferable for container-based deployments, the RPA Worker can source its configuration from environment variables. The name of the environment variables follow Spring’s Binding Rules, which can be briefly summarised as:

  1. Convert the property name to upper-case

  2. Replace dots with underscores

  3. Remove hyphens

For example camunda.rpa.zeebe.worker-tags would become CAMUNDA_RPA_ZEEBE_WORKERTAGS.

Launching a dev container with Zeebe connection details, mapping the Worker’s listener port to the host, might look like:

$ docker run --rm -it \
    -p 36227:36227 \
    -e CAMUNDA_CLIENT_MODE=saas \
    -e CAMUNDA_CLIENT_AUTH_CLIENTID=abc123 \
    -e CAMUNDA_CLIENT_AUTH_CLIENTSECRET=def234 \
    -e CAMUNDA_CLICNE_CLUSTERID=ghi345 \
    -e CAMUNDA_CLIENT_REGION=lpp-1 \
    ghcr.io/camunda/rpa-worker:<version>

License

These source files are made available under the Camunda License Version 1.0.