[rules-users] Nested objects

Mark Proctor mproctor at codehaus.org
Sat Jul 9 03:15:51 EDT 2011


Looks like a bug. Moral of the story is always try an upgrade during 
candidate release cycle, or earlier, so you can feedback bugs quicker :)

Log a jira, preferably with a self contained test, along the lines of 
MiscTest. And we'll try and fix it for 5.3.

Mark
On 09/07/2011 06:39, Amin Mohammed-Coleman wrote:
> Hello there
>
> I have the following object model
>
> ClassA
>    String name
>    ClassB classB
>
> ClassB
>    String status
>    String context
>
> Before upgrading drools 5.2.0.Final I had the following rule:
>
> when
> ClassA ( classB.status =='Open' && name =='Hello' && 
> classB.context='jump')
> then
> System.out.println("Hit rule");
> end
>
> However after upgrading to 5.2.0 the above rule does not get fired, 
> instead I have to do the following:
>
> when
> ClassA ( *name =='Hello' *&& classB.status =='Open' && 
>  classB.context='jump')
> then
> System.out.println("Hit rule");
> end
>
> or
>
> when
> ClassA ( classB.status =='Open' &&  classB.context='jump' 
> &&*name=='Hello'*)
> then
> System.out.println("Hit rule");
> end
>
>
> Has there been a change causing the original rule not to work? Or 
> should the approach always be to use
>
> when
> ClassA ( *name =='Hello' *&& classB.status =='Open' && 
>  classB.context='jump')
> then
> System.out.println("Hit rule");
> end
>
> or
>
> when
> ClassA ( classB.status =='Open' &&  classB.context='jump' 
> &&* name=='Hello'*)
> then
> System.out.println("Hit rule");
> end
>
> Any help would be appreciated
>
> Thanks
> Amin
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110709/0d91e247/attachment.html 


More information about the rules-users mailing list