Hi All,
We have a requirement to execute two tasks parallel and asynchronously, I designed a simple process with two service tasks to execute parallel(with parallel gateway) and assigned JavaDelegate services to execute. When i run the process from test case :
When activiti:async="false" parallel services are executing(sequentially).
If we make activiti:async="true" my parallel services are not executing at all.(also made activiti:exclusive="false")
Note: we enabled/Activated AsyncExecutor in engine configuration also.
Please help us to solve this problem.
Thanks,
Keshav
Solved! Go to Solution.
Thanks Ami Dave for quick reply.
My problem solved, Issue was with parallel gateway.. I made services async but forgot to make gateway async.
Thanks Ami Dave for quick reply.
My problem solved, Issue was with parallel gateway.. I made services async but forgot to make gateway async.
Hi Keshav,
Good to hear that you find it helpful and your issue got resolved.
But just a quick question that How do you make Parallel Gateway Async by using local Activiti framework? I couldn't find the attribute for making Parallel Gateway Async it in UI of actual activiti framework.
Thanks,
Ami Dave
Hi Ami Dave,
I am using Activiti Designer plugin with JBoss, which is providing check boxes for Asynchronous and Exclusive. see below:
Really interesting that the old eclipse designer has both flags.
Certainly Exclusive will impact the behavior of the gateway by only allowing one parallel flow to execute in the instance at a time (i.e. if they share a parent execution). The main reason to do this is to stop potential database locking issues.
However I just checked the source for all of the gateways and the async flag is not even read (as far as I can tell).
However, what is likely happening is, the task prior to the gateway see's the gateway is labeled async and does not continue execution rather the thread is put onto the Job executor queue. It is picked up later (likely the next pass) and starts executing, however it now has a completely clean execution context (nothign carried over from earlier thread) so perhaps this is what is allowing the parallel flow to continue.
Would love to see a unit test on this to try to track the flow.
Greg
Oh Hi Keshav,
This is a nice plugin indeed, need to try once. I generally use my local Activiti explorer externally, so that it doesn't increase load of Eclipse. And in there I didn't find these 2 attributes.
Ami
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.