[rules-users] For each - properties

Betto Bardi betto.bardi at yahoo.com
Sun Oct 4 08:00:30 EDT 2009


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


      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DroolsTest.java
Type: application/octet-stream
Size: 3575 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20091004/dc42a597/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ruleflow.rf
Type: application/octet-stream
Size: 1242 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20091004/dc42a597/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Sample.drl
Type: application/octet-stream
Size: 211 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20091004/dc42a597/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot.JPG
Type: image/jpeg
Size: 130283 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20091004/dc42a597/attachment.jpe 


More information about the rules-users mailing list