Please don't email me direct. I won't reply in the future. All questions and answers are of value to the community as a whole.<div><br></div><div>AFAIK, Activation Cancelled events would trigger in reaction to the revocation of a logically inserted fact that caused an activation to trigger in the first place. It would not help identifying which pattern in a rule was not matched causing your rule not to activate.</div>
<div><br></div><div>I don't believe there is a public API (or any) that could be used to trace which RETE nodes matched for a given rule's definition and hence which did not for you to identify unmatched patterns. Someone correct me if I am wrong.</div>
<div><br></div><div>Of the top of my head, you could possibly achieve what you are looking for by structuring your rules differently; having each pattern in a separate rule and tracking accumulated rule activations yourself. Not nice, not helpful if rules are authored by anybody other than a techy, but it might just work....</div>
<div><br></div><div><font class="Apple-style-span" face="'courier new', monospace">rule "bootstrap"</font></div><div><font class="Apple-style-span" face="'courier new', monospace">salience 100</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">�� �when</font></div><div><font class="Apple-style-span" face="'courier new', monospace">�� � � �not exists Tracker(rule == �"rule 1")</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">�� �then</font></div><div><font class="Apple-style-span" face="'courier new', monospace">�� � � �insert(new Tracker("rule 1"));</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">end</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace">rule "rule 1 - subrule 1"</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">�� �when</font></div><div><font class="Apple-style-span" face="'courier new', monospace">�� � � �$t : Tracker(rule == "rule 1")</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">�� � � �MySubPattern1( ... )</font></div><div><font class="Apple-style-span" face="'courier new', monospace">�� �then</font></div><div><font class="Apple-style-span" face="'courier new', monospace">�� � � �$t.addMatchSubRule("subrule 1");</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">�� � � �update($t);</font></div><div><font class="Apple-style-span" face="'courier new', monospace">end</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br>
</font></div><div><font class="Apple-style-span" face="'courier new', monospace">rule "rule 1 - subrule 2"</font></div><div><font class="Apple-style-span" face="'courier new', monospace">�� �when</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">�� � � �$t : Tracker(rule == "rule 1")</font></div><div><font class="Apple-style-span" face="'courier new', monospace">�� � � �MySubPattern2( ... )</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">�� �then</font></div><div><font class="Apple-style-span" face="'courier new', monospace">�� � � �$t.addMatchedSubRule("subrule 2");</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">�� � � �update($t);</font></div><div><font class="Apple-style-span" face="'courier new', monospace">end</font></div><div><br></div><div>If Tracker(rule == "rule 1") does not contain stages 1 and 2 then you can determine which pattern did not match.</div>
<div><br></div><div>Untried, untested.</div><div><br></div><div>Cheers,</div><div><br></div><div>Mike</div><div>��</div><div><br><div class="gmail_quote">On 3 November 2010 09:31, <span dir="ltr"><<a href="mailto:renganathan.p@tcs.com">renganathan.p@tcs.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Dear Manstis,<br>
<br>
Hope you are doing good.<br>
<br>
I saw your post regarding �AgendaEventlisterner.<br>
<br>
I got your zip file, the code is working fine.<br>
<br>
But the activationcancellation method is not getting invoked. I need to identify which condition in the rule failed.<br>
<br>
Can you pls help me.<br>
<br>
Regards,<br>
<br>
Renganathan P<br>
</blockquote></div><br></div>