Keywords for camunda rest api, leading open source workflow engine.
Project description
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
*** Test Cases ***
Test deployment of models
${response} deploy model from file ${CURDIR}/../../bpmn/demo_for_robot.bpmn
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:
CamundaLibrary.Fetch workload
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}
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
Hashes for robotframework-camunda-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02c9730998eb26155637ab076e6af05f3ad9f9dbed8964379aa06c2f2ef6f3f5 |
|
MD5 | c3882ef98cdc09c5ce0ddc0d6d7057eb |
|
BLAKE2b-256 | 473e86c0476509f77ccc6cec07add7d01696617c3d3732a1e225e56f61d1507a |
Hashes for robotframework_camunda-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7414898f389d07c32c79ac87aa1d5674ca63b11b82f4eb6a581185b3e80a10b |
|
MD5 | d302060103c1caa78d40431a3f45c707 |
|
BLAKE2b-256 | de66a7dfefd8ab1683618606f858df8e082f389c97cabdca302f1df6130fb7ce |