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

With executable model drools keyword is not found when used in a method call

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 7.35.0.Final
    • core engine
    • None
    • 2020 Week 13-15 (from Mar 23)
    • Hide

      run

      mvn clean test
      

      on attached reproducer.

      Show
      run mvn clean test on attached reproducer.
    • NEW
    • NEW

    Description

      Executable model rule compilation fails on rule consequents using the drools keyword as a parameter of a method call.

      Example of DRL that fails to compile:

          function printRuleName(String ruleName) {
            System.out.println(ruleName);
          }
          
          rule "drools keyword in method call"
          when
          then
              printRuleName(drools.getRule().getName());
          end
      

      The example works fine when compiling without executable model.

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            mcasalino Matteo Casalino (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: