I am trying to execute the simple workflow, with test 1 and test 2 as a task, under test1 one task I am setting the variable and in test2 task I am getting the same variable. when I invoke process instance getting below error after both the task are completed, as part of the retry it works fine
2019-08-29 12:46:21.499 WARN 24947 — [aTaskExecutor-1] org.camunda.bpm.engine.jobexecutor : ENGINE-14006 Exception while executing job e2674094-ca2c-11e9-91c1-1afc74d7e891:
org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of ‘UPDATE ExecutionEntity[e2656bd2-ca2c-11e9-91c1-1afc74d7e891]’ failed. Entity was updated by another transaction concurrently.
at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.concurrentUpdateDbEntityException(EnginePersistenceLogger.java:135) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.handleOptimisticLockingException(DbEntityManager.java:499) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.checkFlushResults(DbEntityManager.java:451) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:367) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:325) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:297) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:208) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:137) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:116) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:46) ~[camunda-engine-spring-7.11.0.jar:7.11.0]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.1.8.RELEASE.jar:5.1.8.RELEASE]
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:44) ~[camunda-engine-spring-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.executeJob(ExecuteJobHelper.java:51) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.executeJob(ExecuteJobHelper.java:44) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.executeJob(ExecuteJobsRunnable.java:92) ~[camunda-engine-7.11.0.jar:7.11.0]
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:61) ~[camunda-engine-7.11.0.jar:7.11.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]