Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-1065

Unable to return Declaration for identifier

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.0.0.GA
    • Fix Version/s: 4.0.1
    • Component/s: drools-compiler
    • Labels:
      None
    • Environment:

      Windows XP, Java 1.6

      Description

      I've read in the 4.0 features list where implicit binding for value expressions will be available in the 4.0 release. I've downloaded 4.0GA and still getting the compiler error. We have a need for the following and wondering if I'm misunderstanding the functionality:

      Fact/bean object code:
      public class Record {
      private String abc;
      private String xyz;
      public String getAbc()...
      public String getXyz()...
      ...
      }

      DRL code:
      rule "..."
      when
      $record : Record ( abc == xyz)
      then
      ....
      end

      The PackageBuilder can not resolve the "xyz"

      I understand we can define the Record alias and then reference xyz using the alias (see example below) but it would be asking too much for our business users.
      rule "..."
      when
      r: Record ( )
      $record : Record ( abc == r.xyz)
      then
      ....
      end

      Any feedback with this is greatly appreciated!!!

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tirelli Edson Tirelli
                Reporter:
                tl33 Tong Lee
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: