[rules-users] Query query...

Wolfgang Laun wolfgang.laun at gmail.com
Tue Nov 9 14:26:58 EST 2010


How are classes MyObject1 and MyObject2 related? Is there a field "status"
in each of them and/or in their common superclass?

-W

2010/11/9 Dennis Duggan <dennis at esptechnologies.com>

>  I have 2 types of objects in my knowledge base that I am trying to
> equate.  Equality is based on a number of different variables contained in
> the objects.  Once I find equal objects I set a status member in each to
> “Matched”, otherwise it will be “OneKnows” or “TwoKnows”.
>
>
>
> After I fire the rules I use queries that I call from Java code to get the
> three different types of objects.
>
> *query* "OneFirmKnows"
>
>     oRecord : MyObject1( status=="OneKnows" )
>
> *end*
>
>
>
> *query* "TwoKnows"
>
>     oRecord : MyObject2( status=="TwoKnows" )
>
> *end*
>
>
>
> *query* "Matched"
>
>     oRecord : MyObject1( status=="Matched" )
>
> *end*
>
>
>
> Each query sends back all objects no matter what the status is.  The
> objects have a getStatus( ) method.  What am I doing wrong?
>
>
>
> Thanks!
>
> Dennis
>
> _______________________________________________
> 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/20101109/b34eefff/attachment.html 


More information about the rules-users mailing list