Skip to main content

A simple camunda command line tool and framework

Project description

CamundaTools

CamundaTools is a Python REST api client for the workflow and decision automation engine Camunda. It will provide a simple and intuitive interface for the most used features of the rest-engine api.

CamundaTools also has a set of command line tools to manage definitions, instances and tasks.

Author

Felipe Rayel felipe.rayel@gmail.com

Install

pip install camundatools

Setup

Create a file in the root path called camundatools.cfg

[config]
CAMUNDA_API_BASE_URL = http://localhost:8080/engine-rest
CAMUNDA_AUTH_USERNAME = demo
CAMUNDA_AUTH_PASSWORD = demo
REQUEST_RETRY = 3
REQUEST_TIMEOUT = 5
EXTERNAL_MAX_TASKS = 10
EXTERNAL_TASK_LOCK_DURATION_IN_MILISECONDS = 30000
EXTERNAL_TASK_RETRY_TIMEOUT = 300000
CERT_FILE = cert_file.pem
MAX_RESULTS_PER_PAGE = 100
MAX_RESULTS_NON_PAGINATED = 100

Command Line Tools

Definition Command Parameters

list                List deployed process definitions
deploy              Deploy a definition
delete              Delete a deployment
clear               Clear all instances from a definition
download            Download latest version of a XML definition from server

Example:

$> definition list
$> definition deploy <filename.bpmn>
$> definition delete <deployment_id>
$> definition clear <definition_key>
$> definition download <definition_key>

Instance Command Parameters

start               Start a process instance
list                List process instances
inspect             Inspect a process instance
find                Find a process instance by business key
delete              Delete a process instance
migrate             Migrate a process instance to a newer definition
download            Download a XML of the process instance

Example:

$> instance start <process_key> <business_key>
$> instance list
$> instance inspect <process_instance_id>
$> instance find <process_key> <business_key>
$> instance delete <process_instance_id> <reason>
$> instance migrate

Task Command Parameters

list                List tasks
inspect             Inspect a task
complete            complete a task
delete              Delete a task
move                Move a task to other activity

Example:

$> task list
$> task inspect <task_id>
$> task complete <task_id>
$> task delete <task_id>
$> task move <process_instance_id> <new_task_name>

Using the API

Deploy a bpm

definition_api = Definition('http://localhost:8080/engine-rest', 'demo', 'demo')
definition_api.deploy('file.bpmn')

List Instance

instance_api = Instance('http://localhost:8080/engine-rest', 'demo', 'demo')
instances = instance_api.list('myProcessKeyDefinition')
for instance in instances:
    print(instance)

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

camundatools-0.0.1.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

camundatools-0.0.1-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file camundatools-0.0.1.tar.gz.

File metadata

  • Download URL: camundatools-0.0.1.tar.gz
  • Upload date:
  • Size: 14.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.4

File hashes

Hashes for camundatools-0.0.1.tar.gz
Algorithm Hash digest
SHA256 964ce04928e2d8bd09e60fd5fef859ab567d03ca4ec63c806ab8576bfe565433
MD5 19b899e6b145ce93e450a9eb468a23f5
BLAKE2b-256 cb4c4078e956642aa46d4c02a81490fb5b49c265410afa7874a6f59d6135d812

See more details on using hashes here.

File details

Details for the file camundatools-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: camundatools-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 23.5 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.4

File hashes

Hashes for camundatools-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a956c99c80c165f7f504b5a2e867a04519dd0bf331f08929df9070d8497350c2
MD5 3fc3bb44efa7c75e67052f13f5b39d8e
BLAKE2b-256 d17bc3602a481355f9cb8e4bc03701dcdf2021fbc036f3459e8c92d55df8fedb

See more details on using hashes here.

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