cancel
Showing results for 
Search instead for 
Did you mean: 

parallel processing in Activiti flow

pisadr
Champ in-the-making
Champ in-the-making
We have a flow designed in Activiti.
Start -> A -> B -> C -> End

I have a thread pool executor that gets the request from queue and submits the task to Activiti flow.
Can I design Activiti flow to process multiple requests submitted by multiple threads? (parallel execution of multiple requests)
OR is it always that I need to wait to complete one request and then the Activiti will process second request?

Thanks
3 REPLIES 3

trademak
Star Contributor
Star Contributor
Hi,

You can use the async="true" attribute to let the engine process request asynchronously.

Best regards,

pisadr
Champ in-the-making
Champ in-the-making
Hi trademak,
Thanks for the reply.
I am using "SpringProcessEngineConfiguration" to initialize/start the Activiti engine.

This is what I have in my spring based config -
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
    <property name="dataSource" ref="dataSource" />
    <property name="transactionManager" ref="transactionManager" />
    <property name="jobExecutorActivate" value="true" />
  </bean>

Where do I need to mention "async="true" to start the processing in parallel.

gant
Champ in-the-making
Champ in-the-making
Hi,

If you use Activiti Designer, you can specify that in the properties view of each service task.

Otherwise configure it directly in the xml as described here http://www.activiti.org/userguide/index.html#asyncContinuations in the userguide.

Regards,
michael