-
Type:
Bug Report
-
Resolution: Fixed
-
Priority:
L3 - Default
-
Affects Version/s: 7.5.0-alpha4
-
Component/s: engine
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);
}