01-03-2018 04:20 AM
Good morning,
to upgrade, we followed the migration guide at the following link:
https://www.activiti.org/migration.html#_v5_compatibility
Including the part concerning compatibility with Activiti 5.
To date, we use a series of workflows that have sub-workflows within them.
After upgrading to Activiti 6, we encountered some issues and decided to run some tests.
Below I describe how much we have deduced:
1)
There is a workflow that was started before the upgrade to Activiti 6.
After updating and after reloading all workflows with engine 6, I see the flag in the db, we have continued the workflow.
However, once you get to the sub-workflow, when you try to start it, the application goes into error with the following exception:
16:06:28,162 ERROR [org.activiti.engine.impl.interceptor.CommandContext] (http-/127.0.0.1:8080-92) Error while closing command context: org.activiti.engine.ActivitiException: couldn't execute activity <callActivity id="callactivity4" ...>: org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntityImpl cannot be cast to org.activiti5.engine.impl.persistence.entity.ProcessDefinitionEntity
at org.activiti.compatibility.DefaultActiviti5CompatibilityHandler.handleActivitiException(DefaultActiviti5CompatibilityHandler.java:997) [activiti5-compatibility-6.0.0.jar:]
at org.activiti.compatibility.DefaultActiviti5CompatibilityHandler.completeTask(DefaultActiviti5CompatibilityHandler.java:507) [activiti5-compatibility-6.0.0.jar:]
at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:52) [activiti-engine-6.0.0.jar:6.0.0]
at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:25) [activiti-engine-6.0.0.jar:6.0.0]
at org.activiti.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:56) [activiti-engine-6.0.0.jar:6.0.0]
at org.activiti.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:37) [activiti-engine-6.0.0.jar:6.0.0]
at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:78) [activiti-engine-6.0.0.jar:6.0.0]
at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:57) [activiti-engine-6.0.0.jar:6.0.0]
at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:42) [activiti-engine-6.0.0.jar:6.0.0]
at org.activiti.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:48) [activiti-engine-6.0.0.jar:6.0.0]
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:63) [activiti-engine-6.0.0.jar:6.0.0]
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47) [activiti-spring-6.0.0.jar:6.0.0]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) [spring-tx-3.2.7.RELEASE.jar:3.2.7.RELEASE]
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45) [activiti-spring-6.0.0.jar:6.0.0]
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:29) [activiti-engine-6.0.0.jar:6.0.0]
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:44) [activiti-engine-6.0.0.jar:6.0.0]
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:39) [activiti-engine-6.0.0.jar:6.0.0]
at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:186) [activiti-engine-6.0.0.jar:6.0.0]
2)
We decided to load only the sub-workflow with the Activiti Engine 5 mode, as described in the documentation:
deploymentProperty(DeploymentProperties.DEPLOY_AS_ACTIVITI5_PROCESS_DEFINITION, Boolean.TRUE
As regards the workflow started before the update to activiti 6, the start of the sub-workflow occurred without errors.
However, having started a new instance of the same workflow, when it arrives at the sub-workflow and tries to start it, it goes into error with the following exception:
Error while closing command context: org.activiti.engine.ActivitiException: No start element found for process definitionubblicazione:10:198564 --> Where Pubblicazione is sub-workflow name (defined into activiti.act_re_procdef table)
To solve the problem and still be able to use the entire workflow system, we reloaded all workflows with activiti5,
deploymentProperty(DeploymentProperties.DEPLOY_AS_ACTIVITI5_PROCESS_DEFINITION, Boolean.TRUE, so that both the new and the old workflows are able to perform the sub-workflows, complete all the tasks and finish.
From our point of view it seems a compatibility bug.
We hope to have been useful and to have helped you to identify and solve the problem.
I hope you can look into the matter and provide us with support in this regard.
Thanks in advance
04-19-2018 03:06 AM
05-01-2020 12:24 PM
Facing same issue (Activiti upgrade from Activiti 5.15 to Activiti 6)
Any Suggestion, It is working fine with 5.xx but issue with 6.00
Explore our Alfresco products with the links below. Use labels to filter content by product module.