use of org.jbpm.services.api.admin.MigrationEntry in project jbpm by kiegroup.
the class ProcessInstanceMigrationServiceImplTest method testMigrateSingleProcessInstanceWithoutNodeMappingWithNodeOrderChange.
@Test
public void testMigrateSingleProcessInstanceWithoutNodeMappingWithNodeOrderChange() {
// JBPM-7598
// RECREATEACTIVETASK_ID_V2 was modified from RECREATEACTIVETASK_ID_V1
// Remove the UserTask and recreate the same UserTask so they look same but
// - NodeId is different
// - The order of userTask in bpmn2 file is different
long processInstanceId = processService.startProcess(deploymentUnitV1.getIdentifier(), RECREATEACTIVETASK_ID_V1);
assertNotNull(processInstanceId);
MigrationReport report = migrationService.migrate(deploymentUnitV1.getIdentifier(), processInstanceId, deploymentUnitV2.getIdentifier(), RECREATEACTIVETASK_ID_V2);
assertNotNull(report);
assertFalse(report.isSuccessful());
MigrationEntry error = report.getEntries().stream().filter(e -> e.getType().equals("ERROR")).findFirst().get();
assertNotNull(error);
assertEquals("Node with id _54C7BD3A-0BE4-4C87-9689-C492B8469D2D was not found in new process definition", error.getMessage());
}
Aggregations