We have an requirement in which we have to publish messages outside application during the execution of multi instance subprocess of consolidated create operation and another one for all link /add operation, so if you see below diagram , we want to publish messages as soon as all create service task executed and it should not depend on further execution of process elements.
Below process flow is working but every successful create is invoking create publish job, however we want to execute as soon as all create completed.
Please let me know if there is any better approach available.
Is the throw being connected to the Catch in the same process (just outside the multi instance?
That’s not really allowed by BPMN specification, and results in a mismatch of quantity (there will be N throws, but only one catch).
You can re-use the same collection in more than one multi-instance, so you can do a multi-instance (MI) after “Validate Request” for “Create Parent” (wouldn’t yo want to do that only one time?) and then outside the MI do your throw, and then a second MI for the parallel tasks (Create Childs and Map Childs - should those not be sequential?), coming back out of MI for “Publish Childs”