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

Wrong BetaIndex offset with Or in executable-model

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 7.47.0.Final
    • executable model
    • None
    • 2020 Week 52-03 (from Dec 21)
    • 2
    • Undefined
    • NEW
    • NEW
    • ---
    • ---

      Fix for DROOLS-5916 was not enough. LambdaConstraint.indexingDeclaration needs to be updated when an original Declaration is replaced. If not, betaIndex uses a wrong offset to retrieve a fact from a tuple.

      This rule can reproduce the offset problem.

      import org.drools.modelcompiler.domain.Person;rule R when
        $e : Person(name == "Edson")
        $p : Person(name == "Mark") or
        ( $mark : Person(name == "Mark")
          and
          $p : Person(age == $mark.age) )
        $s: String(this == $p.name)
      then
        System.out.println("Found: " + $s);
      end
      

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: