<br> Ouch.<br><br> Start by removing all those null checks, since things like:<br><br>age > 17 <br><br> Will always return false if the age field is null, so the null check is redundant.<br> Also, replace top level && by ",", since this will make your constraint groups clear. <br>
Then finally, make sure your ()-pairs are all fine and it should work.<br><br> Just taking a quick look here I see an extra ")" here:<br><br>bodyFat > 0.31)<br><br> []s<br> Edson<br><br> []s<br>
Edson<br><br><div class="gmail_quote">2008/11/18 vanshi <span dir="ltr"><<a href="mailto:nilu.thakur@gmail.com">nilu.thakur@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi all,<br>
<br>
Can somebody help me here?? I've a business rule presented in bold here that<br>
I've put in the DRL file in the simplest form but compilation of rule is<br>
generating this error "line 6:342 required (...)+ loop did not match<br>
anything at character ' '"<br>
And any set of value is getting evaluated to TRUE.....that means rule<br>
validation is not happening.....I understand that I can use helper function<br>
in java classes and call them in the rule but wanted to know how can I do<br>
the same entirely in DRL file OR what's wrong with this. I've spent entire<br>
day to figure out but completely clueless and afraid to try function<br>
approach due to project deadline. Plz help.<br>
<br>
pers: Person(sourceType == 'Insurance' && (age != null && > 17) &&<br>
((cholesterol !=null && >= 200) || (hdlCholesterol !=null && < 60) ||<br>
(cholesterolToHdlRation !=null && > 4.5) ||<br>
(ldlCholesterol !=null && >160) || (vldl !=null && > 40) ||<br>
(triglyceride !=null && > 50) || (glucose !=null && >130) || (bmi !=null<br>
&& >=25) ||<br>
(bodyFat > 0. 25 && sbjGdrCd !=null && == 'F' && age !=null && > 17<br>
&& < 40) ||<br>
(bodyFat > 0.30 && sbjGdrCd !=null && == 'F' && age !=null && > 39 && <<br>
60) ||<br>
(bodyFat > 0.31) && sbjGdrCd !=null && == 'F' && age !=null && age > 60)<br>
||<br>
(bodyFat > 0.19 && sbjGdrCd !=null && == 'M' && age !=null && >17 && <<br>
40) ||<br>
(bodyFat > 0.23 && sbjGdrCd !=null && == 'M' && age !=null && age > 39 <<br>
60) ||<br>
(bodyFat > 0.24 && sbjGdrCd !=null && == 'M' && age !=null && >=60)))<br>
<br>
//Age>=18 AND Total Cholesterol >=200 OR HDL <60 OR Cholesterol Ratio<br>
>4.5 OR LDL >160 OR VLDL >40 OR Triglycerides >150 OR Glucose >130 OR BMI<br>
>=25 OR Body Fat % greater than the range of 14% and 25% when gender = F<br>
and age between or equal to 18 and 39 OR Body Fate % greater than the range<br>
of 18% and 30% when gender = F and age between or equal to 40 and 59 OR<br>
Body Fat % greater than the range of 21% and 31% when gender = F and age<br>
>60 OR Body Fat % greater than the range of 7% and 19% when gender = M and<br>
age between or equal to 18 and 39 OR Body Fat % greater than the range of<br>
14% and 23% when gender = M and age between or equal to 40 and 59 OR Body<br>
Fat % greater than the range of 15% and 24% when gender = M and age >60<br>
<font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/What%27s-wrong-with-the-connectives--tp20571531p20571531.html" target="_blank">http://www.nabble.com/What%27s-wrong-with-the-connectives--tp20571531p20571531.html</a><br>
Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>