[rules-users] For each - properties
Kris Verlaenen
kris.verlaenen at cs.kuleuven.be
Thu Oct 8 06:02:28 EDT 2009
I believe that you do not need a for each node here. Note that rules
automatically get executed "for each" possible match. So if you write a
rule that checks a loan linked to a person, it will automatically do
this for each loan related to that person. E.g.
when
p:Person()
Loan (personId == p.id)
...
will get executed for each loan linked to that person.
Kris
Quoting Betto Bardi <betto.bardi at yahoo.com>:
> Hello,
>
> I have been experimenting with the for each loop in Drools Flow, but
> I cannot get it to work. This is because I don't know how to specify
> the properties of this node. Could you please have a look at the
> attached sample and point me in the right direction on how to specify
> these properties? I'm struggling mainly with the properties:
> CollectionExpression and Variable Name (marked red in the attached
> file: screenshot.jpg).
>
> As you can see in the attached file DroolsTest.java my domain model
> is simple. There are two entities, Person and Loan. A Person can have
> zero or more Loans. The for each construction in the flow file should
> execute some rule for each Loan belonging to a Person.
>
> I appreciate your help.
>
> Thanks,
> Betto Bardi
>
>
>
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
More information about the rules-users
mailing list