Hi Bartosz,

I think the answer is "it depends", and that is in the context of the application you are trying to develop. I don't quite understand your statement about clearing the calculation context when the session is stateless.

Whichever approach, I would wrap it as a pricing service with business methods, and then under the covers you can use whatever strategy you like and change that without impacting your application.

I'm also not sure if you are asking from a perspective of performance, so is it better to have number of smaller KnowledgeBases or one large one from a memory/response aspect, and that depends on the number of rules, complexity of conditions, and of course your fact model.

On the other hand if you want to manage the lifecycle of your products independently (say the pricing rules change frequently), and as you say the rulesets are independent, then it might be better to have separate KnowledgeBases from a management perspective. How do you deploy the rules, embedded, Rule Agent, BRMS ...

Maybe some more info on your solution space would help others to give you a better response.

Regards Ross

On Sun, Dec 6, 2009 at 7:43 PM, Torfox <bartosz.jankiewicz@gmail.com> wrote:

Hi,

I'm trying to achieve the following result. There are many rule sets, every
set is responsible for insurance premium calculation and these sets are
independent (every set applies to a single product). I have organized the
rules into packages, where package identifies product.
After calculation of every rule set I have a resulting object insurance
premium and calculation log.

What is the best pattern to execute those rules. E.g. can I put all packages
into a single KnowledgeBase and execute StatelessKnowledgeSession providing
that the last rule of every rule set clears the calculation context?
Or is it better to create separate KnowledgeBase for every single product?

Thanks for the hints.

Bartosz
--
View this message in context: http://n3.nabble.com/Multiple-packages-approach-tp69223p69223.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users