Skip to main content

PyPI status pipeline status PyPi license PyPi version PyPI pyversions PyPI download month

Robot Framework Camunda

This library provides keywords for accessing camunda workflow engine. Complete REST API reference of camunda can be found here.

Please review issue board for known issues or report one yourself. You are invited to contribute pull requests.

Documentation

Keyword documentation is provided here

Installation

The library is published on pypi.org and can be installed with pip:

pip install robotframework-camunda

Running robotframework-camunda

The tests folder has example robot tests for keywords already implemented. Those tests assume you already have an instance of camunda running.

Easiest way of running camunda is to launch with with docker:

docker run -d --name camunda -p 8080:8080 camunda/camunda-bpm-platform:run-latest

Deploy process definition

*** Settings ***
Library    CamundaLibrary    ${CAMUNDA_HOST}

*** Variables ***
${CAMUNDA_HOST}    http://localhost:8080
${MODEL_FOLDER}    ${CURDIR}/../models

*** Test Cases ***
Test deployment of a single model in 1 deployment
    ${response}    deploy    ${MODEL_FOLDER}/demo_for_robot.bpmn

Test deployment of several models in 1 deployment
    ${response}    deploy    ${MODEL_FOLDER}/demo_for_robot.bpmn    ${MODEL_FOLDER}/demo_embedded_form.html

Starting a process instance

*** Settings ***
Library    CamundaLibrary    ${CAMUNDA_HOST}

*** Variables ***
${CAMUNDA_HOST}    http://localhost:8080

*** Test Cases ***
Test starting process
    #GIVEN
    ${process_definition_key}    Set Variable    demo_for_robot

    # WHEN
    ${process_instance}    start process    ${process_definition_key}

Execute Task

"Executing task" bascialy means, you execute a robot task that fetches a workload from camunda, processes it and returns its workload back to camunda during completion. Main keywords involved are:

  1. CamundaLibrary.Fetch workload
  2. CamundaLibrary.Complete Task
*** Settings ***
Library    CamundaLibrary    ${CAMUNDA_HOST}
Library    Collections

*** Variables ***
${CAMUNDA_HOST}    http://localhost:8000
${existing_topic}    process_demo_element

*** Test Cases ***
Process workload
    ${variables}    fetch workload   topic=${existing_topic}
    ${recent_task}    Get fetch response
    log    Recent task:\t${recent_task}

    Pass Execution If    not ${recent_task}    No workload fetched from Camunda
 
    # do some processing
    
    # create result and return workload to Camunda
    ${my_result}    Create Dictionary    lastname=Stahl
    complete task   ${my_result}

Authentication

Prerequisite: CamundaLibrary >= 2.0

If your Camunda Platform REST API requires authentication (it should at least in production!) then you do not need to pass the host url to CamundaLibrary during intialization. You require the Set Camunda Configuration keyword. The keyword expects a dictionary with host url and (optional) either username with password or api key with optional api key prefix. See the following example.

*** Settings ***
Library    CamundaLibrary


*** Test Cases ***
Demonstrate basic auth
    ${camunda_config}    Create Dictionary    host=http://localhost:8080    username=markus    password=%{ENV_PASSWORD}
    Set Camunda Configuration    ${camunda_config}
    ${deployments}    Get deployments    #uses basic auth now implictly

Demonstrate Api Key
    ${camunda_config}    Create Dictionary    host=http://localhost:8080    api_key=%{ENV_API_KEY}   api_key_prefix=Bearer
    Set Camunda Configuration    ${camunda_config}
    ${deployments}    Get deployments    #uses api key implicitly

If you would pass in username+password and and API key, the API key will always be chosen over the username+password. So better leave it out for not confusing everybody.

Release files for robotframework-camunda 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robotframework-camunda 2.0.2
File Size Uploaded
robotframework-camunda-2.0.2.tar.gz 19.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-camunda 2.0.2
File Interpreter ABI Platform
robotframework_camunda-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 38.9 kB

Release files / robotframework-camunda-2.0.2.tar.gz

Download URL robotframework-camunda-2.0.2.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2a6f70c57b5a8c4136a83cae7841e2ae69f49647107ea60fe7b880aff3095408
BLAKE2b-256 checksum
How to use checksums
fe7331984c1aabbb46aeb34781435d9bb4217f026f93b86f90bce88b2add4371
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / robotframework_camunda-2.0.2-py3-none-any.whl

Download URL robotframework_camunda-2.0.2-py3-none-any.whl
Size 19.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27d1983fce318b498dbc5b699d1e41f3263c6e56b7c6a2222ee5dac6c25a5226
BLAKE2b-256 checksum
How to use checksums
a38f7048faf133a2614a7b589c62ed3aebf7d81189a6bfd240b2fee18c05e20e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release history Release notifications | RSS feed

2.0.3

2 release files

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.7.1

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page