7 Replies Latest reply on May 14, 2015 2:00 AM by Maciej Swiderski

    Parallel async tasks

    Adrian Ch Newbie

      I have a very simple process, it looks similar to this process:

      parallel-process.png

      Both parallel tasks are async. I have done some tests and I got stuck with race condition. Two threads want to change the state of the same process at the same time. I get Optimistic lock exception. I know that in a production environment, such situation will be rare, but I want to be prepared for that kind of situation. So I’m wondering if there is a solution in jbpm which can be applied out of the box? I have done some research and unfortunately I didn’t find any.

       

      Also I tried to rewrite query which gets RequestInfo records to be more aware of currently executing processes but without success.