[rules-users] Help writing rules

mike20043 mintymike20043 at yahoo.co.uk
Fri Feb 23 11:28:20 EST 2007


Hi 

I’m having a little problem in writing rules for my expert system. I know
that this is probably written out very badly and I really don’t have much of
an idea on what I’m doing in drools but I’m trying to get the following rule
to run

Rule "test body button check"
when	

(Bodyc(brownb == "true") || Bodyc(grayb == "true") || Bodyc(lightgrayb ==
"true") || Bodyc(redb == "true") || Bodyc(orangeb == "true") ||
Bodyc(yellowb == "true") || Bodyc(whiteb == "true")) && (Bodyc(blackb ==
"false") || Bodyc(greenb == "false") || Bodyc(blueb == "false") ||
Bodyc(cyanb == "false") || Bodyc(pinkb == "false"))

then
System.out.println("body check pass");
end

if I remove the double and symbols in the middle plus everything after the
rule does run. basically I need the first half of the rule to evaluate true
and the second half to evaluate false but in the same rule. Any help would
be greatly appreciated.


Thanks in advance

mike

-- 
View this message in context: http://www.nabble.com/Help-writing-rules-tf3279750.html#a9121875
Sent from the drools - user mailing list archive at Nabble.com.





More information about the rules-users mailing list