In a batch file I have several rules. Most are within the module MAIN At the end of the file I have:
(defmodule MISCTESTING) (printout t "Module is "(get-current-module) crlf) (defrule misc-testing-event ?ee <- (event (eventId ?eId)(OBJECT ?o)) => (printout t "Rule : In misc-testing event id is "?eId crlf) (printout t "* Event " ?eId " has a disease Plan ID: " (?o getDiseasePlanId) crlf) (printout t "* Event " ?eId " has a assigned PHO: " (?o getAssignedPho) crlf) ) (defmodule MULTIPLE) (printout t "Module is "(get-current-module) crlf) (defrule populate-multiple-programs-based-on-event-type ?e <- (event (conditionCodeId ?ccId) (eventDescriptor ?evtDescriptor)(OBJECT ?o)) => (printout t "Rule : In populate multiple programs " crlf) ) (focus MAIN) (focus MISCTESTING) (focus MULTIPLE) The resulting printouts: Rule : In populate multiple programs Rule : In misc-testing event id is 100017 * Event 100017 has a disease Plan ID: 100001 * Event 100017 has a assigned PHO: <External-Address:com.phs3.data.ojb.PhoImpl> Rule report-subject-and-event-status The last one is a printout from a long rule in MAIN that I did not show. Question: why are they fired/reported in reverse order of the focus statements? I reversed the focus order and the order re-reverses itself to the original order. I would think (naively) that as soon as the focus statement is seen by the engine, that module's rules would be candidates for firing (and would do so when the pattern is matched (in this case they are for al rules from the beginning). Mike -------------------------------------------------------------------- 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] --------------------------------------------------------------------