Example of multi-instances external tasks


Do you know where I can find an example of process with multi-instances external tasks ?

There are a few things I don’t get :

  • How can I make my external task to output a dynamic array (let’s say a list of strings)
  • How to modelize then the ‘foreach’ on the modeler using this variable as data, I found the “multi instance” modifier but I could not really get it to work.

Is there any place I can find examples about that ?


Hi @kedare,

if you model a service task as external and multi instance, the engine will take care about the looping.

Your worker will get the tasks one by one. The tasks are all created one-by-one after each other, if you use a sequential multi instance or all the same time, if you use parallel multi instance.

To distribute the content of an array to all the tasks, you refrence the array in the collection field and get the element in the variable you specify in the element field: https://docs.camunda.org/manual/7.12/reference/bpmn20/tasks/task-markers/

Hope this helps, Ingo