If you are using trunk:
rule Timer
when
clock : AlarmClock( ( alarmTime.getHour() > 10 ) )
then
// do something
end
Please note that the double "(" are needed as the above is a predicate.
If you are using 3.0.x, you need to bind the field first. So:
rule Timer
when
clock : AlarmClock( $alarmTime : alarmTime -> ( $alarmTime.getHour() > 10 ) )
then
// do something
end
Hope it helps.
[]s
Edson
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com