AnsweredAssumed Answered

async parallel/inclusive gateways

Question asked by rickm on Nov 11, 2014
Latest reply on Nov 20, 2014 by jbarrez

I recently saw in a posting on Tijs' blog ( that the solution for joining of parallel/inclusive gateways had been cleaned up in 5.16 so that it was not necessary to use external frameworks to address the issue of optimistic locks.   This all looks great, but I can't seem to get it to work, I'm still seeing the ActivitiOptimisticLockingException. 


My environment is:
- Activiti 5.16.4
- JRE 1.7
- Tomcat 8.0
- Eclipse Luna
- H2

Below is the content of my source:

BPMN definition attached.
package tasks;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;

public class Task_Test implements JavaDelegate {

   public void execute(DelegateExecution context) throws Exception {
      System.out.println("Executing activity: " + context.getCurrentActivityName());

Starting Process ID Process2
Executing activity: Task 1
Executing activity: Task 2
Exception in thread "pool-1-thread-2" org.activiti.engine.ActivitiOptimisticLockingException: ProcessInstance[8505] 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$