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

From with modify fires unexpected rule

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.17.0.Final
    • Fix Version/s: None
    • Component/s: core engine
    • Labels:
    • Sprint:
      2019 Week 05-07
    • Steps to Reproduce:
      • See unit test PR
    • Docs QE Status:
      NEW
    • QE Status:
      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

              Assignee:
              mfusco Mario Fusco
              Reporter:
              tkobayashi Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: