In further investigation, it appears that I cannot assert within a rule
called by a previous assert. I was trying to assert the value on the RHS
of a rule which is fired from a previous assertion within another rule.
Is this a problem for 6.0?

rule1
    assert value

causes rule2 to fire
    assert value in rule2

should cause rule 3 to fire but does not.



Verified by moving assertion in rule2 to rule1 and rule3 fired.

Is there another method I can use to start rule3 from within rule2?

I can provide more of the code and/or output if required.
Thanks for your quick response.
Jeff Ruff

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:ejfried@;ca.sandia.gov]
Sent: Tuesday, November 05, 2002 1:19 PM
To: [EMAIL PROTECTED]
Subject: Re: JESS: Variable not being asserted


I think Ruff, Jeff wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> I am very new to JESS and JAVA. When I assert a string as shown below
It
> is not asserted as shown in the following output from watch facts.
> Because the printout works I assume that there are no syntax errors.
> When I try to write a rule that uses PSN, it never fires.  Any help
> would be appreciated.

Obviously, this is only part of your program, so I can't say for sure
what's up -- but let's see. You mention "watch", but I don't see the
output of "watch facts" anyplace, which looks lke

 ==> f-0 (MAIN::foo)

So perhaps you haven't called "(watch facts)," or perhaps the output
is not shown here. It's possible that the fact-id's that you're seeing
are simply the return values of (assert) statements that are being
executed at the top level of a script; if that's the case, then the
assert embedded in "if" wouldn't show up in the same way.

Now, as far as your rule firing or not: did you call (run) or
Rete.run()? Rules don't fire except during calls to run. Or perhaps
you call reset immediately before run,  not realizing that reset
removes all existing facts. reset ought to be called -before- all the
other setup you're doing, but not after.


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to