Vimal Ramesan

How to write rules within a nested loop

Discussion created by Vimal Ramesan on Apr 6, 2013
Latest reply on Aug 12, 2013 by Andreas Nilsen

I'm trying set up a rule that works on each element of a collection. I set up a pattern to do this. However, my collection is two levels deep. For e.g.. my main object is of type Department, which contains a list of Employees, which in turn has a list of Tasks. Now, I want to write a rule at the Task level.


I was able to write a rule at the Employee level by defining a pattern of Employees. However, I wasn't able write a rule at Task level without having to write a for loop. This is because when I try to define a pattern of Tasks using the earlier defined pattern, it throws an error (something like Pattern cannot be used in this context). My users aren't programmers - they would like the looping to be implicit. Is there a way to do this?