[rules-users] Loop Drools on Multi Element

FrankVhh frank.vanhoenshoven at agserv.eu
Wed Feb 22 02:15:51 EST 2012


Actually, I think that laune's solution is preferable as it should be a bit
more understandable.

Basically the rule states

If
 An order is not high priority
  And
 There is no item with a quantity <= 2 in that order (Meaning, all items in
the order have a quantity > 2)
Then
 Set prioiry of order to high

The main difference between his rule and your rule would be that you would
have to access quantity via your nested objects, while laune assumed it to
be accessible directly. 

As for the example of forall, I never tried it with a list. Maybe I'll do it
later today. I would suggest you try it the laune-way.

Regards,
Frank


aliosha79 wrote
> 
> Can you give me an example using forall? as i tried with a list object and
> i m not able to make it to work.
> You can take into account the classes generated by the jaxb engine
> described within my previous post.
> Really thanks!
> Alessio
> 


--
View this message in context: http://drools.46999.n3.nabble.com/Loop-Drools-on-Multi-Element-tp3761638p3765759.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list