decision table excel - AND and OR conditions

2,364 views
Skip to first unread message

Prabhakar Aluri

unread,
Jul 1, 2016, 2:50:15 PM7/1/16
to Drools Usage
Can anyone help me understand how to add multiple conditions in decision table excel with 'AND' and 'OR' separators?

example: I need to specify a condition like this

Product == 'New' AND Brand = 'ABC' AND (SubProduct in ('11','22','33') OR Location='YYY') in decision table excel.

Please point me to any examples available on net.

Thanks

Michael Anstis

unread,
Jul 4, 2016, 5:28:19 AM7/4/16
to Drools Usage
Decision Table columns always have an explicit AND between them.

You would have to emulate OR yourself by clever construction (and duplication) of columns. For example

Brand        SubProduct        Location        Action
ABC          11                                Whatever
ABC          22                                Duplicate "whatever" from above
ABC          33                                Duplicate "whatever" from above
ABC                            YYY             Duplicate "whatever" from above

You don't specify whether you're using XLS Decision Tables or Guided Decision Tables in the workbench.

If you're using Guided Decision Tables you can create a "BRL Condition Fragment" (New column->Show advanced options) and include the OR in that definition.


--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/eb4f6bf4-2d92-4833-b787-09aaad23045d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Prabhakar Aluri

unread,
Jul 5, 2016, 5:24:21 AM7/5/16
to Drools Usage
Thanks Michael. I am using XLS decision table. Is there a way to add these OR conditions in XLS?

Thanks

Michael Anstis

unread,
Jul 5, 2016, 5:27:02 AM7/5/16
to Drools Usage
Only the way I showed; where you manually split the OR into duplicate columns.

All columns in XLS Decision Tables are implicitly AND.

Reply all
Reply to author
Forward
0 new messages