JESS: Obtaining a fact-id from an External Address

2004-05-26 Thread Jason Morris
Hello All (and most likely EJF) GIVEN: A java.util.Iterator of External Address: jess.Fact objects containing the results of a defquery asking for all shadow facts of a certain type in working memory. PROBLEM:Find the corresponding fact-ids of each External Address: jess.Fact via Jess

JESS: accessing a java function

2004-05-26 Thread Brenda K Hamilton
I have a Java object, foo, which is not a bean. Foo has some function, x, that returns a Java object, say a List. From within a Jess rules file, I need to have access to foo, call x, obtaining the List. Foo is originally instantiated from a Java program that is also responsible for initiating

RE: JESS: Obtaining a fact-id from an External Address

2004-05-26 Thread Jason Morris
Hey thanks, Ernest. I think that I was laboring under the misconception that not all of Jess's API was exposed via the Jess language. Just so I understand: All Jess API methods are accessible via Jess script as you show below? -JM -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

RE: JESS: accessing a java function

2004-05-26 Thread Jason Morris
Brenda K Hamilton wrote on May 26, 2004 6:13 AM: I have a Java object, foo, which is not a bean. Foo has some function, x, that returns a Java object, say a List. From within a Jess rules file, I need to have access to foo, call x, obtaining the List. Foo is originally instantiated from a Java

Re: JESS: Obtaining a fact-id from an External Address

2004-05-26 Thread ejfried
I think Jason Morris wrote: Just so I understand: All Jess API methods are accessible via Jess script as you show [in your previous message]? Well, they're all there, but some of them you may not be able to call. Methods that directly work with Value or ValueVector types (i.e., as arguments or

RE: JESS: accessing a java function

2004-05-26 Thread Brenda K Hamilton
Hi Jason, I'm still playing with it. The examples in Chapter 5 is using the bind and creating the Java object from within the Jess script. I am trying to store the Java object from within a Java program, then executing the Jess script that needs to access the Java object's functions. Brenda

Re: JESS: accessing a java function

2004-05-26 Thread Udo Dieckmann
This is easily done. Assume you have in your java code a query result set of type ResultSet, called rset1. In your java code, you would do something like this: Rete engine = new Rete(this); ... ResultSet rset1 = null; boolean results = stmt1.execute(SELECT ...); if( results )

JESS: Retracting large number of facts

2004-05-26 Thread Mithun Sheshagiri
Hi all, I am developing an application that involves a large number of transient facts. Addition of facts is obviously not a problem; deletion is a bit tricky. I was trying to make use of the logical construct to remove facts. for example, (defrule yo (logical

Re: JESS: Retracting large number of facts

2004-05-26 Thread ejfried
I think Mithun Sheshagiri wrote: logical construct which has been reported and fixed in the 6.1p7 version http://www.mail-archive.com/[EMAIL PROTECTED]/msg05983.html Note that this is an incremental reset problem only -- i.e., it only happens if the rules are defined after the facts they

Re: JESS: Retracting large number of facts

2004-05-26 Thread Mithun Sheshagiri
Hello, Thank you for your prompt response. If you meant that the proper ordering solves the problem in version 6.1p7 then please ignore the remainder of the mail. I defined the rule first and then asserted the fact that triggers the rule. Here is trace of what I tried. Jess