<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">JIRA issues are for reporting bugs in drools.&nbsp; Is there a bug you're reporting or do you want help with this particular problem?<br><br>--- On <b>Fri, 5/14/10, Makewise - Vitor Rui Mendonça <i>&lt;Vitor.Mendonca@brisa.pt&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Makewise - Vitor Rui Mendonça &lt;Vitor.Mendonca@brisa.pt&gt;<br>Subject: [rules-users] Entry-Points can cause NullPointerException and/or no rule firing<br>To: "Rules Users List" &lt;rules-users@lists.jboss.org&gt;<br>Date: Friday, May 14, 2010, 8:40 AM<br><br><div id="yiv1181897749">




 

<style>
<!--
#yiv1181897749  
 _filtered #yiv1181897749 {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;}
 _filtered #yiv1181897749 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
 _filtered #yiv1181897749 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
 _filtered #yiv1181897749 {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}
#yiv1181897749  
#yiv1181897749 p.MsoNormal, #yiv1181897749 li.MsoNormal, #yiv1181897749 div.MsoNormal
        {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;font-family:"serif";}
#yiv1181897749 a:link, #yiv1181897749 span.MsoHyperlink
        {color:blue;text-decoration:underline;}
#yiv1181897749 a:visited, #yiv1181897749 span.MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
#yiv1181897749 p.MsoAcetate, #yiv1181897749 li.MsoAcetate, #yiv1181897749 div.MsoAcetate
        {margin:0cm;margin-bottom:.0001pt;font-size:8.0pt;font-family:"sans-serif";}
#yiv1181897749 p.MsoListParagraph, #yiv1181897749 li.MsoListParagraph, #yiv1181897749 div.MsoListParagraph
        {margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;font-size:12.0pt;font-family:"serif";}
#yiv1181897749 span.BalloonTextChar
        {font-family:"sans-serif";}
#yiv1181897749 span.EmailStyle20
        {font-family:"sans-serif";color:#1F497D;}
#yiv1181897749 span.EmailStyle21
        {font-family:"sans-serif";color:#1F497D;}
#yiv1181897749 span.EmailStyle22
        {font-family:"sans-serif";color:#1F497D;}
#yiv1181897749 .MsoChpDefault
        {font-size:10.0pt;}
 _filtered #yiv1181897749 {margin:70.85pt 3.0cm 70.85pt 3.0cm;}
#yiv1181897749 div.Section1
        {}
#yiv1181897749  
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {font-family:Symbol;}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {font-family:Symbol;}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
 _filtered #yiv1181897749 {}
#yiv1181897749 ol
        {margin-bottom:0cm;}
#yiv1181897749 ul
        {margin-bottom:0cm;}
-->
</style>

<div class="Section1">

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US">Hi again.</span></p> 

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US"> &nbsp;</span></p> 

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US">First of all, I’m running Drools 5.1.0.SNAPSHOT on Windows and
Eclipse 3.4.</span></p> 

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US"> &nbsp;</span></p> 

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US">I’ve submitted a Jira Issue (<a rel="nofollow" target="_blank" href="https://jira.jboss.org/jira/browse/JBRULES-2511">https://jira.jboss.org/jira/browse/JBRULES-2511</a>):</span></p> 

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US">“</span></p> 

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US">I've got a system that receives transactions. I want to
implement the following rules: <br>
- raise an alarm(alarm event) when there aren't any transaction for an hour (or
more); <br>
- if there's an alarm, no more alarms should be raised; <br>
- if there's an alarm and the system receives a transaction, that alarm should
be retracted and the system should send an recovery event. <br>
<br>
I've implemented the rules this way: <br>
- ***start*** rule to insert an "EngineStart" event when the rules
engine starts <br>
- ***notrx_after_start*** rule to detect absence of transactions during the
first hour <br>
- ***notrx_after_trx*** rule to detect absence of transactions (during one
hour) after last transaction <br>
- ***rearm*** rule to detect transactions and rearm the system. <br>
<br>
I made a Maven project with junits, which inserts transactions at specific
time, in order to raise the desired events. <br>
<br>
Two set of tests were made: <br>
- the rules defined in "default" entry-point: the correspondent junit
gives a NullPointerException in DefaultAgenda <br>
- the rules defined in "incoming" entry-point: the correspondent
junit doesn't activate the ***rearm*** rule</span></p> 

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US">“</span></p> 

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US"> &nbsp;</span></p> 

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US">The issue has an attachment with junits and rules to play with.</span></p> 

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US"> &nbsp;</span></p> 

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US">T.I.A.</span></p> 

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);" lang="EN-US"> &nbsp;</span></p> 

<div>

<table class="MsoNormalTable" style="width: 100%;" border="0" cellpadding="0" cellspacing="0" width="100%">
 <tbody><tr>
  <td colspan="2" style="background: none repeat scroll 0% 0% rgb(180, 203, 61); padding: 0cm;">
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><img id="Picture_x0020_1" src="cid:1.4138684661@web81504.mail.mud.yahoo.com" border="0" width="389" height="6"></span></p> 
  </td>
 </tr>
 <tr>
  <td style="border-width: medium medium medium 1pt; border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color black; background: none repeat scroll 0% 0% rgb(235, 243, 204); padding: 7.5pt;">
  <p class="MsoNormal"><span style="font-size: 7.5pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);">Vítor Mendonça Moreira<br>
  </span><b><span style="font-size: 7.5pt; font-family: &quot;sans-serif&quot;; color: rgb(138, 154, 55);">Analista / Programador<br>
  Direcção de Investigação e Desenvolvimento</span></b><span style="font-size: 7.5pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);"><br>
  <br>
  Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.<br>
  2500 - 206 - Caldas da Rainha<br>
  Tel: (+351) 262 832 196<br>
  Fax: (+351) 262 186 455<br>
  Web: <a rel="nofollow" target="_blank" href="http://www.makewise.pt">www.makewise.pt</a><br>
  Uma empresa: <a rel="nofollow" target="_blank" href="http://www.sousapedro.com">Grupo Sousa Pedro</a> </span></p> 
  </td>
  <td style="width: 1%; background: none repeat scroll 0% 0% rgb(235, 243, 204); padding: 7.5pt;" width="1%">
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><img id="Picture_x0020_2" src="cid:2.4138684661@web81504.mail.mud.yahoo.com" border="0" width="119" height="60"></span></p> 
  </td>
 </tr>
 <tr style="height: 0.75pt;">
  <td style="background: none repeat scroll 0% 0% rgb(180, 203, 61); padding: 0cm; height: 0.75pt;"><br></td>
  <td style="background: none repeat scroll 0% 0% rgb(180, 203, 61); padding: 0cm; height: 0.75pt;"><br></td>
 </tr>
</tbody></table>

<p class="MsoNormal"><span style="font-size: 11pt; font-family: &quot;sans-serif&quot;; color: rgb(31, 73, 125);"> &nbsp;</span></p> 

</div>

</div>

 

</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>rules-users mailing list<br><a ymailto="mailto:rules-users@lists.jboss.org" href="/mc/compose?to=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></blockquote></td></tr></table><br>