ruleBase.addPackage( pkg );
ruleBase = SerializationHelper.serializeObject( ruleBase );
final WorkingMemory workingMemory = ruleBase.newStatefulSession();
final List events = new ArrayList();
final WorkingMemoryEventListener listener = new DefaultWorkingMemoryEventListener() {
public void objectUpdated( ObjectUpdatedEvent event ) {
events.add( event );
}
};