[rules-users] Dealing with Complex objects in Drools

JimmyM dimitar.miloseski at thalesgroup.com.au
Wed Jan 2 02:56:13 EST 2008


Apologies as i wasn't clear that Object2 is defined and created within
Object1.

Therefore to get to objList2, i need to flatten Object1, which means i need
to insert each object of objList1 in the list separately, but some of my
objects contain many objects which contain many lists of objects so it would
be rather difficult to flatten every single object out.

Is there a way that i can use the from method to cycle through lists within
lists?



JimmyM wrote:
> 
> Will the 'from' CE iterate over each object within objList2? 
> 
> for example
> 
> when
> $o1 : Object1()
> $o2 : Object2(objList2.field1 != null) from $o1.object2
> then
> #do something
> end
> 
> or will i need to flatten out each list and deal with each object
> separately?
> 
> 

-- 
View this message in context: http://www.nabble.com/Dealing-with-Complex-objects-in-Drools-tp14572385p14574795.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list