As you have probably noticed, today is my "decision tables day" :-).
Before telling you what is going wrong, let me show you what kind of
rule I try to put in my Drools 5.1 decision table:
# for each window
$window : Window($elements : elements) from $windows
# for each manual annotation
$an1 : ManualAnnotation( this inside $window && text ==
# if there is another manual annotation
exists ManualAnnotation( this inside $window && text ==
The only things I would like to parametrize are strings in bold.
My decision table looks like this:
CONDITION CONDITION CONDITION
$an1 : ManualAnnotation
$window : Window($elements... this inside $window
text == "$1"
this inside $window text == "$1"
for each window
annotation inside window
Text annotation inside window Text
N/A N/A ToMatch
N/A N/A ToMatch3 N/A ToMatch4
Here are the problems (in bold) with the generated rule:
$an1 : ManualAnnotation( *this inside $window == "N/A"* && text
exists ManualAnnotation( *this inside $window == "N/A"* && text
*$window : Window($elements : elements) from $windows*
* The order of the LHS "fact lines" of the generated rules is the
not same as the order of appearance in the spreadsheet
* The "this inside $window" is considered as a field name
Do you know if I can solve those problems?
I have tried to find a way to tell the decision table to extend another
rule but I haven't found a keyword for that in the documentation.
Maybe do I have to use rule templates?
Show replies by date