[rules-users] How to use KnowledgeBase

Wolfgang Laun wolfgang.laun at gmail.com
Thu Apr 14 03:40:17 EDT 2011


Hi Max,

Also, consider serializing individual Knowledge Packages containing
logically related rules. You may combine them to create several knowledge
bases and serialize them, or create them during application startup.

Once you have a knowledge base, any number of sessions can be started. Make
sure to call dispose() to free (stateful) session resources.

-W


On 14 April 2011 09:13, FrankVhh <frank.vanhoenshoven at agserv.eu> wrote:

> Hi,
>
> In theory, you can do it both ways. Depending on your situation, you will
> have to assess which approach will be the best solution.
>
> Regarding the fact that creation of a kbase takes some time, you will
> probably want to avoid doing it multiple times per transaction or, at
> least,
> cache them. Also, when your rules are part of a continupus flow, you
> probably want only 1 kbase.
>
> In your situation, mortgages, I assume your rules are following eachother
> with no or very little interaction from the user. In that case, I think one
> would normally use 1 knowledgebase.
>
> Theoretically, multiple knowledgebases should be used when dealing with
> completely different rulesets, with one ruleset not influencing the other
> (or execution of ruleset one happening in a totally different timeframe as
> to justify the use of another kbase).
>
> I hope this makes it clear.
>
> Regards,
> Frank
>
>
> ismaximum wrote:
> >
> > Hi
> >
> > I am new to Drools and just want to start developing our app with Drools.
> > I have some questions regarding KnowledgeBase instantiation.
> >
> > Can we create a single instance of KB across the application and use it
> to
> > create any stateful or stateless session?
> > In this case, do we need to add all the rules available in our
> application
> > or we need to create one instance for each set of rules? In other words,
> > consider we have many rules including mortgage calculation/ validation,
> > auditing process, interest rate calculation and many others, do we need
> to
> > create one instance of KB for each rule or just one KB and add all the
> > rules to it?
> >
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/How-to-use-KnowledgeBase-tp2819308p2819374.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110414/b882dc09/attachment.html 


More information about the rules-users mailing list