Jess Information

Jess Home
Jess 7 Features
Download Now!
Online Demo

Documentation
FAQ
Manual
Mailing List
Jess Wiki

More information Related Web Sites
User Contributions
JSR94 Info
Developer's Log
About This Site

JESS ®, the Rule Engine for the JavaTM Platform

Jess Wiki: All Agenda

(deffunction all-agenda ()
    "List all the activations in every module on the focus stack"
    (bind ?I 1)
    (bind ?FOCUS_STACK (get-focus-stack))
    (bind ?FOUND_AGENDA FALSE)
    (while (<= ?I (length$ ?FOCUS_STACK))
        (bind ?FOCUS (nth$ ?I ?FOCUS_STACK))
        (if (((engine) listActivations ?FOCUS) hasNext) then
            (agenda ?FOCUS)
            (bind ?FOUND_AGENDA TRUE))
        (bind ?I (+ ?I 1)))
    (if (eq ?FOUND_AGENDA FALSE) then
        (agenda MAIN))
    (printout t "Focus Stack: " ?FOCUS_STACK crlf))

Submitted by:
GeorgeWilliamson
Union Pacific Railroad
gawillia@up.com



DebuggingTips


Front Page | Sandbox | Recent Changes | Powered by Friki | Last Edited: 18 August 2006