Received: from mm02snlnto.son.sandia.gov (mm02snlnto.sandia.gov [132.175.109.21])
        by mailgate2.sandia.gov (8.12.11/8.12.11) with ESMTP id i7BJ1h9F007190
        for <[EMAIL PROTECTED]>; Wed, 11 Aug 2004 13:01:43 -0600 (MDT)
Received: from 205.228.12.101 (hqvsbh1.ms.com) by
 mm02snlnto.son.sandia.gov with ESMTP (Tumbleweed MMS SMTP Relay 01 (MMS
 v5.6.1)); Wed, 11 Aug 2004 13:01:27 -0600
X-Server-Uuid: 8A37177F-35F9-47CF-80CF-3627B2E578DE
Received: from hqvsbh1.ms.com (localhost [127.0.0.1]) by
 localhost.ms.com (Postfix) with SMTP id 17900187DA for
 <[EMAIL PROTECTED]>; Wed, 11 Aug 2004 15:01:27 -0400 (EDT)
Received: from ny37im02.ms.com (unknown [144.14.31.41]) by
 hqvsbh1.ms.com (internal Postfix) with ESMTP id 09EBB187D2 for
 <[EMAIL PROTECTED]>; Wed, 11 Aug 2004 15:01:27 -0400 (EDT)
Received: from nywexbh02.msad.ms.com (nywexbh02 [144.14.138.178]) by
 ny37im02.ms.com (Sendmail MTA Hub) with ESMTP id i7BJ1Qh23966 for
 <[EMAIL PROTECTED]>; Wed, 11 Aug 2004 15:01:26 -0400 (EDT)
Received: from nywexbh06.msad.ms.com ([205.228.46.151]) by
 nywexbh02.msad.ms.com with Microsoft SMTPSVC(5.0.2195.5329); Wed, 11
 Aug 2004 15:01:26 -0400
Received: from NYWEXMB27.ms.com ([205.228.46.120]) by
 nywexbh06.msad.ms.com with Microsoft SMTPSVC(5.0.2195.5329); Wed, 11
 Aug 2004 15:01:26 -0400
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
content-class: urn:content-classes:message
MIME-Version: 1.0
Subject: RE: JESS: defclass problem
Date: Wed, 11 Aug 2004 15:01:26 -0400
Message-ID: <[EMAIL PROTECTED]>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Importance: normal
Priority: normal
Thread-Topic: JESS: defclass problem
Thread-Index: AcR/tXsbLn5ZDwP8QkqbIcIXv9JNFgAH4CiQ
From: "Ferreira, Miguel (IT)" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-OriginalArrivalTime: 11 Aug 2004 19:01:26.0274 (UTC)
 FILETIME=[9A105620:01C47FD5]
X-WSS-ID: 6D04B28D1JK1640510-01-01
Content-Type: multipart/alternative;
 boundary="----_=_NextPart_001_01C47FD5.99F04BBE"
X-PMX-Version: 4.6.1.107272, Antispam-Core: 4.6.1.106808, Antispam-Data: 
2004.8.11.110142
Status: RO
X-Status: 
X-Keywords:                 
X-UID: 2


This is a multi-part message in MIME format.

------_=_NextPart_001_01C47FD5.99F04BBE
Content-Type: text/plain;
 charset=us-ascii
Content-Transfer-Encoding: quoted-printable

Hi,
=20
So I got through this by calling the execute command directly, however,
the facts are never asserted.
=20
I define instances this way:
_rulesEngine.store("INSTANCE", fact_);

executeCommand("(definstance " + factType + " (fetch INSTANCE)
dynamic)");

No exceptions are thrown. If I ask for=20

Iterator instances=3D_rulesEngine.listDefinstances();

I get an iterator with all the instances I defined. However
executeCommand("(facts)") tells me I have no facts.

Anyone have an idea of what is going on? This has got me stumped...

Thanks,

Miguel


  _____ =20

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Ferreira, Miguel (IT)
Sent: Wednesday, August 11, 2004 11:12 AM
To: [EMAIL PROTECTED]
Subject: JESS: defclass problem


Hello,
=20
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.
=20
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.
=20
Everything works fine, defclassing children facts of BeanFact for a few
different types and then it fails, with the message:=20
=20
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=20

 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?=20

Thanks,

Miguel

  _____ =20

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

------_=_NextPart_001_01C47FD5.99F04BBE
Content-Type: text/html;
 charset=us-ascii
Content-Transfer-Encoding: quoted-printable

<HTML xmlns:eXclaimer=3D"http://www.exclaimer.co.uk";>
<HEAD>
<META http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3DUTF-16">
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUTF-16">
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD><BODY =
><DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D750005718-11082004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Hi,</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D750005718-11082004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D750005718-11082004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>So I got through this by calling the execute =
command=20
directly, however, the facts are never asserted.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D750005718-11082004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D750005718-11082004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>I define&nbsp;instances this =
way:</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D750005718-11082004>
<P><FONT size=3D2>_rulesEngine.store(<FONT =
color=3D#2a00ff>"INSTANCE"</FONT>,=20
fact_);</FONT></P>
<P><FONT size=3D2>executeCommand(<FONT color=3D#2a00ff>"(definstance =
"</FONT> +=20
factType + <FONT color=3D#2a00ff>" (fetch INSTANCE)&nbsp;<SPAN=20
class=3D750005718-11082004>dynamic</SPAN>)"</FONT>);</FONT></P></SPAN></D=
IV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D750005718-11082004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>No exceptions are thrown. If I ask for </FONT>
<P><FONT face=3DArial color=3D#0000ff size=3D2>Iterator=20
instances=3D_rulesEngine.listDefinstances();</FONT></P>
<P><SPAN class=3D750005718-11082004><FONT face=3DArial color=3D#0000ff =
size=3D2>I get an=20
iterator with all the instances I defined. However =
executeCommand("(facts)")=20
tells me I have no facts.</FONT></SPAN></P>
<P><SPAN class=3D750005718-11082004><FONT face=3DArial color=3D#0000ff =
size=3D2>Anyone=20
have an idea of what is going on? This has got me =
stumped...</FONT></SPAN></P>
<P><SPAN class=3D750005718-11082004><FONT face=3DArial color=3D#0000ff=20
size=3D2>Thanks,</FONT></SPAN></P>
<P><SPAN class=3D750005718-11082004><FONT face=3DArial color=3D#0000ff=20
size=3D2>Miguel</FONT></SPAN></P></SPAN></DIV><BR>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>From:</B> [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] <B>On Behalf Of </B>Ferreira, =
Miguel=20
(IT)<BR><B>Sent:</B> Wednesday, August 11, 2004 11:12 AM<BR><B>To:</B>=20
[EMAIL PROTECTED]<BR><B>Subject:</B> JESS: defclass=20
problem<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>
<DIV><SPAN class=3D366255414-11082004><FONT face=3DArial=20
size=3D2>Hello,</FONT></SPAN></DIV>
<DIV><SPAN class=3D366255414-11082004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D366255414-11082004><FONT face=3DArial size=3D2>I am =
having some=20
problems with defclass for inherited classes.&nbsp;I am using Jess as a =
library=20
within my Java code. I load and define facts through Java, through the =
Rete=20
class.</FONT></SPAN></DIV>
<DIV><SPAN class=3D366255414-11082004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D366255414-11082004><FONT face=3DArial size=3D2>I have =
a base fact=20
named BeanFact which most other facts inherit from. Just before adding a =
fact to=20
Jess, I first check if that class of fact has been defclassed, and if =
not I=20
defclass all of its superclasses (that are not already defclassed) and =
then the=20
class of fact itself.</FONT></SPAN></DIV>
<DIV><SPAN class=3D366255414-11082004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D366255414-11082004><FONT face=3DArial =
size=3D2>Everything works=20
fine, defclassing children facts of BeanFact for a few different types =
and then=20
it fails, with the message: </FONT></SPAN></DIV>
<DIV><SPAN class=3D366255414-11082004><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D366255414-11082004><FONT color=3D#ff0000>
<P><FONT size=3D2>Jess reported an error in routine =
defclass.<BR>Message: No such=20
parent template: WorkLoadOrch.BeanFact.<BR>at jess.d7.a(Unknown =
Source)<BR>at=20
jess.Rete.defclass(Unknown Source)<BR>at=20
WorkLoadOrch.RulesEngineBridge.defClassCheck(RulesEngineBridge.java:56)<B=
R>at=20
WorkLoadOrch.RulesEngineBridge.defClassCheck(RulesEngineBridge.java:53)<B=
R>at=20
WorkLoadOrch.RulesEngineBridge.addFact(RulesEngineBridge.java:69)<BR>at=20
WorkLoadOrch.RulesEngineBridge.addFact(RulesEngineBridge.java:103)</FONT>=
</P>
<P><SPAN class=3D366255414-11082004><FONT face=3DArial color=3D#000000 =
size=3D2>I was=20
debuging and have a call to <FONT size=3D2>listDefclasses() and in the =
Iterator=20
returned I see the <FONT face=3D"Times New Roman"=20
color=3D#ff0000>WorkLoadOrch.BeanFact&nbsp;</FONT></FONT></FONT></SPAN></=
P>
<P><SPAN class=3D366255414-11082004>&nbsp;<SPAN =
class=3D366255414-11082004><FONT=20
face=3DArial color=3D#000000 size=3D2>Any suggestions as to what I can =
do or check?=20
Should I define all the classes at the start of the program rather than =
as I use=20
them? </FONT></SPAN></SPAN></P>
<P><SPAN class=3D366255414-11082004><SPAN =
class=3D366255414-11082004><FONT=20
face=3DArial color=3D#000000 size=3D2>Thanks,</FONT></SPAN></SPAN></P>
<P><SPAN class=3D366255414-11082004><SPAN =
class=3D366255414-11082004><FONT=20
face=3DArial color=3D#000000=20
size=3D2>Miguel</FONT></SPAN></SPAN></P></FONT></SPAN></DIV></DIV>
<DIV>
<HR>
</DIV>
<DIV>
<P class=3DBulletedList=20
style=3D"MARGIN: 0in 0in 0pt; TEXT-INDENT: 0in; mso-list: none; =
tab-stops: .5in"><SPAN=20
style=3D"FONT-SIZE: 8pt; COLOR: gray; mso-bidi-font-family: Arial"><FONT =

face=3DArial>NOTICE: If received in error, please destroy and notify =
sender.<SPAN=20
style=3D"mso-spacerun: yes"> </SPAN>Sender does not waive =
confidentiality or=20
privilege, and use is prohibited.</FONT></SPAN></P></DIV></DIV>
<DIV>
<HR>
</DIV>
<DIV>
<P CLASS=3D"BulletedList" STYLE=3D"MARGIN: 0in 0in 0pt; TEXT-INDENT: =
0in; mso-list: none; tab-stops: .5in"><SPAN STYLE=3D"FONT-SIZE: 8pt; =
COLOR: gray; mso-bidi-font-family: Arial"><FONT FACE=3D"Arial">NOTICE: =
If received in error, please destroy and notify sender.<SPAN =
STYLE=3D"mso-spacerun: yes">  </SPAN>Sender does not waive =
confidentiality or privilege, and use is prohibited.</FONT></SPAN></P>
</DIV></BODY></HTML>

------_=_NextPart_001_01C47FD5.99F04BBE--

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to