Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-2007

non-matching rule fires randomly and results in infinite-loop

XMLWordPrintable

    • 2023 Week 36-38 (from Sep 4)

      The issue happens with specific problematic rule like below.
      ~~~
      rule "Rule_174"
      when
      $fact : Fact(
      pattern == "PatternA",
      $itemList : itemList
      )
      $item : Item(
      flag == null,
      $typeScore : typeScore
      ) from $itemList

      $record : Record(
      key == $fact.key,
      specialHandlingFlag != null,
      decompScore == null,
      type == $item.type
      )
      not Record(
      this != $record,
      key == $fact.key,
      specialHandlingFlag != null,
      decompScore == null,
      type == $item.type
      )
      then
      System.out.println("[DEBUG] before $fact=" + $fact + ", $item=" + $item + ", $record=" + $record);

      modify($record)

      { recordScore = $typeScore, decompScore = $typeScore }

      modify($item)

      { flag = "1" }

      modify($fact)

      { itemList = $itemList }

      System.out.println("[DEBUG] after $fact=" + $fact + ", $item=" + $item + ", $record=" + $record);

      end
      ~~~

      In this rule, regarding $item fact taken from 'from' operator, flag is set to "1" in RHS .
      But the same fact still match this rule continuously even if 2nd condition does not match(i.e. flag == null). This does not happen always but surely happens randomly.

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-hmiura Hiroko Miura
              Daniel Rosa Daniel Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: