Map<String, Object> params = new HashMap<String, Object>();
params.put("collection", collection);
ProcessInstance processInstance = ( ProcessInstance )
workingMemory.startProcess("org.drools.ForEach", params);
assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
processInstance.signalEvent("MyEvent", null);
assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
assertEquals(3, myList.size());
}
}