You're asking for the Moon, and some stars thrown in.<br><br>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.<br>
<br>Try it for yourself and write the rules with negated conditions, e.g.,<br><br>rule "not rule1"<br> when<br> $p : Person($name : name not matches "gogo") <br> then<br> System.out.println( $name + " is not a gogo" );<br>
End<br><br>-W<br><br><br><div class="gmail_quote">2009/4/21 Meny Kobel <span dir="ltr"><<a href="mailto:meny.kobel@gmail.com">meny.kobel@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Hi,<br>In debug mode I need to write to my application log the reason why certain rule failed to be activated.<br>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. <br>
For example:<br><br>DRL file :<br><br>rule "rule1"<br> when<br> Person(name matches "gogo") <br> then<br> System.out.println("gogo");<br>End<br><br>In main class :<br><br>Person A = new Person("dodo");<br>
Person b = new Person("gogo");<br><br>newStatefulSession.insert(A);<br>newStatefulSession.insert(c);<br>newStatefulSession.fireAllRules();<br><br><br>I would like to write to log something like:<br><br>Rule1 wasn't activated since the condition "dodo" matches "gogo" returned false for object Person(dodo)...<br>
<br>Any idea how can I get the rule run results?<br><br>Thanks,<br>Meny<br></div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>