Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
7.35.0.Final
-
None
-
2020 Week 13-15 (from Mar 23)
-
-
NEW
-
NEW
Description
Executable model rule compilation fails when trying to bind a List from a double square bracket
Example of DRL that fails to compile:
rule "binding field indexed with square brackets" when $boundList: java.util.List() from [[1,2,3]] Pojo($boundList.containsAll(integerList)) then end
Error:
com.github.javaparser.ParseProblemException: Encountered unexpected token: "[" "[" at line 1, column 1. Was expecting one of: "!" "(" "+" "++" ...
The example works fine when compiling without executable model.
We acknowledge that there are better and more efficient ways to achieve the same result as the above example, but there are perhaps other use-cases for the double square bracket mvel expression. As it is supported in DRL, should it be supported with executable model too?