Hi!
I'm developing a Java EE 6 application where "providers" should be able to define a price and different discounts on a service for users. There are many different providers. Each one provides the same service, the pricing models can be different.
Price Model: - A provider should be able to define the price e.g. per hour, per minute, per process, ... . - The provider should be able to easily add conditions to define the discount a user gets. For example: users from a specific user-group get a discount of 10% and users who used the service more than 5 times get another discount. - It shoulld be able to link conditions with logical operations like "AND" or "OR". - The amount of possible conditions should be defined by the software manufacturer.
- When a user tries to access the service the user-specific price should be shown. After using the service the particular user gets sometime an invoice where the total cost of this service is listed. While using the service the provider can change the pricing model, so there must be a version number or something. The pricing model versions should then be saved in a database.
The Question is - Is it possible and meaningful to use a rule engine to solve this specification? Provider should define conditions without xml files or something like that, just by clicking and choosing. I have no experience with rule engines... so maybe someone can help me to figure out which solution is best for the problem.