async parallel/inclusive gateways

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2014 04:01 PM
Hi,
I recently saw in a posting on Tijs' blog (http://bpmn20inaction.blogspot.com/2014/07/activiti-516-feature-preview.html) 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.
TIA,
Rick
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.
Task_Test.java:
package tasks;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
public class Task_Test implements JavaDelegate {
@Override
public void execute(DelegateExecution context) throws Exception {
System.out.println("Executing activity: " + context.getCurrentActivityName());
Thread.sleep(100);
}
}
Console:
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(DbSqlSession.java:562)
at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:444)
at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:170)
at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:117)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:66)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
I recently saw in a posting on Tijs' blog (http://bpmn20inaction.blogspot.com/2014/07/activiti-516-feature-preview.html) 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.
TIA,
Rick
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.
Task_Test.java:
package tasks;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
public class Task_Test implements JavaDelegate {
@Override
public void execute(DelegateExecution context) throws Exception {
System.out.println("Executing activity: " + context.getCurrentActivityName());
Thread.sleep(100);
}
}
Console:
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(DbSqlSession.java:562)
at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:444)
at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:170)
at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:117)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:66)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2014 04:35 AM
Hmm that should work. Is this in a regular unit test?
