AnsweredAssumed Answered

ReceiveTask - How to handle signals sequentially ?

Question asked by picard.remi on Jul 24, 2017

I use activiti and the ReceiveTask component ( on a project and I would like to handle messages (triggered by signals) sequentially (one by one).

The behaviour I expect is :
1- Create Process
2- Go to ReceiveTask and waiting
3- Signal
4- Do Stuff
5- Go back to ReceiveTask and waiting
6- Signal

But if another signal is triggered during step 4, a second process is created in parallel, and an OptimisticLock exception logically happens (log.txt).

You can find a Java test in the zip archive, I use threads to represent signals emitted in paralell.

I have read the user guide entirely but I have not found how to manage signals sequentially. Is ReceiveTask the right component ? Do you know another alternative ? Should I use a JMS message queue (16.1.3. Message Queue based Async Executor) ?