on ‎2013 Mar 11 11:08 AM
Dear Experts,
we wanted to implement a decision table looking like this:
| Age | Value |
|---|---|
| 10-19 | aaa |
| 20-29 | bbb |
| 30-39 | ccc |
So in this case with an age-input 17 we would get aaa back. For 25 bbb.
First Idea was building the table like this:
| Age From | Age To | Value |
|---|---|---|
| 10 | 19 | aaa |
| 20 | 29 | bbb |
| 30 | 39 | ccc |
But then we didn't come further with a decision table solution and ended up with the following rule flow / script:
So my question is: Is this approach ok? Is there a possibility using decision tables for this requierement?
Thanks a lot,
Koray
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Koray,
I am not sure if I understand your problem completely. I haven't worked with rule scripts and don't know if they are a standard feature available in BRFplus (atleast, I haven't noticed them).
Nevertheless, to me, the logic of your rule script and your decision table seems same to me (except that in the script, I don't see the case where the value 'ccc' would be returned and this may be a typo). To your question whether this logic can be implemented using a decision table in BRF+, yes it certainly can. And, in fact, you need not even have two different columns - one for 'age from' and the other for 'age to'. You can have just one field 'age' and specify a range (like > 10 AND < 19).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.