hi all.
the bussiness back ground is, when i order a list of goods to manufactory, the facttory may send goods to me multi times(the num is dynamic unsure), each time i need to complete two task: “confirm arrive”, “check in to warehouse”.
these two task need to run multiple time. What i need is when 1st task complete , then 2nd task will availe active, and a new 1st task will availe active. if the 2nd task is too slow, it should not block the 1st task.
if i place in sequence sub proc, if 2nd task is not complete , then new 1st task will not avail active.
@thinkdoom you don’t need to know number of values, multi-instance feature has the capability to work on dynamic collection. Just pass the collection resultset to the property like:
camunda:collection="${usersList}"
usersList is collection variable which has dynamic values. Then assign a element variable to loop through the collection like below:
camunda:elementVariable="user"
Multi-instance activity looks like for dynamic values are:
before i enter multiins_subproc, i set usersList={4,5}, it will create two multiins_subproc, 1st with user=4, 2nd with user=5.
then i didn’t complete the two multiins_subproc.
i receive a new arrive task(real dynamic, and can’t predicte when arrive new goods, and how many arrive this time, total 100 may be this time arrive 5 or arrive 41), set usersList={4,5,6} in another thread dynamiclly.