Re: [rules-users] Drools performance

2013-12-19 Thread laune
You can't set Drools to read N events per second. Performance depends on several factors, so asking for how many events doesn't make sense. Benchmark. Who should admit a delay? -W -- View this message in context: http://drools.46999.n3.nabble.com/Drools-performance-tp4027355p4027367.html

Re: [rules-users] How to improve performance with large number of rules and facts ?

2013-08-05 Thread laune
virajn wrote I'm using this project as a experiment. Therefore condition of the all rules are same and they will fire once for all the objects. Following is a sample. when UserProfile( profile == UserProfile.STUDENT ) $book : Book( student == true ) then

Re: [rules-users] Event Processing in Drools

2013-07-26 Thread laune
Add this after your last insertion: clock.advanceTime(1, TimeUnit.MILLISECONDS); I'm not sure why you have to do this, though. Perhaps it is a bug in Drools. -- View this message in context: http://drools.46999.n3.nabble.com/Event-Processing-in-Drools-tp4025029p4025161.html Sent from

Re: [rules-users] Unable to initialize KieBase from Windows file system

2013-06-25 Thread laune
file.separator Daniel Straub wrote Spending some time for debugging, we realized that in KieBuilderImpl (and other places) file names are compared with linux path delimiter We made the followin hack Hack, indeed. RESOURCES_ROOT should be set correctly, using System.getProperty(

Re: [rules-users] NPE in org.drools.compiler.compiler.PackageBuilder

2013-06-25 Thread laune
Probably something like the one below...? A java.lang.NullPointerException was caused for unknown reason by undisclosed code, guess what. -- View this message in context: http://drools.46999.n3.nabble.com/NPE-in-org-drools-compiler-compiler-PackageBuilder-tp4024516p4024521.html Sent from

Re: [rules-users] Memory-Problemwith instance of ReteooStatefulSession

2013-06-25 Thread laune
You have (at least) two different fact classes: Alert and Information (not just one, as you write). The rule you have shown has only two patterns - I was asking for one with three patterns (as I was thinking they had all to be of the same class). If you retract an Alert as soon as it is

Re: [rules-users] Abstracting Rules using extends

2013-04-06 Thread laune
This code may work, and then it may not: it depends on (Java) code not shown. If it works, it will loop. -- View this message in context: http://drools.46999.n3.nabble.com/Abstracting-Rules-using-extends-tp4023217p4023226.html Sent from the Drools: User forum mailing list archive at

Re: [rules-users] Abstracting Rules using extends

2013-04-06 Thread laune
Using a drl-defined class for defining the constants is all right, but these values have to be used while creating a Vehicle object. People maintaining the rules may not be the ones responsible for the code creating the facts, and that's where these values will have to be used for setting the

Re: [rules-users] Structuring rules in Drools

2013-03-22 Thread laune
So I'm not going to repeat the Expert User Guide here - read for yourself. Some pointers: * rule attribute agenda-group * API call class AgendaGroup method setFocus() * rule attribute auto-focus Being in one file or other doesn't matter with these, although there's an undocumented feature: Using

Re: [rules-users] Structuring rules in Drools

2013-03-21 Thread laune
To figure out a hierarchical structure among rules isn't a very clear definition... Rules (like many other logical entities in some programming environment) are written in compilation units - DRL file, which imposes one hierarchical structure. Then, they are subordinate to packages (much like

Re: [rules-users] string tokenizer import issue in drl

2012-06-11 Thread laune
can you let me know what would be the fix. No, but it's possible if you consider showing the DRL file and Java code to reproduce the error, indicating the Drools version, and with the exact error message you are getting. -- View this message in context:

Re: [rules-users] Decision table call external method

2012-05-15 Thread laune
If there is just one object of class XMLTool and all addNode() calls should refer to this single object, you should do what Vincent suggested by making this single object accessible via a DRL global variable, or by using the singleton design pattern (as in Java). Adding this object as a fact and

Re: [rules-users] why java.util.Map doesn't work on RHS update

2012-03-21 Thread laune
Read the definition of lock-on-active: it inhibits the firing of your second rule. It is almost certainly a bad idea to use Map objects like this. Beans are much better suited, as you could write rules such as when MyType( year == 2012, state == null ) then modify(...) -W -- View this

Re: [rules-users] Loop Drools on Multi Element

2012-02-22 Thread laune
Using forall isn't so complicated. You can use the simplified form, where the condition to be satisfied is written in the pattern selecting the domain. rule setPriority when $order: OrderType( priority != high ) forall ( OrderLineType( quantity 2 ) from $order.lineItem ) then

Re: [rules-users] Loop Drools on Multi Element

2012-02-21 Thread laune
As an alternative to the CE forall, consider rule setPriority when $order: OrderType( priority != high ) not OrderLineType( quantity = 2 ) from $order.lineItem then modify( $order ){ setPriority( high ) } end -- View this message in context:

Re: [rules-users] Alternative to instanceof when matching against multiple concrete types under the same hiearchy?

2011-09-08 Thread laune
Inverting the order of patterns (and following Lisa's idea) makes the problem go away: rule asdf when OtherType( $member : member ) Interface( this == $member ) then // do whatever with $member end This can be constrained to a subset of subclasses if there is also ConcreteType3