Search in sources :

Example 6 with CompositeDbHistoryEventHandler

use of org.camunda.bpm.engine.impl.history.handler.CompositeDbHistoryEventHandler in project camunda-bpm-platform by camunda.

the class CompositeDbHistoryEventHandlerTest method testCompositeDbHistoryEventHandlerArgumentConstructorWithNotNullVarargsTwoEvents.

@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" })
public void testCompositeDbHistoryEventHandlerArgumentConstructorWithNotNullVarargsTwoEvents() {
    CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(new CustomDbHistoryEventHandler(), new CustomDbHistoryEventHandler());
    processEngineConfiguration.setHistoryEventHandler(compositeDbHistoryEventHandler);
    startProcessAndCompleteUserTask();
    assertEquals(4, countCustomHistoryEventHandler);
    assertEquals(2, historyService.createHistoricDetailQuery().count());
}
Also used : CompositeDbHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeDbHistoryEventHandler) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 7 with CompositeDbHistoryEventHandler

use of org.camunda.bpm.engine.impl.history.handler.CompositeDbHistoryEventHandler in project camunda-bpm-platform by camunda.

the class CompositeDbHistoryEventHandlerTest method testCompositeDbHistoryEventHandlerNonArgumentConstructorAddNotNullEvent.

@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" })
public void testCompositeDbHistoryEventHandlerNonArgumentConstructorAddNotNullEvent() {
    CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler();
    compositeDbHistoryEventHandler.add(new CustomDbHistoryEventHandler());
    processEngineConfiguration.setHistoryEventHandler(compositeDbHistoryEventHandler);
    startProcessAndCompleteUserTask();
    assertEquals(2, countCustomHistoryEventHandler);
    assertEquals(2, historyService.createHistoricDetailQuery().count());
}
Also used : CompositeDbHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeDbHistoryEventHandler) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 8 with CompositeDbHistoryEventHandler

use of org.camunda.bpm.engine.impl.history.handler.CompositeDbHistoryEventHandler in project camunda-bpm-platform by camunda.

the class CompositeDbHistoryEventHandlerTest method testCompositeDbHistoryEventHandlerArgumentConstructorWithNotNullVarargsOneEvent.

@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" })
public void testCompositeDbHistoryEventHandlerArgumentConstructorWithNotNullVarargsOneEvent() {
    CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(new CustomDbHistoryEventHandler());
    processEngineConfiguration.setHistoryEventHandler(compositeDbHistoryEventHandler);
    startProcessAndCompleteUserTask();
    assertEquals(2, countCustomHistoryEventHandler);
    assertEquals(2, historyService.createHistoricDetailQuery().count());
}
Also used : CompositeDbHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeDbHistoryEventHandler) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 9 with CompositeDbHistoryEventHandler

use of org.camunda.bpm.engine.impl.history.handler.CompositeDbHistoryEventHandler in project camunda-bpm-platform by camunda.

the class CompositeDbHistoryEventHandlerTest method testCompositeDbHistoryEventHandlerNonArgumentConstructor.

@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" })
public void testCompositeDbHistoryEventHandlerNonArgumentConstructor() {
    processEngineConfiguration.setHistoryEventHandler(new CompositeDbHistoryEventHandler());
    startProcessAndCompleteUserTask();
    assertEquals(0, countCustomHistoryEventHandler);
    assertEquals(2, historyService.createHistoricDetailQuery().count());
}
Also used : CompositeDbHistoryEventHandler(org.camunda.bpm.engine.impl.history.handler.CompositeDbHistoryEventHandler) Deployment(org.camunda.bpm.engine.test.Deployment)

Aggregations

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