Parallel execution has transaction concurrency issue

I realized, after testing it, that parallel processing wasnt working. Documentation says I must mark async before in true and uncheck exclusive to make it work.

Can anyone help to fix for parallel gateway parallel processing.
I did that, and I have this error message on camunda log:

2022-09-15 12:22:36.179 WARN [cdups–obprocess,5f2a9bdf144d44c5,5f2a9bdf144d44c5] 1404 — [aTaskExecutor-1] org.camunda.bpm.engine.jobexecutor : ENGINE-14006 Exception while executing job ee97aa2a-34c2-11ed-9d08-60f262b16b01: OptimisticLockingException.

org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of ‘UPDATE ExecutionEntity[3a63ac9c-34e1-11ed-8557-60f262b16b01]’ failed. Entity was updated by another transaction concurrently.
at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException( ~[camunda-engine-7.13.0.jar:7.13.0]

A fundamental of the Camunda 7 engine is that only one thread should be active for a given process instance. This means that for parallel executions the active thread will run one branch at a time.

The Camunda 8 engine doesn’t have this restriction and you can implement your business logic as part of a Camunda 8 job worker rather than a Camunda 7 java delegate you’ll acheive true paraelle execution.

The nearest you can get to parallel execution with Camunda 7 would be to implement your classes as external tasks.


Currently my application using Camunda 7only.
Can we use camunda 8 community editon for prod release also with DB connection?

You can indeed.
But you should be aware that upgrading from Camunda 7 to Camunda 8 isn’t trivial. There are some fundamental changes between the two versions, you can check out this post for details: