Hi!
>Here is my problem. I wrote a Java Class which goal is to
>retrieve informations in a database and write these
>informations as Jess facts. I'd like to call this Class
>within Jess, but I don't know how to retrieve the
>engine which has called the Java Class, in the Java
>Class itself.
You need to define a method that takes the Rete engine as an argument:
public void queryDatabase(..., Rete engine) {
...
engine.assert(...);
...
}
In your Jess script, you can the call
(call ?your-java-object queryDatabase ... (engine))
where ?your-java-object is the reference to an instance of your Java class.
(engine) is a predefined function that returns a reference to the Rete
engine.
Greetings, Thomas
+-------------------------------------------------------------+
| This message may contain confidential and/or privileged |
| information. If you are not the addressee or authorized to |
| receive this for the addressee, you must not use, copy, |
| disclose or take any action based on this message or any |
| information herein. If you have received this message in |
| error, please advise the sender immediately by reply e-mail |
| and delete this message. Thank you for your cooperation. |
+-------------------------------------------------------------+
---------------------------------------------------------------------
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]
---------------------------------------------------------------------