use of org.camunda.bpm.engine.impl.migration.validation.instruction.MigrationInstructionValidator in project camunda-bpm-platform by camunda.
the class CreateMigrationPlanCmd method validateMigrationPlan.
protected void validateMigrationPlan(CommandContext commandContext, MigrationPlanImpl migrationPlan, ProcessDefinitionImpl sourceProcessDefinition, ProcessDefinitionImpl targetProcessDefinition) {
List<MigrationInstructionValidator> migrationInstructionValidators = commandContext.getProcessEngineConfiguration().getMigrationInstructionValidators();
MigrationPlanValidationReportImpl planReport = new MigrationPlanValidationReportImpl(migrationPlan);
ValidatingMigrationInstructions validatingMigrationInstructions = wrapMigrationInstructions(migrationPlan, sourceProcessDefinition, targetProcessDefinition, planReport);
for (ValidatingMigrationInstruction validatingMigrationInstruction : validatingMigrationInstructions.getInstructions()) {
MigrationInstructionValidationReportImpl instructionReport = validateInstruction(validatingMigrationInstruction, validatingMigrationInstructions, migrationInstructionValidators);
if (instructionReport.hasFailures()) {
planReport.addInstructionReport(instructionReport);
}
}
if (planReport.hasInstructionReports()) {
throw LOG.failingMigrationPlanValidation(planReport);
}
}
use of org.camunda.bpm.engine.impl.migration.validation.instruction.MigrationInstructionValidator in project camunda-bpm-platform by camunda.
the class ProcessEngineConfigurationImpl method getDefaultMigrationInstructionValidators.
public List<MigrationInstructionValidator> getDefaultMigrationInstructionValidators() {
List<MigrationInstructionValidator> migrationInstructionValidators = new ArrayList<MigrationInstructionValidator>();
migrationInstructionValidators.add(new SameBehaviorInstructionValidator());
migrationInstructionValidators.add(new SameEventTypeValidator());
migrationInstructionValidators.add(new OnlyOnceMappedActivityInstructionValidator());
migrationInstructionValidators.add(new CannotAddMultiInstanceBodyValidator());
migrationInstructionValidators.add(new CannotAddMultiInstanceInnerActivityValidator());
migrationInstructionValidators.add(new CannotRemoveMultiInstanceInnerActivityValidator());
migrationInstructionValidators.add(new GatewayMappingValidator());
migrationInstructionValidators.add(new SameEventScopeInstructionValidator());
migrationInstructionValidators.add(new UpdateEventTriggersValidator());
migrationInstructionValidators.add(new AdditionalFlowScopeInstructionValidator());
migrationInstructionValidators.add(new ConditionalEventUpdateEventTriggerValidator());
return migrationInstructionValidators;
}
Aggregations