cancel
Showing results for 
Search instead for 
Did you mean: 

Nested Decision Table Issue

Former Member
0 Kudos

Hi All,

I have a below scenario where in I will have a input like

- Japan  Tomato  200.

Below is how my decision table setup looks like. The 'Item' condition has nested decision tables.

Based on the input i want the the BRF PLus to evalute Rule2 and further evaluate nested Decisoin table 'Vegie' to check if tomato belongs to Veggie and return result as 'WASI'.

The issue that i am facing is, when i try to activate the Main decision table, i get the error message that the 'Item' column must have a boolean result.

Is it possible using my approach?

Now i am guessing how to achieve this:

        -> without boolegan

        -> and With Boolegan

Main Descision Table
Country ItemQuantityApprover (Result)
Rule1ParisFruits>1000SAM
Rule2JapanVegie>100Wasi
Rule3SpainDryFruits>500Mike
Sub Decision Table - Fruits
ItemItem Group (Result)
AppleFruits
BananaFruits
grapesFruits
Sub Decision Table - Veggie
ItemItem Group (Result)
tomatoVeggie
potatoVeggie
onionVeggie
Sub Decision Table - DryFruits
ItemItem Group (Result)
datesDryFruits
almondDryFruits
cashewDryFruits

Accepted Solutions (1)

Accepted Solutions (1)

carsten_ziegler
Active Contributor
0 Kudos

You nest the decision table not into the cell but into the column.

In your main decision table there will be a column ITEM GROUP.

The column ITEM GROUP is a decision table with all lines of your nested tables above.

Then you can use the result of the nested table in your main table like any other field/column.

Former Member
0 Kudos

Thanks Carsten for reply,

Yes, I think  thats what I have done.  but while activation i get the error message that the 'Item' column must have a boolean result..

Master Decision table column 'Item' and Nested decision table column 'Item Group' is the same.

Former Member
0 Kudos

Wow. All this time I've been using BRFplus and I didn't know you could nest expressions at the decision table column level (as opposed to the cell level). Now I fell silly. This could have simplified some of the decision tables I've created in the past. Thanks Carsten!

Jameela

When Carsten suggests nesting a decision table into a column of the main decision table he means that you should:

1. Create a new decision table that consolidates all the entries from your three sub decision tables into one. (The three separate decision tables are no longer needed and can be deleted)

2. Add a new column in the main decision table via the "Insert Column -> From Expression" option and then select your new decision table.

Once that is done, you will be able to enter values in each cell of the new column that will be compared to the result of new decision table.

Regards

Glen

carsten_ziegler
Active Contributor
0 Kudos

This does not make any sense to me. A column never enforces a specific result type.

Can you activate the inner decision table?

Then empty all cells of the respective column of your main decision table. Then please activate the main decision table.

carsten_ziegler
Active Contributor
0 Kudos

You are not silly at all. There are many good answers from you in this forum.

Technichally it is very simple. A data object as well as an expression is just an ID for the using object (e.g. the main decision table). During processing the ID needs to be resolved into a value. That value can be the value of a data object or the result of an expression. Once the value is there it can be used such as in comparisons of cell values.

The beauty of the architecture is that an expression does not need to know what an ID is, as long as its type fits. Expressions have results that have types such as context data objects.

Former Member
0 Kudos

Thanks Carsten and Glen for the help.

Answers (2)

Answers (2)

kutjohn
Active Participant
0 Kudos

Hi Jameela,

Did you find the solution???

Regards JP

Former Member
0 Kudos

Yes John.. reply by Glenn is the solution.

Former Member
0 Kudos

Hi

Rather than using decision tables for the nested expressions, you could use value ranges instead. If the Item matches one of the values in the value range then a boolean True will be returned to that cell in the decision table.

Regards

Glen