-
Bug
-
Resolution: Done
-
Major
-
7.9.0.Final
-
None
-
1
-
NEW
-
NEW
-
- See Unit test in PR
-
2018 Week 30-32, 2018 Week 33-35
During process instance migration, MigrationManager tries to find "upgradedNode" which meets UniqueId of old node. If upgradedNode is not found and NodeMapping is not provided, finally MigrationManager leaves the old nodeInstance as is.
It will result in an issue after migration.
If the node order in BPMN2 file has changed, the old nodeInstance will connected to a different node. For example, nodeInstance of HumanTaskNode may connected to EndNode so result in ClassCastException.
2018-08-07 14:17:04,677 [main|org.drools.persistence.PersistableRunner] WARN Could not commit session java.lang.ClassCastException: org.jbpm.workflow.core.node.EndNode cannot be cast to org.jbpm.workflow.core.node.HumanTaskNode at org.jbpm.workflow.instance.node.HumanTaskNodeInstance.getHumanTaskNode(HumanTaskNodeInstance.java:33) ~[jbpm-flow-7.9.0-SNAPSHOT.jar:7.9.0-SNAPSHOT] at org.jbpm.workflow.instance.node.HumanTaskNodeInstance.triggerCompleted(HumanTaskNodeInstance.java:86) ~[jbpm-flow-7.9.0-SNAPSHOT.jar:7.9.0-SNAPSHOT] at org.jbpm.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:396) ~[jbpm-flow-7.9.0-SNAPSHOT.jar:7.9.0-SNAPSHOT] at org.jbpm.workflow.instance.node.WorkItemNodeInstance.signalEvent(WorkItemNodeInstance.java:371) ~[jbpm-flow-7.9.0-SNAPSHOT.jar:7.9.0-SNAPSHOT] at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:597) ~[jbpm-flow-7.9.0-SNAPSHOT.jar:7.9.0-SNAPSHOT] at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:167) ~[drools-persistence-jpa-7.9.0-SNAPSHOT.jar:7.9.0-SNAPSHOT] ... at org.jbpm.kie.services.impl.UserTaskServiceImpl.completeAutoProgress(UserTaskServiceImpl.java:231) [classes/:na] at org.jbpm.kie.services.impl.admin.ProcessInstanceMigrationServiceImplTest.assertMigratedTaskAndComplete(ProcessInstanceMigrationServiceImplTest.java:291) [test-classes/:na] at org.jbpm.kie.services.impl.admin.ProcessInstanceMigrationServiceImplTest.testMigrateSingleProcessInstanceWithoutNodeMappingWithNodeOrderChange(ProcessInstanceMigrationServiceImplTest.java:271) [test-classes/:na]
Shouldn't MigrationManager do fail-fast in this case?
- is incorporated by
-
RHPAM-1458 MigrationManager allows nodeInstance which cannot find upgradedNode
- Closed