Please don&#39;t email me direct. I won&#39;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&#39;t believe there is a public API (or any) that could be used to trace which RETE nodes matched for a given rule&#39;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="&#39;courier new&#39;, monospace">rule &quot;bootstrap&quot;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">salience 100</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    when</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        not exists Tracker(rule ==  &quot;rule 1&quot;)</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    then</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        insert(new Tracker(&quot;rule 1&quot;));</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">end</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">rule &quot;rule 1 - subrule 1&quot;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    when</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        $t : Tracker(rule == &quot;rule 1&quot;)</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        MySubPattern1( ... )</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    then</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        $t.addMatchSubRule(&quot;subrule 1&quot;);</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        update($t);</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">end</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br>
</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">rule &quot;rule 1 - subrule 2&quot;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    when</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        $t : Tracker(rule == &quot;rule 1&quot;)</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        MySubPattern2( ... )</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    then</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        $t.addMatchedSubRule(&quot;subrule 2&quot;);</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        update($t);</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">end</font></div><div><br></div><div>If Tracker(rule == &quot;rule 1&quot;) 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">&lt;<a href="mailto:renganathan.p@tcs.com">renganathan.p@tcs.com</a>&gt;</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>