Open abarazal opened 4 years ago
Hi,
The simpleLog async service task is set to exclusive = false, which means that they can be executed at the same time by the async executor. When this happens they will at the same time try to update the parent multi instance execution and that's why the optimistic locking exception is thrown. When you change exclusive to true this is not expected to happen.
Reopening since we would like to have an ability like the Parallel gateway async join. This new feature would make sure that multi instance activities can run not exclusively in parallel and thus avoiding a FlowableOptimisticLockingException
@tijsrademakers @filiphr Any update on the above open issue? We have a different use case, albeit with the same issue where we want to be able to run in parallel with multi instance activities and not be able to run exclusively.
Describe the bug Given the flow below, we experience a problem with concurrency when executing the “simpleLog” (async) service task in parallel with cardinality = 5, after which the flow does not continue with the “dummy” (exclusive) service task of the next step nor retry the job in “simpleLog”. Instead, we get 4 FlowableOptimisticLockingException.
What could be wrong here? Should flowable retry 3 times after FlowableOptimisticLockingException as we have read here: https://flowable.com/open-source/docs/bpmn/ch07b-BPMN-Constructs/#fail-retry ? Why the flow does not continue?
Expected behavior To be detailed, “simpleLog” only prints some hardcoded string, sleeps 3 seconds (to simulate a real task) and shows another hardcoded string. “dummy” shows another text and “finalLog” shows all global variables.
Code
Additional context Flowable version: 6.4.2 Database vendor: Oracle We are using Flowable with Spring Boot