lucaslorentz / durabletask-extensions

Extensions to Durable Task Framework
MIT License
40 stars 5 forks source link

How to pass variables in the BPMN worker #36

Closed chandusekhar closed 3 months ago

chandusekhar commented 3 months ago

Great project to start with the Durable Tasks. Can you please help on how to pass variables in the BPMN worker

lucaslorentz commented 3 months ago

I implemented the BPMN worker with support for some Camunda BPMN extensions, because BPMN by itself doesn't have definitions of activity input/outputs.

Download Camunda Modeler and have a look at the examples at https://github.com/lucaslorentz/durabletask-extensions/tree/main/samples/BpmnWorker/Workflows

Capturing the output of an activity into a variable:

Screenshot 2024-07-27 at 20 33 53

Passing the saved variable to next activity:

Screenshot 2024-07-27 at 20 34 22

Bear in mind that the BPMN runner I implemented was quite experimental, just to understand how much DurableTask concepts align with BPMN and the feasibility of running BPMN in durable task.