Please be more specfic. If your field is called "foo", then
should have a method in the class representing
your fact, such as:
boolean getFoo(){
return <condition> ? ! (<expression>) : <expression>;
}
Basically, <condition> could be a global parameter (public static final)
or a static or regular method call. <expression> could depend on other
attribute values, and so on.
You can then write your CEs with a test such as
foo == true
But I think this is closely related with that other question you
have posted.
-W
On Wed, Feb 17, 2010 at 9:32 AM, djb <dbrownell83(a)hotmail.com> wrote:
Hi Wolfgang,
Sure, I know de Morgan's laws, but I'm not asking how one can negate a
condition...
I'm asking how one can either negate or not negate, based on a test... and
whether I'm going to have to split my spreadsheet/rule-template into 2,
(i.e. 1 for "may not be" rules, 1 for "must be" rules).
My spreadsheet has a field that in Java would be expressed as field ?
!finalResult : finalResult
But in DRL, it seems the lack of a ternary operator means I have to split
my
rule-set, and I'm just checking if this is the case.
-Daniel
--
View this message in context:
http://n3.nabble.com/Negating-a-result-tp212559p212656.html
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users