Hi ,

Suppose i have a FuzzyRete engine in my jave program and i am calling

engine.Eval("someantecedents => ( new Ssomething (engine) ))")
and my Ssomething class is the same as below. Now will "(engine)" return a
FuzzyRete instance or just a Rete object?

Regards,
Mrinal

On 4/7/07, Mrinal Khanvilkar <[EMAIL PROTECTED]> wrote:

Hi,

i have the following rule.

(defrule someRule
    "comment"
    (Callhome (thing1 ?a)(thing2 ?b))
    (test (try
        (eq ?a ?b)
      catch
        FALSE))

    ;(test(eq ?b TRUE))
    =>
    (printout t crlf (jess-type engine) )
    (new chars.Ssomething engine)
    (try (printout t "done" crlf) catch )
        )

and my Ssomething program looks like this

package chars;

import jess.Rete;

public class Ssomething {

    public Ssomething(Rete engine){
        try {
            System.out.println (engine.eval("(printout t crlf
\"helloworld\")"));
        } catch (Exception Ex) {
            Ex.printStackTrace();
        }
    }
}

Now as seen above , i want to pass the refernce of me rete (engine) from
my jess rule to my java program, can this be done?

Actually i have three programs running.
1. this is the main web application for the user interface
2. from this main application i am calling the Jess engine and passing
facts and rules to it.
       Now in the conclusion of the rule i am running a expect script
which later calls a different java program itself.
3. Here in this java program(called from expect) i want to create another
fact and pass it to the engine. So can i pass the reference of the jess
Engine from the jess rule itself (something like "this")?

Thanks,
Mrinal

Reply via email to