<div><br></div> Your use of the after operator is correct. The documentation tells you about that, although in textual form:<div><br></div><div><a href="http://docs.jboss.org/drools/release/5.3.0.Final/drools-fusion-docs/html_single/index.html#d0e611">http://docs.jboss.org/drools/release/5.3.0.Final/drools-fusion-docs/html_single/index.html#d0e611</a></div>
<div><br></div><div> This presentation has the 2 tables of operators:</div><div><br></div><div><a href="http://www.slideshare.net/ge0ffrey/applying-cep-drools-fusion-drools-jbpm-bootcamps-2011">http://www.slideshare.net/ge0ffrey/applying-cep-drools-fusion-drools-jbpm-bootcamps-2011</a></div>
<div><br></div><div> Edson<br><br><div class="gmail_quote">On Tue, Dec 13, 2011 at 12:11 PM, Mike Melton <span dir="ltr"><<a href="mailto:mike.melton@gmail.com">mike.melton@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Apologies for the stupid question, but I haven't seen anything in the<br>
documentation regarding this and I want to verify my solution. Say I<br>
have a point-in-time event (i.e., duration of 0) that I want to<br>
correlate to another point-in-time event. I want a rule that will<br>
activate if the timestamp of one is greater than or equal to the<br>
other, basically "after or coincides". I wrote a test using the<br>
following rule and it seemed to work:<br>
<br>
rule "Greater Than or Equal"<br>
when<br>
$e1 : TestEvent( $id : id )<br>
$e2 : TestEvent( id != id, this after[0ms] $e1 )<br>
then<br>
System.out.println($e2 + " is greater than or equal to " + $e1);<br>
end<br>
<br>
I realize this rule will fire twice if the event timestamps are equal,<br>
but it's just for demonstration purposes; my question is specifically<br>
about the "after[0ms]" part. Is this the way to go to accomplish what<br>
I need? It seems so simple but I have this annoying feeling that I'm<br>
missing something.<br>
<br>
On a slightly related topic, is there an updated version of the<br>
temporal operators image from the Drools Fusion homepage? It is a<br>
great visual description of the operators and I want to print it out<br>
and post it at my desk, but it doesn't include all of the operators.<br>
<br>
Image: <a href="http://www.jboss.org/drools/drools-fusion/mainColumnParagraphs/02/imageBinary/temporal-operators.png" target="_blank">http://www.jboss.org/drools/drools-fusion/mainColumnParagraphs/02/imageBinary/temporal-operators.png</a><br>
>From page: <a href="http://www.jboss.org/drools/drools-fusion.html" target="_blank">http://www.jboss.org/drools/drools-fusion.html</a><br>
<br>
Thanks<br>
Mike<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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>