Hi irejai,

Well, if you only want to have a rule that responds to the presence ( or non 
presence) or a fact in the working memory, then you could have two rules. For 
example

(defrule isThere
    (criteria)
=>
     (execute this)
)

where the above executes if criteria is present as a fact. Then you have 
another rule for oppositie.

(defrule notThere
    (not (criteria))
=>
    (execute that)
)

Check out the explanation of the not keyword at 
http://www.jessrules.com/jess/docs/70/rules.html#not_ce


Brett



-----Original Message-----
From: [EMAIL PROTECTED] on behalf of m u
Sent: Tue 10/3/2006 7:40 AM
To: [email protected]
Subject: JESS: if else
 
Hi,

I understand how to make a rule in JESS like this:


if ( some criteria)
  execute this

How about rule like this?


if ( some criteria)
    execute this
else
    execute this


thanks.

irejai

<<winmail.dat>>

Reply via email to