Details
-
Bug
-
Resolution: Done
-
Critical
-
6.0.3
Description
Description of problem:
In decision tables we can provide parameters separated by comma and refer to it using the directives $1, $2 etc. However, when trying to get the value $10 it will never work with error or compiling to a bad DRL.
Version-Release number of selected component (if applicable):
N/A.
How reproducible:
Always.
Steps to Reproduce:
1. Create a Spreadsheet decision table
2. In the field action, use the mentioned syntax and try to access the 10th parameter:
System.out.println($10)
3. Provide 10 values:
"One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten"
Actual results:
Error:
Rule Compilation error Syntax error on token "0", delete this token
Expected results:
Print to the 10th parameter.
Additional info:
if we do not use quotes on the parameter, it will not have any error, but will compile to a bad DRL.
Action:
System.out.println("$10")
Value:
One,Two,Three,Four,Five,Six,Seven,Eight,Nine,Ten
It will compile to:
rule "ParamTest"
// Test parameters more than 9
when
then
System.out.println("One0");
end