on 12-10-2013 2:57 AM
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 | Item | Quantity | Approver (Result) | |
Rule1 | Paris | Fruits | >1000 | SAM |
Rule2 | Japan | Vegie | >100 | Wasi |
Rule3 | Spain | DryFruits | >500 | Mike |
Sub Decision Table - Fruits | ||||
Item | Item Group (Result) | |||
Apple | Fruits | |||
Banana | Fruits | |||
grapes | Fruits | |||
Sub Decision Table - Veggie | ||||
Item | Item Group (Result) | |||
tomato | Veggie | |||
potato | Veggie | |||
onion | Veggie | |||
Sub Decision Table - DryFruits | ||||
Item | Item Group (Result) | |||
dates | DryFruits | |||
almond | DryFruits | |||
cashew | DryFruits |
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
Hi Jameela,
Did you find the solution???
Regards JP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.