Hi,
<br><br>say I have a class with two fields, x and y:
<br><br>public class Test {
<br>&nbsp; &nbsp; int x = 1;
<br>&nbsp; &nbsp; int y = 2;
<br><br>&nbsp; &nbsp; getters/setters...
<br>}
<br><br><br>I would like a rule which fires when y = x + 1
<br><br>my initial thought would be something like:
<br><br>rule &quot;Rule 1&quot;
<br>&nbsp; &nbsp; &nbsp; &nbsp; 
<br>&nbsp; &nbsp; &nbsp; &nbsp; when
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; test : Test (y == x + 1)
<br>&nbsp; &nbsp; &nbsp; &nbsp; then 
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;Rule 1 matches.&quot;);
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
<br>end
<br><br><br>but this is invalid syntax and I can not find any examples of such a rule.
I&#39;m doing my best but reading the manual etc. I&#39;m struggling with the syntax here and can&#39;t figure it out.<br><br>any help really appreciated!