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.

To quote what I replied to an almost identical request a couple of days ago
and posted to the drools-user mailing list.....

"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".

On 4 November 2010 14:41, <nku...@objectwave.com> wrote:

> Hi, thanks for helping me out with that code. i have one more question, in
> activation cancelled event, it never gets executed.
>
> @Override
>                public void activationCancelled(ActivationCancelledEvent
> event) {
>                        final Rule rule = event.getActivation().getRule();
>                        final String ruleName = rule.getName();
>                        System.out.println("Activation cancelled --> " +
> ruleName);
>                        rules.add(rule);
>                        ruleNames.add(ruleName);
>                }
>
>
> @Override
>                public void activationCreated(ActivationCreatedEvent event)
> {
>                        final Rule rule = event.getActivation().getRule();
>                        final String ruleName = rule.getName();
>                        System.out.println("Activation created --> " +
> ruleName);
>                        rules.remove(rule);
>                        ruleNames.remove(ruleName);
>                }
>
>
> but my output never show this. i only have Activation created printed in
> console. which rule is not executed, that is not printing at the time when
> it is not activated. Please have a look on this.  My output is
>
> Rules not executed
> - GoodBye-rule
> - Hello World-rule
> - Never fires
> Activation created --> Hello World-rule
> Hello World
> Activation created --> GoodBye-rule
> Goodbye cruel world
> Rules not executed
> - Never fires
>
>
> this is the same code which you sent me. Never fires is the rule which
> never gets executed. we print this from the list of rules we have when we
> load the rule file. even if i skip that activation canceled it prints the
> same result.
>
>
> thanks
>
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to