Search in sources :

Example 6 with CompositeHistoryEventHandler

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());
}
Also used : CompositeHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 7 with CompositeHistoryEventHandler

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());
}
Also used : DbHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler) CompositeHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 8 with CompositeHistoryEventHandler

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());
}
Also used : CompositeHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler) DbHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler) HistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler) ArrayList(java.util.ArrayList) DbHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler) CompositeHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 9 with CompositeHistoryEventHandler

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());
}
Also used : CompositeHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler) DbHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler) HistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler) CompositeHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler) Deployment(org.camunda.bpm.engine.test.Deployment)

Aggregations

CompositeHistoryEventHandler (org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler)9 Deployment (org.camunda.bpm.engine.test.Deployment)7 DbHistoryEventHandler (org.camunda.bpm.engine.impl.history.handler.DbHistoryEventHandler)5 HistoryEventHandler (org.camunda.bpm.engine.impl.history.handler.HistoryEventHandler)3 NullValueException (org.camunda.bpm.engine.exception.NullValueException)2 ArrayList (java.util.ArrayList)1