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.
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.
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.