[rules-users] Dealing with Complex objects in Drools

JimmyM dimitar.miloseski at thalesgroup.com.au
Wed Jan 2 20:00:48 EST 2008


There was an error in the sample code i posted earlier. 
objList should have been objList2

$o2 : Object2(objList2.field1 != null) from $o1.object2

this also returns the error "unable to resolve property: field1"

Mark Proctor wrote:
> 
>    
> make sure the 'from' expression returns a collection, then this will do 
> what you want.
> 
> 
also when i use this instead (java.util.Arraylist has been imported):

$o2 : ArrayList(objList2.field1 != null) from $o1.object2

the error is:

unable to resolve property: unable to resolve token: objList2.field1 

I've inserted only the base object (object1) into working memory. 
For some reason i cant access attributes deeper than object 2. 

What am i doing wrong? 



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




More information about the rules-users mailing list