0 Replies Latest reply on Feb 25, 2009 8:34 AM by hari.manivannan

    Help required in drools

      I am trying to come up with a commission calculation logic with Drools. I need some help in coming up with the best possible approach.

      The commission is calculated based on the location. By location, I mean the city, country and region. Please see the examples below.

      Data Setup:

      Region,Country, City,CommissionApplicable
      ============================
      Asia,,,10
      Asia,Singapore,,20
      ,India,Chennai,25

      (There are tables which maintain the relationships between region -> Country -> City)

      Input=Kualalumpur, Output = 10
      Input=Chennai, output = 25
      Input=Mumbai, Output=10 and so on.

      Can you please let me know how my rule file should look like. I went through a lot of examples but the hierarchial resolution is something that I am not able to implement. Please help.