We are using activiti 5.22.0 . We are trying to execute service tasks parallely, using parallel gateway with async true(for service task and parallel gateway) and exclusive:false. Also we have added the below entry in config file
<property name="jobExecutorActivate" value="true" />
<property name="asyncExecutorActivate" value="true" />
Still the service tasks execution is happening sequentially. Can someone please help us to understand what are we missing.
Ok, what do you mean by sequentially? How are you testing that those are happening in sequence?
What is most likely to happen is that you schedule two jobs in the job executor and one will be picked up first (usually the first job that is schedule) and then , depending on how many executor threads do you have, the next job will be picked up. Using the job executor and async usually make sense when the Jobs are long running things, if the jobs end really quick.. it will look sequential, but as soon as the jobs are scheduled the job executor should deal with them in parallel.
Hope this helps.
Hi,
Thanks for the response.
I have 5 service tasks , all this five i have given in the parallel gateway and given loggers at the beginning and end of each task. All my tasks, which are external service call are taking more than 2 secs. From the log i can clearly see that first the service task 1 starts and completes then the second service and so on. That is how i came to the conclusion it is running sequentially. What i am expecting to see service task start logs for all the tasks first and after then service task end logs, since each task is taking at least 2 seconds.
As I mention before, the gateway schedule the tasks in order.. meaning that job requests are created sequentially, and because the tasks only takes 2 seconds to complete it is very likely to see them starting and completing in order.
Have you read the docs? -> Activiti User Guide
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.