Comments (1)
This works as designed.
What you have explained is valid optimistic lock that makes sure that Flowable stays in a consistent state. There is nothing wrong in the DbSqlSession
since it is never been accessed concurrently from different threads.
The reason why you are seeing the optimistic locking exception is due to the fact that the second step is going to actually try and delete the "Share Task", this will trigger a deletion of the execution for the "NotCancelActivity" execution. However, in step 1 the "NotCancelActivity" will actually be deleted since it will be executed.
When the execution happens in the same time both threads are going to read REV_=1 for the "NotCancelActivity" execution. Depending on which thread finishes first there would either be an optimistic lock exception on the first or the second step.
If Step 1 finishes first, then in Step 2 when trying to delete "NotCancelActivity" it will try to delete the execution with the appropriate id and revision 1. However, that execution no longer exists and thus an optimistic lock exception is thrown.
If Step 2 finishes first, then in Steps when trying to delete the "Share Task" and its associated "NotCancelActivity" execution, a similar thing happens. There is no execution for "NotCancelActivity" anymore and thus there is an optimistic lock exception.
Since this works as designed we are going to close this. However, feel free what you think should happen and how an optimistic locking exception can be avoided here.
from flowable-engine.
Related Issues (20)
- about startProceessInstanceAsync API HOT 1
- realease6.8.1 has a bug ,because The rollback Cannot roll back correctly in the case of multiple instances,please fix soon HOT 1
- flowable-ui的版本和flowable-engine的版本不太一致
- Delay in seconds before script condition executed HOT 6
- task complete before report NoSuchMethodError: org.flowable.bpmn.model.UserTask.getTaskCompleterVariableName() , flowable version: 7.0.1 HOT 2
- Flowable 7.0.1 not getting installed in ecliupse HOT 1
- Conditions should support more than JUEL expressions
- suspendProcessInstanceById question
- BpmnXMLUtil.parseExtensionElement setElementText has bug of Line wrap cover HOT 1
- Process migration cannot migrate processes HOT 1
- Process definition id of an async external worker service task job is not updated after direct migration HOT 2
- 是否有审批人驳回到上级,上级修改后在发起继续审批流程 HOT 1
- Invalid SQL upgrade scripts for HSQL database (7.0.0 -> 7.0.1)
- The DefaultIdentityLinkIterceptor.java creates duplicate identityLinks on ProcessInstance
- AsyncTaskInvokerTaskExecutor supplied by Spring Boot autoconfiguration is not started
- Not possible to exclude the `flowable-event-registry` JAR even if EventRegistry disabled
- startProcessInstanceByKey does not always trigger the process HOT 3
- Liquibase first up does not work with JtaProcessEngineConfiguration HOT 1
- Timer job never unlocked after an exception
- Query the sorting exception of HistoricActivityInstance
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowable-engine.