0

I have used one multi instance subprocess which includes an workflow with human task. When executing, its creating the number of human tasks as to the number of elements present inside the collection object. But all tasks have same process instance id. How the relation is working between parent process and multi instance subprocess?

If there are multiple elements in collection list, then it will create those many tasks inside the multi instance sub process. As all the tasks have same process instance id, how to identify the respective process variable values for each task and the uniqueness of each flow afterwards? And is there a way to make it create an different instance id for each task of the multi instance subprocess?

Bashir
  • 2,057
  • 5
  • 19
  • 44

2 Answers2

0

I did not get all the question, but I will try to answer what I got:

  • Human tasks have their own task instance id
  • What is collection object? If you mean tasks in bpmn model, then it is as expected: process instance flow starts after start node and when it reaches a human task, it will create an task instance with id. You can see it in the tasks in UI and with api you can claim, work on, complete , populate data etc.
  • it is wise to have a separate/different variable for every tasks that can execute in parallel. Then the input will be kept in distinguished data placeholders and you can use it accordingly.
  • you can create a different instance(task instance) for each task or have repeatable tasks
zhrist
  • 1,169
  • 11
  • 28
0

well the answer was to put the multi-instance into a sub-process, this will allow me to have a separate process instance id per each element of the my List (the input of the multi-instance )

Bashir
  • 2,057
  • 5
  • 19
  • 44
  • I still don't get it tho? Shouldn't it be the other way around? The make everything within the multi instance into a reusable subprocess? – L_Cleo May 19 '21 at 11:20