OptimisticLockingException with parallel multi-instance call activity with async tasks

We have a process with a multi-instance call activity subprocess. The call activity is configured as parallel (and we like to keep it that way). The subprocess is comprised of multiple service tasks that are all async.

We sometimes get OptimisticLockingExceptions when multiple subprocess instances complete at the same time. In many writings it is said that OptimisticLockingExceptions are ok as the transaction will be rolled back and retried. However, I would like some clarification of what exactly would be retried in this case:

  • Some internal Flowable functionality to update the parent process instance?
  • The last task of the subprocess (that’s async)?

The first option would be ok, but the latter one not, as the subprocess calls external services which might be incorrect if the call has already been successfully executed once.

Hey @Heikki,

Which Flowable Version are you using?

In 6.7.0 we improved the support for parallel multi instance activities with async elements. There should be no optimistic exceptions anymore for you if you upgrade to a 6.7.0 or a newer version.


We are using version 6.7.2. OptimisticLockingExceptions do happen, but not very often. I think we only got them with the case described in my question, when parallel asynchronous subprocesses of a multi-instance call activity complete simultaneously and are trying to write variables to the call activity.