Skip to main content

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

Project description

pipeline status

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:

  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.2.7.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

robotframework_camunda-1.2.7-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: robotframework-camunda-1.2.7.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for robotframework-camunda-1.2.7.tar.gz
Algorithm Hash digest
SHA256 a6f1a5531dbe6e430d967d2a526b0d6b7bc1a8a87fdd8b685189d7adbedd959e
MD5 da8e18b022cbb12dbceb73742a48e791
BLAKE2b-256 4eae2e9d7907b7ce3e3098ed8b2e508c03830f96fcd48c764c212ece22fdd581

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: robotframework_camunda-1.2.7-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for robotframework_camunda-1.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1927e5e88d46b448115e5b7326f4e26a71daa29f9a255da2335fa98798270ffb
MD5 1c05d0a9e21a965a1f5feb2528586a5f
BLAKE2b-256 e9e0f7b3cabafa9d25ebdb24862292f26befc45bcffdcf6d48380fce611ffcae

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