Library for testing Camunda 7 instances and workflows
APACHE-2.0 License
Bot releases are hidden (Show)
Published by Noordsestern over 2 years ago
#66
#77
Published by Noordsestern over 2 years ago
Removes annoying deprecation warnings. Turns out the keyword is not deprecated after all.
Published by Noordsestern over 2 years ago
Get Process Instance Variable
now auto-converts Java objects from Camunda to Python data structures.
#69 - Bug: Get Process Instance Variable
does not convert java objectgs
#64 - Bug: Documentation for Get Process Instance
has broken format and looks awful
Published by Noordsestern almost 3 years ago
This release completes development on CamundaLibrary 1.x . The goal of version 1 has been to support most common BPMN artefacts, such as incidents, notifications and messages.
Complete list of features in new since 1.0: https://github.com/MarketSquare/robotframework-camunda/milestone/1?closed=1
New in Version 2:
#10
This one has been on the list since day 1: If Camunda REST API requires authentication (it should!) CamundaLibrary supports now auth parameters:
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
#47
A few keywords were a little bit to generous in silently ignoring that the request to Camunda failed. Now all keywords raise an ApiException if the request to Camunda Platform fails for any reason.
#59
CamundaLibrary has been in GLOBAL scope, meaning all task suites within one robot process would shared the same instance. That would become a problem when using several Camunda Platform instances. For a cleaner setup, the library now runs on SUITE level, meaning only all tasks within a suite share the same Camunda client.
#46
You might have noticed for the past months, that you got warnings in your logs when using deprecated keywords. If you haven't seen them, you are good. If you ignored them, you must migrate to other keywords, as the deprecated keywords have been removed entirely.
#58
Added support for Camunda Platform 7.16 (which isn't hard, since Camunda is backwards compatible and awesome).
Published by Noordsestern about 3 years ago
This release contains 1 bugfix and 1 enhancement:
retry_timeout
in Notify Failure
It was not possible to set retry tiemout. This is now fixed
Prior this release, it was necessary to manage retries counter yourself. Although the algorithm is simple, it was overhead and bulky:
*** Test Case ***
Demo old behaviour
fetch workload my topic
${process_instance} get fetch response
IF None is not $process_instance['retries']
${counted_down_retries} Evaluate $process_instance['retries'] - 1
Notify Failure retries=${counted_down_retries}
ELSE
Notify Failure retries=1
END
Now you can always set retries
, but only when set for the first time, it is actually interpreted. If the process instance already has retries set, then CamundaLibrary is counting down retries automatically:
*** Test Case ***
Demo new behaviour
fetch workload my topic
Notify Failure retries=1
fetch workload my topic
# this will now raise an incident, because retries had been set before and are now counted down to 0
Notify Failure retries=1
Published by Noordsestern about 3 years ago
Lock duration for external tasks can now be set through environment variable : CAMUNDA_TASK_LOCK_DURATION
. Value is in millisecond (1000 = 1 second). Default is 600000 (10 minutes).
The feature comes with 2 new keywords:
Set Task Lock Duration
Reset Task Lock Duration
There was already the keyword Get All Active Process Instances
. Additionally, it is now possible with Get Process Instances
to query all kind of process instances from Camunda. Check out full capabilities at Camunda REST API documentation. Also keep in mind that in Robot the parameters are written in snake case, thus it is process_definition_key
instead of processDefinitionKey
There are now 2 new keywords:
Notify failure
Get incidents
*** Settings ***
Library CamundaLibrary http://localhost:8080
*** Tasks ***
Demonstrate "notify failure"
${varialbes} fetch workload topic=${existing_topic}
${process_instance} Get fetch response
Do something with variables ${variables}
Notify failure
${incident} Get incidents process_instance_id=${process_instance}[process_instance_id]
Should Not Be Empty ${incident}
In addition to complete
, unlock
, throw bpmn error
the new keyword notify failure
is the 4th option to finish an external task. By calling notify failure
an incident is created and the process instance is not available for the fetch workload
keyword until the incident is resolved.
With the keyword Get incidents
you can fetch incidents that match your filter arguments.
Published by Noordsestern about 3 years ago
Lock duration for external tasks can now be set through environment variable : CAMUNDA_TASK_LOCK_DURATION
. Value is in millisecond (1000 = 1 second). Default is 600000 (10 minutes).
The feature comes with 2 new keywords:
Set Task Lock Duration
Reset Task Lock Duration
There was already the keyword Get All Active Process Instances
. Additionally, it is now possible with Get Process Instances
to query all kind of process instances from Camunda. Check out full capabilities at Camunda REST API documentation. Also keep in mind that in Robot the parameters are written in snake case, thus it is process_definition_key
instead of processDefinitionKey
There are now 2 new keywords:
Notify failure
Get incidents
*** Settings ***
Library CamundaLibrary http://localhost:8080
*** Tasks ***
Demonstrate "notify failure"
${varialbes} fetch workload topic=${existing_topic}
${process_instance} Get fetch response
Do something with variables ${variables}
Notify failure
${incident} Get incidents process_instance_id=${process_instance}[process_instance_id]
Should Not Be Empty ${incident}
In addition to complete
, unlock
, throw bpmn error
the new keyword notify failure
is the 4th option to finish an external task. By calling notify failure
an incident is created and the process instance is not available for the fetch workload
keyword until the incident is resolved.
With the keyword Get incidents
you can fetch incidents that match your filter arguments.
Published by Noordsestern about 3 years ago
Failed to deploy version 1.7.0. Pipeline fixed now.
Published by Noordsestern about 3 years ago
See #4
Throw bpmn error error_code=de1 error_message=Alles kaputt variables=${variables}
Published by Noordsestern about 3 years ago
#30 GET ACTIVITY INSTANCE returns now Dict instead of Dto
Makes the result easier to process in robot as you can now use simply key notation:
${activities} Get Activity Instance id=${process}[id]
Log ${activities}[child_acitivities]
#31 GET ACTIVITY INSTANCE has now only id as parameter
You can now drop naming the parameter with id=
:
${activities} Get Activity Instance ${process}[id]
Published by Noordsestern about 3 years ago
New Keyword Deliver Message
for sending messages and correlated messages.
*** Test Cases ***
Send message
${workload} Get workload from topic '${TOPIC_SEND_MESSAGE}'
# Send all process variables as message
${message_response} Deliver Message ${MESSAGE_NAME} process_variables=${workload}
Complete task
Published by Noordsestern over 3 years ago
#26
#25
Breaking Change: Since #8 all Lists, Tuples and Dictionaries are no longer stored as Java Objects in Camunda, but as Json Objects.
That change is a breaking change, if you have task workers working with java objects. Or if you have Decision tables that asume Java Objects.
It is recommended to use FEEL for evaluating statements in DMN: https://camunda.github.io/feel-scala/docs/reference/language-guide/feel-expression
Published by Noordsestern over 3 years ago
1.3.1 only added generic camunda client version to requirements - not to setup.py
Published by Noordsestern over 3 years ago
Version of generic-camunda-client
has not been updated in version 1.3.0. Therefore updates of the client has not been enforced in old environments leading to erro like:
Importing library 'CamundaLibrary' failed: ImportError: cannot import name 'EvaluateDecisionDto' from 'generic_camunda_client' (e:\pdpa\jenkinsslave\workspace\bpa_prm_log_analyzer\python\lib\site-packages\generic_camunda_client\__init__.py)
Traceback (most recent call last):
File "e:\pdpa\jenkinsslave\workspace\bpa_prm_log_analyzer\python\lib\site-packages\CamundaLibrary\__init__.py", line 1, in <module>
from .CamundaLibrary import CamundaLibrary
File "e:\pdpa\jenkinsslave\workspace\bpa_prm_log_analyzer\python\lib\site-packages\CamundaLibrary\CamundaLibrary.py", line 18, in <module>
from generic_camunda_client import ApiException, CountResultDto, DeploymentWithDefinitionsDto, DeploymentDto, \
PYTHONPATH:
E:\PDPA\JenkinsSlave\workspace\bpa_prm_log_analyzer\python\Scripts\robot.exe
e:\pdpa\jenkinsslave\workspace\bpa_prm_log_analyzer\python\scripts\python37.zip
c:\pdpa\tools\python\python37\DLLs
c:\pdpa\tools\python\python37\lib
c:\pdpa\tools\python\python37
e:\pdpa\jenkinsslave\workspace\bpa_prm_log_analyzer\python
e:\pdpa\jenkinsslave\workspace\bpa_prm_log_analyzer\python\lib\site-packages
Published by Noordsestern over 3 years ago
New Keywords:
#23 Evaluate Decision
: Keyword for evaluating a decision
Other:
Migrate to generic-camunda-client 7.15
Published by Noordsestern over 3 years ago
Bugfix:
#13 - REST endpoint cannot be reached when Camunda URL ends on /
New Keyword:
#6 - Get Amound of Workloads
Published by Noordsestern over 3 years ago
New keyword added: Get Process Instance Variable
: https://docs.camunda.org/manual/7.14/reference/rest/process-instance/variables/get-variable/
Published by Noordsestern over 3 years ago
Ugly to make this its own release, but links for documentation pointed to wrong URLs and are static on pypi.org
Published by Noordsestern over 3 years ago
New keyword for version endpoint
Useful for checking if camunda url is correct.
Published by Noordsestern over 3 years ago
No changes, except moving from GitLab to GitHub