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

DroolsComplierAntTask shows asymetry with respect to compound proposition ordering

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 4.0.7
    • drools-ant
    • None

    Description

      The Drools ant task compiler produces an error when reordering a propositions in compound rules.

      the following rules compiles without error.
      >>>>
      rule "XYZ"
      salience 5
      agenda-group "XYZGroup"
      when
      $resp : Response(profile != null)
      (or
      (and
      Results(code in (1011 , 1012 , 1013 , 1014 , 4091)) from $resp.profile.results
      Results(iD==14, code in (1015 , 1016 , 1017 , 1018)) from $resp.profile.results
      )
      Results(iD==14, code==1051) from $resp.profile.results
      )
      then

      <<<<

      while this rule

      >>>>
      rule "XYZ"
      salience 5
      agenda-group "XYZGroup"
      when
      $resp : Response(profile != null)
      (or
      Results(iD==14, code==1051) from $resp.profile.results
      (and
      Results(code in (1011 , 1012 , 1013 , 1014 , 4091)) from $resp.profile.results
      Results(iD==14, code in (1015 , 1016 , 1017 , 1018)) from $resp.profile.results
      )
      )
      then

      <<<<

      generates the following error

      RuleBaseTask failed: Unable to determine the used declarations.
      java.lang.Class : [Rule name=XYZ, agendaGroup=XYZGroup, salience=5, no-loop=false]
      Unable to build expression for 'from' node '$resp.profile.results(and
      Results(code in (1011 , 1012 , 1013 , 1014 , 4091)) from $resp.profile.results
      Results(iD==14, code in (1015 , 1016 , 1017 , 1018)) from $resp.profile.results
      )' : [Rule name=XYZ, agendaGroup=XYZGroup, salience=5, no-loop=false]

      Attachments

        Activity

          People

            etirelli@redhat.com Edson Tirelli
            rlefebvr_jira Roger Lefebvre (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Archived:

              PagerDuty