I think Richard Patten wrote:
> Hello everybody,
>     How do I check if a particular fact exists in the knowledge base and if it does 
>I want to retract it if I dont know the fact-id in advance.  I tried using the exists 
>command in a rule but it works only once, that is if there is a fact in the knowledge 
>base then when I the rule will fire for the first time, but if I retract the fact, 
>reassert it and ask to run again then the rule wont fire.
> thanks
> Richard.
> 

Easy -- just don't use "exists." Just write the rule to match the
fact.

You could also consider using a defquery, if you want to find the fact
at a specific time -- i.e., on the RHS of a rule, or from Java.




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

Reply via email to