Please follow Thomas&#39; advice. <br><br>That  now.time  worked in 5.1.1 was actually an &quot;accident&quot;, as it contradicted the specs. I&#39;m not sure whether this behaviour is going to be reinstated. <br><br>If you do need to do the comparison on long (milliseconds since the epoch) values you&#39;d have to do<br>
    subObject.dateField.time &gt;= (now.getTime())<br>which works in 5.1.1, 5.2.0 and 5.3.0.so.far. (Being able to omit the parentheses was promised for 5.2.0; hopefully we&#39;ll have it in 5.3.0.)<br><br>-W<br><br><div class="gmail_quote">
On 23 September 2011 14:54, Slorg1 <span dir="ltr">&lt;<a href="mailto:slorg1@percipiomedia.com">slorg1@percipiomedia.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Wolfgang,<br>
<br>
Thank you for answering, here is the rule rewritten but closer to reality:<br>
<br>
// package<br>
<br>
// imports<br>
<div class="im"><br>
global java.util.Date now;<br>
<br>
</div>rule &quot;MyRule&quot;<br>
   salience 5<br>
   when<br>
      // Prevent rule activation for other offer types.<br>
      MyObject(type == Type.TYPE_SOUGHT)<br>
<br>
      $candidate : Candidate(<br>
         subObject.dateField != null &amp;&amp; subObject.dateField.time &gt;=<br>
now.time)<br>
   then<br>
      // do something<br>
end<br>
<br>
A value for &#39;now&#39; being set like so:<br>
session.setGlobal(&quot;now&quot;, new Date()); // Date being the java.util.Date.<br>
<br>
But I do not think that matters because &#39;compilation&#39; fails at this point.<br>
<br>
Thank you in advance for your time.<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Issue-using-global-variable-with-Drools-5-2-in-DRL-tp3360343p3361770.html" target="_blank">http://drools.46999.n3.nabble.com/Issue-using-global-variable-with-Drools-5-2-in-DRL-tp3360343p3361770.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>