concurrent execution with exclusive job

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2013 06:00 AM
hello,
i've got this situation:
[img]http://s1.directupload.net/images/130301/v3hm273e.jpg[/img]
Service-Call: async=false, exclusive-job=true
T1_1, T5_1, T2_2, T3_2
Service-Call: async=true, exclusive-job=false
T2_1, T3_1
with org.activiti.spring.SpringProcessEngineConfiguration -> jobExecutorActivate=true
i thought, that would solve the problem with the throwing ActivitiOptimisticLockingException
now I've got the following behavior:
T2_1 and T3_1 are executed in parallel
But then, T2_2 and T3_2 are executed also in parallel (what i do not understand), although exclusive-job is set true
i thought, when exclusive-job is set true, the activity would not be execute in parallel in the same process instance, as i read here:
http://www.activiti.org/userguide/index.html#exclusiveJobs
It would be nice if someone could explain the behavior.
Thanks in advance
Lars Willrich
i've got this situation:
[img]http://s1.directupload.net/images/130301/v3hm273e.jpg[/img]
Service-Call: async=false, exclusive-job=true
T1_1, T5_1, T2_2, T3_2
Service-Call: async=true, exclusive-job=false
T2_1, T3_1
with org.activiti.spring.SpringProcessEngineConfiguration -> jobExecutorActivate=true
i thought, that would solve the problem with the throwing ActivitiOptimisticLockingException

now I've got the following behavior:
T2_1 and T3_1 are executed in parallel
But then, T2_2 and T3_2 are executed also in parallel (what i do not understand), although exclusive-job is set true
i thought, when exclusive-job is set true, the activity would not be execute in parallel in the same process instance, as i read here:
http://www.activiti.org/userguide/index.html#exclusiveJobs
Since Activiti 5.9, the JobExecutor makes sure that jobs from a single process instance are never executed concurrently.
It would be nice if someone could explain the behavior.
Thanks in advance
Lars Willrich
Labels:
- Labels:
-
Archive
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2013 06:05 AM
Service-Call: async=false, exclusive-job=true
The "exclusive-job=true" makes no sense when the activity is not async. The T2_2 will run right after T2_1 in the same thread. As will T3_2 run right after T3_1. Set the async=true on the *_2 tasks and your issue will be fixed.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2013 06:39 AM
The "exclusive-job=true" makes no sense when the activity is not async.
i thought, exclusive-job=true set as default, if its not explicit declared or the async-attribute is set false?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2013 01:27 PM
Exclusive job = true has only meaning when executing things async. But I can see your point. Tijs has written down some things about it: http://bpmn20inaction.blogspot.be/2012/12/implement-parallel-execution-in-activiti.html
What happens if you make them all async and exclusive?
What happens if you make them all async and exclusive?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2013 04:01 AM
What happens if you make them all async and exclusive?all: async and exclusive=true
Then, of course all activities will run sequential (but i want to run T2_1 and T3_1 in parallel)
all activities without T2_1 and T3_1: async=false
T2_1 and T3_1: async = true, exclusive = false
Then, it will throw the ActivitiOptimisticLockingException.
solution:
T1,T4: async = false
T2_1, T3_1: async = true, exclusive = false
T2_2, T3_2: async = true, exclusive = true
Then, T2_1 and T3_1 execute in parallel and after that, it runs sequential again.
Thats the solution for my problem.
Thanks.
regards
Lars

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2013 01:21 PM
Just a small question - if there is a sub-process (using CallActivity) embedded in a Process definition and on that sub-process, keeping async=false, will there be any difference setting exclusive as false or true ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2013 08:08 AM
No, exclusive only has meaning when async=true
Best regards,
Best regards,

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2013 09:14 AM
Thanks for the quick reply. The behavior I am trying to understand is - Created a Process Definition with 2 simple Service Tasks & 2 Sub Process (Using CallActivity) and each Sub Process has a Receive Task with a Timer Boundary on it. In this scenario, when the signal is issued on the first Timer Task - the process resumes and continues and when it is about to invoke the Timer in 2nd Sub Process in sequence, it is throwing ActivitiOptimisticLocking Exception on Timer Entity of first SubProcess and the process instance is getting rolled back to the first Time Entity. Trying to understand why this is happening.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2013 05:11 AM
Do you have a simple process that demonstrates the problem?
