[rules-users] How to use multiple objects of the same class in RHS
Wolfgang Laun
wolfgang.laun at gmail.com
Wed Apr 4 08:40:57 EDT 2012
On 04/04/2012, Dennis Lupiana <Dennis.Lupiana at dit.ie> wrote:
> Please help.
> -----------
>
> I have inserted four objects of the same type in the working memory using
> array.
There's no point in inserting an array Person[]. Insert Person objects.
> I want to write a rule which will be activated when certain values in
> the objects are met. Let say my object is Person and it has a username field
> with values John, Peter, Jane and Judy for each object. I want to write a
> rule that will be activated when username is Peter and Jane.
One name can only have one value. Do you mean "when there is one
Person with username "Peter" and another Person "Jane"?
when
Person( username == "Peter" )
Person( username == "Jane" )
then
...
>
> Thanks
> --------
More information about the rules-users
mailing list