Hi,
I just tried this on a simple Bean and I did not observe the problem
you're reporting (nor did I expect to.) A transcript is below.
If you can reproduce the problem in a similar transcript, please send
it along - you may have found a bug. But make sure that it's not
something else - for instance, the "not" wont trigger if you retract
the (initial-fact).
----------------------------------------------------------------------
c:/users/root/jess5> cat Bean.java
public class Bean
{
public String getName() { return "Fred"; }
}
c:/users/root/jess5> java jess.Main
Jess, the Java Expert System Shell
Copyright (C) 1998 E.J. Friedman Hill and the Sandia Corporation
Jess Version 5.0 1/28/2000
Jess> (defclass bean Bean)
Bean
Jess> (bind ?bean (new Bean))
<External-Address:Bean>
Jess> (definstance bean ?bean static)
<Fact-0>
Jess> (watch rules)
TRUE
Jess> (defrule test-rule
(bean (name "Fred"))
=>)
TRUE
Jess> (run)
FIRE 1 test-rule f-0
1
Jess> (undefinstance *)
TRUE
Jess> (definstance bean ?bean static)
<Fact-1>
Jess> (run)
FIRE 1 test-rule f-1
1
Jess>
----------------------------------------------------------------------
I think Calicrates Policroniades Borraz wrote:
>
> Hi, I have a simple question.
>
> If I have the next simple rule in a script:
>
> (defrule I-cant-see-the-object
> (not (element (name "object")))
> =>
> (assert (no_object))
> )
>
> where element is a bean that comes from a Java program and name is a slot.
>
> I clear the kb of elements with rete.executeCommand("(undefinstance *)")
> If the previous rule is fired once, it will not be fired again because the
> element wich name is "object" has fired the rule even though I had
> cleared the kb of elements. I mean, If I include a new element with name
> "object" it won't fire the rule. I suppouse that Jess takes the new income
> as if were the one that fired the rule previously.
>
> I understand this property with simple asserted facts (because support
> the refraction property of an expert system), but it's not clear for me
> why a bean that has bean removed with undefinstance and included again in
> the kb is not recognized by the rule as a new fact.
>
> How can I activate the rule with the new income that comes in the shape
> of a bean without Jess thinks that is the same fact?
>
> Thank you in advance...
>
> Calicrates.
>
> ---------------------------------------------------------------------
> 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]
> ---------------------------------------------------------------------
>
---------------------------------------------------------
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]
---------------------------------------------------------------------