It was asked earlier (I think without followup) whether or not one can
manipulate "fact references" within jess.  I have a similar problem.

Is it at all possible to get the fact's string (what is displayed in the
facts command) returned?  I could implement this as an extension, but I
would rather use existing stuff if possible.  For example I can get a fact
reference (type 16 I believe) from something like 

(defrule footest ?fref <- (foo ?x) => (assert (found-foo-fact ?fref)))
(assert (foo one))
(run)
...
then there is a fact on the fact list that looks like
(found-foo-fact <Fact-1>) .

What I would like is 

(found-foo-fact "(foo one)") or similar.

(get-fact-text <Fact-1>) would be an appropriate function call, or if you
could manipulate the jess.Fact objects directly, we could call the
toString method.

I think making the jess.rete.getFactByID(int) method public, one could get
a fact object by ID number and then call the toString() method, but once
again, that would require fiddling the original code, and remembering to
propagate those changes through later source code updates.

Thanks for reading this long-winded post...

Eric Eslinger
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to