Created a bpmn process flow with parallel multi instance call activity, the process is executing but getting Optimistic Locking Exception warning multiple times.
Added Async continuation (after and exclusive) in call activity and all service methods
this warning causes any issues ?
please suggest some solution to resolve the OLE warnings.
Callactivity.bpmn (9.0 KB)
Hey @V_Sri - you might find this excellent explanation from @thorben to a similar question useful:
Adding async continuations doesn’t get rid of the possibility of OLEs but will change the impact of them when they occur, by changing where the transactional boundaries are. In your case, there is a contention point where different multi-instance instances (the call activity) complete at more or less the same time. The multi-instance body is trying to update its state (number of active instances etc) as each of these finish and these updates are likely to be the source of the OLEs in your example. As per @thorben’s advice, if you put an async continuation after the end event of the call-activity then the job executor will handle the re-tries of any OLEs that the multi-instance body encounters trying to update its state and none of the transactional work in the call activity instance would be rolled back.
Other documentation that I found useful in this area
Hope that helps!