<div><br></div><div>   Hi Tina,</div><div><br></div><div>1. In cases like this, either you define an @expires policy that is longer than your temporal constraints + latency to receive the events, or you run the engine in cloud mode (disabling the lifecycle management).</div>
<div><br></div><div>2. Yes, correct. As you probably realized, given only the constraint in your example, the same B could match multiple A&#39;s.</div><div><br></div><div>   Edson</div><div><br></div><br><br><div class="gmail_quote">
2010/8/23 Tina Vießmann <span dir="ltr">&lt;<a href="mailto:tviessmann@stud.hs-bremen.de">tviessmann@stud.hs-bremen.de</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


  
    
  
  <div bgcolor="#ffffff" text="#000000">
    Thank you, Edson. :)<br>
    <br>
    I&#39;ve got two more questions about that for now.<br>
    <br>
    The first one is kind of ... ugly. <br>
    I know the stream mode needs a time-ordered stream so that the
    processing can be done correctly. In my case it can not really be
    predicted at which time an event arrives so that the
    system/application clock and the timestamp contained in the events
    are not synchronous.<br>
    Let&#39;s say that delta-t is the relation between the time a object is
    send and received. The send time is reflected by the timestamp of
    the object which is referenced using @timestamp. In my case there
    does no Delta-t exists that expresses  sendTime+Delta-t=receiveTime.
    Therefore a event A with ts=10h15m03s10ms can arrive at
    tr=10h15m04s49ms and a event B with ts=10h15m17s30ms can arrive at
    tr=10h15m20s55ms.<br>
    If I&#39;ve got now the rule<br>
      $a : A()<br>
      $b : B(this after[0,20s] $a) <br>
    Will the engine &#39;count&#39; and wait the 20 seconds for a appropriate
    event B? Or how would it work?<br>
    <br>
    <br>
    The second question is more simple.<br>
    If I use <br>
    <div>  $a : A()</div>
    <div>  $b : B( this before[0,3m] $a )</div>
    How does the engine handle the automatic life cycle managment? Will
    every B will be kept for 3 minutes to see if there will be a related
    A?<br>
    <br>
    Thank you! :)<br><font color="#888888">
    Tina</font><div><div></div><div class="h5"><br>
    <br>
    <br>
    <blockquote type="cite">
      <div><br>
      </div>
         Drools also use the 13 temporal operators as &quot;hints&quot;, so if you
      have a rule:
      <div><br>
      </div>
      <div>$a : A()</div>
      <div>$b : B( this after[0,3m] $a )</div>
      <div><br>
      </div>
      <div>   Drools will know that A&#39;s must be held in memory for 3
        minutes while B&#39;s will expire immediately. Drools will calculate
        all possible expiration offsets based on all used temporal
        operators.</div>
      <div><br>
      </div>
      <div>   In case no expiration offset can be calculated for a given
        event (i.e., no temporal operator was used, no sliding window,
        no @expires policy, resulting in expiration offset to be
        infinity), the event is help in memory until explicitly
        retracted.</div>
      <div><br>
      </div>
      <div>   Edson<br>
        <br>
        <div class="gmail_quote">2010/8/23 Tina Vießmann <span dir="ltr">&lt;<a href="mailto:tviessmann@stud.hs-bremen.de" target="_blank">tviessmann@stud.hs-bremen.de</a>&gt;</span><br>
          <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">  Hi,<br>
            <br>
            I&#39;m thinking about something. Maybe anyone can tell me.<br>
            <br>
            The Stream Processing Mode of Drools Fusion provides
            automatic lifecycle<br>
            managment. For my understandings this is based on the
            sliding windows<br>
            used inside the rule conditions, the @expires metadata and
            the @delay<br>
            metadata. Am I right so far?<br>
            My questions is now: How are Events handled if non of the
            things listed<br>
            above are used?<br>
            <br>
            Let&#39;s say I&#39;ve got rules just using the temporal reasoning
            operators<br>
            inside the rule conditions - no sliding windows at all. I&#39;m
            also not<br>
            using any of the @expires and @delay metadata. Is it correct
            than that:<br>
             - Drools matches the event coming in and the events
            existing in the<br>
            KnowledgeBase and eventually activates a rule. And after
            fireAllRules()<br>
            is called the resulting actions are performed and all Events
            are<br>
            retracted by the automatic lifecycle managment,  because
            there are no<br>
            hints (like a sliding window) that events will be needed
            again. (So that<br>
            the knowledge base would be empty again?)<br>
            <br>
            Thanks for any explanations. :)<br>
            Tina<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>
        <br>
        <br clear="all">
        <br>
        -- <br>
          Edson Tirelli<br>
          JBoss Drools Core Development<br>
          JBoss by Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
      </div>
      <pre><fieldset></fieldset>
_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<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>
<br></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>