CamundaLibrary 1.0 and 1.1 are released.
1.0 Version: one library for all
Previously we had CamundaLibrary.ExternalTask
and CamundaLibrary.Deployment
and so on as sub libraries. That was very inconvenient. Only to experts it might have been obvious that the structure of sub libraries was equivilant to the Camunda REST API documentation. Even we often got confused, if we had to use for starting a process instance the sub library ProcessDefinition
or ProcessInstance
. Don’t bother anymore: The sub libraries are gone and there is only CamundaLibrary:
*** Settings ***
Library CamundaLibrary http://localhost:8080
*** Task ***
Demo task
# former: CamundaLibrary.Deployment
deploy model from file bpmn/demo_process.bpmn
# former: CamundaLibrary.ProcessDefinition
start process demo_process
# former: CamundaLibrary.ExternalTask
${variables} fetch workload my_topic
do some processing
complete task
Also some keywords got deprecated throwing warnings.
1.1 Long polling
Since tasks have individual processing durations some might end too soon, while there predecessor are still busy.
Assume this:
*** Task ***
Slow task 1
fetch workload my_topic1
sleep 2s
complete task
Super fast task 2
fetch workload my_topic2
# complete task immediately
complete task
Because second task finishs immediately, it won’t catch any workload from task 1 until task 2 is restarted.
With long polling you can now tell a fetch workload
keyword to negotiate a timeout (in milliseconds). If a workout does arrive within timeout at the camunda acitivity, Camunda calls back the robot client delievering the new workload. Long polling is activated with àsync_response_timeout
setting the timeout in milliseconds (30 minutes maximum):
*** Task ***
Slow task 1
fetch workload my_topic1
sleep 2s
complete task
Super fast task 2 waiting for task1
# wait up to 3000 milliseconds for new workload passed on by task1
fetch workload my_topic2 async_response_timeout=3000
# complete task immediately
complete task
Enjoy.