8

I want to implement Rule Engine on my Rails 3.2 application which has a complex pricing logic,I want to transform the conditions in pricing logic to rules, and use them.I am creating an entirely new application for this purpose.

I googled alot in this regard and found rules_engine, ruleby, treetop, but the documentation they provided was not just sufficient, I struggled a lot in deciding the best one suitable for my requirement.

What's the best approach to start development on rule engine?

Greg
  • 9,068
  • 6
  • 49
  • 91
vishB
  • 1,688
  • 2
  • 17
  • 23

1 Answers1

6

I've been looking for a prolog-like system to implement rules myself. Here's what I found so far.

This library contains a rule engine written in Ruby. It's based on the Rete algorithm and uses a DSL to express rules in a readable way.

https://github.com/ulfurinn/wongi-engine

nurettin
  • 11,090
  • 5
  • 65
  • 85
  • Thanks for replying,I went through it, its good to some extent but what if I want to shift my entire business logic to database as rules and later use them when required.How to put the logic to database and how to use it through rails, any suggestions are always welcome. – vishB Mar 21 '13 at 12:59
  • If you have your rule set inside the database, you can simply loop using ActiveRecord and use the wongi-engine DSL inside the loop to instantiate them. If you have further questions, why not create a stackoverflow question about it? – nurettin Mar 21 '13 at 13:07