<br>&nbsp;&nbsp;&nbsp; Ouch.<br><br>&nbsp;&nbsp;&nbsp; Start by removing all those null checks, since things like:<br><br>age &gt; 17 <br><br>&nbsp;&nbsp;&nbsp; Will always return false if the age field is null, so the null check is redundant.<br>&nbsp;&nbsp;&nbsp; Also, replace top level &amp;&amp; by &quot;,&quot;, since this will make your constraint groups clear. <br>
&nbsp;&nbsp;&nbsp; Then finally, make sure your ()-pairs are all fine and it should work.<br><br>&nbsp;&nbsp;&nbsp; Just taking a quick look here I see an extra &quot;)&quot; here:<br><br>bodyFat &gt; 0.31)<br><br>&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br>&nbsp;&nbsp;&nbsp; []s<br>
&nbsp;&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/11/18 vanshi <span dir="ltr">&lt;<a href="mailto:nilu.thakur@gmail.com">nilu.thakur@gmail.com</a>&gt;</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&#39;ve a business rule presented in bold here that<br>
I&#39;ve put in the DRL file in the simplest form but compilation of rule is<br>
generating this error &quot;line 6:342 required (...)+ loop did not match<br>
anything at character &#39; &#39;&quot;<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&#39;s wrong with this. I&#39;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 == &#39;Insurance&#39; &amp;&amp; (age != null &nbsp;&amp;&amp; &gt; 17) &amp;&amp;<br>
((cholesterol !=null &amp;&amp; &gt;= 200) || (hdlCholesterol !=null &amp;&amp; &lt; 60) ||<br>
(cholesterolToHdlRation !=null &amp;&amp; &gt; 4.5) ||<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (ldlCholesterol !=null &amp;&amp; &nbsp;&gt;160) || (vldl !=null &amp;&amp; &gt; 40) ||<br>
(triglyceride !=null &amp;&amp; &nbsp;&gt; 50) || (glucose !=null &amp;&amp; &nbsp;&gt;130) || (bmi !=null<br>
&amp;&amp; &gt;=25) &nbsp;||<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(bodyFat &gt; 0. 25 &amp;&amp; &nbsp;sbjGdrCd !=null &amp;&amp; &nbsp;== &#39;F&#39; &nbsp;&amp;&amp; &nbsp;age !=null &amp;&amp; &gt; 17<br>
&amp;&amp; &lt; 40) ||<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(bodyFat &gt; 0.30 &amp;&amp; sbjGdrCd !=null &amp;&amp; &nbsp;== &#39;F&#39; &amp;&amp; age !=null &amp;&amp; &gt; 39 &amp;&amp; &lt;<br>
60) ||<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(bodyFat &gt; 0.31) &amp;&amp; sbjGdrCd !=null &amp;&amp; == &#39;F&#39; &amp;&amp; age !=null &amp;&amp; age &gt; 60)<br>
||<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(bodyFat &gt; 0.19 &amp;&amp; sbjGdrCd !=null &amp;&amp; &nbsp;== &#39;M&#39; &amp;&amp; &nbsp;age !=null &amp;&amp; &gt;17 &amp;&amp; &lt;<br>
40) ||<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(bodyFat &gt; 0.23 &amp;&amp; sbjGdrCd !=null &amp;&amp; == &#39;M&#39; &amp;&amp; age !=null &amp;&amp; age &gt; 39 &lt;<br>
60) ||<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(bodyFat &gt; 0.24 &nbsp;&amp;&amp; sbjGdrCd !=null &amp;&amp; == &#39;M&#39; &nbsp;&amp;&amp; age !=null &amp;&amp; &gt;=60)))<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//Age&gt;=18 AND Total Cholesterol &gt;=200 OR HDL &lt;60 OR Cholesterol Ratio<br>
&gt;4.5 OR LDL &gt;160 OR VLDL &gt;40 OR Triglycerides &gt;150 OR Glucose &gt;130 OR BMI<br>
&gt;=25 OR Body Fat % greater than the range of &nbsp;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 &nbsp;18% and 30% when gender = F and age between or equal to 40 and 59 OR<br>
Body Fat % greater than the range of &nbsp;21% and 31% when gender = F and age<br>
&gt;60 OR Body Fat % greater than the range of &nbsp;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 &nbsp;15% and 24% when gender = M and age &gt;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> &nbsp;Edson Tirelli<br> &nbsp;JBoss Drools Core Development<br> &nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>