Re: [rules-users] rule limit

2011-10-05 Thread Mark Proctor
On 06/10/2011 00:09, Davide Sottara wrote: > As far as I know, the parser does not check the number of rules in a DRL > Maybe you could do something like this: > > (i) use a KnowledgeBuilder to load the DRL resource; > (ii) before you add the packages to the knowledgeBase, iterate over > kBuilder.g

Re: [rules-users] rule limit

2011-10-05 Thread Davide Sottara
As far as I know, the parser does not check the number of rules in a DRL Maybe you could do something like this: (i) use a KnowledgeBuilder to load the DRL resource; (ii) before you add the packages to the knowledgeBase, iterate over kBuilder.getKnowledgePackages() to find the package generated fr

Re: [rules-users] rule limit

2011-10-05 Thread Ansgar Konermann
Hi Slyfox, nice to read you. Am 05.10.2011 23:49, schrieb slyfox: > is this something I missed in the doc As you are talking about "the doc", it seems you have a particular part of the solution already in mind (the product/tool you'd like to use to enforce the size limit). Up to now, you did not

Re: [rules-users] rule limit

2011-10-05 Thread slyfox
is this something I missed in the doc or would you mind pointing me in the direction of how to accomplish this? thanks Bobby -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-rule-limit-tp3394660p3398077.html Sent from the Drools: User forum mailing list archive at N

Re: [rules-users] 5.3.0 CR1 has broken existing rules/flows

2011-10-05 Thread Jamie
I've attached a simple stand-alone example to the ticket. -- View this message in context: http://drools.46999.n3.nabble.com/5-3-0-CR1-has-broken-existing-rules-flows-tp3390922p3398007.html Sent from the Drools: User forum mailing list archive at Nabble.com. __

Re: [rules-users] 5.3.0 CR1 has broken existing rules/flows

2011-10-05 Thread Jamie
I created https://issues.jboss.org/browse/JBRULES-3234 JBRULES-3234 . I haven't yet been able to create a stand-alone example, but I'll keep trying. I did attach the three rules in question to the ticket. -- View this message in context: http://drools.46999.n3.nabble.com/5-3-0-CR1-has-broken-e

Re: [rules-users] Memory leak in 5.2/5.3

2011-10-05 Thread Jamie
Thanks, Mark. That's what I figured. Not sure why it worked for Alejandro, but I won't pursue that avenue anymore. As I mentioned earlier, I did try to upgrade to 5.3.0.CR1, but there's a new bug in that version that makes it unusable for me. (You've been involved in that thread as well). I'm

Re: [rules-users] Memory leak in 5.2/5.3

2011-10-05 Thread Mark Proctor
On 05/10/2011 19:11, Jamie wrote: > Thanks for the reply, Alejandro. > > I'm currently using these jars: > > knowledge-api-5.2.0.Final.jar > drools-core-5.2.0.Final.jar > drools-compiler-5.2.0.Final.jar > jbpm-flow-5.1.0.Final.jar > jbpm-flow-builder-5.1.0.Final.jar > jbpm-bpmn2-5.1.0.F

Re: [rules-users] Memory leak in 5.2/5.3

2011-10-05 Thread Jamie
Thanks for the reply, Alejandro. I'm currently using these jars: knowledge-api-5.2.0.Final.jar drools-core-5.2.0.Final.jar drools-compiler-5.2.0.Final.jar jbpm-flow-5.1.0.Final.jar jbpm-flow-builder-5.1.0.Final.jar jbpm-bpmn2-5.1.0.Final.jar I tried changing the three jbpm jars to

Re: [rules-users] Memory leak in 5.2/5.3

2011-10-05 Thread alopez
Yes, I got the same exception, you can't remove all listeners from the outside (at least in 5.2.0.Final), that's why I patched the AbstractWorkingMemory class to hardcode the listeners removal inside Drools. But now that I found JBPM 5.1.1.Final that seems to solve the problem in a better way, the

Re: [rules-users] Memory leak in 5.2/5.3

2011-10-05 Thread Jamie
I'm trying to remove the listeners myself as Edson suggests, but I can't figure out how to make it work. I added this to my code just to see how many listeners there were (I expected to see three - one for each of my flows - based on what I see in the heap dump): Collection listeners = se

Re: [rules-users] Problem with Java enums in Guvnor "multiple field constraints"?

2011-10-05 Thread Michael Anstis
This was fixed recently for 5.3.0.Final You can use either "multiple field constraints" or "Add more options to this fields values" (the icon at the end of a field constraint). On 5 October 2011 16:43, enkidu wrote: > I've been playing with Drools and Guvnor and think I've encountered a > p

[rules-users] Problem with Java enums in Guvnor "multiple field constraints"?

2011-10-05 Thread enkidu
I've been playing with Drools and Guvnor and think I've encountered a problem with Java enums in Guvnor. I've searched for previous enum bugs and seen that a lot have been fixed, but I've tried Guvnor 5.2.0 and 5.3.0.CR1 and it happens in both. The problem seems to happen when you use enums in a "

Re: [rules-users] Compilation errors with 5.3.0.CR1

2011-10-05 Thread Edson Tirelli
I will check these out today. If you can provide an isolated test case, it helps, otherwise I will try to reproduce from your info in these e-mails. Edson 2011/10/5 Wacław Borowiec > Thanks for the hint Wolfgang, here are the results: > > this == ($constr.getRestrictions () [0]) > > gives

Re: [rules-users] Compilation errors with 5.3.0.CR1

2011-10-05 Thread Wacław Borowiec
Thanks for the hint Wolfgang, here are the results: this == ($constr.getRestrictions () [0]) gives [Error: unexpected end of statement] [Near : {... ($constr.getRestrictions () [0]) }] ^ [Line: 1, Column: 33] at org.mvel2.compiler.AbstractP

Re: [rules-users] Compilation errors with 5.3.0.CR1

2011-10-05 Thread Wolfgang Laun
Correction: EmNumberRestriction(this == ($constr.getRestrictions () [0] ),... On 5 October 2011 14:44, Wolfgang Laun wrote: > Write this like so: >   EmNumberRestriction(this == ($constr.getRestrictions[0]),... > -W >> part from last line of LHS. Again, it worked well in 5.1.1. >> >> On 10/05/20

Re: [rules-users] Compilation errors with 5.3.0.CR1

2011-10-05 Thread Wolfgang Laun
Write this like so: EmNumberRestriction(this == ($constr.getRestrictions[0]),... -W 2011/10/5 Wacław Borowiec > > Thanks for your answer Thomas. It showed that this construct works fine > either way with 5.3.0.CR1, but it's other rule that causes the error: > > rule "restriction number paramI

Re: [rules-users] Memory leak in 5.2/5.3

2011-10-05 Thread alopez
Hi Marc, Mario, I'm using the same test case on this thread, and oing more tests I now realized what is the problem, this leak appears only if the pom file has the dependency to jbpm-bpmn2 5.1.0.Final along with Drools 5.2.x or 5.3.x. Re-reading Jamie's post earlier I was puzzled by his reference

Re: [rules-users] Compilation errors with 5.3.0.CR1

2011-10-05 Thread Wacław Borowiec
Thanks for your answer Thomas. It showed that this construct works fine either way with 5.3.0.CR1, but it's other rule that causes the error: rule "restriction number paramId: 1, id: 0" when $param : EmParamValue(id == 1, enabled == true) $def : EmParamDefinition(this == $param.paramDef

Re: [rules-users] Collecting all items of nested collections / accumulate nested collections

2011-10-05 Thread
Excellent, thanks! From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Wolfgang Laun Sent: 05 October 2011 13:18 To: Rules Users List Subject: Re: [rules-users] Collecting all items of nested collections / accumulate nested collections If I unders

Re: [rules-users] Compilation errors with 5.3.0.CR1

2011-10-05 Thread Wolfgang Laun
On 5 October 2011 13:27, Wolfgang Laun wrote: > Snags like this are due to a completer rework of the DRL parser after 5.1.1. Snags like this are due to a *complete compiler* rework of the DRL parser after 5.1.1. ___ rules-users mailing list rules-users

Re: [rules-users] Compilation errors with 5.3.0.CR1

2011-10-05 Thread Wolfgang Laun
For the sake of our readers, I repeat the rule: rule "enabled paramId: 1, id: 0" salience 50 when (def0: EmParamDefinition(paramName == "p2", listIndex == -1) and EmParamValue(paramDefinitionId == def0, requiredValue == 1)) $param : EmParamValue(id == 1, enabled == false) not ParentDis

Re: [rules-users] Collecting all items of nested collections / accumulate nested collections

2011-10-05 Thread Wolfgang Laun
If I understood it correctly and have not missed a comma or parenthesis: rule "level three" when $l0: Level0() $list1: List( size > 0 ) from accumulate (Level1( $level1List: level1List) from $l0.level1List, init( List l = new ArrayList(); ) action( l.addAll($level1List)

Re: [rules-users] Memory leak in 5.2/5.3

2011-10-05 Thread Mario Fusco
Hi Alejandro, I checked if I could reproduce the memory leak in 5.3 by using the test case posted in the first email of this thread, but I wasn't able to do that. In other words it seems to me that all listeners are removed as expected in the dispose method. Were you using a different use case t

Re: [rules-users] Compilation errors with 5.3.0.CR1

2011-10-05 Thread Swindells, Thomas
Why do you need the and in the rule? Have you tried > rule "enabled paramId: 1, id: 0" > salience 50 > when def0: EmParamDefinition(paramName == "p2", listIndex == -1) EmParamValue(paramDefinitionId == def0, requiredValue == 1) $param : EmParamValue(id == 1, enabled == false)

[rules-users] Compilation errors with 5.3.0.CR1

2011-10-05 Thread Wacław Borowiec
Hello I'm sending the message once again due to problems with code samples visibility in the previous one. I've got following rule: rule "enabled paramId: 1, id: 0" salience 50 when (def0: EmParamDefinition(paramName == "p2", listIndex == -1) and EmParamValue(paramDefinitionId == def0, re

[rules-users] Exception Handler not working in Drools flow(bpmn) but working fine in .rf

2011-10-05 Thread rahulkrishnan
Hi, I have tried the fault node in drools flow file and it has worked fine in .rf. Whenever a faultnode is triggered it will search for the fault name and will be caught at the apropriate Exception Handlers. But When am implementing the same in .bpmn the fault node is triggered but the flow i

Re: [rules-users] Memory leak in 5.2/5.3

2011-10-05 Thread Mark Proctor
On 04/10/2011 22:51, alopez wrote: > Good news, I followed your advice and patched drools-core to prevent this, > focusing on removing all listeners: > > AbstractWorkingMemory.java, line 1246: > > for ( Iterator it = this.__ruleBaseEventListeners.iterator(); it.hasNext(); > ) { > this.ruleB

[rules-users] Compilation errors with 5.3.0.CR1

2011-10-05 Thread wyborowiec
Hello I've got following rule: It compiles fine under Drools 5.1.1, but after switching to 5.3.0.CR1 I get following exception: It is line that causes the problem - the exeption disappears after removing it. What's interesting, when I add '$' sign to binding variable name, and the line

[rules-users] Collecting all items of nested collections / accumulate nested collections

2011-10-05 Thread
I have a question regarding creating a list of items that are all in nested collections of my main object. A high level overview of the model is like this: public Level0 { private List level1List; } public Level1 { private List level1List; } public Level2 { private Date occurence;