AnsweredAssumed Answered

Handling the org.activiti.engine.ActivitiOptimisticLockingException

Question asked by arunshenbagaraj on Feb 11, 2015
Latest reply on Feb 28, 2015 by jbarrez
Hi There,

Hope u r doing good. Am using the activiti-engine version 5.17, in my workflow am using a parallel gateway with 5 service tasks running in parallel, all are exclusive jobs. Two jobs are failing with the below exception. When a service task fails, the service task starts executing from the beginning. I need to stop this, when a service task fails with the below exception, it should only try to update the db again rather than executing the service task itself again.

org.activiti.engine.ActivitiOptimisticLockingException: ProcessInstance[70004] was updated by another transaction concurrently
        at org.activiti.engine.impl.db.DbSqlSession.flushUpdates(
        at org.activiti.engine.impl.db.DbSqlSession.flush(
        at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(
        at org.activiti.engine.impl.interceptor.CommandContext.close(
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(
        at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(
        at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$

Please help me identifying the issue. Thanks in advance.