@Before public void saveBatchJobsPerSeed() { defaultBatchJobsPerSeed = engineRule.getProcessEngineConfiguration().getBatchJobsPerSeed(); }
@Before public void storeEngineSettings() { ProcessEngineConfigurationImpl configuration = engineRule.getProcessEngineConfiguration(); defaultBatchJobsPerSeed = configuration.getBatchJobsPerSeed(); defaultInvocationsPerBatchJob = configuration.getInvocationsPerBatchJob(); }
@Before public void saveAndReduceBatchJobsPerSeed() { ProcessEngineConfigurationImpl configuration = engineRule.getProcessEngineConfiguration(); defaultBatchJobsPerSeed = configuration.getBatchJobsPerSeed(); // reduce number of batch jobs per seed to not have to create a lot of instances configuration.setBatchJobsPerSeed(10); }
@Before public void storeEngineSettings() { ProcessEngineConfigurationImpl configuration = engineRule.getProcessEngineConfiguration(); defaultBatchJobsPerSeed = configuration.getBatchJobsPerSeed(); defaultInvocationsPerBatchJob = configuration.getInvocationsPerBatchJob(); }
@Before public void saveAndReduceBatchJobsPerSeed() { ProcessEngineConfigurationImpl configuration = engineRule.getProcessEngineConfiguration(); defaultBatchJobsPerSeed = configuration.getBatchJobsPerSeed(); // reduce number of batch jobs per seed to not have to create a lot of instances configuration.setBatchJobsPerSeed(1); }
protected BatchEntity createBatch(CommandContext commandContext, Collection<String> processInstanceIds) { ProcessEngineConfigurationImpl processEngineConfiguration = commandContext.getProcessEngineConfiguration(); BatchJobHandler<SetRetriesBatchConfiguration> batchJobHandler = getBatchJobHandler(processEngineConfiguration); SetRetriesBatchConfiguration configuration = new SetRetriesBatchConfiguration(new ArrayList<String>(processInstanceIds), builder.getRetries()); BatchEntity batch = new BatchEntity(); batch.setType(batchJobHandler.getType()); batch.setTotalJobs(calculateSize(processEngineConfiguration, configuration)); batch.setBatchJobsPerSeed(processEngineConfiguration.getBatchJobsPerSeed()); batch.setInvocationsPerBatchJob(processEngineConfiguration.getInvocationsPerBatchJob()); batch.setConfigurationBytes(batchJobHandler.writeConfiguration(configuration)); commandContext.getBatchManager().insertBatch(batch); return batch; }
@Before public void saveAndReduceBatchConfiguration() { ProcessEngineConfigurationImpl configuration = engineRule.getProcessEngineConfiguration(); defaultBatchJobsPerSeed = configuration.getBatchJobsPerSeed(); defaultBatchJobPriority = configuration.getBatchJobPriority(); // reduce number of batch jobs per seed to not have to create a lot of instances configuration.setBatchJobsPerSeed(1); }
protected BatchEntity createBatch(CommandContext commandContext, Collection<String> processInstanceIds) { ProcessEngineConfigurationImpl processEngineConfiguration = commandContext.getProcessEngineConfiguration(); BatchJobHandler<SetRetriesBatchConfiguration> batchJobHandler = getBatchJobHandler(processEngineConfiguration); SetRetriesBatchConfiguration configuration = new SetRetriesBatchConfiguration(new ArrayList<String>(processInstanceIds), builder.getRetries()); BatchEntity batch = new BatchEntity(); batch.setType(batchJobHandler.getType()); batch.setTotalJobs(calculateSize(processEngineConfiguration, configuration)); batch.setBatchJobsPerSeed(processEngineConfiguration.getBatchJobsPerSeed()); batch.setInvocationsPerBatchJob(processEngineConfiguration.getInvocationsPerBatchJob()); batch.setConfigurationBytes(batchJobHandler.writeConfiguration(configuration)); commandContext.getBatchManager().insertBatch(batch); return batch; }
protected BatchEntity createBatch(CommandContext commandContext, Collection<String> processInstanceIds) { ProcessEngineConfigurationImpl processEngineConfiguration = commandContext.getProcessEngineConfiguration(); BatchJobHandler batchJobHandler = getBatchJobHandler(processEngineConfiguration); BatchConfiguration configuration = getAbstractIdsBatchConfiguration(new ArrayList<String>(processInstanceIds)); BatchEntity batch = new BatchEntity(); batch.setType(batchJobHandler.getType()); batch.setTotalJobs(calculateSize(processEngineConfiguration, (UpdateProcessInstancesSuspendStateBatchConfiguration) configuration)); batch.setBatchJobsPerSeed(processEngineConfiguration.getBatchJobsPerSeed()); batch.setInvocationsPerBatchJob(processEngineConfiguration.getInvocationsPerBatchJob()); batch.setConfigurationBytes(batchJobHandler.writeConfiguration(configuration)); commandContext.getBatchManager().insertBatch(batch); return batch; }
protected BatchEntity createBatch(CommandContext commandContext, Collection<String> processInstanceIds) { ProcessEngineConfigurationImpl processEngineConfiguration = commandContext.getProcessEngineConfiguration(); BatchJobHandler batchJobHandler = getBatchJobHandler(processEngineConfiguration); BatchConfiguration configuration = getAbstractIdsBatchConfiguration(new ArrayList<String>(processInstanceIds)); BatchEntity batch = new BatchEntity(); batch.setType(batchJobHandler.getType()); batch.setTotalJobs(calculateSize(processEngineConfiguration, (UpdateProcessInstancesSuspendStateBatchConfiguration) configuration)); batch.setBatchJobsPerSeed(processEngineConfiguration.getBatchJobsPerSeed()); batch.setInvocationsPerBatchJob(processEngineConfiguration.getInvocationsPerBatchJob()); batch.setConfigurationBytes(batchJobHandler.writeConfiguration(configuration)); commandContext.getBatchManager().insertBatch(batch); return batch; }
@Before public void storeEngineSettings() { processEngineConfiguration = rule.getProcessEngineConfiguration(); defaultBatchJobsPerSeed = processEngineConfiguration.getBatchJobsPerSeed(); defaultInvocationsPerBatchJob = processEngineConfiguration.getInvocationsPerBatchJob(); defaultEnsureJobDueDateSet = processEngineConfiguration.isEnsureJobDueDateNotNull(); processEngineConfiguration.setEnsureJobDueDateNotNull(ensureJobDueDateSet); }
@Before public void storeEngineSettings() { configuration = rule.getProcessEngineConfiguration(); defaultEnsureJobDueDateSet = configuration.isEnsureJobDueDateNotNull(); defaultBatchJobsPerSeed = configuration.getBatchJobsPerSeed(); defaultInvocationsPerBatchJob = configuration.getInvocationsPerBatchJob(); configuration.setEnsureJobDueDateNotNull(ensureJobDueDateSet); }
@Before public void storeEngineSettings() { configuration = engineRule.getProcessEngineConfiguration(); defaultBatchJobsPerSeed = configuration.getBatchJobsPerSeed(); defaultInvocationsPerBatchJob = configuration.getInvocationsPerBatchJob(); defaultEnsureJobDueDateSet = configuration.isEnsureJobDueDateNotNull(); configuration.setEnsureJobDueDateNotNull(ensureJobDueDateSet); }
@Before public void storeEngineSettings() { configuration = rule.getProcessEngineConfiguration(); defaultBatchJobsPerSeed = configuration.getBatchJobsPerSeed(); defaultInvocationsPerBatchJob = configuration.getInvocationsPerBatchJob(); defaultEnsureJobDueDateSet = configuration.isEnsureJobDueDateNotNull(); configuration.setEnsureJobDueDateNotNull(ensureJobDueDateSet); }
protected BatchEntity createBatch(CommandContext commandContext, List<AbstractProcessInstanceModificationCommand> instructions, Collection<String> processInstanceIds, ProcessDefinitionEntity processDefinition) { ProcessEngineConfigurationImpl processEngineConfiguration = commandContext.getProcessEngineConfiguration(); BatchJobHandler<ModificationBatchConfiguration> batchJobHandler = getBatchJobHandler(processEngineConfiguration); ModificationBatchConfiguration configuration = new ModificationBatchConfiguration(new ArrayList<String>(processInstanceIds), builder.getProcessDefinitionId(), instructions, builder.isSkipCustomListeners(), builder.isSkipIoMappings()); BatchEntity batch = new BatchEntity(); batch.setType(batchJobHandler.getType()); batch.setTotalJobs(calculateSize(processEngineConfiguration, configuration)); batch.setBatchJobsPerSeed(processEngineConfiguration.getBatchJobsPerSeed()); batch.setInvocationsPerBatchJob(processEngineConfiguration.getInvocationsPerBatchJob()); batch.setConfigurationBytes(batchJobHandler.writeConfiguration(configuration)); batch.setTenantId(processDefinition.getTenantId()); commandContext.getBatchManager().insertBatch(batch); return batch; }
protected BatchEntity createBatch(CommandContext commandContext, List<AbstractProcessInstanceModificationCommand> instructions, Collection<String> processInstanceIds, ProcessDefinitionEntity processDefinition) { ProcessEngineConfigurationImpl processEngineConfiguration = commandContext.getProcessEngineConfiguration(); BatchJobHandler<ModificationBatchConfiguration> batchJobHandler = getBatchJobHandler(processEngineConfiguration); ModificationBatchConfiguration configuration = new ModificationBatchConfiguration(new ArrayList<String>(processInstanceIds), builder.getProcessDefinitionId(), instructions, builder.isSkipCustomListeners(), builder.isSkipIoMappings()); BatchEntity batch = new BatchEntity(); batch.setType(batchJobHandler.getType()); batch.setTotalJobs(calculateSize(processEngineConfiguration, configuration)); batch.setBatchJobsPerSeed(processEngineConfiguration.getBatchJobsPerSeed()); batch.setInvocationsPerBatchJob(processEngineConfiguration.getInvocationsPerBatchJob()); batch.setConfigurationBytes(batchJobHandler.writeConfiguration(configuration)); batch.setTenantId(processDefinition.getTenantId()); commandContext.getBatchManager().insertBatch(batch); return batch; }
@Test public void testDefaultBatchConfiguration() { ProcessEngineConfigurationImpl configuration = engineRule.getProcessEngineConfiguration(); assertEquals(100, configuration.getBatchJobsPerSeed()); assertEquals(1, configuration.getInvocationsPerBatchJob()); assertEquals(30, configuration.getBatchPollTime()); }
protected BatchEntity createBatch(CommandContext commandContext, List<String> ids) { ProcessEngineConfigurationImpl processEngineConfiguration = commandContext.getProcessEngineConfiguration(); BatchJobHandler batchJobHandler = getBatchJobHandler(processEngineConfiguration); BatchConfiguration configuration = getAbstractIdsBatchConfiguration(ids); BatchEntity batch = new BatchEntity(); batch.setType(batchJobHandler.getType()); batch.setTotalJobs(calculateSize(processEngineConfiguration, configuration)); batch.setBatchJobsPerSeed(processEngineConfiguration.getBatchJobsPerSeed()); batch.setInvocationsPerBatchJob(processEngineConfiguration.getInvocationsPerBatchJob()); batch.setConfigurationBytes(batchJobHandler.writeConfiguration(configuration)); commandContext.getBatchManager().insertBatch(batch); return batch; }
protected BatchEntity createBatch(CommandContext commandContext, List<String> ids) { ProcessEngineConfigurationImpl processEngineConfiguration = commandContext.getProcessEngineConfiguration(); BatchJobHandler batchJobHandler = getBatchJobHandler(processEngineConfiguration); BatchConfiguration configuration = getAbstractIdsBatchConfiguration(ids); BatchEntity batch = new BatchEntity(); batch.setType(batchJobHandler.getType()); batch.setTotalJobs(calculateSize(processEngineConfiguration, configuration)); batch.setBatchJobsPerSeed(processEngineConfiguration.getBatchJobsPerSeed()); batch.setInvocationsPerBatchJob(processEngineConfiguration.getInvocationsPerBatchJob()); batch.setConfigurationBytes(batchJobHandler.writeConfiguration(configuration)); commandContext.getBatchManager().insertBatch(batch); return batch; }
protected BatchEntity createBatch(CommandContext commandContext, List<AbstractProcessInstanceModificationCommand> instructions, List<String> processInstanceIds, ProcessDefinitionEntity processDefinition) { ProcessEngineConfigurationImpl processEngineConfiguration = commandContext.getProcessEngineConfiguration(); BatchJobHandler<RestartProcessInstancesBatchConfiguration> batchJobHandler = getBatchJobHandler(processEngineConfiguration); RestartProcessInstancesBatchConfiguration configuration = new RestartProcessInstancesBatchConfiguration( processInstanceIds, instructions, builder.getProcessDefinitionId(), builder.isInitialVariables(), builder.isSkipCustomListeners(), builder.isSkipIoMappings(), builder.isWithoutBusinessKey()); BatchEntity batch = new BatchEntity(); batch.setType(batchJobHandler.getType()); batch.setTotalJobs(calculateSize(processEngineConfiguration, configuration)); batch.setBatchJobsPerSeed(processEngineConfiguration.getBatchJobsPerSeed()); batch.setInvocationsPerBatchJob(processEngineConfiguration.getInvocationsPerBatchJob()); batch.setConfigurationBytes(batchJobHandler.writeConfiguration(configuration)); batch.setTenantId(processDefinition.getTenantId()); commandContext.getBatchManager().insertBatch(batch); return batch; }