Service task in parallel gateway are failing randomly.
-
method call A and method call B are using expression to resolve a method.
-
expression used in methodCallA is #{beanA.methodA}
-
expression used in methodCallB is #{beanA.methodB}
-
beanA is singleton bean. (is there something do with this ? I hope not)
-
both method just logs a line to the output, nothing much is done.
-
upon triggering the workflow, either of methodA/methodB is failed randomly.
-
job is moved to deadletter job and upon retrying the job, its passed.
Why is this happening.? why is the job failing in the first place even after marking all the steps as async and exclusive.?
Below are the logs captured after setting debug level log
org.flowable.common.engine.api.FlowableOptimisticLockingException: Could not lock process instance
at org.flowable.engine.impl.persistence.entity.data.impl.MybatisExecutionDataManager.updateProcessInstanceLockTime(MybatisExecutionDataManager.java:328)
at org.flowable.engine.impl.persistence.entity.ExecutionEntityManagerImpl.updateProcessInstanceLockTime(ExecutionEntityManagerImpl.java:980)
at org.flowable.engine.impl.cfg.DefaultInternalJobManager.lockJobScope(DefaultInternalJobManager.java:148)
at org.flowable.job.service.impl.cmd.LockExclusiveJobCmd.execute(LockExclusiveJobCmd.java:56)
at org.flowable.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:51)
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:93)
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:72)
at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:56)
at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:25)
at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53)
at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:72)
at org.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:56)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)