Search in sources :

Example 1 with MigrationInstructionGenerator

use of org.camunda.bpm.engine.impl.migration.MigrationInstructionGenerator in project camunda-bpm-platform by camunda.

the class CreateMigrationPlanCmd method generateInstructions.

protected List<MigrationInstruction> generateInstructions(CommandContext commandContext, ProcessDefinitionImpl sourceProcessDefinition, ProcessDefinitionImpl targetProcessDefinition, boolean updateEventTriggers) {
    ProcessEngineConfigurationImpl processEngineConfiguration = commandContext.getProcessEngineConfiguration();
    // generate instructions
    MigrationInstructionGenerator migrationInstructionGenerator = processEngineConfiguration.getMigrationInstructionGenerator();
    ValidatingMigrationInstructions generatedInstructions = migrationInstructionGenerator.generate(sourceProcessDefinition, targetProcessDefinition, updateEventTriggers);
    // filter only valid instructions
    generatedInstructions.filterWith(processEngineConfiguration.getMigrationInstructionValidators());
    return generatedInstructions.asMigrationInstructions();
}
Also used : MigrationInstructionGenerator(org.camunda.bpm.engine.impl.migration.MigrationInstructionGenerator) ValidatingMigrationInstructions(org.camunda.bpm.engine.impl.migration.validation.instruction.ValidatingMigrationInstructions) ProcessEngineConfigurationImpl(org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)

Aggregations

ProcessEngineConfigurationImpl (org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl)1 MigrationInstructionGenerator (org.camunda.bpm.engine.impl.migration.MigrationInstructionGenerator)1 ValidatingMigrationInstructions (org.camunda.bpm.engine.impl.migration.validation.instruction.ValidatingMigrationInstructions)1