Clarification: My question is: Why would the config fact NOT get asserted Thanks again, Hasan
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hasan Khan Sent: Thursday, August 07, 2008 10:54 AM To: jess-users@sandia.gov Subject: JESS: Problem in assertion of fact Hello, I have been having the following issue with regards to Jess and the assertion of facts. I have the following rule: (defrule getConfigValue "loads a single configuration value as a fact" (declare (auto-focus true)) (need-config(pid ?pid)(system ?system)(subSystem ?subSystem)(name ?name)(value ?value)) => (bind ?configLocator (fetch configurationLocator)) (try (bind ?result (call ?configLocator getConfigurationValue ?system ?subSystem ?name)) catch (if(eq ?name upgradeRejectedTaskCardClosingRequirement) then (bind ?result "0") else (bind ?exception (call ?ERROR getCause)) (printout t "error while looking up config value " ?system ", " ?subSystem ", " ?name crlf ) (printout t "message: " (?exception getMessage)crlf) (printout t "cause: "(?exception getCause)crlf) (bind ?result BadConfig) ) ) (assert(config(pid ?pid)(system ?system)(subSystem ?subSystem)(name ?name)(value ?result))) ) What happens here is the following. I am not getting the desired result(the config fact is not getting asserted). When the turn the watchon facture on I get the following result: O <== Focus DOMAIN-FACTS O ==> Focus CONFIG O FIRE 4 CONFIG::getConfigValue f-350, O <== Focus CONFIG O ==> Focus DOMAIN-FACTS Here the CONFIG and DOMAIN-FACTS are modules signified by the (defmodule CONFIG) statement. What I do not get is why would the config fact get asserted. Meaning what would go wrong in order for this to happen? Thank you for your help Hasan Khan Confidentiality Notice: ********************************************** This E-mail and any attachments thereto, are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this E-mail, you are hereby notified any dissemination, distribution or copying of this E-mail, and any attachments thereto, is strictly prohibited. If you receive this E-mail in error, please immediately notify me by reply E-mail or telephone at (218) 723-7887 and permanently delete the original and any copy of this E-mail, and any printout thereof. -------------------------------------------------------------------- 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] -------------------------------------------------------------------- Confidentiality Notice: ********************************************** This E-mail and any attachments thereto, are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this E-mail, you are hereby notified any dissemination, distribution or copying of this E-mail, and any attachments thereto, is strictly prohibited. If you receive this E-mail in error, please immediately notify me by reply E-mail or telephone at (218) 723-7887 and permanently delete the original and any copy of this E-mail, and any printout thereof. -------------------------------------------------------------------- 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] --------------------------------------------------------------------