Please be more specfic. If your field is called "foo", then<br>should have a method in the class representing<br>your fact, such as:<br><br> boolean getFoo(){<br> return <condition> ? ! (<expression>) : <expression>;<br>
}<br><br>Basically, <condition> could be a global parameter (public static final)<br>or a static or regular method call. <expression> could depend on other<br>attribute values, and so on.<br><br>You can then write your CEs with a test such as<br>
foo == true<br><br>But I think this is closely related with that other question you<br>have posted.<br><br>-W<br><br><br><div class="gmail_quote">On Wed, Feb 17, 2010 at 9:32 AM, djb <span dir="ltr"><<a href="mailto:dbrownell83@hotmail.com">dbrownell83@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hi Wolfgang,<br>
<br>
Sure, I know de Morgan's laws, but I'm not asking how one can negate a<br>
condition...<br>
<br>
I'm asking how one can either negate or not negate, based on a test... and<br>
whether I'm going to have to split my spreadsheet/rule-template into 2,<br>
(i.e. 1 for "may not be" rules, 1 for "must be" rules).<br>
<br>
My spreadsheet has a field that in Java would be expressed as field ?<br>
!finalResult : finalResult<br>
<br>
But in DRL, it seems the lack of a ternary operator means I have to split my<br>
rule-set, and I'm just checking if this is the case.<br>
<br>
-Daniel<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://n3.nabble.com/Negating-a-result-tp212559p212656.html" target="_blank">http://n3.nabble.com/Negating-a-result-tp212559p212656.html</a><br>
</font><div><div></div><div class="h5">Sent from the Drools - User mailing list archive at Nabble.com.<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>
</div></div></blockquote></div><br>