" list.add( $y ); \n" +
" System.out.println( $x ); \n" +
" System.out.println( $y ); \n" +
"end\n";
KnowledgeBuilderConfiguration kbConf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
KnowledgeBase kbase = loadKnowledgeBaseFromString( kbConf, drl );
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
List<Long> list = new ArrayList<Long>();
ksession.setGlobal( "list", list );