<div dir="ltr"><div class="gmail_quote"><div dir="ltr">Ciao, I'm using 6.1.0.beta4 and I identified in my application a rule pattern inducing memory leaks. I try to attach rule, screenshots, and javacode to replicate the issue.<div>
<br></div><div>IF the rule "<span style="color:green;font-family:'Courier New';font-size:10pt;line-height:115%">After No data received within the last 1 hour Error,
now resumed</span>" is included, memory leaks happens, and pretty quickly.</div><div>IF such rule is commented out, application do manage to keep alive.</div><div><br></div><div>[>] Question kindly is: is this normal on 6.1.0.beta4, or shall I go ahead and raise a JIRA for this, please?</div>
<div><br></div><div>This time I ask in the mailinglist first, just because last time I experienced a similar issue and raised JIRA, but in fact at the end was just another way to replicate a known issue.</div><div><br></div>
<div>Thank you in advance</div><div>Ciao,</div><div>MM</div><div><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">package</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">
com.acme.drools6test.anotherleak;</span><br></div><div>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">import</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">
com.acme.objectmodel.*</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:olive">// we take time is insertion time
of SensorReading</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">declare</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> SensorReading</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> @role(event)</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">end</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">declare</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> Alert</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> @role(event)</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">end</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">declare</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> AlertErrorToken</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> @role(event)</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> @timestamp(ts)</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> ts
: </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">long</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">end</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">declare</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> AMap</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> @role(fact)</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> map
: java.util.HashMap</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">end</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">query</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:green">"AMap"</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> $AMap
: AMap()</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">end</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">query</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:green">"Alerts"</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> $alert
: Alert()</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">end</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">query</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:green">"All"</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> $o
: Object()</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">end</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">rule</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:green">"init
AMap"</span><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">no-loop</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">when</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">not</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> ( AMap() )</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">then</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> AMap
t = </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">new</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> AMap();</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> t.setMap(
</span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">new</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">
java.util.HashMap() );</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">insert</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">( t );</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">end</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">rule</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:green">"to display
a kind of single table that list most recent value"</span><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">no-loop</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">when</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> $sr
: SensorReading($id : <a href="http://header.id" target="_blank">header.id</a> , $value : value)</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> AMap($map
: map)</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">then</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> $map.put($id,
$value);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">end</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">rule</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:green">"No data
received within the last 1 minutes Warning"</span><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">no-loop</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">when</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> $sr
: SensorReading()</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">not</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">( SensorReading(
</span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">this</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> != $sr, </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">this</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> after[0,1m] $sr
) )</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">not</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">( Alert( sr ==
$sr, type == AlertType.WARNING ) )</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">then</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> Alert
alert = </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">new</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">
Alert(kcontext.getKieRuntime().getSessionClock().getCurrentTime(), </span><span style="font-size:10pt;font-family:'Courier New';color:green">"No data
received within the last 1 minutes"</span><span style="font-size:10pt;font-family:'Courier New';color:black">, AlertType.WARNING,
$sr);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">insert</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">(alert);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> System.out.println(</span><span style="font-size:10pt;font-family:'Courier New';color:green">"1 minutes
Warning insert "</span><span style="font-size:10pt;font-family:'Courier New';color:black"> + alert);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:olive">// send WARNING
notification</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">end</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">rule</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:green">"No data
received within the last 1 hour Error"</span><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">no-loop</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">when</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> $sr
: SensorReading()</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">not</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">( SensorReading(
</span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">this</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> != $sr, </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">this</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> after[0,1h] $sr
) )</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">not</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">( Alert( sr ==
$sr, type == AlertType.ERROR ) )</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">then</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">long</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> errTs =
kcontext.getKieRuntime().getSessionClock().getCurrentTime();</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> Alert
alert = </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">new</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> Alert(errTs, </span><span style="font-size:10pt;font-family:'Courier New';color:green">"No data received within the last 1 hour"</span><span style="font-size:10pt;font-family:'Courier New';color:black">, AlertType.ERROR, $sr);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">insert</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">(alert);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> AlertErrorToken
errToken = </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">new</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> AlertErrorToken();</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> errToken.setTs(errTs);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">insert</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">(errToken);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> System.out.println(</span><span style="font-size:10pt;font-family:'Courier New';color:green">"last 1
hour Error insert "</span><span style="font-size:10pt;font-family:'Courier New';color:black"> + alert);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:olive">// send ERROR
notification</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">end</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">rule</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:green">"After No
data received within the last 1 hour Error, now resumed"</span><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">no-loop</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">when</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> $errToken
: AlertErrorToken()</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> $errAlert
: Alert(</span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">this</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> coincides $errToken)</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> SensorReading(
</span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">this</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> after $errToken
) </span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">then</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">retract</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">($errToken);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> System.out.println(</span><span style="font-size:10pt;font-family:'Courier New';color:green">"now
resumed retract "</span><span style="font-size:10pt;font-family:'Courier New';color:black"> + $errToken);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:olive">// send INFO
resume notification</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">end</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">rule</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:green">"Housekeep
rule"</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">salience</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> -1000</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">no-loop</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">dialect</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New';color:green">"mvel"</span><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">when</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> $last : SensorReading( ) over window:length( 1 )</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> $earlier : SensorReading( </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">this</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> before $last, </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">this</span></b><span style="font-size:10pt;font-family:'Courier New';color:black"> != $last )</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">then</span></b><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> </span><b><span style="font-size:10pt;font-family:'Courier New';color:rgb(150,0,0)">retract</span></b><span style="font-size:10pt;font-family:'Courier New';color:black">($earlier);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt"><span style="font-size:10pt;font-family:'Courier New';color:black"> System.out.println(</span><span style="font-size:10pt;font-family:'Courier New';color:green">"Housekeep
: "</span><span style="font-size:10pt;font-family:'Courier New';color:black">+$earlier);</span><span style="font-size:10pt;font-family:'Courier New'"></span></p>
<p class="MsoNormal"><b><span style="font-size:10pt;line-height:115%;font-family:'Courier New';color:rgb(150,0,0)">end</span></b></p></div><div><br></div></div></div></div>