protected void initHistoryEventHandler() { if (historyEventHandler == null) { historyEventHandler = new DbHistoryEventHandler(); } }
protected void initHistoryEventHandler() { if (historyEventHandler == null) { historyEventHandler = new DbHistoryEventHandler(); } }
/** * Add {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. */ private void addDefaultDbHistoryEventHandler() { historyEventHandlers.add(new DbHistoryEventHandler()); }
/** * Add {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. */ private void addDefaultDbHistoryEventHandler() { historyEventHandlers.add(new DbHistoryEventHandler()); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerArgumentConstructorWithNotEmptyListNotNullTwoEvents() { // prepare the list with two events List<HistoryEventHandler> historyEventHandlers = new ArrayList<HistoryEventHandler>(); historyEventHandlers.add(new CustomDbHistoryEventHandler()); historyEventHandlers.add(new DbHistoryEventHandler()); CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(historyEventHandlers); processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
protected void initHistoryEventHandler() { if (historyEventHandler == null) { historyEventHandler = new DbHistoryEventHandler(); } }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerArgumentConstructorWithNotNullVarargsTwoEvents() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(new CustomDbHistoryEventHandler(), new DbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
/** * Add {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. */ private void addDefaultDbHistoryEventHandler() { historyEventHandlers.add(new DbHistoryEventHandler()); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testDefaultHistoryEventHandler() { // use default DbHistoryEventHandler processEngineConfiguration.setHistoryEventHandler(new DbHistoryEventHandler()); startProcessAndCompleteUserTask(); assertEquals(0, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerNonArgumentConstructorAddNotNullTwoEvents() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(); compositeHistoryEventHandler.add(new CustomDbHistoryEventHandler()); compositeHistoryEventHandler.add(new DbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerArgumentConstructorWithNotEmptyListNotNullTwoEvents() { // prepare the list with two events List<HistoryEventHandler> historyEventHandlers = new ArrayList<HistoryEventHandler>(); historyEventHandlers.add(new CustomDbHistoryEventHandler()); historyEventHandlers.add(new DbHistoryEventHandler()); CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(historyEventHandlers); processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerArgumentConstructorWithNotNullVarargsTwoEvents() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(new CustomDbHistoryEventHandler(), new DbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testDefaultHistoryEventHandler() { // use default DbHistoryEventHandler processEngineConfiguration.setHistoryEventHandler(new DbHistoryEventHandler()); startProcessAndCompleteUserTask(); assertEquals(0, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerNonArgumentConstructorAddNotNullTwoEvents() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(); compositeHistoryEventHandler.add(new CustomDbHistoryEventHandler()); compositeHistoryEventHandler.add(new DbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }