@Test public void historyEventHandlerTest() { HistoryEventHandler historyEventHandlerMock = mock(HistoryEventHandler.class); List customHandlersList = mock(List.class); when(springProcessEngineConfiguration.getCustomHistoryEventHandlers()).thenReturn(customHandlersList); defaultHistoryConfiguration.historyEventHandler = historyEventHandlerMock; springProcessEngineConfiguration.setCustomHistoryEventHandlers(customHandlersList); defaultHistoryConfiguration.preInit(springProcessEngineConfiguration); verify(springProcessEngineConfiguration).getCustomHistoryEventHandlers(); verify(springProcessEngineConfiguration.getCustomHistoryEventHandlers()).add(historyEventHandlerMock); }
@Override public void preInit(SpringProcessEngineConfiguration configuration) { String historyLevel = camundaBpmProperties.getHistoryLevel(); if (historyLevel != null) { configuration.setHistory(historyLevel); } if (historyEventHandler != null) { logger.debug("registered history event handler: {}", historyEventHandler.getClass()); configuration.getCustomHistoryEventHandlers().add(historyEventHandler); } }
DefaultHistoryConfiguration extends AbstractCamundaConfiguration implements CamundaHistoryConfiguration { @Override public void preInit(SpringProcessEngineConfiguration configuration) { String historyLevel = camundaBpmProperties.getHistoryLevel(); if (historyLevel != null) { configuration.setHistory(historyLevel); } if (historyEventHandler != null) { logger.debug("registered history event handler: {}", historyEventHandler.getClass()); configuration.getCustomHistoryEventHandlers().add(historyEventHandler); } } }
DefaultHistoryConfiguration extends AbstractCamundaConfiguration implements CamundaHistoryConfiguration { @Override public void preInit(SpringProcessEngineConfiguration configuration) { String historyLevel = camundaBpmProperties.getHistoryLevel(); if (historyLevel != null) { configuration.setHistory(historyLevel); } if (historyEventHandler != null) { logger.debug("registered history event handler: {}", historyEventHandler.getClass()); configuration.getCustomHistoryEventHandlers().add(historyEventHandler); } }  }
DefaultHistoryConfiguration extends AbstractCamundaConfiguration implements CamundaHistoryConfiguration { @Override public void preInit(SpringProcessEngineConfiguration configuration) { String historyLevel = camundaBpmProperties.getHistoryLevel(); if (historyLevel != null) { configuration.setHistory(historyLevel); } if (historyEventHandler != null) { logger.debug("registered history event handler: {}", historyEventHandler.getClass()); configuration.getCustomHistoryEventHandlers().add(historyEventHandler); } }  @Override void preInit(SpringProcessEngineConfiguration configuration); }
DefaultHistoryConfiguration extends AbstractCamundaConfiguration implements CamundaHistoryConfiguration { @Override public void preInit(SpringProcessEngineConfiguration configuration) { String historyLevel = camundaBpmProperties.getHistoryLevel(); if (historyLevel != null) { configuration.setHistory(historyLevel); } if (historyEventHandler != null) { logger.debug("registered history event handler: {}", historyEventHandler.getClass()); configuration.getCustomHistoryEventHandlers().add(historyEventHandler); } }  @Override void preInit(SpringProcessEngineConfiguration configuration);  }