flowable-engine icon indicating copy to clipboard operation
flowable-engine copied to clipboard

Acquire only one exclusive external worker job per process instance

Open basclaessen opened this issue 3 years ago • 2 comments

Fixes #3509

Check List:

  • Unit tests: YES
  • Documentation: NO

basclaessen avatar Oct 29 '22 11:10 basclaessen

This solution has a side effect. When one exclusive external worker job (a) is acquired and an other exclusive external worker job (b) belonging to the same process/case instance with the same topic is ready for acquiring a FlowableOptimisticLockingException is thrown and the acquire transaction is rolled back. This will prevent other external external worker jobs which are ready for acquiring with the same topic (exclusive or not) belonging to other process/case instances to be acquired until (a) is completed.

I'll work on another solution proposal for #3509 which does not have the side effect mentioned above.

basclaessen avatar Nov 02 '22 07:11 basclaessen

Thanks for working on this and good point @basclaessen. We are going to review this and try to come up with the right solution. Ideally we should try to avoid the side effect in this solution.

filiphr avatar Dec 20 '22 10:12 filiphr