assertProcessInstanceCompleted(processInstance.getId(), ksession);
}
public void testIntermediateCatchEventMessage() throws Exception {
KnowledgeBase kbase = createKnowledgeBase("BPMN2-IntermediateCatchEventMessage.bpmn2");
StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new DoNothingWorkItemHandler());
ProcessInstance processInstance = ksession.startProcess("IntermediateCatchEvent");
assertTrue(processInstance.getState() == ProcessInstance.STATE_ACTIVE);
ksession = restoreSession(ksession, true);
// now signal process instance
ksession.signalEvent("Message-HelloMessage", "SomeValue", processInstance.getId());
assertProcessInstanceCompleted(processInstance.getId(), ksession);
}