cancel
Showing results for 
Search instead for 
Did you mean: 

job executors and exclusive jobs

louis44
Champ in-the-making
Champ in-the-making
I have a process that has parallel script tasks. Both are set to async=true. When I run with the default job executor, these don't run in parallel, but sequentially. This is because exclusive = true for all jobs by default. If I set exclusive = false on both script tasks, I see the parallel execution I want. This is all pretty well documented in the user guide.

However, If I run the exact same process but use the async executor (and have the default setting of exclusive = true for all tasks), I see parallel behavior. This was a bit surprising, because I thought I would still need to set exclusive = false for the execution to be parallel. So, does the setting of exclusive only make sense for the original job executor?
4 REPLIES 4

vasile_dirla
Star Contributor
Star Contributor
Hi Louis,
What do you want to say by "original job executor" ?

A JUnit will be very useful.
http://forums.activiti.org/content/sticky-how-write-unit-test

louis44
Champ in-the-making
Champ in-the-making
By "original job executor" I mean the "default" job executor. By "async executor", I mean the executor that is enabled with the following setting: "asyncExecutorEnabled = true".

So, to clarify the question, should the async executor respect "exclusive = true" or does the value of exclusive only matter when using the default executor?

trademak
Star Contributor
Star Contributor
The async executor locks the process instance in case exclusive is set to true, so only one job at a time should be executed. What's the parallel behaviour you are seeing? Can you provide more details?

Best regards,

louis44
Champ in-the-making
Champ in-the-making
Thank you both. I have opened a Jira with an example of what I am seeing here: https://activiti.atlassian.net/browse/ACT-4035