Hi <span class="gD">Wolfgang,<br>thanks a lot for the explanation, but i am very sad now.<br>I have to use STREAM mode, because i am implementing a spatio-temporal expert system, so, i need of temporal reasoning. I need to compare events on time too.<br>
>From my understaning, i am limitated by:<br></span><ul><li><span class="gD">i cannot update timestamp and duration of an event;</span></li><li><span class="gD">i cannot insert a new event with an old timestamp</span></li>
</ul><p>is it right?</p><p>In a realtime sensor system, i don&#39;t receive the event with duration, but i need to correlate them to have an event with duration.</p><p>Do you have any suggestions?</p><p>Thanks a lot,</p><p>
Matteo.<br></p><span class="gD"><br></span><br><div class="gmail_quote">On Thu, Feb 23, 2012 at 7:39 AM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 22/02/2012, Edson Tirelli &lt;<a href="mailto:ed.tirelli@gmail.com">ed.tirelli@gmail.com</a>&gt; wrote:<br>

&gt;    If your use case somehow has &quot;mutable&quot; events, you can retract, change<br>
&gt; the duration and reinsert.<br>
<br>
</div>But mind the requirements of STREAM mode: Events in each stream must<br>
be time-ordered. I.e., inside a given stream, events that happened<br>
first must be inserted first into the engine. If reinsertions would<br>
violate this, you must run the session in CLOUD mode, which has<br>
certain consequences. This is all very well described in the Fusion<br>
manual, section on &quot;Event Processing Modes&quot;.<br>
<br>
-W<br>
<div class="im"><br>
<br>
&gt; The engine uses optimizations for the temporal<br>
&gt; reasoning that are based on the fact that events should be immutable. That<br>
&gt; is why the engine &quot;resolves&quot; the timestamp/duration attributes at insert<br>
&gt; time and make them immutable.<br>
&gt;<br>
&gt;    Edson<br>
&gt;<br>
&gt; 2012/2/22 Matteo Cusmai &lt;<a href="mailto:cusmaimatteo@gmail.com">cusmaimatteo@gmail.com</a>&gt;<br>
&gt;<br>
&gt;&gt; Hi Edson,<br>
&gt;&gt; so, when i want modify an event, i could do as follow:<br>
&gt;&gt;<br>
</div>&gt;&gt;    - clone event;<br>
&gt;&gt;    - change the duration<br>
&gt;&gt;    - retract the previuos event<br>
&gt;&gt;    - insert the new event<br>
<div class="HOEnZb"><div class="h5">&gt;&gt;<br>
&gt;&gt; Is it right?<br>
&gt;&gt;<br>
&gt;&gt; Bye bye,<br>
&gt;&gt;<br>
&gt;&gt; Matteo.<br>
&gt;&gt;<br>
&gt;&gt; 2012/2/22 Edson Tirelli &lt;<a href="mailto:ed.tirelli@gmail.com">ed.tirelli@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;    Unfortunately you can&#39;t update event durations or timestamp. Events<br>
&gt;&gt;&gt; are supposed to represent things that happened and as so, are immutable<br>
&gt;&gt;&gt; (other than data enrichment). If an event representation is no longer<br>
&gt;&gt;&gt; true,<br>
&gt;&gt;&gt; that event has to be retracted. Most common case is when you are dealing<br>
&gt;&gt;&gt; with atomic events (like start and end atomic events) that represent a<br>
&gt;&gt;&gt; complex event. Usually you will have a rule that correlates the start and<br>
&gt;&gt;&gt; end atomic events and creates a complex derived event, retracting the<br>
&gt;&gt;&gt; atomic ones.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;    Edson<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 2012/2/22 Matteo Cusmai &lt;<a href="mailto:cusmaimatteo@gmail.com">cusmaimatteo@gmail.com</a>&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Hi all,<br>
&gt;&gt;&gt;&gt; i am using Drools Fusion in multi sensor data fusion system. I have some<br>
&gt;&gt;&gt;&gt; rules that generate a new event when some situations occur. But from the<br>
&gt;&gt;&gt;&gt; other hand, i would like to update the event, when i understand that new<br>
&gt;&gt;&gt;&gt; sensor observation is referring to the same event. I have my Event clazz<br>
&gt;&gt;&gt;&gt; with duration field, i try to update it in modify clause, but i have<br>
&gt;&gt;&gt;&gt; concern about it, because when i use temporal operator (such as before,<br>
&gt;&gt;&gt;&gt; meets, so on) it seems that Drools manage them as event with duration<br>
&gt;&gt;&gt;&gt; null.<br>
&gt;&gt;&gt;&gt; I could post the code too.<br>
&gt;&gt;&gt;&gt; Bye bye,<br>
&gt;&gt;&gt;&gt; Matteo.<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; rules-users mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt;   Edson Tirelli<br>
&gt;&gt;&gt;   JBoss Drools Core Development<br>
&gt;&gt;&gt;   JBoss by Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; rules-users mailing list<br>
&gt;&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; rules-users mailing list<br>
&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt;   Edson Tirelli<br>
&gt;   JBoss Drools Core Development<br>
&gt;   JBoss by Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
&gt;<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>
</div></div></blockquote></div><br>