Yes, your understanding matches mine.

    The decision to make timestamp and duration constant is due to the many side-effects that making them mutable bring, as you guessed. I really want to do the next step and allow mutable temporal properties, but that requires much more research, as it involves all kinds of temporal operations, including clock management and behavior implementations (like sliding windows).

    Sorry, but with current version, no easy solution for that. If we can get a few people interested in helping with the development of these features, we could organize a task force to research and implement this. Anyone interested in joining?


2010/4/15 Barry Kaplan <>

If I understand you correctly Edson, you have provided a better description
to solution 1) in my post above.

This works to a degree but leaves a bit to be desired. For example when
correlating instant events as "during" the interval events (ie, startX,
endX, eventX) those correlations cannot simply use "during", because there
may be no eventX yet (ie, endX has not yet occurred).

This requires patterns of the form:

instant: InstantEvent
beginX: BeginX
(or (and instant after beginX
           not endX(id ==
    instant is during eventX(id ==

Which like I said gets messy.

Again, if the @timestamp and @duration were not stored in the fact handle
and could be altered via a working-memory update then "instant is during
eventX" would work in all instances. The trade off is that it would make the
drools internals much more complex as behaviors scheduled based on
@timestamp and @duration would need to be modified according on a wm.update,
along with all race conditions that would entail.

It could also be argued that modifying an event's timestamp smells for
purity reasons. But that would depend the perspective you take. Some events
unfold over time (hence the modeling construct of using startX, endX,
eventX). So a counter argument might be that a CEP engine should have first
class support events of this nature.

View this message in context:
Sent from the Drools - User mailing list archive at
rules-users mailing list

 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @