Today i upgraded the flowable versions from 5.23 to 6.1.0.
I made the necessary changes in the spring-configuration.xml
When i ran the processEngine, I got this exception
Caused by: org.flowable.engine.common.api.FlowableException: Found v5 process definitions that are the latest version. Enable the ‘flowable5CompatibilityEnabled’ property in the process engine configuration and make sure the flowable5-compatibility dependency is available on the classpath
So i added the property and dependency as mentioned above. Now i get this exception.
Caused by: org.activiti.engine.ActivitiException: Unsupported process engine configuration
I am using Spring Integration and the config is as below
Make sure you have the flowable5-compatibility and the flowable5-spring-compatibility dependencies on your classpath. You only need to have these dependencies when the flowable5CompatibilityEnabled property is set to true, that’s why they are not required dependency for the Flowable 6 Engine.
I have managed to run the engine successfully by adding the dependencies. I have redeployed the process definitions in v6. I have also changed all the package names from org.activiti to org.flowable.However, when i try to do updates on a task of process v5, then i get the following exception.
Caused by: org.activiti.engine.impl.javax.el.ELException: Cannot coerce from class org.activiti.engine.impl.persistence.entity.TaskEntity to interface org.flowable.engine.task.Task
At first try to find out whether the isue is caused by the expressionManager (put breakpoint on the exception…)
expressionManager for flowable5 processes could be set by:
set this property to org.activiti.engine.impl.el.ExpressionManager (or your custom ExpressionManager)
After doing the changes, DB upgrades successfully. Processing Engine also starts, but when actioned on any of the existing task which were created before migration getting following error
Caused by: org.activiti.engine.ActivitiException: Unknown property used in expression: ${UserAction.doUserAction(execution)}
at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:55) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.bpmn.behavior.ServiceTaskExpressionActivityBehavior.execute(ServiceTaskExpressionActivityBehavior.java:79) ~[flowable5-engine-6.5.0.jar:6.5.0]
… 62 common frames omitted
Caused by: org.flowable.common.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier ‘UserAction’
at org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstIdentifier.eval(AstIdentifier.java:97) ~[flowable-engine-common-6.5.0.jar:6.5.0]
at org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstMethod.eval(AstMethod.java:84) ~[flowable-engine-common-6.5.0.jar:6.5.0]
at org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstMethod.eval(AstMethod.java:107) ~[flowable-engine-common-6.5.0.jar:6.5.0]
at org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstEval.eval(AstEval.java:53) ~[flowable-engine-common-6.5.0.jar:6.5.0]
at org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstNode.getValue(AstNode.java:31) ~[flowable-engine-common-6.5.0.jar:6.5.0]
at org.flowable.common.engine.impl.de.odysseus.el.TreeValueExpression.getValue(TreeValueExpression.java:122) ~[flowable-engine-common-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:34) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:35) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:26) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:52) ~[flowable5-engine-6.5.0.jar:6.5.0]
… 63 common frames omitted
UserAction is the bean which I am calling from the service task. Once I upload the bpmn definition in v6, this starts to work again, without any change.
I tried to debug the issue. Not able to pin-point the issue. Here are few observations
org.flowable.common.engine.impl.de.odysseus.el.TreeValueExpression.getValue(TreeValueExpression.java:122) >> Bindings dont have values related to expression.
Because of that org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstIdentifier.eval is not able to find valueExpression. and due to that base (beanname) is passed as null to org.flowable.common.engine.impl.javax.el.getValue
To me its due to bindings in “org.flowable.common.engine.impl.de.odysseus.el.TreeValueExpression” doesn’t have appropriate values. BeanElResolver can’t resolve the bean if base is passed as null and property is passed as beanName.