This Jess snippet will get rid of all your rules and queries
(bind ?iter ((engine) listDefrules))
(while (?iter hasNext)
(bind ?rule (?iter next))
(undefrule (?rule getName)))
If the object returned from the iterator is instanceof Defrule/Defquery
it is a rule/query, so you could restrict deletions to either subclass.
kr
Wolfgang
ivo jonker wrote:
> Hello everyone here at the JESS group!
>
> Is it possible to dispose all defined rules in the current jess
> session? (sort of the (reset) for rules.)
>
> The reason i'm asking is that i'd like to be able to refresh the
> rule-base during runtime of our application.
>
> Kind regards,
> Ivo Jonker
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users
you@...'
in the BODY of a message to
majordomo@..., NOT to the list
(use your own address!) List problems? Notify
owner-jess-users@....
--------------------------------------------------------------------