use of org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler in project camunda-bpm-platform by camunda.
the class CompositeHistoryEventHandlerTest method testCompositeHistoryEventHandlerNonArgumentConstructorAddNotNullTwoEvents.
@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());
}
use of org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler in project camunda-bpm-platform by camunda.
the class CompositeHistoryEventHandlerTest method testCompositeHistoryEventHandlerArgumentConstructorWithNotNullVarargsTwoEvents.
@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());
}
use of org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler in project camunda-bpm-platform by camunda.
the class CompositeHistoryEventHandlerTest method testCompositeHistoryEventHandlerArgumentConstructorWithNotEmptyListNotNullTwoEvents.
@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());
}
use of org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler in project camunda-bpm-platform by camunda.
the class CompositeHistoryEventHandlerTest method testDefaultHistoryEventHandler.
@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());
}
Aggregations