);
AbstractRuleBase ruleBase = (AbstractRuleBase) RuleBaseFactory.newRuleBase();
ruleBase.addProcess(process);
InternalWorkingMemory workingMemory = new ReteooWorkingMemory(1, ruleBase);
ProcessInstance processInstance = workingMemory.startProcess("org.drools.process.event");
assertEquals(0, myList.size());
Person jack = new Person();
jack.setName("Jack");
processInstance.signalEvent("myEvent", jack);
assertEquals(1, myList.size());
assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
processInstance.signalEvent("myEvent", jack);
assertEquals(2, myList.size());
assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
Person john = new Person();
john.setName("John");
processInstance.signalEvent("myOtherEvent", john);
assertEquals(3, myList.size());
assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
}