Re: [rules-users] java.lang.OutOfMemoryError: Java heap space
Just repeat this, as often as required, with as many facts in facts as you want: // copy-pasted from the API documentation ;-) StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); for( Object fact : facts ) { ksession.insert( fact ); } ksession.fireAllRules(); ksession.dispose(); -W On 09/10/2012, Brenda1636 brenda.chodkow...@ctg.com wrote: I've seen many posts about users receiving a java.lang.OutOfMemoryError: Java heap space error. The answer have been to increase heap space. I was wondering if there is another way around this. I have about 10,000 facts that I want to bring into working memory. Is there a way to insert some of them, run the rules, remove the inserted ones, and then insert more? Thanks! -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-OutOfMemoryError-Java-heap-space-tp4020185.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] java.lang.OutOfMemoryError: Java heap space
Is there anything that has to be taken care in case of a stateless session. I have a huge collection of facts that needs to get into the working memory and I fire ksession.execute(Collecton object); Regards, Shobha M | Senior Program Manager, AAD | NTT DATA Global Delivery Services Limited| w. +91-80-26659482 (Ext 3679) | v. 8814.3679 | m. +91.9972522743 | shobha.mahadeva...@nttdata.com -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun Sent: 10 October 2012 PM 12:58 To: Rules Users List Subject: Re: [rules-users] java.lang.OutOfMemoryError: Java heap space Just repeat this, as often as required, with as many facts in facts as you want: // copy-pasted from the API documentation ;-) StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); for( Object fact : facts ) { ksession.insert( fact ); } ksession.fireAllRules(); ksession.dispose(); -W On 09/10/2012, Brenda1636 brenda.chodkow...@ctg.com wrote: I've seen many posts about users receiving a java.lang.OutOfMemoryError: Java heap space error. The answer have been to increase heap space. I was wondering if there is another way around this. I have about 10,000 facts that I want to bring into working memory. Is there a way to insert some of them, run the rules, remove the inserted ones, and then insert more? Thanks! -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-OutOfMemoryError-Java-heap -space-tp4020185.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 __ Disclaimer:This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.OutOfMemoryError: Java heap space
On 10/10/2012, Mahadevappa, Shobha shobha.mahadeva...@nttdata.com wrote: Is there anything that has to be taken care in case of a stateless session. I have a huge collection of facts that needs to get into the working memory and I fire ksession.execute(Collecton object); That'll do - it calls dispose for you. -W Regards, Shobha M | Senior Program Manager, AAD | NTT DATA Global Delivery Services Limited| w. +91-80-26659482 (Ext 3679) | v. 8814.3679 | m. +91.9972522743 | shobha.mahadeva...@nttdata.com -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun Sent: 10 October 2012 PM 12:58 To: Rules Users List Subject: Re: [rules-users] java.lang.OutOfMemoryError: Java heap space Just repeat this, as often as required, with as many facts in facts as you want: // copy-pasted from the API documentation ;-) StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); for( Object fact : facts ) { ksession.insert( fact ); } ksession.fireAllRules(); ksession.dispose(); -W On 09/10/2012, Brenda1636 brenda.chodkow...@ctg.com wrote: I've seen many posts about users receiving a java.lang.OutOfMemoryError: Java heap space error. The answer have been to increase heap space. I was wondering if there is another way around this. I have about 10,000 facts that I want to bring into working memory. Is there a way to insert some of them, run the rules, remove the inserted ones, and then insert more? Thanks! -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-OutOfMemoryError-Java-heap -space-tp4020185.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 __ Disclaimer:This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding ___ 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
[rules-users] Evaluating decision tables from DRL
Hi, With Drools I need to execute a DRL first and based on its output value I need to evaluate a decision table in guvnor and get the output values. Please let me know how this can be done. Thanks, Manasi -- View this message in context: http://drools.46999.n3.nabble.com/Evaluating-decision-tables-from-DRL-tp4020192.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] Evaluating decision tables from DRL
Chaining rules, including those in decision tables, can be achieved by using a transient control fact. rule your DRL rule 1 when YourObject( field == 1 ) then insertLogical( new TransientControlFact( dtable1 ); end rule your DRL rule 2 when YourObject( field == 2 ) then insertLogical( new TransientControlFact( dtable2 ); end Then in the decision table use the transient control fact in an additional column. The DRL would look like this:- rule dtable1 row 1 when TransientControlFact( dtable = dtable1 ) YourOtherFacts( ) then end rule dtable1 row 2 when TransientControlFact( dtable = dtable2 ) YourOtherFacts( ) then end How you retrieve the results from the Decision Tables is up to you (e.g. queries, globals etc). With kind regards, Mike On 10 October 2012 09:34, Manasi manasi.a.da...@capgemini.com wrote: Hi, With Drools I need to execute a DRL first and based on its output value I need to evaluate a decision table in guvnor and get the output values. Please let me know how this can be done. Thanks, Manasi -- View this message in context: http://drools.46999.n3.nabble.com/Evaluating-decision-tables-from-DRL-tp4020192.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
[rules-users] Best practice to use heap memory effectively
Hi , I want to keep events valid for 24 hour period. Per day I’m getting over 1000K events insert into session. I saw that heap usage increase drastically because of this. What is the best practice to handle such a situation? Do I need to choose some caching mechanism? Meantime I’m using “Statefulknowledge” session and use single session to cater each event never call session.dispose(). Will there be any impact? I’m using Drool 5.1.1, jboss-5.1.0.GA, jre 1.6.0_33 Thanks. Mohan -- View this message in context: http://drools.46999.n3.nabble.com/Best-practice-to-use-heap-memory-effectively-tp4020194.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.OutOfMemoryError: Java heap space
Thank you! I did write code for this last night and ran it, but didn't get the results I wanted so I was thinking the session was disposed before it had a chance to run the rules. But the real issue was that I did not write my rule correctly. Thanks again! -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-OutOfMemoryError-Java-heap-space-tp4020185p4020195.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] Finding the definition of a rule
Thank you very much, it worked. kind regards Lukas -- View this message in context: http://drools.46999.n3.nabble.com/Finding-the-definition-of-a-rule-tp4020183p4020196.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] Drools 5.5 - Runtime files
Does anyone know where I can find documentation on the Drools 5.5 runtime files necessary to deploy with the application? Thank you for your assistance. -Dean -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-Runtime-files-tp4020199.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] Get List of FactTypes in a KnowledgeBase
Look at the Expert docs, for drools.getWorkingMemory(). This might be what you need. the iterateObjects() method on WorkingMemory lets you see all facts in working memory at runtime. -- View this message in context: http://drools.46999.n3.nabble.com/Get-List-of-FactTypes-in-a-KnowledgeBase-tp4020197p4020200.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] Drools 5.5 - Runtime files
http://www.jboss.org/drools/downloads About half way down. When we get to 5.5.0.Final it'll move to the top of the page. The User Guide talks about dependencies: http://docs.jboss.org/drools/release/5.5.0.Beta1/droolsjbpm-introduction-docs/html/installationAndSetup.html On 10 October 2012 19:24, dxande6 dxan...@qwest.com wrote: Does anyone know where I can find documentation on the Drools 5.5 runtime files necessary to deploy with the application? Thank you for your assistance. -Dean -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-Runtime-files-tp4020199.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] Get List of FactTypes in a KnowledgeBase
kBase -- getKnowledgePackages() -- getFactTypes() returns the definitions for a given package kSession -- getObjects( new ClassObjectFilter( factyype.getFactClass() ) ) returns the actual instances of a given fact type Davide -- View this message in context: http://drools.46999.n3.nabble.com/Get-List-of-FactTypes-in-a-KnowledgeBase-tp4020197p4020202.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] Drools 5.4 Jitting Error
FYI, I came across a similar problem calling a method declared on a Java helper class, when the method takes a Number and the value passed in is declared as long or int. Problem does not occur when value is declared as double. Simplified version of my example: class JavaHelper { public boolean helperMethod(Number value) { return true; } } declare BusinessObject LongAttribute : long DoubleAttribute : double end rule TestRule when $helper: JavaHelper () $object: BusinessObject ( $helper.helperMethod(LongAttribute) ) then // end This gives the exception shown below. Exception goes away when replacing LongAttribute with DoubleAttribute. One workaround is to create multiple versions of helperMethod: public boolean helperMethod(long value) {..} public boolean helperMethod(double value) {..} = Exception in thread Thread-5 java.lang.RuntimeException: Exception jitting: $helper.helperMethod(LongAttribute) at org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:219) at org.drools.rule.constraint.MvelConstraint.access$000(MvelConstraint.java:41) at org.drools.rule.constraint.MvelConstraint$1.run(MvelConstraint.java:201) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.VerifyError: (class: ConditionEvaluatorc78edf31751242d095abbdec5e344aa4, method: evaluate signature: (Ljava/lang/Object;Lorg/drools/common/InternalWorkingMemory;Lorg/drools/reteoo/LeftTuple;)Z) Expecting to find long on stack at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.getConstructor(Class.java:1657) at org.drools.rule.builder.dialect.asm.ClassGenerator.newInstance(ClassGenerator.java:173) at org.drools.rule.constraint.ASMConditionEvaluatorJitter.jitEvaluator(ASMConditionEvaluatorJitter.java:53) at org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:217) ... 5 more -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-4-Jitting-Error-tp3999176p4020203.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] Query regarding guvnor and drools remote execution using categories of guvnor
Hi All I am a newbie I have a question In guvnor we have categories Using REST API we can access assets through categories like /rest/categories/{}/assets ...something like this I have a JSON object which gets populated which has references to binary for all the assets 1) How do we construct the KnowledgeBase out of it and execute rules based on those subset of rules ? is it advisable to do that ? 2) How do we get all the declarative facts residing inside guvnor remotely from a Java client ? -- Thanks and Regards Krishnendra Nandi Phone :+91-93727-08782 Skype :krish_nandi_78 Gtalk :krishnen...@gmail.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] java.lang.OutOfMemoryError: Java heap space
Hi laune, Assume we continuously getting vast number of facts or events from a stream and we want to reasoning over particular time window (accumulate number of events on this window) how we could achieve the same? Guess we cannot call dispose() after fireAllRules(). -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-OutOfMemoryError-Java-heap-space-tp4020185p4020206.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] Custom Form with DSL
I were able to launch the custom form in DSL, however the rule condition is not mapped to corresponding DRL. I don't know if this is a bug or just something is missing. my DSL mapping looks like this: [when] my dsl is {varName:CF:MyFactType.fieldName} = System.out.println({varName}) I have working set created then configured custom form for fieldName. All things working but rule is not validating. When I check drl source, I found the mapping is not taking place, its still displaying DSL expression in DRL source instead of displaying: System.out.println(values from cf) Any ideas? I have tried this in guvnor 5.4.0.final and 5.5.beta1 -- View this message in context: http://drools.46999.n3.nabble.com/Custom-Form-with-DSL-tp4020207.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