baseConfig.setOption( RuleEngineOption.PHREAK );
baseConfig.setOption( EventProcessingOption.STREAM );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase( baseConfig );
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
KieSessionConfiguration sessionConfig = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
sessionConfig.setOption( ClockTypeOption.get("realtime") );
//init stateful knowledge session
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession( sessionConfig, null );
ArrayList list = new ArrayList( );
ksession.setGlobal( "list", list );