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.
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. 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. 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.... rule "bootstrap" salience 100 when not exists Tracker(rule == "rule 1") then insert(new Tracker("rule 1")); end rule "rule 1 - subrule 1" when $t : Tracker(rule == "rule 1") MySubPattern1( ... ) then $t.addMatchSubRule("subrule 1"); update($t); end rule "rule 1 - subrule 2" when $t : Tracker(rule == "rule 1") MySubPattern2( ... ) then $t.addMatchedSubRule("subrule 2"); update($t); end If Tracker(rule == "rule 1") does not contain stages 1 and 2 then you can determine which pattern did not match. Untried, untested. Cheers, Mike On 3 November 2010 09:31, <renganatha...@tcs.com> wrote: > Dear Manstis, > > Hope you are doing good. > > I saw your post regarding AgendaEventlisterner. > > I got your zip file, the code is working fine. > > But the activationcancellation method is not getting invoked. I need to > identify which condition in the rule failed. > > Can you pls help me. > > Regards, > > Renganathan P >
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users