use of org.camunda.bpm.engine.impl.migration.MigrationPlanExecutionBuilderImpl in project camunda-bpm-platform by camunda.
the class MigrationBatchJobHandler method execute.
@Override
public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) {
ByteArrayEntity configurationEntity = commandContext.getDbEntityManager().selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId());
MigrationBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes());
MigrationPlanExecutionBuilder executionBuilder = commandContext.getProcessEngineConfiguration().getRuntimeService().newMigration(batchConfiguration.getMigrationPlan()).processInstanceIds(batchConfiguration.getIds());
if (batchConfiguration.isSkipCustomListeners()) {
executionBuilder.skipCustomListeners();
}
if (batchConfiguration.isSkipIoMappings()) {
executionBuilder.skipIoMappings();
}
// uses internal API in order to skip writing user operation log (CommandContext#disableUserOperationLog
// is not sufficient with legacy engine config setting "restrictUserOperationLogToAuthenticatedUsers" = false)
((MigrationPlanExecutionBuilderImpl) executionBuilder).execute(false);
commandContext.getByteArrayManager().delete(configurationEntity);
}
Aggregations