Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-7598

MigrationManager allows nodeInstance which cannot find upgradedNode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.11.0.Final
    • 7.9.0.Final
    • Runtime Engine
    • None
    • 1
    • NEW
    • NEW
      • See Unit test in PR
    • 2018 Week 30-32, 2018 Week 33-35

    Description

      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.

      https://github.com/kiegroup/jbpm/blob/master/jbpm-runtime-manager/src/main/java/org/jbpm/runtime/manager/impl/migration/MigrationManager.java#L403

      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?

      Attachments

        Issue Links

          Activity

            People

              swiderski.maciej Maciej Swiderski (Inactive)
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: