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

Drools unable to compile rules when using a declared enum in the DRL file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • None
    • None
    • None
    • 2019 Week 29-31, 2019 Week 32-34, 2019 Week 35-37
    • 7
    • Hide

      I have attached a zip of a very simple project with included test cases.

      This can be compiled using maven, but when executing the rules through the included test case, it fails - giving "Error: unqualified type".

      There is another test that reads the very same drl file through an alternate method, and the test passes.

      Show
      I have attached a zip of a very simple project with included test cases. This can be compiled using maven, but when executing the rules through the included test case, it fails - giving "Error: unqualified type". There is another test that reads the very same drl file through an alternate method, and the test passes.
    • NEW
    • NEW

    Description

      I am finding inconsistent behaviour between drools reading rules from a local file (as a fileSystemResource) as opposed to pre compiling the rules into a kjar.

      This happens if I use an enum declared within the drl file in the "when" or "then" section of a rule within the same drl file.

      The rule runs perfectly as expected if I load the rule from the filesystem, but fails to run if I have pre-compiled the rule. For this reason I think this is a bug as I would expect the same behaviour for both ways of running rules.

      I outlined the problem in more detail stackoverflow:

      https://stackoverflow.com/questions/56989080/drools-maven-plugin-not-understanding-locally-declared-enums-when-compiling-drl

      This is running JAVA8 and drools 7.23.0.Final

      Attachments

        Activity

          People

            lmolteni@redhat.com Luca Molteni
            rawbb Robert Buchmann (Inactive)
            Tibor Zimányi Tibor Zimányi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: