Upgraded to 6.1.0 from 5.23 version problems

Hello Guys,

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

<bean id="processEngineConfiguration" class="org.flowable.spring.SpringProcessEngineConfiguration">

              <property name="dataSource" ref="dataSource" />
              <property name="transactionManager" ref="transactionManager" />
              <property name="databaseSchemaUpdate" value="true" />
              <property name="asyncExecutorActivate" value="true" />
              <property name="flowable5CompatibilityEnabled" value="true" />
              <property name="history" value="full" />

          <property name="customFormTypes">
            <list>
            </list>
          </property>
        </bean>

and my java code is

try
		{
			if(PROCESS_APPLICATION_CONTEXT==null)
			{
				PROCESS_APPLICATION_CONTEXT = new ClassPathXmlApplicationContext("classpath*:applicationContext.xml"); 
				if(PROCESS_APPLICATION_CONTEXT!=null)
				{
					PROCESS_ENGINE = (ProcessEngine) PROCESS_APPLICATION_CONTEXT.getBean("processEngine");
					REPOSITORY_SERVICE = (RepositoryService) PROCESS_APPLICATION_CONTEXT.getBean("repositoryService");
					TASK_SERVICE = (TaskService) PROCESS_APPLICATION_CONTEXT.getBean("taskService");
					HISTORY_SERVICE = (HistoryService) PROCESS_APPLICATION_CONTEXT.getBean("historyService");
					RUNTIME_SERVICE = (RuntimeService) PROCESS_APPLICATION_CONTEXT.getBean("runtimeService");
					MANAGEMENT_SERVICE = (ManagementService) PROCESS_APPLICATION_CONTEXT.getBean("managementService");
				}
			}
                        
		}
		catch(Exception e)
		{
                        System.out.println("Activiti start FAILED");
			e.printStackTrace();
		}

How to solve this issue?

Thanks.

Hi,

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.

Best regards,

Tijs

Hi Tijs,

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

Hi,

It seems like problem with the expression. Did you configure Flowable5 expressionManage too?

flowable5ExpressionManager property in process engine configuration should point to Flowable5 expression manager too.

Regards
Martin

Sorry, I haven’t done it. Can you give me the code snippet or documentation ?

Hi,

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)

Regards
Martin

Thanks will try it out and update.

Hi,

I am also trying to migration from flowable v5.22 to v6.5.
as mentioned I have also added following code for migration

processEngineConfiguration.setFlowable5CompatibilityEnabled(true);
processEngineConfiguration.setFlowable5CompatibilityHandlerFactory(springFlowable5CompatibilityHandlerFactory());
processEngineConfiguration.setFlowable5ExpressionManager(new org.activiti.engine.impl.el.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.

Hi,

try to check expression managers used in activiti and flowable. I would expect that activiti expression manager does not resolve beans.

Regards
Martin

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

Capture

The question is why base is resolved to null => BeanElResolver resolves the bean base as null, why?

Regards
Martin

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.


check:

    public DefaultExpressionManager(Map<Object, Object> beans) {

Beans which are added to expression manager.