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">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>>:<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><br>