<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Kris,&nbsp;</div><div><br></div><div>Now I understand.... and the process is running ok...</div><div><br></div><div>Thanks</div><div><br></div><div>Cristiano</div><br><div><div>On 03/03/2009, at 10:44, Kris Verlaenen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div bgcolor="#ffffff" background=""><div><font face="Arial" size="2">The problem you are facing is that the Drools engine by default is a passive component, meaning that you should tell it when to start executing.&nbsp; For example, you usually want to insert all your data before executing the rules.&nbsp; The same is also valid for timers: they don't just fire.&nbsp; But you can make the engine active by having it execute any action automatically until someone halts the engine using fireUntilHalt().&nbsp; Note that this uses the calling thread until halt so best to start this in a separate thread, something like this:<br><br>new Thread(new Runnable() {<br>&nbsp; public void run() {<br>&nbsp;&nbsp; session.fireUntilHalt();<span class="Apple-converted-space">&nbsp;</span><br>&nbsp; }<br>}).start();</font></div><div><font face="Arial" size="2"><br>Kris<br><br>----- Original Message -----<span class="Apple-converted-space">&nbsp;</span><br>From: Cristiano Gavião<span class="Apple-converted-space">&nbsp;</span><br>To: Rules Users List<span class="Apple-converted-space">&nbsp;</span><br>Sent: Monday, March 02, 2009 7:50 PM<br>Subject: Re: [rules-users] Timer isn't firing<br><br><br>It is so strange...<br><br><br>I could run this test with no errors, but I can't get any of my process completed if diagram has a timer...<br><br><br>Ok, I'll sent to you my project.<br><br><br>Thanks<span class="Apple-converted-space">&nbsp;</span><br><br><br>On 02/03/2009, at 11:19, Kris Verlaenen wrote:<br><br><br>Cristiano,<br><br>There are some examples on processes using timers here:<br><a href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessTimerTest.java">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessTimerTest.java</a><br><br>If you need help, could you maybe send me the test project you are trying to execute, so I can take a look?<br><br>Kris<br><br>----- Original Message -----<br>From: Cristiano Gavião<br>To: Rules Users List<br>Sent: Monday, March 02, 2009 2:34 AM<br>Subject: [rules-users] Timer isn't firing<br><br><br>Hi,<span class="Apple-converted-space">&nbsp;</span><br><br><br>I've created a simple process flow with a start node followed by a timer (with delay = 1 and period = 0), an workitem node, and an end node.<br><br><br>Its simple but isn't working properly. The problem is that process isn't getting out from the timer node. Nothing happens...<br><br><br>Its something more needed to get timer working?<br><br><br><br><br>This is the output generated:<br><br><br>BEFORE RULEFLOW STARTED process:ProcessoX[id=ProcessoX]<br>BEFORE RULEFLOW NODE TRIGGERED node:Start[id=20] process:ProcessoX[id=ProcessoX]<br>null process:ProcessoX[id=ProcessoX]<br>BEFORE RULEFLOW NODE TRIGGERED node:Timer[id=19] process:ProcessoX[id=ProcessoX]<br>AFTER RULEFLOW NODE TRIGGERED node:Timer[id=19] process:ProcessoX[id=ProcessoX]<br>null process:ProcessoX[id=ProcessoX]<br>AFTER RULEFLOW NODE TRIGGERED node:Start[id=20] process:ProcessoX[id=ProcessoX]<br>AFTER RULEFLOW STARTED process:ProcessoX[id=ProcessoX]<br><br><br><br><br>thanks in advance<br><br><br>_________________________<br>Cristiano V. Gavião<br><br><br><br><br><br><br><br><br><br><br><br><br><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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br><br><br>____________________________________<br>Cristiano Gavião<br><br><br>"O único lugar onde o sucesso vem antes do trabalho é no dicionário." Albert Einstein<br><br><br><br><br><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">https://lists.jboss.org/mailman/listinfo/rules-users</a></font></div>_______________________________________________<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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></div></span></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>____________________________________</div><div>Cristiano Gavião</div><div><br></div><div>"O único lugar onde o sucesso vem antes do trabalho é no dicionário." Albert Einstein</div></div></span></div></span> </div><br></body></html>