use of org.jbpm.test.listener.TrackingProcessEventListener in project jbpm by kiegroup.
the class EventBasedGatewayTest method testSignal.
/**
* Signal event branch
*/
@Test(timeout = 30000)
public void testSignal() {
TrackingProcessEventListener tpel = new TrackingProcessEventListener();
ksession.addEventListener(tpel);
List<Command<?>> commands = new ArrayList<Command<?>>();
commands.add(CommandFactory.newStartProcess(EVENT_BASED_GATEWAY_ID));
commands.add(CommandFactory.newSignalEvent("sigkill", null));
ksession.execute(CommandFactory.newBatchExecution(commands));
TrackingListenerAssert.assertProcessStarted(tpel, EVENT_BASED_GATEWAY_ID);
TrackingListenerAssert.assertTriggeredAndLeft(tpel, "start");
TrackingListenerAssert.assertTriggeredAndLeft(tpel, "fork");
TrackingListenerAssert.assertTriggeredAndLeft(tpel, "sig");
TrackingListenerAssert.assertTriggeredAndLeft(tpel, "join");
TrackingListenerAssert.assertTriggered(tpel, "end");
TrackingListenerAssert.assertProcessCompleted(tpel, EVENT_BASED_GATEWAY_ID);
}
Aggregations