Is using Rule Engine to implement chain of rules [complex business logic] overkill? -
recently, reading rule engines in jboss drools manual [ref - 2.2.5. strong , loose coupling]. below excerpt 'if rules coupled, chances rules have future inflexibility, , more significantly, perhaps rule engine overkill (as logic clear chain of rules - , can hard coded. [a decision tree may in order]). not strong or weak coupling inherently bad, point keep in mind when considering rule engine , in how capture rules. "loosely" coupled rules should result in system allows rules changed, removed , added without requiring changes other rules unrelated.'
does mean, rule engine not suitable option implement complex business logic [tightly coupled rules or chain of rules].
in current project, have chain of rules i.e. outcome of 1 rule decides outcome of rule , on. application has many internal variables chain rules. thought rules engine might handle complexity added advantage of declarative rules , dynamic business logic.
discussion in regard helpful ...
some logic isn't easy right if know order , nature of tests need perform, , actions should result. examples corporate audits, means testing assistance programs, insurance regulations, etc.
most rules engines today beginning include decision table feature, in reality introduces "limited strong coupling" (i don't know if term, how understand effect in systems such ilog, drools, etc.). helpful because tests related other tests , decision tables far better structuring these tests if else structures.
corticon (a proprietary rules engine) , dtrules (an open source rules engine) toss whole loosely coupled rules approach, , build decision tables. idea giving nice structure construction of decisions (which amount decision trees underneath everything) easier many applications.
Comments
Post a Comment