[rules-users] complex rule conditions

sweng sebastian.weng at sap.com
Fri Feb 5 07:19:21 EST 2010


Hi,

I want to use some "complex" conditions on the lhs of a rule.
Following the example in the drools-expert docu:

Person( girlAge : age, sex = "F" )
Person( eval( age == girlAge + 2 ), sex = 'M' )

I have try the following rule:

rule "detect stop of cars"
    when
        p1:PositionReportEvent( $t1:time) 
        p2:PositionReportEvent( eval(time == $t1 + 30))
    then
        System.out.println("do something");
end

but it is never triggered. 
-- 
View this message in context: http://n3.nabble.com/complex-rule-conditions-tp188717p188717.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list