I'm doing some experiments with mutiple engines within the same process and I hit the
following
issue. I'd like to construct a function that lets me assert a fact in a different
engine - i.e. I'd
like to do something like
(defrule ..
(some-fact ?parameter)
(other-engine-instance ?rete)
=>
(assert-across-engines ?rete (a-new-fact ?parameter))
..)
The way I see it is I can turn my fact into a string:
(assert-across-engines ?rete (str-cat "(a-new-fact " ?parameter ")"))
and use assertString inside my function. sadly this fails if any of the slots are Java
objects. Or I
can create a new Fact
in the new context then munge over the slots, parameter at a time, which at least lets
me pass Java
object references. Both techniques are, of coure, slow and messy.
What I want to write is what I wrote - the exact analogue to (assert (a-new-fact
?parameter)). It
seems to me that something along the lines of the lisp ' would be useful (I think I
have this correct
- it has been an ____age____ since I wrote any lisp) i.e. don't evaluate this, just
treat it as a
form: (assert-across-engines ?rete '(a-new-fact ?parameter)).
Or am I missing something _very_obvious here .. ??
Tnx
Alanl
---------------------------------------------------------------------
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]
---------------------------------------------------------------------