<br> Yes, newest mvel version works fine, but that problem only happened when using mvel dialect. For java, just do as Chris mentioned:<br><br>when<br> Test( y == (x+1) )<br>then<br><br> And it will work. The () is needed to tell the engine that what is inside is a semantic code block, i.e., an expression that will return a value to be compared to y.<br>
<br> []s<br> Edson<br><br><br><br><div class="gmail_quote">2008/5/2 Chris Woodrow <<a href="mailto:woodrow.chris@gmail.com">woodrow.chris@gmail.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>even <br>Test (y == (x + 1)) <br>works.<br><br>Richard : I think you should take a look at this before planning doing complicated calculations with drools <a href="http://lists.jboss.org/pipermail/rules-users/2008-April/005247.html" target="_blank">http://lists.jboss.org/pipermail/rules-users/2008-April/005247.html</a> but it might be fixed now.<br>
<br>Chris<br><br><br><div class="gmail_quote">2008/5/2 Raffi Khatchadourian <<a href="mailto:khatchad@cse.ohio-state.edu" target="_blank">khatchad@cse.ohio-state.edu</a>>:<div><div></div><div class="Wj3C7c"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>On Fri 2.May'08 at 10:05:20 +0100, Anstis, Michael (M.) wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
The "when" section matches fact (object) patterns, so your requirement<br>
could be written as:-<br>
<br>
when there is a Test Fact 'A' and another Test Fact 'B' where "the 'x'<br>
property of 'A'" equals "the 'y' property of fact 'B' plus 1" then.....<br>
<br>
This would become:-<br>
<br>
rule "Rule 1"<br>
when<br>
Test( $y : y )<br>
Test( x == ($y + 1) )<br>
</blockquote>
<br></div>
Could you combine these conditions? As in:<br>
<br>
when<br>
Test($y : y, x == $y + 1)<br>
//...<br>
_______________________________________________<br>
rules-users mailing list<div><br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
</div><div><div></div><div><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div></div></div><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>
<br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>