You're asking for the Moon, and some stars thrown in.
Consider the general case, where there isn't just one simple constraint
condition - any of those could fail. The Rete network would have to be
extended enormously to create the NAKtivations you're asking for.
Try it for yourself and write the rules with negated conditions, e.g.,
rule "not rule1"
when
$p : Person($name : name not matches "gogo")
then
System.out.println( $name + " is not a gogo" );
End
-W
2009/4/21 Meny Kobel <[email protected]>
> Hi,
> In debug mode I need to write to my application log the reason why certain
> rule failed to be activated.
> I'm familiar with the "Audit view" but the data isn't sufficient. It
> doesn't write the reason why rule wasn't activated only successful
> activation.
> For example:
>
> DRL file :
>
> rule "rule1"
> when
> Person(name matches "gogo")
> then
> System.out.println("gogo");
> End
>
> In main class :
>
> Person A = new Person("dodo");
> Person b = new Person("gogo");
>
> newStatefulSession.insert(A);
> newStatefulSession.insert(c);
> newStatefulSession.fireAllRules();
>
>
> I would like to write to log something like:
>
> Rule1 wasn't activated since the condition "dodo" matches "gogo" returned
> false for object Person(dodo)...
>
> Any idea how can I get the rule run results?
>
> Thanks,
> Meny
>
> _______________________________________________
> rules-users mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users