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

Inappropriate "Missing Header" DecisionTableParseException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.0.Beta3
    • None
    • core engine
    • None
    • 2017 Week 24-25
    • NEW
    • NEW

      Introduced in this commit,

      A condition in the "when" section of a drt file, which begins with the word package, such as:

      Unable to find source-code formatter for language: mvel. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
              $box: Box (
                  packageName == $productPackageName,
              )
      

      ... will cause an error:

      org.drools.template.parser.DecisionTableParseException: Missing header
      	at org.drools.template.parser.DefaultTemplateContainer.parseTemplate(DefaultTemplateContainer.java:127)
              .......
      

      Previously, the parsing logic would only look for unindented keywords. Now, DefaultTemplateContainer will trim the line, see that it starts with the word "package," and error out.

              mfusco@redhat.com Mario Fusco
              christianlowe Christian Lowe (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: