<div dir="ltr">Hi,<div><br></div><div>I recall this email. After trying with more examples, I notice if I reverse the order, the non-dynamic salience will not work. </div><div><br></div><div>Thanks.</div><div><br></div><div>
Jinghai</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Jun 12, 2014 at 11:03 AM, rjh <span dir="ltr">&lt;<a href="mailto:raojinghai@gmail.com" target="_blank">raojinghai@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello,<br>
<br>
I developed a system where dynamic salience for some particular rules<br>
doesn&#39;t rules. However, it is very hard for me to create a simple test case<br>
unless I publish the entire rule files. In the system, some rules using<br>
dynamic salience work and some don&#39;t, but I don&#39;t know why.<br>
<br>
I debugged into the drools-core source code, and found out the following<br>
code in branch 6.0.x.<br>
(<a href="https://github.com/droolsjbpm/drools/blob/6.0.x/drools-core/src/main/java/org/drools/core/reteoo/PathMemory.java" target="_blank">https://github.com/droolsjbpm/drools/blob/6.0.x/drools-core/src/main/java/org/drools/core/reteoo/PathMemory.java</a>)<br>


<br>
Line 98 - org.drools.core.reteoo.PathMemory::doLinkRule<br>
<br>
            int salience = ( rtn.getRule().getSalience() instanceof<br>
MVELSalienceExpression)<br>
                           ? 0<br>
                           : rtn.getRule().getSalience().getValue(null,<br>
rtn.getRule(), wm);<br>
<br>
Line 113 - org.drools.core.reteoo.PathMemory::doUnlinkRule<br>
<br>
            int salience = ( rtn.getRule().getSalience() instanceof<br>
MVELSalienceExpression)<br>
                           ? 0<br>
                           : rtn.getRule().getSalience().getValue(null,<br>
rtn.getRule(), wm);<br>
<br>
I wonder if this is a bug that put the first value and the second value<br>
reversed. At least I fixed my problem after reversing them.<br>
<br>
Thanks.<br>
<br>
Jinghai<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Possible-problem-in-PathMemory-tp4030026.html" target="_blank">http://drools.46999.n3.nabble.com/Possible-problem-in-PathMemory-tp4030026.html</a><br>


Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br></div></div>