Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
Edison, first of all, thanks for your quick reply! Those initial words caught my attention, although: “By default, Drools does not start any internal thread”… What do you mean “by default”? 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. For example, I’m using this kind of solution: declare A @role( event ) @expires( 1h ) end rule internal - expiring A timer(int:1h) when $a : A() from entry-point incoming then retract($a); end 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. There’s a simpler way to do this? I’m thinking correctly? Once again, thanks! Vítor Mendonça Moreira Analista / Programador Direcção de Investigação e Desenvolvimento Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq. 2500 - 206 - Caldas da Rainha Tel: (+351) 262 832 196 Fax: (+351) 262 186 455 Web: www.makewise.pthttp://www.makewise.pt Uma empresa: Grupo Sousa Pedrohttp://www.sousapedro.com [cid:image002.jpg@01CBE493.E9E167A0] Declaração: 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. Disclaimer: 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. From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Edson Tirelli Sent: quarta-feira, 16 de Março de 2011 18:38 To: Rules Users List Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires 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. Edson 2011/3/16 Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.ptmailto:vitor.mendo...@brisa.pt Hi all! I’ve got a really basic doubt… I’ve read several documentation regarding it but I think I need some advice here… Imagine that I have an event: declare A @role( event ) @expires( 1h ) end On my Java code, I call “fireAllRules()” method every time that I put an event into the working memory. My doubt: When does event A expires? a) One hour after it was inserted (time-based and without the “fireAllRules()” method call) or b) by calling “fireAllRules()” method (event-based) T.I.A. Vítor Mendonça Moreira Analista / Programador Direcção de Investigação e Desenvolvimento Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq. 2500 - 206 - Caldas da Rainha Tel: (+351) 262 832 196 Fax: (+351) 262 186 455 Web: www.makewise.pthttp://www.makewise.pt Uma empresa: Grupo Sousa Pedrohttp://www.sousapedro.com [cid:image002.jpg@01CBE493.E9E167A0] Declaração: 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. Disclaimer: 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
Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
Have you looked at fireUntilHalt? From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Makewise - Vitor Rui Mendonça Sent: 17 March 2011 11:20 To: 'Rules Users List' Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires Edison, first of all, thanks for your quick reply! Those initial words caught my attention, although: “By default, Drools does not start any internal thread”… What do you mean “by default”? 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. For example, I’m using this kind of solution: declare A @role( event ) @expires( 1h ) end rule internal - expiring A timer(int:1h) when $a : A() from entry-point incoming then retract($a); end 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. There’s a simpler way to do this? I’m thinking correctly? Once again, thanks! Vítor Mendonça Moreira Analista / Programador Direcção de Investigação e Desenvolvimento Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq. 2500 - 206 - Caldas da Rainha Tel: (+351) 262 832 196 Fax: (+351) 262 186 455 Web: www.makewise.pthttp://www.makewise.pt Uma empresa: Grupo Sousa Pedrohttp://www.sousapedro.com [cid:image002.jpg@01CBE496.891C1F20] Declaração: 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. Disclaimer: 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. From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Edson Tirelli Sent: quarta-feira, 16 de Março de 2011 18:38 To: Rules Users List Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires 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. Edson 2011/3/16 Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.ptmailto:vitor.mendo...@brisa.pt Hi all! I’ve got a really basic doubt… I’ve read several documentation regarding it but I think I need some advice here… Imagine that I have an event: declare A @role( event ) @expires( 1h ) end On my Java code, I call “fireAllRules()” method every time that I put an event into the working memory. My doubt: When does event A expires? a) One hour after it was inserted (time-based and without the “fireAllRules()” method call) or b) by calling “fireAllRules()” method (event-based) T.I.A. Vítor Mendonça Moreira Analista / Programador Direcção de Investigação e Desenvolvimento Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq. 2500 - 206 - Caldas da Rainha Tel: (+351) 262 832 196 Fax: (+351) 262 186 455 Web: www.makewise.pthttp://www.makewise.pt Uma empresa: Grupo Sousa Pedrohttp://www.sousapedro.com [cid:image002.jpg@01CBE496.891C1F20] Declaração: 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
Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
You lost me. Why are you defining a rule to retract your event? If you are running in STREAM mode, @expires will take care of the retraction for you automatically... Regarding threads, I said by default because there is an experimental feature that makes drools start internal threads, but that is not production ready yet. Edson 2011/3/17 Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pt Edison, first of all, thanks for your quick reply! Those initial words caught my attention, although: “By default, Drools does not start any internal thread”… What do you mean “by default”? 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. For example, I’m using this kind of solution: *declare* A @role( event ) @expires( 1h ) *end* *rule* internal - expiring A timer(*int*:1h) *when* $a : A() *from* entry-point incoming *then* *retract*($a); *end* 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. There’s a simpler way to do this? I’m thinking correctly? Once again, thanks! Vítor Mendonça Moreira *Analista / Programador Direcção de Investigação e Desenvolvimento* Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq. 2500 - 206 - Caldas da Rainha Tel: (+351) 262 832 196 Fax: (+351) 262 186 455 Web: www.makewise.pt Uma empresa: Grupo Sousa Pedro http://www.sousapedro.com -- Declaração: 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. Disclaimer: 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. -- *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *Edson Tirelli *Sent:* quarta-feira, 16 de Março de 2011 18:38 *To:* Rules Users List *Subject:* Re: [rules-users] Basic doubt regarding Drools Fusion - @expires 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. Edson 2011/3/16 Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pt Hi all! I’ve got a really basic doubt… I’ve read several documentation regarding it but I think I need some advice here… Imagine that I have an event: *declare* A @role( event ) @expires( 1h ) *end* On my Java code, I call “fireAllRules()” method every time that I put an event into the working memory. My doubt: When does event A expires? a) One hour after it was inserted (time-based and without the “fireAllRules()” method call) or b) by calling “fireAllRules()” method (event-based) T.I.A. Vítor Mendonça Moreira *Analista / Programador Direcção de Investigação e Desenvolvimento* Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq. 2500 - 206 - Caldas da Rainha Tel: (+351) 262 832 196 Fax: (+351) 262 186 455 Web: www.makewise.pt Uma empresa: Grupo Sousa Pedro http://www.sousapedro.com -- Declaração: 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
Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
Has the performance problem with fireUntilHalt been fixed in 5.2? --- On Thu, 3/17/11, Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pt wrote: From: Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pt Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires To: 'Rules Users List' rules-users@lists.jboss.org Date: Thursday, March 17, 2011, 7:01 AM #yiv2042545743 P.yiv2042545743c1e0f729-dcb6-480b-8dd2-365933e094eb { MARGIN:0cm 0cm 0pt;} #yiv2042545743 LI.yiv2042545743c1e0f729-dcb6-480b-8dd2-365933e094eb { MARGIN:0cm 0cm 0pt;} #yiv2042545743 DIV.yiv2042545743c1e0f729-dcb6-480b-8dd2-365933e094eb { MARGIN:0cm 0cm 0pt;} #yiv2042545743 TABLE.yiv2042545743c1e0f729-dcb6-480b-8dd2-365933e094ebTable { MARGIN:0cm 0cm 0pt;} #yiv2042545743 DIV.yiv2042545743Section1 { } Hi Thomas, thanks for the info! 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. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
To be honest, I believe so, but didn't profiled it extensively. I used fireUntilHalt() in my Webinar yesterday on a live demo and it worked nicely. Edson 2011/3/17 Greg Barton greg_bar...@yahoo.com Has the performance problem with fireUntilHalt been fixed in 5.2? --- On *Thu, 3/17/11, Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pt* wrote: From: Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pt Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires To: 'Rules Users List' rules-users@lists.jboss.org Date: Thursday, March 17, 2011, 7:01 AM Hi Thomas, thanks for the info! 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. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
Yes, but I just fired up a small project using it and it used 100% of CPU. If you build the attached project you'll see the tests run just fine. (They use fireAllRules.) If you launch from the commandline, (java -jar target/DroolsBoxes-1.0.jar) which uses fireUntilHalt, the rules fire (and complete) just fine, but it continues to use 100% of a cpu core indefinitely. This is with 5.1.1. If I change the drools version to 5.2.0-SNAPSHOT it compiles but the tests won't run. They all fail with the following exception: java.lang.NoSuchMethodError: org.drools.spi.DeclarationScopeResolver.init([Ljava/util/Map;Ljava/util/Stack;)V at org.drools.rule.builder.RuleBuildContext.init(RuleBuildContext.java:72) at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1198) at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:629) at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:278) at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:451) at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28) at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:75) at com.sample.DroolsTest.go(DroolsTest.java:31) at com.sample.BoxTest.test0(BoxTest.java:21) --- On Thu, 3/17/11, Edson Tirelli ed.tire...@gmail.com wrote: From: Edson Tirelli ed.tire...@gmail.com Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires To: Rules Users List rules-users@lists.jboss.org Date: Thursday, March 17, 2011, 10:47 AM To be honest, I believe so, but didn't profiled it extensively. I used fireUntilHalt() in my Webinar yesterday on a live demo and it worked nicely. Edson 2011/3/17 Greg Barton greg_bar...@yahoo.com Has the performance problem with fireUntilHalt been fixed in 5.2? --- On Thu, 3/17/11, Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pt wrote: From: Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pt Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires To: 'Rules Users List' rules-users@lists.jboss.org Date: Thursday, March 17, 2011, 7:01 AM Hi Thomas, thanks for the info! 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. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com -Inline Attachment Follows- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users DroolsBoxes.tar.gz Description: GNU Zip compressed data ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
Yes, please. Thank you, Edson 2011/3/17 Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pt I forgot to mention that I’m running in stream mode, yes J I’m having problems regarding event expiration: I define events with @expires(1h) but they won’t disappear, I had to write some rules to force the expiration. To keep short a long history… J · I put transactions into entry-point “incoming” · I’ve got rules that create a new event (defined in .drl file) when a transaction is inserted in the working memory. That event has an expire time (1h) · But I’ve notice that the created event will never go away *// transaction inserted into working memory through insertFact()* *declare* Transaction @role( event ) @expires( 1h ) *end* * * *// event created when working memory receives transaction* *declare* ExampleTransaction @role( event ) @expires( 1h ) value: *int* transaction: Transaction *end* * * *// rule to create event * *rule* new example transaction *when* $transaction : Transaction() over window:time(1h) *from* entry-point incoming *then* ExampleTransaction exampleTransaction = *new* ExampleTransaction(); exampleTransaction.setValue(0); exampleTransaction.setTransaction($transaction); *insert*( exampleTransaction ); *end* Maybe submitting a new issue with a JUnit test would be nice, right? J Vítor Mendonça Moreira *Analista / Programador Direcção de Investigação e Desenvolvimento* Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq. 2500 - 206 - Caldas da Rainha Tel: (+351) 262 832 196 Fax: (+351) 262 186 455 Web: www.makewise.pt Uma empresa: Grupo Sousa Pedro http://www.sousapedro.com -- Declaração: 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. Disclaimer: 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. -- *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *Edson Tirelli *Sent:* quinta-feira, 17 de Março de 2011 13:41 *To:* Rules Users List *Subject:* Re: [rules-users] Basic doubt regarding Drools Fusion - @expires You lost me. Why are you defining a rule to retract your event? If you are running in STREAM mode, @expires will take care of the retraction for you automatically... Regarding threads, I said by default because there is an experimental feature that makes drools start internal threads, but that is not production ready yet. Edson 2011/3/17 Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pt Edison, first of all, thanks for your quick reply! Those initial words caught my attention, although: “By default, Drools does not start any internal thread”… What do you mean “by default”? 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. For example, I’m using this kind of solution: *declare* A @role( event ) @expires( 1h ) *end* *rule* internal - expiring A timer(*int*:1h) *when* $a : A() *from* entry-point incoming *then* *retract*($a); *end* 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. There’s a simpler way to do this? I’m thinking correctly? Once again, thanks! Vítor Mendonça Moreira *Analista / Programador Direcção de Investigação e Desenvolvimento* Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq. 2500 - 206 - Caldas da Rainha Tel: (+351) 262 832 196 Fax: (+351) 262 186 455 Web: www.makewise.pt Uma empresa: Grupo Sousa Pedro http://www.sousapedro.com -- Declaração: A informação contida nesta mensagem, e os ficheiros anexos, é privilegiada e
Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
Greg, I will look into that. Trunk is under heavy work right now, so it will probably not work. Edson 2011/3/17 Greg Barton greg_bar...@yahoo.com Yes, but I just fired up a small project using it and it used 100% of CPU. If you build the attached project you'll see the tests run just fine. (They use fireAllRules.) If you launch from the commandline, (java -jar target/DroolsBoxes-1.0.jar) which uses fireUntilHalt, the rules fire (and complete) just fine, but it continues to use 100% of a cpu core indefinitely. This is with 5.1.1. If I change the drools version to 5.2.0-SNAPSHOT it compiles but the tests won't run. They all fail with the following exception: java.lang.NoSuchMethodError: org.drools.spi.DeclarationScopeResolver.init([Ljava/util/Map;Ljava/util/Stack;)V at org.drools.rule.builder.RuleBuildContext.init(RuleBuildContext.java:72) at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1198) at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:629) at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:278) at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:451) at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28) at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:75) at com.sample.DroolsTest.go(DroolsTest.java:31) at com.sample.BoxTest.test0(BoxTest.java:21) --- On *Thu, 3/17/11, Edson Tirelli ed.tire...@gmail.com* wrote: From: Edson Tirelli ed.tire...@gmail.com Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires To: Rules Users List rules-users@lists.jboss.org Date: Thursday, March 17, 2011, 10:47 AM To be honest, I believe so, but didn't profiled it extensively. I used fireUntilHalt() in my Webinar yesterday on a live demo and it worked nicely. Edson 2011/3/17 Greg Barton greg_bar...@yahoo.comhttp://mc/compose?to=greg_bar...@yahoo.com Has the performance problem with fireUntilHalt been fixed in 5.2? --- On *Thu, 3/17/11, Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pt http://mc/compose?to=vitor.mendo...@brisa.pt*wrote: From: Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pthttp://mc/compose?to=vitor.mendo...@brisa.pt Subject: Re: [rules-users] Basic doubt regarding Drools Fusion - @expires To: 'Rules Users List' rules-users@lists.jboss.orghttp://mc/compose?to=rules-users@lists.jboss.org Date: Thursday, March 17, 2011, 7:01 AM Hi Thomas, thanks for the info! 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. ___ rules-users mailing list rules-users@lists.jboss.orghttp://mc/compose?to=rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com -Inline Attachment Follows- ___ rules-users mailing list rules-users@lists.jboss.orghttp://mc/compose?to=rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Basic doubt regarding Drools Fusion - @expires
Hi all! I’ve got a really basic doubt… I’ve read several documentation regarding it but I think I need some advice here… Imagine that I have an event: declare A @role( event ) @expires( 1h ) end On my Java code, I call “fireAllRules()” method every time that I put an event into the working memory. My doubt: When does event A expires? a) One hour after it was inserted (time-based and without the “fireAllRules()” method call) or b) by calling “fireAllRules()” method (event-based) T.I.A. Vítor Mendonça Moreira Analista / Programador Direcção de Investigação e Desenvolvimento Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq. 2500 - 206 - Caldas da Rainha Tel: (+351) 262 832 196 Fax: (+351) 262 186 455 Web: www.makewise.pthttp://www.makewise.pt Uma empresa: Grupo Sousa Pedrohttp://www.sousapedro.com [cid:image002.jpg@01CBE3EF.C9596900] Declaração: 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. Disclaimer: 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. inline: image001.jpginline: image002.jpg___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Basic doubt regarding Drools Fusion - @expires
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. Edson 2011/3/16 Makewise - Vitor Rui Mendonça vitor.mendo...@brisa.pt Hi all! I’ve got a really basic doubt… I’ve read several documentation regarding it but I think I need some advice here… Imagine that I have an event: *declare* A @role( event ) @expires( 1h ) *end* On my Java code, I call “fireAllRules()” method every time that I put an event into the working memory. My doubt: When does event A expires? a) One hour after it was inserted (time-based and without the “fireAllRules()” method call) or b) by calling “fireAllRules()” method (event-based) T.I.A. Vítor Mendonça Moreira *Analista / Programador Direcção de Investigação e Desenvolvimento* Rua Dr. Francisco Sá Carneiro, nº. 4 r/c esq. 2500 - 206 - Caldas da Rainha Tel: (+351) 262 832 196 Fax: (+351) 262 186 455 Web: www.makewise.pt Uma empresa: Grupo Sousa Pedro http://www.sousapedro.com -- Declaração: 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. Disclaimer: 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. -- ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com image001.jpgimage002.jpg___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users