]
Jozef Marko updated DROOLS-4985:
--------------------------------
Fix Version/s: 7.33.0.Final
A Spreadsheet decision tables does not convert to a DRL file
correctly when a Function is being used in the RuleTable constraints
---------------------------------------------------------------------------------------------------------------------------------
Key: DROOLS-4985
URL:
https://issues.redhat.com/browse/DROOLS-4985
Project: Drools
Issue Type: Bug
Components: Guided Decision Table Editor, XLS Score Card Editor
Affects Versions: 7.32.0.Final
Reporter: Oscar Molina
Assignee: Toni Rikkola
Priority: Major
Labels: drools-tools, support
Fix For: 7.33.0.Final
The attached "test_functions.xlsx" spreadsheet which is being used for creating
a “Spreadsheet decision tables” asset. This spreadsheet contains a “Function” and has
some rules. These rules use the “Function” in the constraints. When this XLSX Decision
Table is converted to a “Guided Decision Table”, the constraints are missing the
“Function” calls. Surprisingly if the “Function” call is used in a System.out.println
statement, the generated DRL correctly contains it.
A wrongly generated DRL rule
{code}
rule "Row 3 Hello RuleTable"
dialect "mvel"
when
$person : Person( gender == "Female" , married
== true )
then
$person.setHelloMsg( "Miss" );
System.out.println(hello($person.getName(),
"Miss", "how are you doing"));
end
{code}
Expected correct DRL rule
{code}
rule "Row 3 Hello RuleTable DRL"
dialect "mvel"
when
$person : Person( gender == "Female" , married
== true )
then
$person.setHelloMsg( hello($person.getName(),
"Miss", "how are you doing") );
System.out.println(hello($person.getName(),
"Miss", "how are you doing"));
end
{code}
Regards,
Oscar.