[rules-users] shadow proxy nullpointerexception

Trägenap traegenap at ttc-informatik.de
Tue Dec 9 09:31:40 EST 2008


Hello,

I got some problems with shadowproxy.

I have a couple of instances of class "FirstObj". The objects contains 
some other objects like "innerObj" and have a method "computesomething", 
which returns boolean and use the "innerObj" to compute the result.

I try to access this object with the following rule:

rule "doIt"
when
     $firstobj : FirstObj(computesomething == true)
then
     // take a break...
     System.out.println("be happy");

I debug the programm and figure out that the innerObj is not null. 
Instead of my original object "firstobj", there I found a 
FirstObjShadowProxy which offers a field called "innerObj" which is null.

Isnt it possible to get access to "computed" fields? What is wrong here?

Thanks
Thorsten




More information about the rules-users mailing list