Looks like (ppdefrule *) is sufficient, Jess> (foreach ?v (explode$ (ppdefrule *)) (ppdefrule ?v)) Jess reported an error in routine call while executing (call (engine) findDefrule ?__rule) while executing (bind ?__defrule (call (engine) findDefrule ?__rule)) while executing (if (eq ?__rule *) then (bind ?sb (new StringBuffer)) (bind ?it (call (engine) listDefrules)) (while (call ?it hasNext) (call ?sb append (new jess.PrettyPrinter (call ?it next))) (call ?sb append " ")) (call ?sb toString) else (bind ?__defrule (call (engine) findDefrule ?__rule)) (if (neq ?__defrule nil) then (call (new jess.PrettyPrinter ?__defrule) toString) else (str-cat "No such rule: " ?__rule))) while executing deffunction ppdefrule while executing (ppdefrule ?v) while executing (foreach ?v (explode$ (ppdefrule *)) (ppdefrule ?v)). Message: No overloading of method 'findDefrule' in class jess.Rete I can call with these arguments: (call (engine) findDefrule ?__rule). Program text: ( foreach ?v ( explode$ ( ppdefrule * ) ) ( ppdefrule ?v ) ) at line 3. Je
________________________________ From: Wolfgang Laun <wolfgang.l...@gmail.com> To: jess-users@sandia.gov Sent: Wednesday, September 2, 2009 1:55:47 PM Subject: Re: JESS: how to dumping rules ? (rules) just prints, returning nil. (foreach ?v (explode$ (ppdefrule *)) (ppdefrule ?v)) -W On Wed, Sep 2, 2009 at 11:25 AM, jo <etaoi...@yahoo.com> wrote: Hi > >>I tried to dump the rules loaded at some point in time as follows but it did >>not work out... >>I do not know the names beforehand and have to figure out why they are not >>firing... > >>Jess> (rules) >>For a total of 0 rules in module MAIN. >>Jess> (defrule x (f $? )=>) >>TRUE >>Jess> (rules) >>MAIN::x >>For a total of 1 rules in module MAIN. >>Jess> (bind ?rulelist (rules)) >>MAIN::x >>For a total of 1 rules in module MAIN. >>Jess> ( foreach ?v ?rulelist (ppdefrule ?v )) >>Jess reported an error in routine foreach >> while executing (foreach ?v ?rulelist (ppdefrule ?v)). >> Message: Argument must be ValueVector, Collection, or Iterator: nil. >> Program text: ( foreach ?v ?rulelist ( ppdefrule ?v ) ) at line 6. >>Jess> (printout t ?rulelist) >>nil > >>Jess> > >>Kind Regards, >>joe > > > > > >>-------------------------------------------------------------------- >>To unsubscribe, send the words 'unsubscribe jess-users y...@address.com' >>in the BODY of a message to majord...@sandia.gov, NOT to the list >>(use your own address!) List problems? Notify owner-jess-us...@sandia.gov. >>-------------------------------------------------------------------- > >