Hi all,<br><br>just a quick recap of what I did until now to check if we are all on the same page and also agree with the naming convention I used.<br><br>The property specific feature is off by default in order to make the behavior of the rule engine backward compatible with the former releases. If you want to activate it on a specific bean you have to annotate it with @propSpecific. This annotation works both on drl type declarations:<br>
<br>declare Person<br>    @propSpecific<br>    firstName : String<br>    lastName : String<br>end<br><br>and on Java classes:<br><br>@PropSpecific<br>public static class Person {<br>    private String firstName;<br>    private String lastName;<br>
}<br><br>Moreover on Java classes you can also annotate any method to say that its invocation actually modifies other properties. For instance in the former Person class you could have a method like:<br><br>@Modifies( &quot;firstName, lastName&quot; )<br>
public void setName(String name) {<br>    String[] names = name.split(&quot;\\s&quot;);<br>    this.firstName = names[0];<br>    this.lastName = names[1];<br>
}<br><br>That means that if a rule has a RHS like the following:<br><br>modify($person) { setName(&quot;Mario Fusco&quot;) }<br><br>it will correctly recognize that both the firstName and lastName have been modified and act accordingly. Of course the @Modifies annotation on a method has no effect if the declaring class isn&#39;t  annotated with @PropSpecific. <br>
<br>The third annotation I have introduced is on patterns and allows you to modify the inferred set of properties &quot;listened&quot; by it. So, for example, you can annotate a pattern in the LHS of a rule like:<br><br>Person( firstName == $expectedFirstName ) @watch( lastName ) // --&gt; listens for changes on both firstName (inferred) and lastName<br>
Person( firstName == $expectedFirstName ) @watch( * ) // --&gt; 
listens for all the properties of the Person bean<br>Person( firstName == $expectedFirstName ) @watch( lastName, !firstName ) // --&gt; listens for changes on lastName and explicitly exclude firstName<br>Person( firstName == $expectedFirstName ) @watch( *, !age )
 // --&gt; listens for changes on all the properties except the age one<br><br>Once again this annotation has no effect if the corresponding pattern&#39;s type hasn&#39;t been annotated with @PropSpecific.<br><br>I&#39;ve almost finished with the development of this feature (at the moment I am missing the compile-time check of the properties named in the @watch annotation together with some more exhaustive tests), so if you think that I misunderstood something or there is room for any improvement (or you just don&#39;t like the annotation&#39;s names I chose) please let me know as soon as possible.<br>
<br>Mario<br>