[rules-users] Re: Is this scenario suitable for using Drools?

Cheng Wei Lee zhenwei.li at gmail.com
Wed Apr 23 04:35:35 EDT 2008


I'm not using Drools yet; was thinking whether would I gain from using
Drools with my situation and more importantly whether could I achieve what I
need to with Drools.

Actually even before coming to the cost calculation, there're a bunch of
business rules that I need to apply to determine if I need to calculate the
cost. Some folks get the product free, while some has to pay for it. I'm not
exactly sure would this be better off using jBPM or Drools? Or I'm better of
sticking to the plain old programming if-else statements?

Thanks!

On Wed, Apr 23, 2008 at 4:15 PM, Steven Williams <stevearoonie at gmail.com>
wrote:

> without knowing how you are accessing the database your two algorithms
> come down to something like:
>
> Alg. 1
> max(select max(p) from y, select max(t) from z)
>
> Alg. 2
> select min(p) from y + select min(t) from z
>
> which is basically the same as what Michael has proposed.
>
> Personally I think if you are already using Drools then this would fit,
> but it wouldn't seem like enough of a reason to introduce Drools on its own.
>
> cheers
> Steve
>
>
>
> On Wed, Apr 23, 2008 at 2:27 AM, Cheng Wei Lee <zhenwei.li at gmail.com>
> wrote:
>
> > I've 2 algorithms to calculate the cost of a product. At any one time,
> > there is only 1 algorithm in use. Initially algorithm 1 will be the default.
> > Subsequently, the decision to use which algorithm will depend on customers
> > feedback. The algorithms are:
> >
> > Algorithm 1:
> > Cost = MAX(P1, T1, P2, T2, P3, T3, ...)
> >
> > Algorithm 2:
> > Cost = MIN(P1, P2, P3, ...) + MIN(T1, T2, T3, ...)
> >
> > The values of P1, P2, ... are stored within a database. The number of Ps
> > & Ts are unknown but can be determined by querying the database, Would
> > drools be a good option to use to store the algorithms? If so, how could I
> > be able to retrieve the values of P1, P2, etc from the database from within
> > drools?
> >
> > Thanks!
> >
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
>
> --
> Steven Williams
>
> Supervising Consultant
>
> Object Consulting
> Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
> steven.williams at objectconsulting.com.au
> www.objectconsulting.com.au
>
> consulting | development | training | support
> our experience makes the difference
>
> _______________________________________________
> 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/20080423/bd674dfc/attachment.html 


More information about the rules-users mailing list