[rules-users] Short circuiting evaluations on LHS

Newman, Jason Jason.Newman at anheuser-busch.com
Thu Apr 3 15:06:56 EDT 2008


I am currently using Drools 4.0 to determine the best choice out of a data set
based on business rules. The rules eliminate (retract) facts until a single fact
survives, and is used for additional processing. I have found Drools to be a
great solution for this problem, and plan to role it out for additional survivor
rules. My problem is in optimization - this is essentially a batch processing
application, and speed is very important (of course it is  - show me the case
where it isn't, right?).

Some of the later evaluations in the rules are fairly expensive (invoking
complex queries from the database), and generally apply to only a small set of
the use cases. For most use cases, the survivor will have been determined after
the first or second rule, so I only want to perform the expensive evaluations if
necessary. I have not found a way to avoid or schedule the LHS evaluations from
firing when inserting the fact into the working memory. I have played around
with agenda groups and rule flows, but haven't had any luck. The only way I can
think of at this point is to break my rules into separate rule bases, and
"manually" copy survivors from one working memory to the next, performing my own
short circuiting outside of the rules being fired. 

Is there any other technique that I have missed? From a maintenance standpoint,
I would prefer to be able to use one rule base/rule flow to manage the rules
(there are only about 10 total rules, so the base is not very large - and I
would have to break it into 4 or 5 different rule bases, which seems like it
will be a pain across the 5 different areas I need to implement the rules.)

Thanks,

-Jason



The information transmitted (including attachments) is
covered by the Electronic Communications Privacy Act,
18 U.S.C. 2510-2521, is intended only for the person(s) or
entity/entities to which it is addressed and may contain
confidential and/or privileged material. Any review,
retransmission, dissemination or other use of, or taking
of any action in reliance upon, this information by persons
or entities other than the intended recipient(s) is prohibited.
If you received this in error, please contact the sender and
delete the material from any computer.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080403/38c44794/attachment.html 


More information about the rules-users mailing list