You can also try a data driven approach: declare Rate minUnits : int maxUnits : int revenuePercent : int end declare Sale units : int end rule "FindRate" when r : Rate( ) s : Sale( units > r.minUnits, units < r.maxUnits ) then System.out.println( "revenuePercent for " + s + " is " + r.getRevenuePercent()); end Sample code attached. --- On Wed, 6/9/10, Esteban Aliverti <esteban.aliverti@gmail.com> wrote:
|