[rules-users] Plz reply : Descending order rule

barath gunasagaran barathguna at gmail.com
Thu Feb 21 02:11:51 EST 2008


Hi,

Can u explain me the rule flow for the below rule ?.
This will help me to get some clear idea about rules.

rule "Descending order"
    when
        $a : Order( $value : value )
        not Order( value > $value)
    then
        System.out.println("value :"+$value);                	
        retract($a);
end

I am having the following ,

1. Order value=1
2. Order value=2
3. Order value=3
4. Order value=4
5. Order value=5

Can u explain the flow(when part) for this 5 object ?

Note my understanding(in when) : 1st line  take one order object
                                                 2nd line check for
any other object with grater 'value'
                                                 But i dont know
sequence in which the objects are taken.

Plz do reply......

Thanks in advance,
Barath.



More information about the rules-users mailing list