[rules-users] try to understand Banking example 3

ferry97 vri_97 at yahoo.com
Sun Mar 23 21:25:38 EDT 2008


Hi, 
I'm trying to understand the Banking Example 3.

rule "Rule 01"   
    when
        $number : Number( )
        not Number( intValue < $number.intValue )
    then
        System.out.println("Number found with value: " + $number.intValue()
); 
        retract( $number );
end

The result is :
Number found with value: 1
Number found with value: 1
Number found with value: 3
Number found with value: 4
Number found with value: 5


But if I remove the "not"
The result is :
Number found with value: 5
Number found with value: 4
Number found with value: 3

Why ? How does it work ? why the two number "1" is gone ?

Please help 
Thanks
-- 
View this message in context: http://www.nabble.com/try-to-understand-Banking-example-3-tp16138098p16138098.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list