cancel
Showing results for 
Search instead for 
Did you mean: 

How to send signal in ReciveTask At Clustered Enviorment

er3n
Champ in-the-making
Champ in-the-making
Hi, is there any way that i can control concurrency of signals that signal same activiti from different instances?
When multiple signals send to recivetask, Multiple executions start.
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
In case the second signal is called before the first signal thread returns (so when the signal's execution is still flowing), a second execution will be started indeed. But when the second execution tries to persist the process-state, it will receive a "ActivitiOptimisticLockException", rolling back all changes done.

Unless, in the case the receive-task is at the end of the process (see https://jira.codehaus.org/browse/ACT-1259) but this is a bug…

One solution would be to make the stuff that happens AFTER the signal-task (eg. a service-taks that does some magic) be marked as async:
- Disadvantage: the calling-thread that signals() the execution, will be returned, before the rest of the process is actually executed.
- Advantage: when an async-task is reached (and is only active execution), the process is persisted to the database BEFORE executing the actual stuff you wanted to do when signaled (the service task). This way, the second calling thread will get a ActivitiOptimisticLockException BEFORE it actually executed the servicetaks a second time.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.