Hello everybody,
    I am having a small problem at the moment.

I have the following two rules

(defrule myRule2
   (Stat homedomain-mch1.1097.ActionInitiators.TelephoneExchange.explainSituation           ?explainSituation &: (eq ?explainSituation 3))
=>
   (printout t "Fired the rule" crlf)
)

(defrule myRule3
   (Stat homedomain-mch1.1097.ActionInitiators.TelephoneExchange.explainSituation        ?explainSituation &: (< ?explainSituation 3 ))
=>
   (printout t "Fired the rule2" crlf)

)

The following facts are inserted one after another.  After each fact is inserted the run() command is called in JESS.

(assert (Stat homedomain-mch1.1097.ActionInitiators.TelephoneExchange.explainSituation  1))
(run)
(assert (Stat homedomain-mch1.1097.ActionInitiators.TelephoneExchange.explainSituation  2))
(run)
(assert (Stat homedomain-mch1.1097.ActionInitiators.TelephoneExchange.explainSituation  3))
(run)

The first two facts work fine, I get the output
Fired teh rule2
Fired teh rule2

But when I try the third fact I get no output at all, which means 'myRule2' is not firing.  But when I change

(Stat homedomain-mch1.1097.ActionInitiators.TelephoneExchange.explainSituation  ?explainSituation &: (eq ?explainSituation 3))

to

(Stat homedomain-mch1.1097.ActionInitiators.TelephoneExchange.explainSituation  ?explainSituation &: (> ?explainSituation 2))

then the rule fires.  Can someone please tell me what is going wrong.
thanks
Richard.



Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site

Reply via email to