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

MVELConstraint warning raised after upgrading to v8.41

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 8.41.0.Final
    • core engine
    • None
    • 2023 Week 30-32 (from Jul 24)
    • NEW
    • NEW
    • ---
    • ---

      After upgrading to v8.41 which fixed issue DROOLS-7462 for us, using that same drl raises a new warning in logs.

      DRL:

      rule "__NOMINAL_Virtual_Instrument_State__"
      salience 99
      when
      $info : InstrumentInfoEvent(virtual == true, customStateRule == false)
      InstrumentStateEvent(server == $info.server, instrument memberOf $info.members)
      then
      insertLogical(new InstrumentStateEvent($info.server, $info.instrument, InstrumentState.NOMINAL));
      end

      Warning:

      WARN [main] (MVELConstraint.java:481) - $info is not relevant to this pattern, so it causes class reactivity. Consider placing this constraint in the original pattern if possible : $info.members contains instrument

      Changing the rule to recommended 

      $info.members contains instrument

      results in an identical warning.

      Can be reproduced easily using linked issue test case by observing logs.

      Commit that introduced this change: https://github.com/kiegroup/drools/commit/963cdeacbf4159d51f2fa8cef056e2b9576135a4

              mfusco@redhat.com Mario Fusco
              alan.sambol Alan Sambol (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: