The build command can only be used to create constructs (defrule, etc.)
see: http://herzberg.ca.sandia.gov/jess/docs/60a6/functions.html#build
The eval command only allows functions to be evaluated.
see: http://herzberg.ca.sandia.gov/jess/docs/60a6/functions.html#eval
I tried to use:
(execute-on-engine (engine) (str-cat ?cmd))
but it didn't work either. I'll keep looking into it.
alan
-----Original Message-----
From: Thomas Gentsch [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 11, 2001 3:28 PM
To: Jess
Subject: JESS: Debug rule
Hello,
I wanted to create a rule as some kind of an debugging-aid which allows
me to submit facts that are interpreted as regular commands.
I tried the following in different variations but can't get it to work
as expected:
(defrule exec-itm_command-string
(declare (salience 10000))
?f <- (TgeFact (text TGE-Command: ?cmd))
=>
(build ?cmd)
(retract ?f)
)
and asserted e.g.
(TgeFact (text TGE-Command: "(facts)"))
Nothing happens. Similraly I tried out (eval ) and multifields for ?cmd
(passed as (explode$ ?cmd) of course.
Is there any nice way how to accomplish that?
Thanks a lot,
tge
--
Thomas Gentsch
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
---------------------------------------------------------------------
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]
---------------------------------------------------------------------