Re: JESS: Retrieving slot and multislot values
"Ernest Friedman-Hill" <[email protected]>
| Newsgroups | gmane.comp.java.jess |
|---|---|
| Message-ID | <[email protected]> |
I don't know the context (sorry) in which you're doing this, so you'll have to make up your own mind. Read this for some info: http://www.jessrules.com/jess/docs/71/library.html#resolution You can always use the global context for a Rete object by calling Rete.getGlobalContext() . If you absolutely, positively know that a value contains no variables, and no function calls that produce a variable or reference a Rete object, then you can get away with passing "null" -- but getGlobalContext() is safer, of course. On Sep 15, 2010, at 11:02 AM, Donald Winston wrote: > /* I need to retrieve slot and multislot values. */ > > Value v1 = fact.getSlotValue(slotName).toString()); > /* Assuming above is ok */ > Value v2 = fact.getSlotValue(multiSlotName); > ValueVector vv = v2.listValue(context); > > where or how do I construct an appropriate "context"? > > Do I need to do this for v1 also or is toString() good enough? --------------------------------------------------------- Ernest Friedman-Hill Informatics & Decision Sciences, Sandia National Laboratories PO Box 969, MS 9012, 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]. --------------------------------------------------------------------