use of org.jbpm.bpmn2.objects.NotAvailableGoodsReport in project jbpm by kiegroup.
the class StartEventTest method testSignalStartWithCustomEvent.
@Test
public void testSignalStartWithCustomEvent() throws Exception {
KieBase kbase = createKnowledgeBase("BPMN2-SingalStartWithCustomEvent.bpmn2");
ksession = createKnowledgeSession(kbase);
final List<ProcessInstance> list = new ArrayList<ProcessInstance>();
ksession.addEventListener(new DefaultProcessEventListener() {
public void beforeProcessStarted(ProcessStartedEvent event) {
list.add(event.getProcessInstance());
}
});
NotAvailableGoodsReport report = new NotAvailableGoodsReport("test");
ksession.signalEvent("SignalNotAvailableGoods", report);
assertThat(getNumberOfProcessInstances("org.jbpm.example.SignalObjectProcess")).isEqualTo(1);
assertThat(list.size()).isEqualTo(1);
assertProcessVarValue(list.get(0), "report", "NotAvailableGoodsReport{type:test}");
}
Aggregations