The global way is the best, as steven suggested.
It will generally only read that value once. I guess whilst the value
changes, once it has passed "now" then it will never suddenly change from
true back to false (unless you go into a black hole or something), so maybe
it will work without a global. The problem may be if it was "false" when it
read it one time, it may be true later one, causing confusion. So best to
avoid, use a global and set the value up front so it is constant.

On 11/28/06, Dirk Bergstrom <[EMAIL PROTECTED]> wrote:

Steven Williams was heard to exclaim, On 11/27/06 20:25:
> Could use a global for the "now" and then use the function to calculate
> differences from that?

I don't think that drools would "notice" that the function's return value
was
dependent on the global, and thus inconstant.  I suspect that drools would
cache the return value the first time it ran the rule, and never bother to
recalculate.

Or maybe not.  Anyone know the code well enough to give a definite answer?

--
Dirk Bergstrom               [EMAIL PROTECTED]
_____________________________________________
Juniper Networks Inc.,          Computer Geek
Tel: 408.745.3182           Fax: 408.745.8905

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to