I don't know why what you show below isn't working for you, but here's
a complete working example:

A Java class Foo.java:
----------------------------------------------------------------------
import jess.*;

public class Foo {
    public static void bar(Fact fact) throws JessException {
        System.out.println(fact);
    }
}
----------------------------------------------------------------------

A Jess transcript:
----------------------------------------------------------------------
[ejfried@foss tmp]$ java jess.Main

Jess, the Java Expert System Shell
Copyright (C) 1998 E.J. Friedman Hill and the Sandia Corporation
Jess Version 6.0 12/7/2001

Jess> (defrule foo-bar
  ?a <- (foo bar)
  =>
  (bind ?G (new Foo))
  (call ?G bar ?a))
TRUE
Jess> (reset)
TRUE
Jess> (assert (foo bar))
<Fact-1>
Jess> (run)
(MAIN::foo bar)
1
Jess>
----------------------------------------------------------------------

I think [EMAIL PROTECTED] wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]

> in my java code
> ...
> public void fooBar(int fadctId){...}
> ...
> 
> 
> in my jess code
> ...
> (defrule foo-bar
> ?a <- (foo bar)
> =>
> (bind ?G (fetch G))
> (call ?G fooBar (call ?a getFactId))
> 
> and the answer is:
> message : no overloading of the method fooBar in the class ... i can use with
> these arguments (call ?G fooBar (call ?a getFactId))
> --------------------------------------------------------------------------------
> 
> second example:
> 
> in my java code
> ...
> public void fooBar(Fact fadctId){...}
> ...
> 
> 
> in my jess code
> ...
> (defrule foo-bar
> ?a <- (foo bar)
> =>
> (bind ?G (fetch G))
> (call ?G fooBar ?a )
> 
> and the answer is:
> message : no overloading of the method fooBar in the class ... i can use with
> these arguments (call ?G fooBar ?a )
> 
> So, my question is always the same : how can i get back a Fact id (or Fact) in 
> my java programm?
> 


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

--------------------------------------------------------------------
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