str += " if ( list.size() == 2 ) {\n";
str += " drools.halt();\n";
str += " }";
str += "end \n";
KieBase kbase = loadKnowledgeBaseFromString(str);
KieSession ksession = kbase.newKieSession();
List list = new ArrayList();
ksession.setGlobal( "list", list );
ksession.insert( "hello1" );
ksession.insert( "hello2" );
ksession.insert( "hello3" );