-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
7.5.0-alpha4
If the a migration plan is generated with a process definition id which definition is not cached a NullPointerException is thrown. Problem the CreateMigrationPlanCmd only queries the deployment cache.
commandContext.getProcessEngineConfiguration() .getDeploymentCache().findProcessDefinitionFromCache()
Testcase to reproduce in MigrationPlanGenerationTest:
@Test
public void testDeploymentCache() {
ProcessDefinition sourceDefinition = testHelper.deployAndGetDefinition(ProcessModels.ONE_TASK_PROCESS);
ProcessDefinition targetDefinition = testHelper.deployAndGetDefinition(ProcessModels.ONE_TASK_PROCESS);
MigrationPlan migrationPlan = rule.getRuntimeService().createMigrationPlan(sourceDefinition.getId(), targetDefinition.getId())
.mapEqualActivities()
.build();
assertNotNull(migrationPlan);
rule.getProcessEngineConfiguration().getDeploymentCache().discardProcessDefinitionCache();
migrationPlan = rule.getRuntimeService().createMigrationPlan(sourceDefinition.getId(), targetDefinition.getId())
.mapEqualActivities()
.build();
assertNotNull(migrationPlan);
}