Hi,
I recall this email. After trying with more examples, I notice if I reverse
the order, the non-dynamic salience will not work.
Thanks.
Jinghai
On Thu, Jun 12, 2014 at 11:03 AM, rjh <raojinghai(a)gmail.com> wrote:
Hello,
I developed a system where dynamic salience for some particular rules
doesn't rules. However, it is very hard for me to create a simple test case
unless I publish the entire rule files. In the system, some rules using
dynamic salience work and some don't, but I don't know why.
I debugged into the drools-core source code, and found out the following
code in branch 6.0.x.
(
https://github.com/droolsjbpm/drools/blob/6.0.x/drools-core/src/main/java...
)
Line 98 - org.drools.core.reteoo.PathMemory::doLinkRule
int salience = ( rtn.getRule().getSalience() instanceof
MVELSalienceExpression)
? 0
: rtn.getRule().getSalience().getValue(null,
rtn.getRule(), wm);
Line 113 - org.drools.core.reteoo.PathMemory::doUnlinkRule
int salience = ( rtn.getRule().getSalience() instanceof
MVELSalienceExpression)
? 0
: rtn.getRule().getSalience().getValue(null,
rtn.getRule(), wm);
I wonder if this is a bug that put the first value and the second value
reversed. At least I fixed my problem after reversing them.
Thanks.
Jinghai
--
View this message in context:
http://drools.46999.n3.nabble.com/Possible-problem-in-PathMemory-tp403002...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users