@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); BatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers(); commandContext.disableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true); try { commandContext.getProcessEngineConfiguration() .getHistoryService() .deleteHistoricProcessInstances(batchConfiguration.getIds()); } finally { commandContext.enableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions); } commandContext.getByteArrayManager().delete(configurationEntity); }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); BatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers(); commandContext.disableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true); try { commandContext.getProcessEngineConfiguration() .getHistoryService() .deleteHistoricDecisionInstancesBulk(batchConfiguration.getIds()); } finally { commandContext.enableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions); } commandContext.getByteArrayManager().delete(configurationEntity); }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); BatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers(); commandContext.disableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true); try { commandContext.getProcessEngineConfiguration() .getHistoryService() .deleteHistoricProcessInstances(batchConfiguration.getIds()); } finally { commandContext.enableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions); } commandContext.getByteArrayManager().delete(configurationEntity); }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); BatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers(); commandContext.disableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true); try { commandContext.getProcessEngineConfiguration() .getHistoryService() .deleteHistoricDecisionInstancesBulk(batchConfiguration.getIds()); } finally { commandContext.enableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions); } commandContext.getByteArrayManager().delete(configurationEntity); }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); SetRetriesBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers(); commandContext.disableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true); try { commandContext.getProcessEngineConfiguration() .getManagementService() .setJobRetries(batchConfiguration.getIds(), batchConfiguration.getRetries()); } finally { commandContext.enableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions); } commandContext.getByteArrayManager().delete(configurationEntity); } }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); DeleteProcessInstanceBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers(); commandContext.disableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true); try { commandContext.getProcessEngineConfiguration() .getRuntimeService() .deleteProcessInstances(batchConfiguration.getIds(), batchConfiguration.deleteReason, batchConfiguration.isSkipCustomListeners(), true, batchConfiguration.isSkipSubprocesses()); } finally { commandContext.enableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions); } commandContext.getByteArrayManager().delete(configurationEntity); }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); SetRetriesBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers(); commandContext.disableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true); try { commandContext.getProcessEngineConfiguration() .getManagementService() .setJobRetries(batchConfiguration.getIds(), batchConfiguration.getRetries()); } finally { commandContext.enableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions); } commandContext.getByteArrayManager().delete(configurationEntity); } }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); SetRetriesBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers(); commandContext.disableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true); try { commandContext.getProcessEngineConfiguration() .getExternalTaskService() .setRetries(batchConfiguration.getIds(), batchConfiguration.getRetries()); } finally { commandContext.enableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions); } commandContext.getByteArrayManager().delete(configurationEntity); }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); SetRetriesBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers(); commandContext.disableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true); try { commandContext.getProcessEngineConfiguration() .getExternalTaskService() .setRetries(batchConfiguration.getIds(), batchConfiguration.getRetries()); } finally { commandContext.enableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions); } commandContext.getByteArrayManager().delete(configurationEntity); }
@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); }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); DeleteProcessInstanceBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers(); commandContext.disableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true); try { commandContext.getProcessEngineConfiguration() .getRuntimeService() .deleteProcessInstances(batchConfiguration.getIds(), batchConfiguration.deleteReason, batchConfiguration.isSkipCustomListeners(), true, batchConfiguration.isSkipSubprocesses()); } finally { commandContext.enableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions); } commandContext.getByteArrayManager().delete(configurationEntity); }
@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); }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); ModificationBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); ModificationBuilderImpl executionBuilder = (ModificationBuilderImpl) commandContext.getProcessEngineConfiguration() .getRuntimeService() .createModification(batchConfiguration.getProcessDefinitionId()) .processInstanceIds(batchConfiguration.getIds()); executionBuilder.setInstructions(batchConfiguration.getInstructions()); if (batchConfiguration.isSkipCustomListeners()) { executionBuilder.skipCustomListeners(); } if (batchConfiguration.isSkipIoMappings()) { executionBuilder.skipIoMappings(); } executionBuilder.execute(false); commandContext.getByteArrayManager().delete(configurationEntity); }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); ModificationBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); ModificationBuilderImpl executionBuilder = (ModificationBuilderImpl) commandContext.getProcessEngineConfiguration() .getRuntimeService() .createModification(batchConfiguration.getProcessDefinitionId()) .processInstanceIds(batchConfiguration.getIds()); executionBuilder.setInstructions(batchConfiguration.getInstructions()); if (batchConfiguration.isSkipCustomListeners()) { executionBuilder.skipCustomListeners(); } if (batchConfiguration.isSkipIoMappings()) { executionBuilder.skipIoMappings(); } executionBuilder.execute(false); commandContext.getByteArrayManager().delete(configurationEntity); }
commandContext.getByteArrayManager().delete(configurationEntity);
commandContext.getByteArrayManager().delete(configurationEntity);
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); BatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers(); commandContext.disableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true); try { commandContext.getProcessEngineConfiguration() .getHistoryService() .deleteHistoricProcessInstances(batchConfiguration.getIds()); } finally { commandContext.enableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions); } commandContext.getByteArrayManager().delete(configurationEntity); }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); DeleteProcessInstanceBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers(); commandContext.disableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true); try { commandContext.getProcessEngineConfiguration() .getRuntimeService() .deleteProcessInstances(batchConfiguration.getIds(), batchConfiguration.deleteReason, batchConfiguration.isSkipCustomListeners(), true, batchConfiguration.isSkipSubprocesses()); } finally { commandContext.enableUserOperationLog(); commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions); } commandContext.getByteArrayManager().delete(configurationEntity); }
@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); }
@Override public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { ByteArrayEntity configurationEntity = commandContext .getDbEntityManager() .selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId()); ModificationBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes()); ModificationBuilderImpl executionBuilder = (ModificationBuilderImpl) commandContext.getProcessEngineConfiguration() .getRuntimeService() .createModification(batchConfiguration.getProcessDefinitionId()) .processInstanceIds(batchConfiguration.getIds()); executionBuilder.setInstructions(batchConfiguration.getInstructions()); if (batchConfiguration.isSkipCustomListeners()) { executionBuilder.skipCustomListeners(); } if (batchConfiguration.isSkipIoMappings()) { executionBuilder.skipIoMappings(); } executionBuilder.execute(false); commandContext.getByteArrayManager().delete(configurationEntity); }