[rules-users] [Drools Fusion] Accessing Events' time (read-only) with Drools in STREAM mode, REALTIME clock
Davide Sottara
dsotty at gmail.com
Fri Oct 12 13:24:04 EDT 2012
Stefano Bragaglia wrote
> Hi guys,
> I just realised that it is not possible to take advantage of the
> default time handling and access the timestamp value at the same time.
Agreed, one may want to write both qualitative ( A after B ) and
quantitative constraints ( A.time > x ) on an event. While this is possible
when the even timestamp is assigned externally, this is very hard to do with
the fusion-managed timestamp. Unfortunately, what you propose won't work,
since that particular configuration (setting a @timestamp field) would break
the assumption of immutable events.
We would need something like:
//operator-like, even better with implicit unification
Event( this happensAt $t ) // timestamp
Event( this lasts $d ) // duration
//accessor-like
Event( $t := happensAt, lasts > 100 )
Probably this needs to be taken to the dev channel or to the jira feature
requests
Best
Davide
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Fusion-Accessing-Events-time-read-only-with-Drools-in-STREAM-mode-REALTIME-clock-tp4020251p4020256.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list