[rules-users] Bug: Shadow facts

Arjun Dhar dhar_ar at yahoo.com
Mon Jul 30 08:21:38 EDT 2007


Hi,
 I have an Object 'Configuration'

public class BooleanConfiguration {
  String paramName;
  Boolean value;
  Client client;
}

I asserted this object and the rule was not executing as I expected.

I put a break point in the object, and found that it set it correctly but 
whenenver the rule engine called the get method the vaue of the object was null.

I traced this the place where it creates shadows in Rete.java.
I had observed a similar behaviour in version 3.1 or 3.6 (if there was a 3.6). 
it was more prolific then. I have over 50 objects, only this one is giving a 
problem.

I made the class 'final' (This prevents a shadow from being created), and voila 
my rule worked as expected.
Note: None of the otehr objects needed a final, but had comeplex associations.
But this particular object does not run, unless declared final.

The fact that i have to use 'final' for it to work, seals it for me as a bug.

thanks,
Arjun




More information about the rules-users mailing list