Consider the scenario where there is:
- A clustered setup (multiple nodes, shared database)
- There is a multi-instance call activity, that calls a sub-process in parallel, N times.
When the multi-instance call activity executes, it creates N rows in the job table.
In my experiments, all N rows initially get locked by ONE of the nodes in the cluster (N rows in the ACT_RU_JOB table with the same LOCK_OWNER_).
I think this is because each node’s job acquisition thread is querying at a different times, and one “wins” and beats the others to the N rows. Either that or there is some optimization going on that hints to the same node that’s running the process instance with the call activity, to immediately grab the sub-process start jobs.
Either way, the launching of the sub-processes does not get distributed across the nodes, but only goes to a single node.
I would like to hear if it’s possible to distribute these sub-process starts across the fleet of worker nodes.
NOTE: the start event of each sub-process has an async-before. This is so that the fact that it started can be tracked in the database.
My call activity has these settings