Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-5916

Migration does not load definitions from database if not present in the deployment cache

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.5.0, 7.5.0-alpha5
    • 7.5.0-alpha4
    • 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);
      }
      

        This is the controller panel for Smart Panels app

              christopher.zell Christopher Kujawa
              sebastian.menski Sebastian Menski
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: