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

From with modify fires unexpected rule

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 7.17.0.Final
    • core engine
    • 2019 Week 05-07
      • See unit test PR
    • NEW
    • NEW

    Description

      The rules below expect that only "R1" is fired when Person ("John", 20) is inserted. However, "R2" is also fired though age is set to 5 in modify block.

      rule "R1"
          salience 1
          when
              $p : Person()
              Person( age > 10 ) from $p 
          then
              modify ($p) {
                setAge(5);
              }
              System.out.println( "R1, " + $p);
      end
      
      rule "R2"
          salience 0
          when
              $p : Person()
              Person( age > 10 ) from $p 
          then
              System.out.println( "R2, " + $p);
      end
      

      Attachments

        Issue Links

          Activity

            People

              mfusco@redhat.com Mario Fusco
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: