@Test public void addJobHandler() { JobHandler<?> jobHandler = mock(JobHandler.class); when(jobHandler.getType()).thenReturn("MockHandler"); setField(jobConfiguration, "customJobHandlers", Arrays.<JobHandler<?>> asList(jobHandler)); assertThat(processEngineConfiguration.getCustomJobHandlers()).isNull(); jobConfiguration.registerCustomJobHandlers(processEngineConfiguration); assertThat(processEngineConfiguration.getCustomJobHandlers()).containsOnly(jobHandler); }
protected void registerCustomJobHandlers(SpringProcessEngineConfiguration configuration) { configuration.setCustomJobHandlers(join(configuration.getCustomJobHandlers(), customJobHandlers)); for (JobHandler<?> jobHandler : configuration.getCustomJobHandlers()) { logger.info("Register Custom JobHandler: '{}'", jobHandler.getType()); } }
DefaultJobConfiguration extends AbstractCamundaConfiguration implements CamundaJobConfiguration { protected void registerCustomJobHandlers(SpringProcessEngineConfiguration configuration) { configuration.setCustomJobHandlers(join(configuration.getCustomJobHandlers(), customJobHandlers)); for (JobHandler<?> jobHandler : configuration.getCustomJobHandlers()) { logger.info("Register Custom JobHandler: '{}'", jobHandler.getType()); } } }
DefaultJobConfiguration extends AbstractCamundaConfiguration implements CamundaJobConfiguration { protected void registerCustomJobHandlers(SpringProcessEngineConfiguration configuration) { configuration.setCustomJobHandlers(join(configuration.getCustomJobHandlers(), customJobHandlers)); for (JobHandler<?> jobHandler : configuration.getCustomJobHandlers()) { logger.info("Register Custom JobHandler: '{}'", jobHandler.getType()); } }  }
DefaultJobConfiguration extends AbstractCamundaConfiguration implements CamundaJobConfiguration { protected void registerCustomJobHandlers(SpringProcessEngineConfiguration configuration) { configuration.setCustomJobHandlers(join(configuration.getCustomJobHandlers(), customJobHandlers)); for (JobHandler<?> jobHandler : configuration.getCustomJobHandlers()) { logger.info("Register Custom JobHandler: '{}'", jobHandler.getType()); } }  @Override void preInit(final SpringProcessEngineConfiguration configuration); }
DefaultJobConfiguration extends AbstractCamundaConfiguration implements CamundaJobConfiguration { protected void registerCustomJobHandlers(SpringProcessEngineConfiguration configuration) { configuration.setCustomJobHandlers(join(configuration.getCustomJobHandlers(), customJobHandlers)); for (JobHandler<?> jobHandler : configuration.getCustomJobHandlers()) { logger.info("Register Custom JobHandler: '{}'", jobHandler.getType()); } }  @Override void preInit(final SpringProcessEngineConfiguration configuration);  }