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

Field to update is corrupted for rule with multiple types and eval().

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 8.33.0.Final, 8.44.0.Final, 9.44.0.Alpha
    • None
    • None
    • Hide

      Attached is a unit test that shows the failure condition.

      DroolsTest.zip

      The DroolsCorruptionTest.testBreakingRuleExecution() will fail.  It should not.  Next to it are other methods that tweak the drl file slightly showing that the rule does work when either the different object type or the eval() components are removed from the condition.

      Show
      Attached is a unit test that shows the failure condition. DroolsTest.zip The DroolsCorruptionTest. testBreakingRuleExecution() will fail.  It should not.  Next to it are other methods that tweak the drl file slightly showing that the rule does work when either the different object type or the eval() components are removed from the condition.
    • NEW
    • NEW
    • ---
    • ---

      For a particular usecase relationships between fields during rule execution get corrupted.  That usecase is

      • A rule with 2 types of fields in the condition.  Having all the same type of field does not trigger it.
      • A rule with an eval() clause in the condition.  The eval() doesn't need to do anything.  It just needs to be present.

      Given those conditions and a simple rule setting the value of an output field to a constant when an input field is a specified value ends up in the rule executing twice (it should only run once).  The first time running correctly and the second time it sets the input field instead of the output field corrupting the value of a field that should not be touched.

      The following are the releases where it works and where it breaks:

      7.68.0.Final    WORKS
      7.74.1.Final    WORKS
      8.29.0.Final    WORKS
      8.31.0.Final    WORKS
      8.31.1.Final    WORKS
      8.32.0.Final    WORKS
      8.33.0.Final    BROKEN
      8.36.0.Final    BROKEN
      8.44.2.Final    BROKEN
      9.44.0.Final    BROKEN

      It looks like this issue was introduced in 8.33.0.

              mfusco@redhat.com Mario Fusco
              jeff@logik.io Jeffrey Wilkins (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: