<p>Property specific?</p>
<p>sent on the move</p>
<p>On 13 Jan 2012 22:31, &quot;Mark Proctor&quot; &lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt; wrote:<br type="attribution"><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></p>