[rules-users] Rules with variable timers

Wolfgang Laun wolfgang.laun at gmail.com
Wed Dec 19 06:25:24 EST 2012


On 19/12/2012, riri <irina.adam at gmail.com> wrote:

> I understand that by default the timestamp for a given event is read from
> the Session Clock and assigned to the event at the time the event is
> inserted into the working memory. Is there any way to access these values
> from inside the .drl file or do I have to set my own values using the
> @timestamp in order to have such access?

You'll have to do this using your own method - unless you dig into
the "unstable" API, which (officially) is not recommended.

Why Drools should provide a service but keep you from accessing
it is beyond me.

>
> As a possible solution I tried setting a timestamp attribute inside an
> event
> at creation time, with a value taken from the session clock.
>

What you describe looks all right to me.

-W


More information about the rules-users mailing list