12

What could be the reasons to implement your own rule engine instead of using an existing commercial/open source one? Any specific guidelines for implementing rule engines?

tshepang
  • 12,111
  • 21
  • 91
  • 136
Snake
  • 445
  • 1
  • 4
  • 14

1 Answers1

9

See this post for argument for implementing your own:

Rules Engine - pros and cons

mainly the problem centers around the anemic data model anti-pattern. as described here:

http://martinfowler.com/bliki/AnemicDomainModel.html

How you should implement depends very much on the requirements but generally important points to consider when designing your own include.

  • Make the ability to add rules dynamic. So you don't have to shut down the system to edit rules.
  • Match the rules syntax to the appropriate user level, don't expect a secretary to be writing SQL.
  • Take advantage of your domain knowledge to implement your domain models which you will run your rules against.
  • Drools is a good bit of software, try to learn lessons from how that was implemented.
  • Try to modularize your rules engine so it functions independent of any business process tools you might be using
Community
  • 1
  • 1
rogermushroom
  • 5,486
  • 4
  • 42
  • 68