Is there a difference between the following:

(defrule some-rule
   (pattern1)
   (not (MyJavaObject))
=>
)

and

(defrule some-rule
   (pattern1)
   (not (exists (MyJavaObject)))
=>
)

beyond performance or internal jess overhead?

Note that I am not testing for any particular properties of MyJavaObject,
just that one doesn't exist.

I was running into a problem (I am using 6.1b1) where the rule was firing
when there *was* an instance of MyJavaObject definstance'd.

After reading the manual and the cautionary note about calling reset() when
working with the (not) conditional element, I discovered that reset() was
not being called anywhere - could this explain the behavior?

In the heat of the moment I threw in the (exists) test and it seemed to fix
things. But now I am revisiting this issue and just want to verify that
these should be equivalent. I have also added a call to reset()...

BTW - your newly updated online user manual has the following date:

Version 6.1b2 (24 February 2003)

alan

Alan Moore - mailto:[EMAIL PROTECTED]
Ciphergen Biosystems - http://www.ciphergen.com

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to