7273747576777879808182
" ?Q( $i; )\n" + "then\n" + " list.add( $i );\n" + "end\n"; KieSession ksession = new KieHelper() .addContent(str, ResourceType.DRL) .build() .newKieSession(); List<Integer> list = new ArrayList<Integer>();
100101102103104105106107108109110
128129130131132133134135136137138
" Q( $i; )\n" + "then\n" + " list.add( $i );\n" + "end\n"; KieSession ksession = new KieHelper() .addContent(str, ResourceType.DRL) .build() .newKieSession(); List<Integer> list = new ArrayList<Integer>();
157158159160161162163164165166167
" ?Q( $j; )\n" + "then\n" + " list.add( $j );\n" + "end\n"; KieSession ksession = new KieHelper() .addContent(str, ResourceType.DRL) .build() .newKieSession(); List<Integer> list = new ArrayList<Integer>();
192193194195196197198199200201202
" ?Q( $i; )\n" + "then\n" + " list.add( \"R2\" );\n" + "end\n"; KieSession ksession = new KieHelper() .addContent(str, ResourceType.DRL) .build() .newKieSession(); List<String> list = new ArrayList<String>();
239240241242243244245246247248249
" ?Q( $i; )\n" + "then\n" + " list.add( \"R2b\" );\n" + "end\n"; KieSession ksession = new KieHelper() .addContent(str, ResourceType.DRL) .build() .newKieSession(); List<String> list = new ArrayList<String>();
282283284285286287288289290291292
" ?Q( $i; )\n" + "then\n" + " list.add( \"R2\" );\n" + "end\n"; KieBase kbase = new KieHelper() .addContent(str, ResourceType.DRL) .build(); KieSession ksession = kbase.newKieSession();
3233343536373839404142
"then\n" + " insert( \"\" + $i );\n" + " list.add( -$i );\n" + "end\n"; KieSession ksession = new KieHelper() .addContent(str, ResourceType.DRL) .build() .newKieSession(); List<Integer> list = new ArrayList<Integer>();
7071727374757677787980
112113114115116117118119120121122
" list.add( -$i * 5 );\n" + "then[$onAfterAllFire$]\n" + " list.add( -$i * 4 );\n" + "end\n"; KieSession ksession = new KieHelper() .addContent(str, ResourceType.DRL) .build() .newKieSession(); List<Integer> list = new ArrayList<Integer>();