I'm currently evaluating jBPM for project and I have some questions :
Suppose 2 java processes A and B trying to access concurrently the same jBPM process instance. They both begin a transaction, read the processInstance, try to execute a transition and then save and commit the changes. As I understand, one process will fail commiting the change since the other one already did it.
Is there a way to know before committing that the processInstance is being modified ? I suppose no but, is there a pessimistic locking possible ? Or a pattern to solve the problem ?
Is there a release date for 3.1 version ?
Is it possible to define multiple jBPM Command Executor in a cluster ?
Thanks in advance,
You will have to lock on the processInstance before you signal a workflow. Use Hibernate mechs http://www.hibernate.org/hib_docs/v3/reference/en/html/transactions.html#transactions-locking or your own locking service.
Command Executor in a cluster