<div>You really should follow naming conventions Java programmers are familiar</div><div>with. javax.xml.bind.annotation.XmlAccessType, for instance, uses the</div><div>term &quot;member&quot; for referring to &quot;public getter/setter pairs&quot;, and this comes</div>
<div>close to what Drools does. Alternatively, there&#39;s &quot;field&quot; and &quot;property&quot;,</div><div>and I wouldn&#39;t worry about the extra lip mileage - you can always abbreviate</div><div>to &quot;prop-specific&quot;.</div>
<div><br></div><div>Is this new feature in some way configurable for the KnowledgeBase?</div><div>There are fact types where modifying one member results in the change</div><div>of more than one member. Consider the very plausible case:</div>
<div>     $f: Fact(...)</div><div>   then</div><div>      modify( $f ){ getList().add( $x ) }</div><div>   end</div><div><br></div><div>   when</div><div>     Fact( size &gt; 10 )  # size implemented as getList().size()</div>
<div>   then</div><div><br></div><div>Wolfgang</div><div><br></div><div>PS: The new feature is actually <i>restricting the sensitivity of the system.</i></div><div>Therefore, I feel that &quot;high-fidelity&quot; is actually counter-intuitive!</div>
<div><br><br><div class="gmail_quote">On 13 January 2012 23:30, Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Mario just got a first cut working for fine grained property change<br>
listeners. Previously when you call update() it will trigger revaluation<br>
of all Patterns of the matching object type in the knowledeg base.<br>
<br>
As some have found this can be a problem, forcing you to split up your<br>
objects into smaller 1 to 1 objects, to avoid unwanted evaluation of<br>
objects - i.e. recursion or excessive evaluation problems.<br>
<br>
The new approach now means the pattern&#39;s will only react to fields<br>
constrained or bound inside of the pattern. This will help with<br>
performance and recursion and avoid artificial object splitting.  We<br>
previously discussed this here:<br>
<a href="http://blog.athico.com/2010/07/slot-specific-and-refraction.html" target="_blank">http://blog.athico.com/2010/07/slot-specific-and-refraction.html</a><br>
You can see the unit test here:<br>
<a href="https://github.com/droolsjbpm/drools/blob/ca55c78429cbc0f14167c604c413cdc3faaf6988/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java" target="_blank">https://github.com/droolsjbpm/drools/blob/ca55c78429cbc0f14167c604c413cdc3faaf6988/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java</a><br>

<br>
The implementation is bit mask based, so very efficient. When the engine<br>
executes a modify statement it uses a bit mask of fields being changed,<br>
the pattern will only respond if it has an overlapping bit mask. This<br>
does not work for update(), and is one of the reason why we promote<br>
modify() as it encapsulates the field changes within the statement. You<br>
can follow Mario&#39;s chain of work on this at his github activity feed:<br>
<a href="https://github.com/mariofusco.atom" target="_blank">https://github.com/mariofusco.atom</a><br>
<br>
The adventerous amoung you can pick this up from hudson, or from maven,<br>
and start playing now. My hope is that this will make drools much easier<br>
to use:<br>
<a href="https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/drools-distribution/target/" target="_blank">https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/drools-distribution/target/</a><br>

<br>
Btw we are after a name. Drools is not a frame based system, so &quot;slot<br>
specific&quot; doesn&#39;t seem appropropriate. Property Specific seems a bit of<br>
a mouth full. I&#39;m quite liking High Fidelity Change Listeners :) any<br>
other suggestions?<br>
<br>
slot-specific is the name used by Jess for this feature,<br>
<a href="http://www.jessrules.com/docs/71/constructs.html" target="_blank">http://www.jessrules.com/docs/71/constructs.html</a>. It&#39;s also the standard<br>
way that Clips COOL works, which is the Clips OO module. Although that&#39;s<br>
partly a side effect of the triple representation of properties used in<br>
COOL, and the modifications are triple based. I don&#39;t know what<br>
mechanism Jess is using to enable this.<br>
<br>
Mark<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</blockquote></div><br></div>