OptimisticLockingException even on tasks not modifying data

Hi - personally I prefer to interpret the BPMN parallel gateway as indicating that the order in which tasks are performed is irrelevant and that they can even be performed concurrently. I don’t really believe it is about parallel processing in the sense of parallel threads…

Hence using a parallel path to improve processing time may be false economy. Consider the additional overheads required to manage the parallel processing; Assuming asynchronous continuations, two or more jobs need to be flushed to the database. In addition, the job executor now needs to acquire these jobs, a database read followed by locking the jobs, database write, followed by the actual execution. Then the jobs have to be deleted from the job table and a joining gateway needs to be updated.

Hence it could be that serial execution is faster than parallel execution due to lower overheads…

P.S. consider marking the join gateway as asynch before to reduce optimistic locks and thus retry of your tasks…

regards

Rob

4 Likes