<div><br></div> Ok, can you please open a JIRA with a test case for me to reproduce the problem? I will investigate.<div><br></div><div> Thanks,</div><div> Edson<br><br><div class="gmail_quote">2010/7/6 Axelrod, Nelson <span dir="ltr"><<a href="mailto:naxelrod@jcvi.org">naxelrod@jcvi.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Edson,<br>
<br>
Yes, I have been writing and checking the audit log. It shows several<br>
activations of the "test" rule, and I've pasted them below if that<br>
helps. There are no other activation events with fact handles to [19,<br>
6313, 3681] except for the "test" rule.<br>
<br>
These two rules intentionally do not have any side effects written in<br>
the RHS, specifically to avoid the case that an activation of one rule<br>
would somehow lead to a change affecting the LHS of another rule or any<br>
other side effects. I load all of the facts before the rules, and no<br>
other code is executed except for the KnowledgeSession fireAllRules()<br>
method followed by dispose().<br>
<br>
<org.drools.audit.event.ActivationLogEvent><br>
<type>4</type><br>
<activationId>test [19, 6313, 3681]</activationId><br>
<rule>test</rule><br>
<declarations>f=Feature.ORF00019(19);<br>
hit=org.jcvi.annotation.facts.HmmHit.ORF00019.TIGR00549.ABOVE_TRUSTED.13<br>
836<br>
502(3681); p=FeatureProperty.TIGR00549(6313)</declarations><br>
</org.drools.audit.event.ActivationLogEvent><br>
<org.drools.audit.event.ActivationLogEvent><br>
<type>6</type><br>
<activationId>test [19, 6313, 3681]</activationId><br>
<rule>test</rule><br>
<declarations>f=Feature.ORF00019(19);<br>
hit=org.jcvi.annotation.facts.HmmHit.ORF00019.TIGR00549.ABOVE_TRUSTED.13<br>
836<br>
502(3681); p=FeatureProperty.TIGR00549(6313)</declarations><br>
</org.drools.audit.event.ActivationLogEvent><br>
<org.drools.audit.event.ActivationLogEvent><br>
<type>7</type><br>
<activationId>test [19, 6313, 3681]</activationId><br>
<rule>test</rule><br>
<declarations>f=Feature.ORF00019(19);<br>
hit=org.jcvi.annotation.facts.HmmHit.ORF00019.TIGR00549.ABOVE_TRUSTED.13<br>
836<br>
502(3681); p=FeatureProperty.TIGR00549(6313)</declarations><br>
</org.drools.audit.event.ActivationLogEvent><br>
<br>
Nelson<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 6 Jul 2010 12:39:22 -0400<br>
From: Edson Tirelli <<a href="mailto:tirelli@post.com">tirelli@post.com</a>><br>
Subject: Re: [rules-users] How is this possible?<br>
To: Rules Users List <<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>><br>
Message-ID:<br>
<<a href="mailto:AANLkTik_Ge7ay6M4gcakpUAgccshwCmU7ke2IYNFJhg6@mail.gmail.com">AANLkTik_Ge7ay6M4gcakpUAgccshwCmU7ke2IYNFJhg6@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="windows-1252"<br>
<br>
Nelson,<br>
<br>
How do you know one rule is firing, but not the other? Are you<br>
checking<br>
the audit log or using an agenda listener for that? Otherwise, if you<br>
think<br>
the rule is not firing because of your println in the consequence, you<br>
might<br>
be looking at the wrong "symptom". There is a huge difference between<br>
writing an "if" like that in the consequence of a rule and writing a<br>
constraint like "hitId == "TIGR00549"" in the condition of the rule,<br>
because<br>
the LHS of a rule is evaluated at "insert" time while the RHS is<br>
evaluated<br>
at the consequence fire time.<br>
<br>
So, from the information given, trying to imagine a scenario to<br>
explain<br>
why the syserr in the "test" rule shows up while the one in the first<br>
rule<br>
doesn't, here is a possible explanation:<br>
<br>
* You insert the fact HmmHit, it activates both rules, but in a given<br>
time,<br>
before the "Hmm Hit" rule is fired, the value of hitId changes. In this<br>
case, the rule would still fire, but the "if" in the consequence is only<br>
evaluated after the change (during consequence fire time) and so<br>
evaluates<br>
to false, not printing the message.<br>
<br>
This is a pretty simple use case and we have several customers/users<br>
with<br>
thousands of rules and millions of facts in a single session and they<br>
are<br>
not facing anything like you described. So, while a bug is always a<br>
possible<br>
explanation, we need a way to reproduce your problem in order to give<br>
you a<br>
proper answer.<br>
<br>
Edson<br>
<br>
*******************************************<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">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><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>