Red Hat Bugzilla – Bug 996976
Guided Decision Table: empty cells are ignored in the source
Last modified: 2016-07-31 21:07:55 EDT
Created attachment 786512 [details]
ignored cell, invalid rule
Description of problem:
If you don't fill a value into a cell, that fact pattern is ignored in the source of that row. This doesn't really make sense and creates problems once you try to update that fact in an action column.
As you can see in the screenshot, I have a Fact [f], field [==] condition column and a f, field action column updating the field on the fact from the condition column. I have one row with only the action column cell filled in.
The source code then shows this:
1. | //from row number: 1
2. | rule "Row 1 gdt"
3. | dialect "mvel"
4. | when
5. | then
6. | f.setField( "aaa" );
7. | end
As you can see, this creates an invalid rule.
This happens for any empty cell, not just those in condition columns.
The only understandable occurrence of this is for the attribute columns, where e.g. salience without a value would again create an invalid rule.
Version-Release number of selected component (if applicable):
kie-wb 6.0 CR1
Not sure if I am understanding this correctly, but decision tables are supposed to not create conditions for empty cells. I am assigning to Michael for him to double check that is the case. If so, it is not a bug.
The only scenario where this is potentially valid is where a field's data-type is String and the value is a space or spaces. Can you confirm this? Obviously the other scenario where there's an action to update an existing fact where the pattern is excluded remains a valid - and flawed - scenario.
*** Bug 996964 has been marked as a duplicate of this bug. ***
You are right.
Based on comment 1 and comment 2, I'll be closing this as not a bug and reopening the other BZ (bug 996964), now marked as duplicate of this, since that is an issue.