AnsweredAssumed Answered

Problem caused by multiple asynchronous sub process finishing around the same time.

Question asked by domreiroam on Oct 28, 2015
Latest reply on Nov 3, 2015 by jbarrez
Hi all,

We need to launch multiple (up to 24) sub-process from a Main process. Each sub-process will have multiple asynchronous task. 

We noticed an issue when multiple sub-process finish in the same time: we get errors like ActivitiOptimisticLockingException and the activiti engine will retry the sub-process . This behaviour causes 2 problems:
  • The first problem is that the last tasks of the sub-process will be executed again, so we must be sure that these tasks are allowed to run multiple time.
  • The second problem is that some time one sub-process is retried to much and fail ( maximum number retries reached).
We have this problem only with Oracle or PostgreSQL never with H2. We made a jUnit test that shows the behaviour by launching a sub-process containing a counter that should be increased only once by sub-process.

It may be related to ACT-2126 but in our junit we managed to run sub-process in parallel. We have only the problem when merging back to the main process.

Would like that we open a ticket? We can join our project with the jUnit test.