[rules-users] Property Navigation

Michael B. michael.bain at mckesson.com
Tue May 6 19:09:04 EDT 2008


Alessandro:

I wrote a test case and some classes around your example and mailed them to
you, I was not able to get them to post on this list for some reason.

Thanks...Michael

Alessandro Lazarotti wrote:
> 
> 
> 
> 
>   
> 
> 
> Hi, Michael... 
> The code that I wrote has a property "name" and not "nome". Sorry, the
> example not is the same that the Exception. 
> But ocurr the same error. 
> 
> org.drools.RuntimeDroolsException: Exception executing predicate 
> org.drools.base.mvel.MVELPredicateExpression at 18488ef
> Caused by: org.mvel.CompileException: unable to resolve property: name
> Caused by: org.mvel.PropertyAccessException: unable to resolve
> property:name 
> 
> 
> 
> 
> Michael B. escreveu:
> 
>   According to your error it appears you had a typo somewhere.  The error
> you
> pasted in was looking for the property nome instead of name.
> 
> 
> 
> Alessandro Lazarotti wrote:
>   
>   
>     If  I've the simple classes:
> 
> public class ObjectBar{ public String name; gets/sets}
> 
> public class ObjectFoo{ public ObjectBar bar; gets/sets }
> 
> ... and ObjectFoo this in WorkingMemory.
> 
> It's not possible navigate in objectFoo for make constraint in objectBar?
> Example:
> 
> rule "Teste"
> no-loop true
>     when
>         $foo: ObjectFoo(objectBar.name != "foobar")
>     then
>         System.out.println($foo);
> end   
> 
> ... but:
> org.drools.RuntimeDroolsException: Exception executing predicate 
> org.drools.base.mvel.MVELPredicateExpression at 18488ef
> Caused by: org.mvel.CompileException: unable to resolve property: nome
> Caused by: org.mvel.PropertyAccessException: unable to resolve property: 
> nome
> 
> Thanks
> Alessandro Lazarotti
> 
> 
> 
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org 
> https://lists.jboss.org/mailman/listinfo/rules-users 
> 
> 
>     
>   
>   
>   
> 
> 
> 
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 


-----
Drools Noob since 5/2008
-- 
View this message in context: http://www.nabble.com/Property-Navigation-tp17089209p17093653.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list