strictly speaking, the simple "not cheese ( prince == 5) would get
translated to an alphaNode that is (price !=5).
Not join is for checking cases where two or more objects are joined and the
entire condition is negated. As in
rule "not example"
when
object1($blah:blah)
object2($blah2:blah2)
not ($blah == $blah2)
then
do something
Not exists is different. Not exists means that if a single fact matching the
conditions do not exist. In other words
rule "politician"
when
not exist politician (honest == true)
then
incarcerate all politicians
In the not join case, there may be multiple matches that will fire. in the
Not exist case, it should only fire that rule once.
peter
On 3/21/06, 王在祥 <[EMAIL PROTECTED]> wrote:
>
> How to understand the not expression?
>
> rule "not rule test"
> when
>
> not Cheese( price == 5 )
> then
> list.add( new Integer( 5 ) );
> end
>
>
> Does it means that for each Cheese(price != 5), then fire the rule, or if
> there not exists Cheese(price == 5) then fire the rule?
>
>
> >
>
>