Re: [rules-users] in syntax breaking the Rete Tree
@laune, were you able to reproduce this? -- View this message in context: http://drools.46999.n3.nabble.com/in-operator-breaking-the-Rete-Tree-tp4028148p4028184.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] in syntax breaking the Rete Tree
No, sorry, I haven't had the time to download 5.6.0. -W On 19/02/2014, droolster quant.co...@gmail.com wrote: @laune, were you able to reproduce this? -- View this message in context: http://drools.46999.n3.nabble.com/in-operator-breaking-the-Rete-Tree-tp4028148p4028184.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list 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
Re: [rules-users] in syntax breaking the Rete Tree
@laune, it is the same problem in version 6.0.0.Final. please try with that version if you have it already. Thanks -- View this message in context: http://drools.46999.n3.nabble.com/in-operator-breaking-the-Rete-Tree-tp4028148p4028188.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.NullPointerException in simple example
Check the result of KieSession ksession = kc.newKieSession(CashFlowKS); Might be null. -W On 19/02/2014, ahgiovanini ahgiovan...@gmail.com wrote: Hi guys! I'm new in the world of jboss and drools and I'm making some simple examples that existing on https://github.com/droolsjbpm/drools/tree/master/drools-examples-api Now, I'm studing the CashFlow example and in my project when I run it, I receive a error message saying: Exception in thread main java.lang.NullPointerException at com.sample.CashFlowMain.main(CashFlowMain.java:30) I don't know the why this message, because I set the acp at lines 20 and 21. Someone would help me please? Thanks package com.sample; import org.kie.api.KieServices; import org.kie.api.runtime.KieContainer; import org.kie.api.runtime.KieSession; import org.kie.api.runtime.rule.FactHandle; import java.text.SimpleDateFormat; import java.util.Date; public class CashFlowMain { public static void main(String[] args) throws Exception { SimpleDateFormat sdf = new SimpleDateFormat(-MM-dd); KieContainer kc = KieServices.Factory.get().getKieClasspathContainer(); KieSession ksession = kc.newKieSession(CashFlowKS); AccountPeriod acp = new AccountPeriod(); acp.setStart(date(2013-01-01)); // set acp - line 20 acp.setEnd(date(2013-03-31));// set acp - line 21 Account ac = new Account(1, 0); CashFlow cf1 = new CashFlow(date( 2013-01-12), 100, CashFlowType.CREDIT, 1 ); CashFlow cf2 = new CashFlow(date( 2013-02-2), 200, CashFlowType.DEBIT, 1 ); CashFlow cf3 = new CashFlow(date( 2013-05-18), 50, CashFlowType.CREDIT, 1 ); CashFlow cf4 = new CashFlow(date( 2013-03-07), 75, CashFlowType.CREDIT, 1 ); FactHandle fh = ksession.insert(acp); ksession.insert( ac ); ksession.insert( cf1 ); ksession.insert( cf2 ); ksession.insert( cf3 ); ksession.insert( cf4 ); ksession.fireAllRules(); acp.setStart(date( 2013-04-01)); acp.setEnd(date( 2013-06-31)); ksession.update(fh, acp); ksession.fireAllRules(); } public static Date date(String str) throws Exception { SimpleDateFormat sdf = new SimpleDateFormat(-MM-dd); return sdf.parse( str ); } } -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-NullPointerException-in-simple-example-tp4028177.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list 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
Re: [rules-users] Help with event not found over window query
On 18 Feb 2014, at 18:38, laune [via Drools] wrote: [snip] I ran into trouble because my various rules (from my original email) wouldn't fire an alert as expected when I fed in simulated events. I'm curious as to why you think it's interesting that the four rules below fail to meet my expectation? I suppose it's the fact that I'm a drools newbie and the issue here is probably just my inexperience mapping business logic into drools rules. The word is illuminative rather than interesting. Take this one: $e1: Event($location: properties[location] ...) not Event(, this after $e1) The $e1 Event is here, Time is Now. It's most certainly true that nothing is here after Now! - And the next one: $e1: Event($location: properties[location] ...) not Event(, this after[0, 1m] $e1) Again, Event $e1 is here, Time is Now, and nothing is here after Now. The operator does not instruct the Engine to wait! Yes, I had imagined something like that was the case. My original reasoning was the following; At the moment when the $e1 event arrives, time is Now and it is true that there is no second event. However, there is no way for the engine to know at Time=Now whether or not the second event is going to arrive within the required time period (this after[0,1m] $e1) Surely, the engine needs to wait until (at least) Time=Now+1m before firing the rule, at least in the second case, because it is not possible to establish the truth or falsehood of the second criterion until 1m has past since the first event arrived because the second event might arrive, right? Well, that's what I thought at least! daveor -- View this message in context: http://drools.46999.n3.nabble.com/Help-with-event-not-found-over-window-query-tp4028129p4028190.html Sent from the Drools: User forum mailing list archive at Nabble.com.___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] OutOfMemoryError using 6.0.1
Ciao, I'm another Drools user also encountering similar OutOfMemory errors with v6.0.1; I'm not 100% sure what is your issue specific to, but this may be related / of interest to your case: https://issues.jboss.org/browse/DROOLS-411 Hope this helps; Ciao MM On Wed, Feb 19, 2014 at 8:20 AM, john poole jdpo...@gmail.com wrote: I've converted some NurseRostering rules, which worked in Drools 5.50, to OptaPlanner 6.0.1. While it works far better for the time it runs, it uses up whatever memory I can give it (9GB) and then eventually crashes the GUI. with: Exception in thread AWT-EventQueue-0 java.lang.OutOfMemoryError: GC overhead limit exceeded Is there a way to limit how much memory OptaPlanner uses? Or is it likely that I'm just adding fact to the WorkingMemory in a way that wasn't a problem in 5.5 but is a problem in 6.0? -- View this message in context: http://drools.46999.n3.nabble.com/OutOfMemoryError-using-6-0-1-tp4028183.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list 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
Re: [rules-users] OutOfMemoryError using 6.0.1
A workaround in optaplanner 6.0.1 is probably to enforce RETE_OO (unfortunately ScoreDirectorFactoryConfig#buildKieBase hard codes that, so that's a PITA). It's fixed in BRMS 6.0.0.GA and optaplanner 6.1.0.Beta1. optaplanner 6.1.0.Beta1 might be released later this month. On 19-02-14 13:11, Matteo Mortari wrote: Ciao, I'm another Drools user also encountering similar OutOfMemory errors with v6.0.1; I'm not 100% sure what is your issue specific to, but this may be related / of interest to your case: https://issues.jboss.org/browse/DROOLS-411 Hope this helps; Ciao MM On Wed, Feb 19, 2014 at 8:20 AM, john poole jdpo...@gmail.com mailto:jdpo...@gmail.com wrote: I've converted some NurseRostering rules, which worked in Drools 5.50, to OptaPlanner 6.0.1. While it works far better for the time it runs, it uses up whatever memory I can give it (9GB) and then eventually crashes the GUI. with: Exception in thread AWT-EventQueue-0 java.lang.OutOfMemoryError: GC overhead limit exceeded Is there a way to limit how much memory OptaPlanner uses? Or is it likely that I'm just adding fact to the WorkingMemory in a way that wasn't a problem in 5.5 but is a problem in 6.0? -- View this message in context: http://drools.46999.n3.nabble.com/OutOfMemoryError-using-6-0-1-tp4028183.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org mailto: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 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.NullPointerException in simple example
Hi laune, you are right, the ksession is null. What would be the reason for this? The code, KieContainer kc = KieServices.Factory.get().getKieClasspathContainer(); KieSession ksession = kc.newKieSession(CashFlowKS); is the original code of example. Maybe I set something wrong in my project? My kmodule.xml is: ?xml version=1.0 encoding=UTF-8? kmodule xmlns=http://jboss.org/kie/6.0.0/kmodule; kbase name=kBase ksession name=CashFlowKS / /kbase /kmodule - The rule (CashFlow.drl) is package com.sample dialect mvel rule Increase balance for AccountPeriod Credits when ap : AccountPeriod( ) ac : Account( ) cf : CashFlow( type == CashFlowType.CREDIT, accountNo == ac.accountNo, date = ap.start = ap.end ) then ac.balance = ac.balance + cf.amount; end rule Decrease balance for AccountPeriod Debits when ap : AccountPeriod( ) ac : Account( ) cf : CashFlow( type == CashFlowType.DEBIT, accountNo == ac.accountNo, date = ap.start = ap.end ) then ac.balance = ac.balance - cf.amount; end rule Print blance for AccountPeriod salience -50 when ap : AccountPeriod( ) ac : Account( ) then System.out.println( Account Number + ac.accountNo + balance + ac.balance ); end -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-NullPointerException-in-simple-example-tp4028177p4028193.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] OutOfMemoryError using 6.0.1
That was exactly what I was hoping for. A bug, not caused by me, that had already been closed. Thanks. On Wed, Feb 19, 2014 at 5:13 AM, tari-manga [via Drools] ml-node+s46999n4028191...@n3.nabble.com wrote: Ciao, I'm another Drools user also encountering similar OutOfMemory errors with v6.0.1; I'm not 100% sure what is your issue specific to, but this may be related / of interest to your case: https://issues.jboss.org/browse/DROOLS-411 Hope this helps; Ciao MM On Wed, Feb 19, 2014 at 8:20 AM, john poole [hidden email] wrote: I've converted some NurseRostering rules, which worked in Drools 5.50, to OptaPlanner 6.0.1. While it works far better for the time it runs, it uses up whatever memory I can give it (9GB) and then eventually crashes the GUI. with: Exception in thread AWT-EventQueue-0 java.lang.OutOfMemoryError: GC overhead limit exceeded Is there a way to limit how much memory OptaPlanner uses? Or is it likely that I'm just adding fact to the WorkingMemory in a way that wasn't a problem in 5.5 but is a problem in 6.0? -- View this message in context: http://drools.46999.n3.nabble.com/OutOfMemoryError-using-6-0-1-tp4028183.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/rules-users If you reply to this email, your message will be added to the discussion below: http://drools.46999.n3.nabble.com/OutOfMemoryError-using-6-0-1-tp4028183p4028191.html To unsubscribe from OutOfMemoryError using 6.0.1, click here. NAML -- View this message in context: http://drools.46999.n3.nabble.com/OutOfMemoryError-using-6-0-1-tp4028183p4028196.html Sent from the Drools: User forum mailing list archive at Nabble.com.___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Question about 'query'
Any idea? I'd like to hear from Drools developers! -- View this message in context: http://drools.46999.n3.nabble.com/Question-about-query-tp4028158p4028197.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Question about 'query'
I use queries to encapsulate sets of patterns for re-use. Look at connect, isContainerIn, look etc: https://github.com/droolsjbpm/drools/blob/master/drools-examples/src/main/resources/org/drools/games/adventures/Queries.drl Then look at their use here: https://github.com/droolsjbpm/drools/blob/master/drools-examples/src/main/resources/org/drools/games/adventures/Commands.drl Mark On 19 Feb 2014, at 21:29, ismaximum mnr...@gmail.com wrote: Any idea? I'd like to hear from Drools developers! -- View this message in context: http://drools.46999.n3.nabble.com/Question-about-query-tp4028158p4028197.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list 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
Re: [rules-users] Question about 'query'
Thanks... that's exactly what I was after! -- View this message in context: http://drools.46999.n3.nabble.com/Question-about-query-tp4028158p4028199.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] kieContainer version as LATEST for Drools 6
That is good. We took an optimistic decision to go with Drools 6 instead of a safe 5.6 for our application. Planning a performance test after fixing the integration approach with Drools 6. Will keep the results updated in the forum. Thanks Regards, Rupesh From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mark Proctor Sent: 19 February 2014 07:09 To: Rules Users List Subject: Re: [rules-users] kieContainer version as LATEST for Drools 6 We want it to be quick. I hope 4 to weeks. We'll do one beta, one CR and then final. Also it might be called 7.0. We are being asked to differentiate community versions, with our product version - by increasing the community version number. Mark On 18 Feb 2014, at 08:50, Rupesh M G rupesh.gopinat...@ibsplc.commailto:rupesh.gopinat...@ibsplc.com wrote: Thanks Mark. What is the tentative release date for 6.1.0.Final? Regards, Rupesh From: rules-users-boun...@lists.jboss.orgmailto:rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf OfMark Proctor Sent: 17 February 2014 19:57 To: Rules Users List Subject: Re: [rules-users] kieContainer version as LATEST for Drools 6 There were some bugs, these have been fixed in master. Mark On 17 Feb 2014, at 13:56, Rupesh M G rupesh.gopinat...@ibsplc.commailto:rupesh.gopinat...@ibsplc.com wrote: Hi, Will Drools 6 supports loading a kieContainer like this? KieContainer kContainer = ks.newKieContainer(ks.newReleaseId(org.drools, named-kiesession, LATEST)); The docs say it will. But I didn't get it working. The mailing list also didn't give a clear reply on YES / NO. The unit test samples are showing only updateToVersion(ReleaseId on a specific version). Regards, Rupesh DISCLAIMER: The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect. ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users DISCLAIMER: The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect. ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users DISCLAIMER: The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users