[rules-users] decision table 'not exists'

Mark Proctor mproctor at codehaus.org
Wed Sep 21 16:30:40 EDT 2011


On 21/09/2011 21:23, hmoazed wrote:
> Thanks Mark for the quick reply, but I already know about the "not", I just
> don't know what the syntax is in a decision table. Normally in a rule I
> would write:
>
> when
>      not ( exists ( Object(pattern == "somePattern"))
> then
>      ...
no that is redundant, you never need to write the two together like 
that. Either use 'not' or use 'exists', not both together.

you can use drools-templates to get a more flexible mapping from drl to 
decision tables. The latest Guvnor in 5.3 supports this at a web level.

Mark
>
>
> but I don't know how to represent the above in an XLS spreadsheet decision
> table. In the cell below CONDITION I can write:
>
> exists Object
>
> and then in the cell below put the condition:
>
> pattern == "SomePattern"
>
> and it works great. But I don't know how to introduce the "not" to the
> above. I tried:
>
> not ( exists Object)
>
> and it compiled into nothing (that cell was ignored without error), and I
> tried \( \), nothing, I tried:
>
> not exists Object
>
> and the compiled rule is missing the parenthesis.
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/decision-table-not-exists-tp3356570p3356686.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>





More information about the rules-users mailing list