if ( kbuilder.hasErrors() ) { fail( kbuilder.getErrors().toString() ); }
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
KieSessionConfiguration conf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
conf.setOption( ClockTypeOption.get( "pseudo" ) );
KieSession ksession = kbase.newStatefulKnowledgeSession( conf, null );
ArrayList list = new ArrayList( );
ksession.setGlobal( "list", list );
SessionPseudoClock clock = ( SessionPseudoClock ) ksession.getSessionClock();