Skip to main content

Keywords for camunda rest api, leading open source workflow engine.

Project description

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}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework-camunda-1.8.2.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

robotframework_camunda-1.8.2-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file robotframework-camunda-1.8.2.tar.gz.

File metadata

  • Download URL: robotframework-camunda-1.8.2.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for robotframework-camunda-1.8.2.tar.gz
Algorithm Hash digest
SHA256 70a7f9692a0a16ff263e5103c938e2b07eb44e53317c072da48b9015fb4b9bb1
MD5 6c7b7688989472d8f0c5c168c920107c
BLAKE2b-256 a14cf380d753cd33d7cd664f81b9a7210e0099e79b6d19f6da01540bc49ed3a0

See more details on using hashes here.

Provenance

File details

Details for the file robotframework_camunda-1.8.2-py3-none-any.whl.

File metadata

  • Download URL: robotframework_camunda-1.8.2-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for robotframework_camunda-1.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c1c433bb7fa00b6361d0042ebeeb6db40b03e5dc21f58f7de8ec8e11d488b90
MD5 55d3b3b764ee827f95c425b9dbd5cc0a
BLAKE2b-256 bcea2e96803b8a196b98d3d8cab697a3a9538ee322bb7831c5e5a2cf1985760c

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page