<p><br></p><p>Pretty sure I am correct, think the  devs are at a conference this week in London. <a href="http://blog.athico.com/">http://blog.athico.com/</a><br> </p><p>1)Start time , point time interval. <br></p><p>2)Don&#39;t know exactly, I think the documentation is just showing what is meant. <br>
</p><p>But it does say you need to set at least the start time and duration. <br></p><p>If you don&#39;t set the time stamp , it gets a timestamp of the time it was inserting into working memory and duration 0. <br></p><p>
3)timestamp is the same as start time. if no duration is set <br></p><p>In our rule set , I set a timestamp attribute, duration and also a endtimestamp. </p><p>You can also do items like this , but reading the docs I am double checking <br>
</p><p>timeEndMs after[-120s,120s] AND0.timeMs , <br></p><p><br></p><p>More is in the <a href="http://docs.jboss.org/drools/release/5.4.0.Beta2/drools-fusion-docs/html/ch02.html#d0e289">http://docs.jboss.org/drools/release/5.4.0.Beta2/drools-fusion-docs/html/ch02.html#d0e289</a> <br>
</p><p><br></p><p>I think the start and endtime time stamp statements in the documentation is for clarity. <br></p><p><br></p><p>When working with the rules we have , reading the documentation let me know if the temporal operators is what I needed. <br>
</p><p><br></p><p><br></p><p></p><div class="gmail_quote">On Mar 8, 2012 11:55 AM, &quot;mind&quot; &lt;<a href="mailto:gil.vegliach@gmail.com" target="_blank">gil.vegliach@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello everybody,<br>
<br>
I recently started using Drools (with C#) and I have some problems in<br>
understanding how temporal operators work with the duration field. According<br>
to the documentation, the temporal operators work with startTimestamp and<br>
endTimestamp of events, the semantics being defined with inequalities. In<br>
order to work, temporal operator requires the duration field to be declared.<br>
Now the questions:<br>
1. What does @timeStamp stay for? The start or the end timestamp?<br>
2. Does Drools calculate startTimestamp and endTimestamp if I set @timeStamp<br>
and @duration attribute from my C# code? If not how can I set them? (like<br>
shall I declare like @startTimeStamp(sth) and set from the C# code?)<br>
3. Do temporal operators work if I do not set explicitly the start and end<br>
timestamps but just @timeStamp and @duration attributes?<br>
<br>
<br>
In particular, I have this drl file (%VAR% are replaced by other code):<br>
<br>
<br>
declare IntensionalEvent<br>
        @role(event)<br>
        @timeStamp(timeStamp)<br>
        @duration(duration)<br>
end<br>
<br>
rule &quot;Expression (%EVENTNAME1%, %OPERATOR%, %EVENTNAME2%, %TIMESPAN%,<br>
%TIMEVAR%)&quot;<br>
    dialect &quot;mvel&quot;<br>
        when<br>
            $eventA : IntensionalEvent( name == &#39;%EVENTNAME2%&#39; )<br>
                $eventB : IntensionalEvent( this %OPERATOR% $eventA,<br>
                name == &#39;%EVENTNAME1%&#39;<br>
            ) over window:time( %TIMESPAN% )<br>
<br>
        then<br>
                  blah blah... create an IntensionalEvent and set timestamp<br>
and duration<br>
<br>
end<br>
<br>
Thanks everybody,<br>
Gil<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Duration-attritube-and-Temporal-Operators-tp3810201p3810201.html" target="_blank">http://drools.46999.n3.nabble.com/Duration-attritube-and-Temporal-Operators-tp3810201p3810201.html</a><br>


Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>