use of org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler in project camunda-bpm-platform by camunda.
the class CompositeHistoryEventHandlerTest method testCompositeHistoryEventHandlerNonArgumentConstructor.
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" })
public void testCompositeHistoryEventHandlerNonArgumentConstructor() {
processEngineConfiguration.setHistoryEventHandler(new CompositeHistoryEventHandler());
startProcessAndCompleteUserTask();
assertEquals(0, countCustomHistoryEventHandler);
assertEquals(0, historyService.createHistoricDetailQuery().count());
}
use of org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler 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.CompositeHistoryEventHandler 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.CompositeHistoryEventHandler in project camunda-bpm-platform by camunda.
the class CompositeHistoryEventHandlerTest method testCompositeHistoryEventHandlerArgumentConstructorWithEmptyList.
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" })
public void testCompositeHistoryEventHandlerArgumentConstructorWithEmptyList() {
CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(new ArrayList<HistoryEventHandler>());
processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler);
startProcessAndCompleteUserTask();
assertEquals(0, countCustomHistoryEventHandler);
assertEquals(0, historyService.createHistoricDetailQuery().count());
}
Aggregations