On Thursday 19 April 2007 8:31:35 am M Ismail wrote: > > how can i get back the slot "h_description" back in to java? i want to get > the last one which is "long hair, Frames: 0, 1, 4, "
There are two parts to the solution. First, you have to get ahold of the data; and second, you have to put it where you want it. I'm being deliberately vague because there are so many different ways to do this. For example, let's say that you have a rule that matches this interesting fact; this takes care of step one. Then on the right-hand-side of the rule, you just need to put the value someplace where your Java code can find it. You can use the store/fetch mechanism, as described in the manual (see the Jess function "store" and the Java method Rete.fetch()), or you can simply call a Java method you've provided for this purpose yourself. But there are many other scenarios as well. For example, let's say control is in the Java code. Then you might use a defquery to find the interesting fact, and the slot value would be available via the QueryResult. Again, this is all detailed in the manual. --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://www.jessrules.com -------------------------------------------------------------------- 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] --------------------------------------------------------------------
