When is a Business Rules Engine used

前端 未结 3 543
盖世英雄少女心
盖世英雄少女心 2021-02-02 17:22

When is a Business Rules Engine used?

What is the difference between Business Rules Engines and scripting/configuration/customization

3条回答
  •  攒了一身酷
    2021-02-02 17:37

    A business rules engine, or a business rules management system, should be used when you are trying to implement a decision in your code. But not just any decision. A decision that:

    • Involves lots of rules
    • Has rules that change often
    • Has rules that are complex or interact in complex ways (think lots of nested IFs otherwise)
    • Has rules that only someone with domain knowledge can understand/verify
    • Is one that the business people REALLY want to be able to change without your help
    • Involves using predictive analytics / scores as part of the decision making

    These are the kinds of decisions that pay off the use of a business rules management system. Don't start with the rules, start with the DECISIONS.

    Business rules are verbose (so business people find them easier to read), declarative not procedural and atomic (so they can be stored, managed and reused like data in a database).

    More on why to use business rules here in this piece on why I believe in business rules.

提交回复
热议问题