Re: [rules-users] newbie question on "when" condition syntax

2008-05-02 Thread mashup
Ahhh I wondered about that, thanks. Again, now I see it, it makes complete sense. This drools stuff is actually pretty damn good! Richard Chris Woodrow wrote: > > You're right, if you want to do this with 2 facts, you'll need to do : > > $test : Test( $y : y ) > Test( > this == $test, > x

[rules-users] Accumulate x No-loop

2008-05-02 Thread Alessandro Lazarotti
Hi When I use accumulate and update, no-loop is ignored and the rule is recursive. Why? The Rule: rule "Nota final das questoes" no-loop true when questionarioResposta : QuestionarioResposta() $result : Number() from accumulate(QuestaoResposta($no

Re: [rules-users] newbie question on "when" condition syntax

2008-05-02 Thread Chris Woodrow
You're right, if you want to do this with 2 facts, you'll need to do : $test : Test( $y : y ) Test( this == $test, x == ($y + 1) ) Chris 2008/5/2 Raffi Khatchadourian <[EMAIL PROTECTED]>: > On Fri 2.May'08 at 10:05:20 +0100, Anstis, Michael (M.) wrote: > > > The "when" section matches fact

Re: [rules-users] OutOfMemory Error - 3500 Rules

2008-05-02 Thread Mike D
Thanks for the help Samir, We'll give that a try. -- View this message in context: http://www.nabble.com/OutOfMemory-Error---3500-Rules-tp17019001p17026771.html Sent from the drools - user mailing list archive at Nabble.com. ___ rules-users mailing

Re: [rules-users] OutOfMemory Error - 3500 Rules

2008-05-02 Thread samirsss
I was profiling an application running on 4.0.4 and saw a dramatic decrease in memory consumption after we disabled shadow proxy. I think this might be a good starting point too. Thanks Samir Mike D wrote: > > Edson, > > We are running into the same issue. Do you happen to have an ETA for th

Re: [rules-users] Newbie need help.

2008-05-02 Thread mashup
Hi Alan, Just thought I would say I suffered from the same problem and found the solution hidden in the manual somewhere. The tutorial needs updated use: WorkingMemory workingMemory = ruleBase.newStatefulSession(); and workingMemory.insert(obj); //instead of assert cheers Richard Alan

Re: [rules-users] newbie question on "when" condition syntax

2008-05-02 Thread mashup
Thanks Chris, that does work. oh man, I tried something so similar to that with the parenethisis last night using my "programming by trial and error" methodology. many thanks to everyone who replied, it's all been a great help! Richard Chris Woodrow wrote: > > Hi, > even > Test (y == (x + 1

Re: [rules-users] OutOfMemory Error - 3500 Rules

2008-05-02 Thread Mike D
Edson, We are running into the same issue. Do you happen to have an ETA for the release? Thanks! Mike -- View this message in context: http://www.nabble.com/OutOfMemory-Error---3500-Rules-tp17019001p17026507.html Sent from the drools - user mailing list archive at Nabble.com. _

Re: [rules-users] newbie question on "when" condition syntax

2008-05-02 Thread mashup
wow, you guys are good, nice observation Raffi I had not considered that but this is all making me comprehend how Drools works. Actually I think I need to switch my brain on! Java is so easy it doesn't tend to require much thought, now I'm having to think about this stuff it hurts :-) thanks Ric

RE: [rules-users] OutOfMemory Error - 3500 Rules

2008-05-02 Thread Knapp, Barry
So here Is a question then. If I create 2 rulebases with 2 different rules, does that consume more permGen space than 1 rulebase with the same 2 rules? Thanks Barry From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edson Tirelli Sent: Friday, May 02, 2008 9:58 AM T

Re: [rules-users] newbie question on "when" condition syntax

2008-05-02 Thread Raffi Khatchadourian
On Fri 2.May'08 at 10:05:20 +0100, Anstis, Michael (M.) wrote: The "when" section matches fact (object) patterns, so your requirement could be written as:- when there is a Test Fact 'A' and another Test Fact 'B' where "the 'x' property of 'A'" equals "the 'y' property of fact 'B' plus 1" then..

Re: [rules-users] newbie question on "when" condition syntax

2008-05-02 Thread Edson Tirelli
Yes, newest mvel version works fine, but that problem only happened when using mvel dialect. For java, just do as Chris mentioned: when Test( y == (x+1) ) then And it will work. The () is needed to tell the engine that what is inside is a semantic code block, i.e., an expression that wil

Re: [rules-users] newbie question on "when" condition syntax

2008-05-02 Thread Chris Woodrow
Hi, even Test (y == (x + 1)) works. Richard : I think you should take a look at this before planning doing complicated calculations with drools http://lists.jboss.org/pipermail/rules-users/2008-April/005247.html but it might be fixed now. Chris 2008/5/2 Raffi Khatchadourian <[EMAIL PROTECTED]>:

Re: [rules-users] OutOfMemory Error - 3500 Rules

2008-05-02 Thread Edson Tirelli
Barry, First of all, aside from permgen issues, if I remember correctly, we fixed a pretty serious memory leak bug around August/September of last year. So, I strongly advise you to upgrade to Drools 4.0.7, that is about to be released. Regarding permgen, the best way to save space on it

[rules-users] OutOfMemory Error - 3500 Rules

2008-05-02 Thread Barry K
Hello, Has anyone had to resolve out of memory errors with large applications using moderatly sized rulebases? Increasing the permGen any higher does not appear to be an option for us. DROOLS Version 4.01 OutOfMemory Error in PermGen space. Our application has ~5000 classes and uses ~3500 rule

Re: [rules-users] newbie question on "when" condition syntax

2008-05-02 Thread Raffi Khatchadourian
On Fri 2.May'08 at 10:05:20 +0100, Anstis, Michael (M.) wrote: The "when" section matches fact (object) patterns, so your requirement could be written as:- when there is a Test Fact 'A' and another Test Fact 'B' where "the 'x' property of 'A'" equals "the 'y' property of fact 'B' plus 1" then..

RE: [rules-users] newbie question on "when" condition syntax

2008-05-02 Thread Anstis, Michael (M.)
Hi Richard, Glad I can be of help (this forum as a whole is actually very helpful). Reading your email you understand me correctly (you even picked up on the implicit AND between pattern matches). With a bit of imagination complex problems can be solved with Drools; just like programming you

Re: [rules-users] newbie question on "when" condition syntax

2008-05-02 Thread Richard Bremner
Hi Mike, Thanks very much, after a few minutes of staring I think I have understood your very well put answer! If I understand you right, what is happening is: Test( $y : y ) This means, WHEN there is an instance of Test, assign the value of its "y" property to $y AND WHEN there is an instanc

RE: [rules-users] newbie question on "when" condition syntax

2008-05-02 Thread Anstis, Michael (M.)
Hi Richard, The "when" section matches fact (object) patterns, so your requirement could be written as:- when there is a Test Fact 'A' and another Test Fact 'B' where "the 'x' property of 'A'" equals "the 'y' property of fact 'B' plus 1" then. This would become:- rule "Rule 1" when

[rules-users] newbie question on "when" condition syntax

2008-05-02 Thread Richard Bremner
Hi, say I have a class with two fields, x and y: public class Test { int x = 1; int y = 2; getters/setters... } I would like a rule which fires when y = x + 1 my initial thought would be something like: rule "Rule 1" when test : Test (y == x + 1)