Hello,
 
I am having some problems with defclass for inherited classes. I am using Jess as a library within my Java code. I load and define facts through Java, through the Rete class.
 
I have a base fact named BeanFact which most other facts inherit from. Just before adding a fact to Jess, I first check if that class of fact has been defclassed, and if not I defclass all of its superclasses (that are not already defclassed) and then the class of fact itself.
 
Everything works fine, defclassing children facts of BeanFact for a few different types and then it fails, with the message:
 

Jess reported an error in routine defclass.
Message: No such parent template: WorkLoadOrch.BeanFact.
at jess.d7.a(Unknown Source)
at jess.Rete.defclass(Unknown Source)
at WorkLoadOrch.RulesEngineBridge.defClassCheck(RulesEngineBridge.java:56)
at WorkLoadOrch.RulesEngineBridge.defClassCheck(RulesEngineBridge.java:53)
at WorkLoadOrch.RulesEngineBridge.addFact(RulesEngineBridge.java:69)
at WorkLoadOrch.RulesEngineBridge.addFact(RulesEngineBridge.java:103)

I was debuging and have a call to listDefclasses() and in the Iterator returned I see the WorkLoadOrch.BeanFact 

 Any suggestions as to what I can do or check? Should I define all the classes at the start of the program rather than as I use them?

Thanks,

Miguel


NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

Reply via email to