Check the &quot;Expert&quot; manual. What you need here is a so-called &quot;Return Value Restriction&quot; where you relate a field and a parenthesized expression using a relational operator; i.e.: &lt;field&gt; &lt;op&gt; ( &lt;expr&gt; )<br>
<br>Therefore, $b/$c &lt;= 105 is not correct, but $b &lt;= ( 105*$c ) is (apart from possible truncation if $b and $c are integers).<br><br>-W<br> <br><br><div class="gmail_quote">On Fri, Oct 2, 2009 at 5:20 PM, skasab2s <span dir="ltr">&lt;<a href="mailto:skasab2s@smail.inf.fh-brs.de">skasab2s@smail.inf.fh-brs.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hello guys,<br>
<br>
I have this problem:<br>
<br>
I have an object A with fields b and c. I have to check if b/c &lt;= 105 (if<br>
the division of the both fields is less than 105).<br>
<br>
When I try the condition  A ($b:b, $c:c, $b/$c &lt;=105), I get the error<br>
message &quot;No viable alternative for /&quot;.<br>
<br>
How to check this one correctly in a rule condition?<br>
<br>
Thanks a lot for any ideas!<br>
<br>
skasab2s<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://www.nabble.com/Division-Operator-in-a-Rule-Condition-tp25716712p25716712.html" target="_blank">http://www.nabble.com/Division-Operator-in-a-Rule-Condition-tp25716712p25716712.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>