config.setOption( EventProcessingOption.STREAM );
KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase( config );
knowledgeBase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
KnowledgeSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
ksconf.setOption( ClockTypeOption.get( "pseudo" ) );
((SessionConfiguration) ksconf).setTimerJobFactoryManager( new TrackableTimeJobFactoryManager( ) );
StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession(ksconf, null);
List list = new ArrayList();
ksession.setGlobal( "list", list );