Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-6041

"RHS doesn't have a type" error when a semicolon is missing with exec-model and mvel dialect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.51.0.Final
    • 7.50.0.Final
    • executable model
    • None
    • 2021 Week 07-09 (from Feb 15)
    • 3
    • Undefined
    • NEW
    • NEW
    • ---
    • ---

      With a rule like this: (See, a semicolon is missing in the "p2.age = 30" line)

      rule R
      dialect "mvel"
      when
        Person(name == "Mario")
      then
        Person p2 = new Person("John");
        p2.age = 30
        insert(p2);
      end
      

      exec-model fails with

      CompilationProblemErrorResult: org.drools.mvelcompiler.MvelCompilerException: RHS doesn't have a type
      

      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)

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: