Re: [rules-users] Jboss Business Rules Management System (BRMS)
Take a look at the jars in the brms install dir. The versions are usually embedded in the filenames. On May 17, 2013 12:57 PM, "Michael Anstis" wrote: > Which version of BRMS? > > > On 17 May 2013 12:54, abhinay_agarwal wrote: > >> May I know which version of drools is bundled in Jboss Business Rules >> Management System (BRMS) ? >> >> Thanks, >> Abhinay >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Jboss-Business-Rules-Management-System-BRMS-tp4023870.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Fusion Dropping Events?
Wolfgang, the code to reproduce is below. I'm hoping to process between 20k and 50k events through Drools per second thus the extreme high-throughput testing. I could settle for a single Drools node handling only say 5K per second IFF I could cluster Drools but I've not yet found a way to distribute workload across an active-active Drools cluster (seems there is no such thing?). Since you're recommendation I've shifted to using Drools 5.3 just FYI: ### Average.java ### package drools53fusioneval; import java.io.IOException; import java.util.Random; import org.drools.KnowledgeBase; import org.drools.KnowledgeBaseConfiguration; import org.drools.KnowledgeBaseFactory; import org.drools.builder.KnowledgeBuilder; import org.drools.builder.KnowledgeBuilderFactory; import org.drools.builder.ResourceType; import org.drools.conf.EventProcessingOption; import org.drools.io.ResourceFactory; import org.drools.runtime.StatefulKnowledgeSession; import org.drools.runtime.rule.WorkingMemoryEntryPoint; class AvgDFEChannel implements org.drools.runtime.Channel { @Override public void send(Object o) { System.err.println("Recieved channel message: " + o); } } public class Average { public static void main(String[] args) throws InterruptedException, IOException { KnowledgeBaseConfiguration kbconfig = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(); kbconfig.setOption(EventProcessingOption.STREAM); KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(kbconfig); KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add(ResourceFactory.newClassPathResource("drools53fusioneval/basic.drl"), ResourceType.DRL); if (kbuilder.hasErrors()) { System.err.println(kbuilder.getErrors().toString()); } kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); final StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession(); session.registerChannel("heartbeat", new AvgDFEChannel()); WorkingMemoryEntryPoint ep01 = session.getWorkingMemoryEntryPoint("ep01"); new Thread() { public void run() { session.fireUntilHalt(); } }.start(); Thread.sleep(5000); // give the engine time to get setup Server hiwaesdk = new Server("hiwaesdk"); session.insert(hiwaesdk); long LIMIT = 1; long sentCount = 0; int batchSize = 1; Random rnd = new Random(System.nanoTime()); int temp = 0; long startTS = System.nanoTime(); while (sentCount < LIMIT) { for (int i = 0; i < batchSize; i++) { temp = rnd.nextInt(212); IntEvent evt = new IntEvent (temp); ep01.insert(evt); sentCount++; } Thread.sleep (0x1); } double duration = (System.nanoTime() - startTS)/100.0; System.out.println(LIMIT +" events generated in "+ duration +" milliseconds"); System.out.println("Last temperature submitted: "+ temp); for (int i = 0; i < 5; i++) { System.out.println ("Sec "+ i +": "+ hiwaesdk.currentTemp +", "+ hiwaesdk.readingCount); Thread.sleep (1000); } System.exit(0); } } ### basic.drl ### package drools53fusioneval declare IntEvent @role ( event ) end rule "number rule" when $e : IntEvent () from entry-point ep01 $s : Server (hostname == "hiwaesdk") then $s.currentTemp = $e.data; $s.readingCount++; end On Thu, May 16, 2013 at 4:25 AM, Wolfgang Laun wrote: > What you describe is definitely not "expected behaviour" - it's more > like that race condition (or another one) already being in 5.3. Posting > your code might be a good idea ;-) > -W > > On 16/05/2013, Jason Barto wrote: > > I've been working to load test Drools 5.3 to determine if its a fit for a > > project. As part of the test I programmatically insert events as rapidly > > as possible; an example, my earlier test inserted 10k events in about > > 300ms. There is currently a single rule which reads the event and stores > > the event's value into the only fact in Drools. I'm very happy to report, > > and I'm sure it will be no surprise to anyone, that the engine processes > > all the events in roughly 1 sec. However I have noticed that any large > > number of events (~>1000) usually sees that a small number of events > don't > > get processed. I think after 10k events as many as 7 appear to have gone > > unprocessed. If 100 events are inserted, rather than 10k, no events get > > disregarded. Being
[rules-users] Drools Fusion Dropping Events?
I've been working to load test Drools 5.3 to determine if its a fit for a project. As part of the test I programmatically insert events as rapidly as possible; an example, my earlier test inserted 10k events in about 300ms. There is currently a single rule which reads the event and stores the event's value into the only fact in Drools. I'm very happy to report, and I'm sure it will be no surprise to anyone, that the engine processes all the events in roughly 1 sec. However I have noticed that any large number of events (~>1000) usually sees that a small number of events don't get processed. I think after 10k events as many as 7 appear to have gone unprocessed. If 100 events are inserted, rather than 10k, no events get disregarded. Being new to Drools I can easily accept that my java code or DRL code is off or unoptimized in some way. However not knowing how Drools does its magic I'm currently inclined to think that Drools gets swamped (10k in 300ms is a lot) and a few events get dropped so Drools can keep operating. Is this a known or expected behavior from Drools? If not I am happy to post my code, it is similar to the other code sets I've posted in the last few days. I'm still new to Drools and trying to learn its behavior so any insight or enlightenment is greatly appreciated. Sincerely, Jason ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] NPE from reteoo.AccumulateNode
Davide and Wolfgang, thank you both for your time and feedback into my questions as well as to other's questions. I'm rather interested in learning more about the internals of drools in the hopes of making contribution when and where possible. I'd imagine there's a developer guide that talks to fusion's architecture that would act as a companion to reviewing the source code? Sincerely, Jason On May 14, 2013 8:25 PM, "Davide Sottara" wrote: > Confirmed as a race condition, hopefully it will be fixed in 5.6 > Thanks Jason and Wolfgang > Davide > > On 05/14/2013 06:43 AM, Jason Barto wrote: > > Thanks Wolfgang. I'll change over to the 5.3 libraries and carry on with > my testing. I'll also enter this issue into jira if it doesn't yet exist. > > Sincerely, > Jason > On May 14, 2013 11:30 AM, "Wolfgang Laun" wrote: > >> Looks like a bug in Drools to me. It has the classic hallmark of a >> race condition: the NPE does not happen with every run (on my system), >> perhaps only with 85%. >> >> Moreover, with 5.4.0 I get a similar NPE and also: >> Exception in thread "main" java.util.NoSuchElementException >> at java.util.LinkedList.remove(LinkedList.java:788) >> at java.util.LinkedList.removeFirst(LinkedList.java:134) >> at >> org.drools.common.PropagationContextImpl.evaluateActionQueue(PropagationContextImpl.java:344) >> at >> org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:342) >> at >> org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:298) >> at >> org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:123) >> at >> org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:53) >> at overrun.Main.main(Main.java:64) >> >> 5.3.0 is the last version without this bug. >> >> -W >> >> >> On 14/05/2013, jpbarto wrote: >> > First the specifics: JDK 1.6, Mac OSX, using Drools 5.5 Final >> > >> > The full source code and rules are pasted below but here's the gist, I >> have >> > a stateful knowledge session to which I am inserting events and running >> an >> > accumulate on the input events. I have a for loop generating the events >> > and >> > inserting them as rapidly as possible. In the rules I use an >> accumulator >> > to >> > calculate the average of the values contained within the events. The >> > behavior I'm observing is that if I insert ~120 events without any >> waiting >> > I >> > receive an NPE. If I Thread.sleep for even just 1ms the test goes off >> > without a hitch. Have I uncovered a bug which should be logged in >> JIRA? I >> > would check through JIRA to see if something similar has been logged but >> > I'm >> > so unfamiliar with the codebase, not to mention it could all just be >> user >> > error. >> > >> > The NPE is as follows: >> > Exception in thread "main" java.lang.NullPointerException >> > at >> > org.drools.reteoo.AccumulateNode.getFirstMatch(AccumulateNode.java:1050) >> > at >> > >> org.drools.reteoo.AccumulateNode.modifyLeftTuple(AccumulateNode.java:345) >> > at >> > >> org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateModifyChildLeftTuple(SingleLeftTupleSinkAdapter.java:259) >> > at >> > >> org.drools.reteoo.AccumulateNode.evaluateResultConstraints(AccumulateNode.java:676) >> > at >> > >> org.drools.reteoo.ReteooWorkingMemory$EvaluateResultConstraints.execute(ReteooWorkingMemory.java:590) >> > at >> > >> org.drools.common.PropagationContextImpl.evaluateActionQueue(PropagationContextImpl.java:350) >> > at >> > >> org.drools.rule.SlidingLengthWindow.assertFact(SlidingLengthWindow.java:119) >> > at >> org.drools.rule.BehaviorManager.assertFact(BehaviorManager.java:94) >> > at org.drools.reteoo.WindowNode.assertObject(WindowNode.java:167) >> > at >> > >> org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497) >> > at >> > >> org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382) >> > at >> org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235) >> > at >> org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240) >>
Re: [rules-users] NPE from reteoo.AccumulateNode
Thanks Wolfgang. I'll change over to the 5.3 libraries and carry on with my testing. I'll also enter this issue into jira if it doesn't yet exist. Sincerely, Jason On May 14, 2013 11:30 AM, "Wolfgang Laun" wrote: > Looks like a bug in Drools to me. It has the classic hallmark of a > race condition: the NPE does not happen with every run (on my system), > perhaps only with 85%. > > Moreover, with 5.4.0 I get a similar NPE and also: > Exception in thread "main" java.util.NoSuchElementException > at java.util.LinkedList.remove(LinkedList.java:788) > at java.util.LinkedList.removeFirst(LinkedList.java:134) > at > org.drools.common.PropagationContextImpl.evaluateActionQueue(PropagationContextImpl.java:344) > at > org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:342) > at > org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:298) > at > org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:123) > at > org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:53) > at overrun.Main.main(Main.java:64) > > 5.3.0 is the last version without this bug. > > -W > > > On 14/05/2013, jpbarto wrote: > > First the specifics: JDK 1.6, Mac OSX, using Drools 5.5 Final > > > > The full source code and rules are pasted below but here's the gist, I > have > > a stateful knowledge session to which I am inserting events and running > an > > accumulate on the input events. I have a for loop generating the events > > and > > inserting them as rapidly as possible. In the rules I use an accumulator > > to > > calculate the average of the values contained within the events. The > > behavior I'm observing is that if I insert ~120 events without any > waiting > > I > > receive an NPE. If I Thread.sleep for even just 1ms the test goes off > > without a hitch. Have I uncovered a bug which should be logged in JIRA? > I > > would check through JIRA to see if something similar has been logged but > > I'm > > so unfamiliar with the codebase, not to mention it could all just be user > > error. > > > > The NPE is as follows: > > Exception in thread "main" java.lang.NullPointerException > > at > > org.drools.reteoo.AccumulateNode.getFirstMatch(AccumulateNode.java:1050) > > at > > org.drools.reteoo.AccumulateNode.modifyLeftTuple(AccumulateNode.java:345) > > at > > > org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateModifyChildLeftTuple(SingleLeftTupleSinkAdapter.java:259) > > at > > > org.drools.reteoo.AccumulateNode.evaluateResultConstraints(AccumulateNode.java:676) > > at > > > org.drools.reteoo.ReteooWorkingMemory$EvaluateResultConstraints.execute(ReteooWorkingMemory.java:590) > > at > > > org.drools.common.PropagationContextImpl.evaluateActionQueue(PropagationContextImpl.java:350) > > at > > > org.drools.rule.SlidingLengthWindow.assertFact(SlidingLengthWindow.java:119) > > at > org.drools.rule.BehaviorManager.assertFact(BehaviorManager.java:94) > > at org.drools.reteoo.WindowNode.assertObject(WindowNode.java:167) > > at > > > org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497) > > at > > > org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382) > > at > org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235) > > at > org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240) > > at > org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350) > > at > org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311) > > at > org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:127) > > at > org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:55) > > at drools5fusioneval.Average.main(Average.java:66) > > > > ### Average.java ### > > package drools5fusioneval; > > > > import java.io.IOException; > > import java.util.Random; > > import org.drools.KnowledgeBase; > > import org.drools.KnowledgeBaseConfiguration; > > import org.drools.KnowledgeBaseFactory; > > import org.drools.builder.KnowledgeBuilder; > > import org.drools.builder.KnowledgeBuilderFactory; > > import org.drools.builder.ResourceType; > > import org.drools.conf.EventProcessingOption; > > import org.drools.io.ResourceFactory; > > import org.drools.runtime.StatefulKnowledgeSession; > > import org.drools.runtime.rule.WorkingMemoryEntryPoint; > > > > class AvgDFEChannel implements org.drools.runtime.Channel { > > @Override > > public void send(Object o) { > > System.err.println ("Recieved channel message: "+ o); > > } > > } > > > > public class Average { > > public static void main(String[] args) throws InterruptedException, > > IOException { > > KnowledgeBaseConfiguration kbconfig = > > KnowledgeBaseFactory.newKnowledgeBaseConfiguration(); > > kbconfig.setOption(EventProcessingOp
[rules-users] Grid Node Null Pointer Exception
I am attempting to, using Camel, receive AMQP messages from RabbitMQ and pass them into a Drools Fusion engine. As my starting point I have a 4 line bit of Java code that instantiates Camel and passes it the camel XML pasted below. Is it apparent to anyone where I've gone wrong that I receive a NPE while the system is calling the init method for 'node1'? http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:rabbit="http://www.springframework.org/schema/rabbit"; xmlns:drools="http://drools.org/schema/drools-spring"; xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.0.xsd http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd";> http://camel.apache.org/schema/spring";> ${body.toUpperCase()} I'm still extremely new to Drools, Camel, BRMS and my ultimate goal is to have BRMS running, receiving events from RabbitMQ. This is one step along my learning to achieve that goal so any help that can be offered is very much appreciated. It's potentially worth noting that the JAR files I'm running for this are from the Drools-jBPM Integration 5.5 distribution. Sincerely, Jason ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Consequence Exception with too many events
Wolfgang, I'd agree with you although I will continue to research further. If it is as you suggest - a race condition - I would think a more appropriate reaction of the system would be to emit a warning that events are expiring before they can be considered by the rules engine, although I would think that this is a use case which does not see much real life execution. Thank you very much for your time and input into this matter, it's been educational. Sincerely, Jason On Saturday, May 4, 2013, Wolfgang Laun wrote: > I can confirm that (using 5.5.0) this NPE occurs predictably with a > limit of 50. > > It looks like a race condition to me - at least that is what line > DefaultAgenda.java:1319 suggests. Possibly it is due to automatic > retraction "overtaking" rule firing, since the latter tends to take > much, much longer than the ~10sec the mere insertion of 500K events > takes on my system. > > 500,000 inserted in 10s means 50,000/s, and that, in turn, implies > 50,000 retractions per second. 30s after the last insertion, only > ~90,000 firings have taken place. (I added a printout of the counter's > total after the Thread.sleep().) > > It's interesting to experiment with the @expires value: Everything > else remaining the same, a setting of @expires(10s) will let the > firings complete without a NPE. > > So, I'm back to my surmise: a race condition, due to expiry being cut > too short to cope with the system load. I'd still classify this as a > Drools bug: it should notice that it is being overtaxed and/or > destabilizing itself. > > -W > > > On 04/05/2013, Jason Barto wrote: > > Wolfgang, > > thank you for your prompt reply. After further work with my code I think > > the culprit may have either been the setting of the event expiration time > > to 1s OR that I was using session.update to insert a new counter object; > > but maybe not. I cleaned up my code in order to send it out. In doing > so > > I also downloaded the official Drools 5.5 distribution (in the previous > > example I was using the libraries packaged with BRMS). Between the code > > cleanup and the use of the official distro I'm no longer experiencing a > > Consequence Exception. > > > > That being said I am still experiencing a NPE when a high iteration > count. > > If you take a look at Drools5FusionEval.java, around line 51 you'll see a > > variable 'eventLimit'. If set to 50 it seems to pretty reliably kick > > out the following NPE: > > > > Exception in thread "Thread-1" java.lang.NullPointerException > > at > > org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1319) > > at > > org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221) > > at > > org.drools.common.DefaultAgenda.fireUntilHalt(DefaultAgenda.java:1434) > > at > > > org.drools.common.AbstractWorkingMemory.fireUntilHalt(AbstractWorkingMemory.java:755) > > at > > > org.drools.common.AbstractWorkingMemory.fireUntilHalt(AbstractWorkingMemory.java:731) > > at > > > org.drools.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:247) > > at > drools5fusioneval.Drools5FusionEval$1.run(Drools5FusionEval.java:47) > > > > As I've said I'm still very new to Drools and trying to understand better > > how it does what it does - any information that anyone can provide to > help > > me understand why the above error is being experienced would be greatly > > appreciated. > > > > Source code and rules are attached. > > > > Sincerely, > > Jason > > > > > > On Sat, May 4, 2013 at 7:58 AM, Wolfgang Laun > > wrote: > > > >> Works for me (5.5.0, 5.4.0) - at least based on the code you've posted > >> which (apart from the omitted getters and setters) isn't the one you've > >> been running, and so you may have changed or omitted something > >> that's essential. > >> > >> The full stack dump might shed some more light on this, and the full and > >> true code of the rule RHS whre the NPE is caused. > >> > >> -W > >> > >> On 04/05/2013, Jason Barto wrote: > >> > I am new to Drools (Expert and Fusion) and have been reading through > >> > the > >> > materials over the last few days. After going through some of the > >> tutorial > >> > code I wrote a very quick and dirty to perform a base assessment of > the > >> > speed of Fusion / Expert. My code is below. The str
Re: [rules-users] Consequence Exception with too many events
Wolfgang, thank you for your prompt reply. After further work with my code I think the culprit may have either been the setting of the event expiration time to 1s OR that I was using session.update to insert a new counter object; but maybe not. I cleaned up my code in order to send it out. In doing so I also downloaded the official Drools 5.5 distribution (in the previous example I was using the libraries packaged with BRMS). Between the code cleanup and the use of the official distro I'm no longer experiencing a Consequence Exception. That being said I am still experiencing a NPE when a high iteration count. If you take a look at Drools5FusionEval.java, around line 51 you'll see a variable 'eventLimit'. If set to 50 it seems to pretty reliably kick out the following NPE: Exception in thread "Thread-1" java.lang.NullPointerException at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1319) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221) at org.drools.common.DefaultAgenda.fireUntilHalt(DefaultAgenda.java:1434) at org.drools.common.AbstractWorkingMemory.fireUntilHalt(AbstractWorkingMemory.java:755) at org.drools.common.AbstractWorkingMemory.fireUntilHalt(AbstractWorkingMemory.java:731) at org.drools.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:247) at drools5fusioneval.Drools5FusionEval$1.run(Drools5FusionEval.java:47) As I've said I'm still very new to Drools and trying to understand better how it does what it does - any information that anyone can provide to help me understand why the above error is being experienced would be greatly appreciated. Source code and rules are attached. Sincerely, Jason On Sat, May 4, 2013 at 7:58 AM, Wolfgang Laun wrote: > Works for me (5.5.0, 5.4.0) - at least based on the code you've posted > which (apart from the omitted getters and setters) isn't the one you've > been running, and so you may have changed or omitted something > that's essential. > > The full stack dump might shed some more light on this, and the full and > true code of the rule RHS whre the NPE is caused. > > -W > > On 04/05/2013, Jason Barto wrote: > > I am new to Drools (Expert and Fusion) and have been reading through the > > materials over the last few days. After going through some of the > tutorial > > code I wrote a very quick and dirty to perform a base assessment of the > > speed of Fusion / Expert. My code is below. The strange thing I'm > > currently receiving is, if I insert 100k events the test completes > > successfully, if I insert 150k events, I receive a ConsequenceException > > caused by an NPE. Being new to Drools I must be doing something wrong, > can > > anyone please provide some guidance? > > > > (Main function) > > Counter cc = new Counter (); > > session.insert (cc); > > for (int i = 0; i < 15; i++) { > > entryPoint01.insert (new MyEvent ()); > > } > > > > (Counter Class) > > public class Counter { > > private long total = 0; > > // get / set total > > public void addValue (int val) { > > total += val; > > } > > } > > > > (MyEvent Class) > > public class MyEvent { > > private int value = 1; > > // get / set value > > } > > > > (DRL file) > > declare MyEvent > > @role (event) > > @expires (1s) > > end > > > > rule "Count the rules" > > when > > $ev : MyEvent () from entry-point entryPoint01 > > $pc : Counter () > > then > > $cc.addValue ($ev.getValue ()); > > end > > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > drools5fusioneval.tar.gz Description: GNU Zip compressed data ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Consequence Exception with too many events
I am new to Drools (Expert and Fusion) and have been reading through the materials over the last few days. After going through some of the tutorial code I wrote a very quick and dirty to perform a base assessment of the speed of Fusion / Expert. My code is below. The strange thing I'm currently receiving is, if I insert 100k events the test completes successfully, if I insert 150k events, I receive a ConsequenceException caused by an NPE. Being new to Drools I must be doing something wrong, can anyone please provide some guidance? (Main function) Counter cc = new Counter (); session.insert (cc); for (int i = 0; i < 15; i++) { entryPoint01.insert (new MyEvent ()); } (Counter Class) public class Counter { private long total = 0; // get / set total public void addValue (int val) { total += val; } } (MyEvent Class) public class MyEvent { private int value = 1; // get / set value } (DRL file) declare MyEvent @role (event) @expires (1s) end rule "Count the rules" when $ev : MyEvent () from entry-point entryPoint01 $pc : Counter () then $cc.addValue ($ev.getValue ()); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users