Actually, there is one thing that changed and might affect this use case:
it is the filter on identity cross product.

   Before RC2, if you had a Rule with 2 columns of the same type, like the
rule you wrote bellow, every object in the working memory of that type,
would try to match against itself. So, for instance, if you had asserted two
messages (m1 and m2) in the working memory for this rule, the activations
would be:

[m1, m1]
[m1, m2]
[m2, m1]
[m2, m2]

   In RC2, we added an identity removal constraint to not allow identity
activations like [m1, m1] and [m2, m2].

   So, what is probably happening to you is that you are asserting a single
message object in the working memory. Before RC2, it would create an
activation for [m1, m1] and now it does not creates anymore.
   As Mark said, this is probably and error when writing the rule, as the
rule should have only one column, not two. A better way to write this rule
would be:

   rule "Hello World"
     when
       m : Message( status == Message.HELLO, message == "Hello World" )
     then
       System.out.println( "fired" );
   end

    This way, each single message object asserted into working memory that
matches the constraints, will cause an activation.

   []s
   Edson


----- Original Message -----
From: "Mark Proctor" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, April 17, 2006 4:26 PM
Subject: Re: [drools-user] RC2


>   package com.sample
>   import com.sample.DroolsTest.Message;
>   rule "Hello World"
>     when
>       m : Message( status == Message.HELLO )
>       Message( message == "Hello World" )
>     then
>       System.out.println( "fired" );
>   end
>
> That's filtering on two columns, its like doing this in SQL:
> select * from Message, Message
> Not what most people want. This hasn't changed in any of the releases
> in Drools 3.0
>
> Mark
>
> Yuesong Wang wrote:
> > Thanks for the great job on RC2. Solved a lot of my
> > problem :)
> >
> > The following rule, however, does not work in RC2
> > anymore...
> >
> >   package com.sample
> >   import com.sample.DroolsTest.Message;
> >   rule "Hello World"
> >     when
> >       m : Message( status == Message.HELLO )
> >       Message( message == "Hello World" )
> >     then
> >       System.out.println( "fired" );
> >   end
> >
> > So the field constraints have to be in the sample
> > column? like
> >
> >   m:Message(status==0, message=="Hello World")
> >
> > That is probably no good, especially for someone who
> > wants to use DSL and map individul conditions to
> > separate sentences.
> >
> > Yuesong
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> >
> >
>
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.4.2/314 - Release Date: 16/4/2006
>
>

Reply via email to