You're missing a '}'
And you could break when you know it's false.
-W
On 5 January 2012 08:00, gg <gagan.gautam(a)gmail.com> wrote:
I have written this in my rules file: But I getting this error :
[29,0]: [ERR 102] Line 29:0 mismatched input '<eof>' in function
"isContained"
[0,0]: Parser returned a null Package
-----------------------------------------------------------------------------
function boolean isContained(List<String> plist, List<String> clist){
boolean found = true;
for(String s : clist){
if (!plist.contains(s)){
found = false;
}
return found;
}
rule "GoodBye"
when
m : Message(ls:ls, pids: productIds)
l : List() from ls
eval(isContained(pids,l))
then
System.out.println( "found" );
end
--
View this message in context:
http://drools.46999.n3.nabble.com/Function-Mismatch-eof-tp3634033p3634033...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users