<br>&nbsp;&nbsp; If you are using trunk:<br><br>rule Timer<br>when<br>&nbsp;&nbsp;&nbsp; clock : AlarmClock( ( alarmTime.getHour() &gt; 10 ) )<br>then<br>&nbsp;&nbsp;&nbsp; // do something<br>end<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Please note that the double &quot;(&quot; are needed as the above is a predicate.
<br><br>&nbsp;&nbsp;&nbsp; If you are using 3.0.x, you need to bind the field first. So:<br><br>rule Timer<br>
when<br>
&nbsp;&nbsp;&nbsp; clock : AlarmClock( $alarmTime : alarmTime -&gt; ( $alarmTime.getHour() &gt; 10 ) )<br>
then<br>
&nbsp;&nbsp;&nbsp; // do something<br>
end<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp; Hope it helps.<br><br>&nbsp;&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/5/8, seeker &lt;<a href="mailto:janko.dimitroff@dai-labor.de">janko.dimitroff@dai-labor.de</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>I&#39;d like to build a rule which tests for a special property.<br><br>rule &quot;Timer&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clock : AlarmClock( $time : alarmTime)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then<br>// some consequences..<br><br>
the problem is the $time. I bound it to a variable so far.<br>It is a complex object which I actually want to check for<br>getAlarmTime().getHour() &gt; 10<br><br>I dont know how.<br>I want the rule to fire if the hour of the alarmTime has reached a certain
<br>value.<br>--<br>View this message in context: <a href="http://www.nabble.com/rule-creation-tf3709922.html#a10376825">http://www.nabble.com/rule-creation-tf3709922.html#a10376825</a><br>Sent from the drools - user mailing list archive at 
<a href="http://Nabble.com">Nabble.com</a>.<br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646
<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>