Re: [rules-users] drools performance with

2010-01-21 Thread Tom Carchrae
Please don't confuse my message with bashing Drools for not being as fast as Java. While I am not very familiar with Rete, I'm aware of what goes on behind the scenes; I've been programming declarative optimization systems for many years. My query relates to how to perform such a comparison with

Re: [rules-users] drools performance with

2010-01-21 Thread Greg Barton
pit->out That falls into a rare class: two letter typos that pass a spell checker. :) --- On Thu, 1/21/10, Greg Barton wrote: > From: Greg Barton > Subject: Re: [rules-users] drools performance with < > To: "Rules Users List" > Date: Thursday, January 21, 2010, 9:04 PM > This is not at all su

Re: [rules-users] drools performance with

2010-01-21 Thread Greg Barton
This is not at all surprising. To set up and run the rules there's quite a bit of code running behind the scenes besides just the comparison test. (For instance, there's object creation just to track the fact that two objects matched the rule, and in this case those objects are created for ever

[rules-users] drools performance with

2010-01-21 Thread Tom Carchrae
Hello, I'm new to Drools and am trying it out. I've found it easy enough so far, but quickly ran into a performance bottleneck. (perhaps an all too familiar story! :) ). So, I made a simple example to try and track down the behavior. Here it is. I wanted to create a rule that uses an < compar

[rules-users] error on retracting fact on drools 5.0.1

2010-01-21 Thread Garner, Shawn
I have a rule and it is supposed to retract two objects when $objectOne : ObjectOne(...) $objectTwo : ObjectTwo(...) then retract($objectOne); #retract($objectTwo); end No matter what I do I can't ever retract objectTwo. I put a print statement and it is there. If I

Re: [rules-users] Advice needed on a Design problem - Orderly execution of rules based on a ruleflow-group and a ruleflow "template" where rule-flow-group is only known at runtime

2010-01-21 Thread Pritham
Finally got this working with the help of agenda-groups (and not rule-groups). I set the agenda-group name with the URL for each rule and at runtime I execute all section rules and page level rules by setting it's agenda-group into focus. Turned out to be simpler than I imagined. -- View this m

Re: [rules-users] how to stop executing current agenda group and all rules without a KnowledgeHelper class

2010-01-21 Thread Pritham
After figuring out how an agenda-filter works, this question is sort of redundant since drools executes only agendas that are in it's stack (which can be programmatically controlled by setFocus() method). So, yes it's possible -- if you don't set the focus to any other group. -- View this messag

Re: [rules-users] Understanding agenda-group (doesn't work as documented in book or docs)

2010-01-21 Thread Pritham
That's the best description I've read on *groups so far. Stuff like this should be in the docs. Now, you mentioned Edson Tirelli-4 wrote: > > and every time you call setFocus() from the application code *or* from a > rules consequence *or* a > rule with auto-focus true is activated, it will

Re: [rules-users] Understanding agenda-group (doesn't work as documented in book or docs)

2010-01-21 Thread Greg Barton
The following is philosophical rambling, so feel free to ignore. :) This touches on a deeper issue: the intent of a rules developer should be a bit more lax than a procedural developer. By coding in rules you are handing off some of the intent to the engine itself. To be most effective you sho

Re: [rules-users] Understanding agenda-group (doesn't work as documented in book or docs)

2010-01-21 Thread Edson Tirelli
Hehe, ok, lets try to clarify then. In your example, you have 2 rules. Assuming your are *not* using any kind of grouping, when you insert the message with status HELLO, then engine knows that only the first rule is eligible to execute, and so the engine fires it. The consequence of rule 1 chang

Re: [rules-users] Problems with GWT WebProject and Drools5.0!

2010-01-21 Thread ben780
Just a follow up to my last message. I actually did figure out how to get pass this error. The knowledgeBuilderFactory.newKnowledgeBuilder() uses the java property "user.home" to get the user directory. So in order to get around using your docs and setting folder you need to set the property to

Re: [rules-users] Understanding agenda-group (doesn't work as documented in book or docs)

2010-01-21 Thread Pritam
If you're curious how a Stack is implemented in Java, C or C++, have a look at the method names: push, pop etc., There's a reason why the names are push, pop and not setXXX. It's not a good design where an operation with a method signature that resembles a standard javabean accessor like setXXX

Re: [rules-users] Understanding agenda-group (doesn't work as documented in book or docs)

2010-01-21 Thread Edson Tirelli
LOL, by "jeopardize the intention of the developer" you mean "guess what the developer wanted to do but didn't know how to model" or more like "teach the developer how to use a stack"? :) Seriously, there is a reason why stacks work like they do and why agenda-groups are handled as stacks.

Re: [rules-users] Understanding agenda-group (doesn't work as documented in book or docs)

2010-01-21 Thread Pritam
I set session.getAgenda().getAgendaGroup("group1").setFocus(); session.getAgenda().getAgendaGroup("group2").setFocus(); and only group1 rule fires, but when I set session.getAgenda().getAgendaGroup("group2").setFocus(); session.getAgenda().getAgendaGroup("group1").setFocus(); both group1 an

Re: [rules-users] Understanding agenda-group (doesn't work as documented in book or docs)

2010-01-21 Thread Mauricio Salatino
yes.. you are missing that if you don't put the agenda group in the stack it will never be used. Like Bali said "Whenever the focus is set to a different group, Drools adds this group to a stack". If you don't set the focus to another agenda group, the only one in the Stack is MAIN. On Thu, Jan 21

[rules-users] Understanding agenda-group (doesn't work as documented in book or docs)

2010-01-21 Thread Pritam
I'm not quite sure howDrools processes and partitions Agenda based on agenda-groups as the documentation conflicts with a real example. As per the documentation in Drools site and Michael Bali's book, page 102 "Drools maintains a stack of Agenda groups. Whenever the focus is set to true, the act

Re: [rules-users] Stateless Vs Stateful Sessions in Webtier

2010-01-21 Thread Pritam
What about thread-safety of StatefulSession? Which part isn't thread-safe and how do you propose developers use this in the web tier since I don't find many useful api available on StatelessSession (grouping, agendafilters etc.,) -- View this message in context: http://n3.nabble.com/Stateless-Vs

Re: [rules-users] Stateless Vs Stateful Sessions in Webtier

2010-01-21 Thread Mark Proctor
On 20/01/2010 11:41, Simon Thum wrote: > Pritam wrote: > >> Drools says, for rules itself, "it doesn't matter whether you use stateless >> or stateful ksession ..." then why is that an entire set of metadata like >> grouping and ordering is ignored? >> > As I understood it, a stateless se