<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<!-- Template generated by Exclaimer Mail Disclaimers on 12:01:15 Thursday, 17 March 2011 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.c1e0f729-dcb6-480b-8dd2-365933e094eb {
        MARGIN: 0cm 0cm 0pt
}
LI.c1e0f729-dcb6-480b-8dd2-365933e094eb {
        MARGIN: 0cm 0cm 0pt
}
DIV.c1e0f729-dcb6-480b-8dd2-365933e094eb {
        MARGIN: 0cm 0cm 0pt
}
TABLE.c1e0f729-dcb6-480b-8dd2-365933e094ebTable {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</style>
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
@font-face
        {font-family:"Frutiger 45 Light";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
p.977b31dd-477c-4867-8fee-5af8d92640a6, li.977b31dd-477c-4867-8fee-5af8d92640a6, div.977b31dd-477c-4867-8fee-5af8d92640a6
        {mso-style-name:977b31dd-477c-4867-8fee-5af8d92640a6;
        mso-style-priority:99;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="PT" link="blue" vlink="purple">
<p class="c1e0f729-dcb6-480b-8dd2-365933e094eb"></p>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi Thomas, thanks for the info!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I googled it quite a bit and I think it’s a path to be explored, albeit I’ve saw several messages on the mailing list regarding performance issues
 when using fireUntilHalt.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Nonetheless, I must get some free time to change my JUnits &nbsp;to test that.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks for pointing out the direction!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td colspan="2" style="background:#B4CB3D;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="color:#1F497D"><img width="389" height="6" id="_x0000_i1035" src="cid:image001.jpg@01CBE49B.0B525500"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td style="border:none;border-left:solid black 1.0pt;background:#EBF3CC;padding:7.5pt 7.5pt 7.5pt 7.5pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">Vítor Mendonça Moreira<br>
</span><b><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#8A9A37">Analista / Programador<br>
Direcção de Investigação e Desenvolvimento</span></b><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><br>
<br>
Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.<br>
2500 - 206 - Caldas da Rainha<br>
Tel: (&#43;351) 262 832 196<br>
Fax: (&#43;351) 262 186 455<br>
Web: <a href="http://www.makewise.pt">www.makewise.pt</a><br>
Uma empresa: <a href="http://www.sousapedro.com">Grupo Sousa Pedro</a> <o:p></o:p></span></p>
</td>
<td width="1%" style="width:1.0%;background:#EBF3CC;padding:7.5pt 7.5pt 7.5pt 7.5pt">
<p class="MsoNormal"><span style="color:#1F497D"><img border="0" width="119" height="60" id="_x0000_i1034" src="cid:image002.jpg@01CBE49B.0B525500"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:.75pt">
<td style="background:#B4CB3D;padding:0cm 0cm 0cm 0cm;height:.75pt"></td>
<td style="background:#B4CB3D;padding:0cm 0cm 0cm 0cm;height:.75pt"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div></div>
</div>
</div>
<p></p>
<font size="1"><font face="Frutiger 45 Light">
<div>
<hr>
</div>
<div><font face="Arial">&nbsp; </font>
<div><font face="Arial">Declaração:<br>
A informação contida nesta mensagem, e os ficheiros anexos, é privilegiada e confidencial, destinando-se exclusivamente ao(s) destinatário(s).Se não é o destinatário (ou o responsável pela sua entrega ao destinatário) e recebeu a mesma por engano, fica notificado
 que é estritamente proibido reproduzir, guardar ou distribuir toda ou qualquer parte desta mensagem e ficheiros anexos.Por favor reencaminhe a mensagem para o responsável pelo seu envio ou contacte-nos por telefone e elimine a mensagem e ficheiros anexos do
 seu computador,sem os reproduzir. </font></div>
<div><font face="Arial"></font>&nbsp;</div>
<div><font face="Arial">Disclaimer:<br>
The information contained in this message, and any files attached, is privileged and confidential, and intended exclusively for the included addresses.If you are not the intended recipient (or the person responsible for delivering to the intended recipient)
 and received this message by mistake, be aware that copy, storage, distribution or any other use of all or part of this message and the files attached is strictly prohibited. Please notify the sender by reply e-mail or contact us by telephone and delete this
 message and the files attached, without retaining a copy.</font><font face="Times New Roman">&nbsp;</font></div>
<div>
<hr>
</div>
</div>
<p></p>
<div class="WordSection1">
<div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
<b>On Behalf Of </b>Swindells, Thomas<br>
<b>Sent:</b> quinta-feira, 17 de Março de 2011 11:29<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> Re: [rules-users] Basic doubt regarding Drools Fusion - @expires<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Have you looked at fireUntilHalt?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
<b>On Behalf Of </b>Makewise - Vitor Rui Mendonça<br>
<b>Sent:</b> 17 March 2011 11:20<br>
<b>To:</b> 'Rules Users List'<br>
<b>Subject:</b> Re: [rules-users] Basic doubt regarding Drools Fusion - @expires<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Edison, first of all, thanks for your quick reply!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Those initial words caught my attention, although: “</span><span lang="EN-US">By default, Drools does not start any internal thread</span><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">”…
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">What do you mean “by default”?
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I know there are ways to force the event to be expired but I’m looking for a solution that doesn’t involve to write new rules.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">For example, I’m using this kind of solution:<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<b><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:#960000">declare</span></b><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black"> A</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @role( event )</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @expires( 1h )</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:#960000">end</span></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:#960000">rule</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black">
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:green">&quot;internal - expiring A&quot;</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timer(</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:#960000">int</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black">:1h)</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:#960000">when</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $a : A()
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:#960000">from</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black"> entry-point
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:green">&quot;incoming&quot;</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:#960000">then</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:#960000">retract</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black">($a);</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;"><o:p></o:p></span></p>
<div style="border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:#960000">end</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Although this solution works (from Drools 5.1), I’m forced to write a rule to expire an event that’s supposed to be expired initially.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">There’s a simpler way to do this? I’m thinking correctly?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Once again, thanks!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td colspan="2" style="background:#B4CB3D;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="color:#1F497D"><img border="0" width="389" height="6" id="Picture_x0020_1" src="cid:image001.jpg@01CBE49B.0B525500"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td style="border:none;border-left:solid black 1.0pt;background:#EBF3CC;padding:7.5pt 7.5pt 7.5pt 7.5pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D">Vítor Mendonça Moreira<br>
</span><b><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#8A9A37">Analista / Programador<br>
Direcção de Investigação e Desenvolvimento</span></b><span style="font-size:7.5pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1F497D"><br>
<br>
Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.<br>
2500 - 206 - Caldas da Rainha<br>
Tel: (&#43;351) 262 832 196<br>
Fax: (&#43;351) 262 186 455<br>
Web: <a href="http://www.makewise.pt">www.makewise.pt</a><br>
Uma empresa: <a href="http://www.sousapedro.com">Grupo Sousa Pedro</a> <o:p></o:p></span></p>
</td>
<td width="1%" style="width:1.0%;background:#EBF3CC;padding:7.5pt 7.5pt 7.5pt 7.5pt">
<p class="MsoNormal"><span style="color:#1F497D"><img border="0" width="119" height="60" id="Picture_x0020_2" src="cid:image002.jpg@01CBE49B.0B525500"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:.75pt">
<td style="background:#B4CB3D;padding:0cm 0cm 0cm 0cm;height:.75pt"></td>
<td style="background:#B4CB3D;padding:0cm 0cm 0cm 0cm;height:.75pt"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:7.5pt;font-family:&quot;Frutiger 45 Light&quot;,&quot;serif&quot;">
<hr size="2" width="100%" align="center">
</span></div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">&nbsp;
</span><span style="font-size:7.5pt;font-family:&quot;Frutiger 45 Light&quot;,&quot;serif&quot;"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Declaração:<br>
A informação contida nesta mensagem, e os ficheiros anexos, é privilegiada e confidencial, destinando-se exclusivamente ao(s) destinatário(s).Se não é o destinatário (ou o responsável pela sua entrega ao destinatário) e recebeu a mesma por engano, fica notificado
 que é estritamente proibido reproduzir, guardar ou distribuir toda ou qualquer parte desta mensagem e ficheiros anexos.Por favor reencaminhe a mensagem para o responsável pelo seu envio ou contacte-nos por telefone e elimine a mensagem e ficheiros anexos do
 seu computador,sem os reproduzir. </span><span style="font-size:7.5pt;font-family:&quot;Frutiger 45 Light&quot;,&quot;serif&quot;"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Frutiger 45 Light&quot;,&quot;serif&quot;">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Disclaimer:<br>
The information contained in this message, and any files attached, is privileged and confidential, and intended exclusively for the included addresses.If you are not the intended recipient (or the person responsible for delivering to the intended recipient)
 and received this message by mistake, be aware that copy, storage, distribution or any other use of all or part of this message and the files attached is strictly prohibited. Please notify the sender by reply e-mail or contact us by telephone and delete this
 message and the files attached, without retaining a copy.</span><span style="font-size:7.5pt">&nbsp;</span><span style="font-size:7.5pt;font-family:&quot;Frutiger 45 Light&quot;,&quot;serif&quot;"><o:p></o:p></span></p>
</div>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:7.5pt;font-family:&quot;Frutiger 45 Light&quot;,&quot;serif&quot;">
<hr size="2" width="100%" align="center">
</span></div>
</div>
</div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
<b>On Behalf Of </b>Edson Tirelli<br>
<b>Sent:</b> quarta-feira, 16 de Março de 2011 18:38<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> Re: [rules-users] Basic doubt regarding Drools Fusion - @expires<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">&nbsp;&nbsp; By default, Drools does not start any internal thread, so that you can embed it in non-multithread applications or in JEE containers. That means that the actual release of events in such cases depends on triggers. In your example, after
 1h has passed, whenever something happens to the session (a new rule is fired, a new event is inserted, the session clock is advanced, etc), the event will be expired as part of the action. Remember though that it only happens when running in STREAM mode.
 In CLOUD mode, event garbage collection does not make sense and will not happen.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">&nbsp;&nbsp;Edson<o:p></o:p></p>
<div>
<p class="MsoNormal">2011/3/16 Makewise - Vitor Rui Mendonça &lt;<a href="mailto:Vitor.Mendonca@brisa.pt">Vitor.Mendonca@brisa.pt</a>&gt;<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi all!<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">I’ve got a really basic doubt… I’ve read several documentation regarding it but I think I need some advice here…</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Imagine that I have an event:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:#960000">declare</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black"> A</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @role( event )</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @expires( 1h )</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Lucida Console&quot;;color:#960000">end</span></b><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">On my Java code, I call “fireAllRules()” method every time that I put an event into the working memory.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">My doubt: When does event A expires?</span><o:p></o:p></p>
<p><span lang="EN-US">a)</span><span lang="EN-US" style="font-size:7.0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
<span lang="EN-US">One hour after it was inserted (time-based and without the “fireAllRules()” method call) or
</span><o:p></o:p></p>
<p><span lang="EN-US">b)</span><span lang="EN-US" style="font-size:7.0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
<span lang="EN-US">by calling “fireAllRules()” method (event-based)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">T.I.A.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">&nbsp;</span><o:p></o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%">
<tbody>
<tr>
<td colspan="2" style="background:#B4CB3D;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><img border="0" width="389" height="6" id="_x0000_i1029" src="cid:image001.jpg@01CBE49B.0B525500"><o:p></o:p></p>
</td>
</tr>
<tr>
<td style="border:none;border-left:solid black 1.0pt;background:#EBF3CC;padding:7.5pt 7.5pt 7.5pt 7.5pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:7.5pt">Vítor Mendonça Moreira<br>
<b><span style="color:#8A9A37">Analista / Programador<br>
Direcção de Investigação e Desenvolvimento</span></b><br>
<br>
Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq.<br>
2500 - 206 - Caldas da Rainha<br>
Tel: (&#43;351) 262 832 196<br>
Fax: (&#43;351) 262 186 455<br>
Web: <a href="http://www.makewise.pt" target="_blank">www.makewise.pt</a><br>
Uma empresa: <a href="http://www.sousapedro.com" target="_blank">Grupo Sousa Pedro</a>
</span><o:p></o:p></p>
</td>
<td width="1%" style="width:1.0%;background:#EBF3CC;padding:7.5pt 7.5pt 7.5pt 7.5pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><img border="0" width="119" height="60" id="_x0000_i1030" src="cid:image002.jpg@01CBE49B.0B525500"><o:p></o:p></p>
</td>
</tr>
<tr style="min-height:.75pt">
<td style="background:#B4CB3D;padding:0cm 0cm 0cm 0cm;min-height:.75pt"></td>
<td style="background:#B4CB3D;padding:0cm 0cm 0cm 0cm;min-height:.75pt"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p>
</div>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:7.5pt;font-family:&quot;Frutiger 45 Light&quot;,&quot;serif&quot;">
<hr size="2" width="100%" align="center">
</span></div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">&nbsp;
</span><span style="font-size:7.5pt;font-family:&quot;Frutiger 45 Light&quot;,&quot;serif&quot;"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Declaração:<br>
A informação contida nesta mensagem, e os ficheiros anexos, é privilegiada e confidencial, destinando-se exclusivamente ao(s) destinatário(s).Se não é o destinatário (ou o responsável pela sua entrega ao destinatário) e recebeu a mesma por engano, fica notificado
 que é estritamente proibido reproduzir, guardar ou distribuir toda ou qualquer parte desta mensagem e ficheiros anexos.Por favor reencaminhe a mensagem para o responsável pelo seu envio ou contacte-nos por telefone e elimine a mensagem e ficheiros anexos do
 seu computador,sem os reproduzir. </span><span style="font-size:7.5pt;font-family:&quot;Frutiger 45 Light&quot;,&quot;serif&quot;"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Frutiger 45 Light&quot;,&quot;serif&quot;">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">Disclaimer:<br>
The information contained in this message, and any files attached, is privileged and confidential, and intended exclusively for the included addresses.If you are not the intended recipient (or the person responsible for delivering to the intended recipient)
 and received this message by mistake, be aware that copy, storage, distribution or any other use of all or part of this message and the files attached is strictly prohibited. Please notify the sender by reply e-mail or contact us by telephone and delete this
 message and the files attached, without retaining a copy.</span><span style="font-size:7.5pt">&nbsp;</span><span style="font-size:7.5pt;font-family:&quot;Frutiger 45 Light&quot;,&quot;serif&quot;"><o:p></o:p></span></p>
</div>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:7.5pt;font-family:&quot;Frutiger 45 Light&quot;,&quot;serif&quot;">
<hr size="2" width="100%" align="center">
</span></div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><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><o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <br>
&nbsp; Edson Tirelli<br>
&nbsp; JBoss Drools Core Development<br>
&nbsp; JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span lang="EN-GB">
<hr size="2" width="100%" align="center">
</span></div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:gray"><br>
**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data
 may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.<br>
<br>
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
</div>
</font></font>
<p></p>
</body>
</html>