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.<br><br>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?<br>
<br>Thanks!<br><br><div class="gmail_quote">On Wed, Apr 23, 2008 at 4:15 PM, Steven Williams <<a href="mailto:stevearoonie@gmail.com">stevearoonie@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
without knowing how you are accessing the database your two algorithms come down to something like:<br><br>Alg. 1<br>max(select max(p) from y, select max(t) from z)<br><br>Alg. 2<br>select min(p) from y + select min(t) from z<br>
<br>which is basically the same as what Michael has proposed. <br><br>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.<br>
<br>cheers<br>Steve<br><br><br><br><div class="gmail_quote"><div><div></div><div class="Wj3C7c">On Wed, Apr 23, 2008 at 2:27 AM, Cheng Wei Lee <<a href="mailto:zhenwei.li@gmail.com" target="_blank">zhenwei.li@gmail.com</a>> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
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:<br>
<br>Algorithm 1:<br>Cost = MAX(P1, T1, P2, T2, P3, T3, ...)<br><br>Algorithm 2:<br>Cost = MIN(P1, P2, P3, ...) + MIN(T1, T2, T3, ...)<br><br>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?<br>
<br>Thanks!<br><br>
<br></div></div><div class="Ih2E3d">_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></div></blockquote></div><div><div></div><div class="Wj3C7c"><br><br clear="all"><br>-- <br>Steven Williams<br><br>Supervising Consultant<br><br>Object Consulting<br>Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501<br>
<a href="mailto:steven.williams@objectconsulting.com.au" target="_blank">steven.williams@objectconsulting.com.au</a><br>
<a href="http://www.objectconsulting.com.au" target="_blank">www.objectconsulting.com.au</a><br><br>consulting | development | training | support<br>our experience makes the difference
</div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>