<br>   Talking just about myself, I was kicked off the list (too many bounces it said) and I noticed yesterday, so I lost all messages in the last week or so. <br><br>   Edson<br><br><div class="gmail_quote">2009/9/29 Chris Richmond <span dir="ltr">&lt;<a href="mailto:crichmond@referentia.com">crichmond@referentia.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="blue" lang="EN-US">

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Ok..will do.  </span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">BTW…is the newgroup problem happening
again?  I posted this question about 3 times over the last week as well as some
others, and I don’t mind that people can’t help all the time at all, but I know
there was a problem before and I posted this again today because iI never
received any responses for like a week and that doesn’t happen, usuallly
someone mentions something.  <br>
<br>
Thanks,</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Chris</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<div>

<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr align="center" size="3" width="100%">

</span></font></div>

<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>
[mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank">rules-users-bounces@lists.jboss.org</a>] <b><span style="font-weight: bold;">On
Behalf Of </span></b>Edson Tirelli<br>
<b><span style="font-weight: bold;">Sent:</span></b> Tuesday, September 29, 2009
9:21 AM<br>
<b><span style="font-weight: bold;">To:</span></b> Rules Users List<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [rules-users]
Understanding Fusion temporal reasoning</span></font></p>

</div><div><div></div><div class="h5">

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
   Chris,<br>
<br>
   Someone found a bug a couple days ago that might be affecting you
too. What happens if you write:</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">declare NumReading</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    @role( event )</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    @expires( 10s )</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">end</span></font></p>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
   ?<br>
<br>
   Edson<br>
<br>
</span></font></p>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">2009/9/29 Chris Richmond &lt;<a href="mailto:crichmond@referentia.com" target="_blank">crichmond@referentia.com</a>&gt;</span></font></p>

<div link="blue" vlink="purple">

<div>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hello,</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I
am trying to make a rule to delay firing until a certain amount of time has
passed without another event being received.  I have set up a loop that
goes every 10 seconds in my main application that takes readings and injects
them into the ReadingStream. These are like sensor readings. </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> I
have a thread started at initialization that is basically calling
fireUntilHalt() and I never call halt until shutdown, and that seams to be
working fine.</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">So
basically any time an out of spec reading in my Reading object (&lt;15) is
received, I want to wait to see if a FollowUpReading is not received in the
next 5 seconds, before I fire the results(The second rule below).  The
first rule is there just to verify I am indeed detecting NumReadings with
values &lt; 15 being injected and that works fine.   Now at this
point in my appication I am *<b><span style="font-weight: bold;">never</span></b>*
inserting a FollowUpReading object/event, so I would expect the 2<sup>nd</sup>
rule to fire all the time, however the strange thing is that it only fires the
first time I receive a reading out of spec. I see rule one fire, then the seond
time, but after that any subsequent out of spec readings received(I know they
are out of spec, because rule 1 still fires when received) but rule 2 never
fires again.  It only ever fires one time!   This is very confusing. 
These ar the only 2 rules and the only two object types being inserted to the
stream. Know that rule 2 *<b><span style="font-weight: bold;">can</span></b>*
fire because it does once and only once.  Why won’t it fire beyond the
first time, even though I never insert the FollowUpReading() ?</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Thanks,</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><br>
Chris</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">declare NumReading</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    @role( event )</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">end</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">declare FollowUpReading</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">      @role(event)</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">end</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">rule &quot;Determine out of spec reading&quot;</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">when</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">      $n : NumReading($r:reading &lt;
15) from entry-point &quot;ReadingStream&quot;;</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">then</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">      System.err.println(&quot;Fire off
a follow up reading for device: &quot; + $n);</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">end</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">rule &quot;Missed degrading confirmation reading&quot; </span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">when</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">      $n : NumReading($r:reading &lt;
15) from entry-point &quot;ReadingStream&quot;;</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">      not (FollowUpReading(this
after[0s, 5s] $n))</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">then</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">      System.err.println(&quot;No good
reading received for: &quot; + $n);</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">end</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

</div>

</div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><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></span></font></p>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"></span></font><br>
</p></div></div></div></div></blockquote></div><br>