Details
Description
Environment (Required on creation):
- This is a regression introduced with FEEL Scala Engine version 1.14.0
- The C7 engine uses FEEL Scala Engine version 1.12.4 and 1.13.3
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
The evaluation of an expression structured as myVariable keyword myFunction() fails.
Steps to reproduce (Required on creation):
Evaluate the following expression to reproduce the problem:
eval("if 7 > var then flatten(xs) else []", Map("xs" -> List(1, 2), "var" -> 3))
Observed Behavior (Required on creation):
The following error is shown:
ValError(no function found with name 'myVariable keyword myFunction' and 1 parameters).
Expected behavior (Required on creation):
The expression has the following return value:
ValList(List(ValNumber(1), ValNumber(2)))
Root Cause (Required on prioritization):
The keywords satisfies, return, then, and else are not defined as reserved keywords.
Solution Ideas (Optional):
- Wrap the variable into parentheses
- Fix the bug in the FEEL Engine by adding the keywords satisfies, return, then, and else to the list of reserved keywords: https://github.com/camunda/feel-scala/blob/d538af/src/main/scala/org/camunda/feel/impl/parser/FeelParser.scala#L139-L148
- Release a patch of the FEEL Engine
- Override/replace the FEEL Engine with version 1.14.2 (not released yet) manually by using the shaded artifact feel-engine-$VERSION-scala-shaded.jar
- In C7, bump the FEEL Engine version to 1.14.2 (not released yet) and release a patch
- Release a patch of the FEEL Engine
Hints (optional):
I've already raised a pull request to fix the problem:
https://github.com/camunda/feel-scala/pull/395
mgm-controller-panel
This is the controller panel for Smart Panels app
Attachments
Issue Links
- causes
-
CAM-14356 Bump FEEL Scala Engine to >= 1.14.2
- Closed
- links to