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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
18 matches
Mail list logo