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

Property reactive may cause pending activations to be removed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 6.0.0.Alpha9
    • None
    • None
    • None

    Description

      This is a simple all-DRL test case demonstrating that property reactive
      may cause pending activations to be removed, depending on some
      specific composition of the LHS:

      declare Person
      @propertyReactive
      name : String
      age : int
      weight : int
      end

      rule kickoff
      salience 100
      when
      then
      Person p = new Person( "Joe", 20, 20 );
      insert( p );
      end

      rule y
      when
      $p : Person(name == "Joe" )
      then
      modify($p)

      { setAge( 100 ) }

      end

      rule x
      when
      $p : Person(name == "Joe" )
      then
      modify($p)

      { setWeight( 100 ) }

      end

      rule z
      salience -100
      when
      $p : Person()
      then
      System.out.println( $p );
      if ($p.getAge() != 100 || $p.getWeight() != 100) throw new RuntimeException();
      end

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            mfusco@redhat.com Mario Fusco
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: