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

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: 7.5.0-alpha4
    • Fix Version/s: 7.5.0, 7.5.0-alpha5
    • Component/s: engine
    • Labels:

      Description

      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);
      }
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: