I think Bogdan Werth wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
>             Hello Jess-list,
>             I wonder if it is possible to delete old rules/facts in a
>             while-loop if they all contain the same ID in either
>             rule-name or fact-name.

You could certainly use the Rete.listDefrules() method and look at the
name of each Defrule object returned by the Iterator. It would be safe
to hand the name of each rule to the Rete.unDefrule() method as you
encounter it.

For facts, if you can't simply have a rule which matches the facts you
want to retract, you could use a defquery. That would give you access
to all the matching facts, and again, you could retract them one by

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

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