[rules-users] are for loops possible in drools

Dinesh kumar dinp87 at gmail.com
Mon Aug 2 10:21:15 EDT 2010


Hi,

I faced a similar problem. This thread helped me to solve the issue. this
keyword is working fine for me. U can check whether it is supported in your
version. I am using 5.0.1

But even this keyword works for me, I am facing another problem.

The then block executed for every success in the block
i.e., say there are 10 items in the list and 5 of the matches the regex,
then the when block executed 5 times.

Is this the only way to iterate a loop..?
My business scenario involves nested for loops. Is it possible in drools..?

How do I write a nested for loop. Remember that my inner for loop requires
values from the outer loops and this inner loops will go up to 3 or 4
levels. Is it possible and even if it is possible, will the coding become so
complex so that the business user who is going to use it may not understand
??

Kindly advice.

Regards,
Dinesh
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/are-for-loops-possible-in-drools-tp1011729p1016053.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list