Dear All,
I'm trying to embedd Jess in a Java Gui.
if I try to run a batch file by the rete engine with the following java
statement:
m_rete.batch(jessfile);
assume that
jessfile = "./jess/goB.clp"
I get the following error message:
An error occurred at line: 25
which look like: ( load-facts ./jess/facts_behandeling.clp )
Errormessage: Undefined function Groep
This is a familair error message if a deftemplate is not executed before the
load-facts command is executed.
But in the goB.clp file the deftemplate.clp file is executed before the
load-facts command.
(batch ./jess/deftemplate.clp)
(load-facts ./jess/facts_behandeling.clp)
The deftemplate.clp file looks like:
;Template om veelgebruikte termen in het systeem per groep op te slaan.
;Groepen : TestSoort,MonsterSoort,Ernst,Behandeling,Ziekteverwekker,Beroep
;Leeftijdgroep,Geslacht,Populatiesoort,Gebouwfunctie
(deftemplate Term
(slot Groep) ;Groepsnaam
(slot Naam)) ;Term
A part of the facts_behandeling.clp:
(MAIN::initial-fact)
(MAIN::Term (Groep Behandeling) (Naam "Licht"))
In Jesswin these goB.clp file executes fine.
In the java application it is not.
It looks like the deftemplate.clp file is not executed, but I didn't receive
any errors.
Has anyone any idea why the rete engine produces this error?
Is there a workaround.
Thanks In Advance.