[rules-dev] Property reactive broken in 5.5.0 Final
Mario Fusco
mario.fusco at gmail.com
Wed Dec 19 04:18:21 EST 2012
Hi Wolfgang,
thanks for having pointed this out.
I reproduced this issue and, with Mark's help, fixed it. I just pushed the
fix on the master and backported it to both the 5.5.x and 5.4.x branches.
Mario
On Mon, Dec 17, 2012 at 12:29 PM, Wolfgang Laun <wolfgang.laun at gmail.com>wrote:
> package reactive;
>
> declare Person
> @propertyReactive
> name : String
> age : int
> weight : int
> city : String
> end
> 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.
>
> * As the DRL is, only one rule fires but both should.
> * Adding the Integer pattern (in either form) in both rules may result in
> both rules firing, or only one, but both should.
>
> Best
> -W
>
> rule kickoff
> salience 100
> when
> then
> Person p = new Person( "Joe", 20, 20, "Boston" );
> insert( p );
> insert( new Integer(1000) );
> end
>
> rule "y"
> when
> $p : Person(name == "Joe" )
> // $o : Integer( intValue == 1000)
> // $o : Integer()
> then
> modify($p){
> setAge( 100 )
> }
> end
>
> rule "x"
> when
> $p : Person(name == "Joe" )
> // $o : Integer( intValue == 1000)
> // $o : Integer()
> then
> modify($p){
> setWeight( 100 )
> }
> end
>
> rule z
> salience -100
> when
> $p : Person()
> then
> System.out.println( $p );
> end
>
> // End
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20121219/28ab21c2/attachment.html
More information about the rules-dev
mailing list