]
Toshiya Kobayashi updated DROOLS-6041:
--------------------------------------
Sprint: 2021 Week 07-09 (from Feb 15)
Story Points: 3
"RHS doesn't have a type" error when a semicolon is
missing with exec-model and mvel dialect
--------------------------------------------------------------------------------------------
Key: DROOLS-6041
URL:
https://issues.redhat.com/browse/DROOLS-6041
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.50.0.Final
Reporter: Toshiya Kobayashi
Assignee: Toshiya Kobayashi
Priority: Major
With a rule like this: (See, a semicolon is missing in the "p2.age = 30" line)
{noformat}
rule R
dialect "mvel"
when
Person(name == "Mario")
then
Person p2 = new Person("John");
p2.age = 30
insert(p2);
end
{noformat}
exec-model fails with
{noformat}
CompilationProblemErrorResult: org.drools.mvelcompiler.MvelCompilerException: RHS
doesn't have a type
{noformat}
while standard-drl runs successfully.
I'm not sure if exec-model should work the same as standard-drl (treat a new line as
a delimiter?), or give a better error message.
This looks to be a rare issue but when using spreadsheet, it's possible to forget to
add a semicolon. (Then users don't notice the mistake because standard-drl executes it
succesfully)