6 Creating complex business rules

 

This chapter covers

  • Creating complex business rules
  • Implementing domain specific language for use in creating guided rules
  • Implementing business rules in decision tables and validating with test scenarios

The previous chapter introduced business logic, rules and how to implement a few basic examples. The next step is to expand your capabilities with more complex rules and look into how more advanced rule implementation can make your life easier. In this chapter I take you farther into the world of rules by introducing you to the uses of the following complex rule solutions:

  • A domain specific language (DSL)
  • A rule designed using a DSL
  • A decision table
  • Test scenarios for each of the rules to validate correctness.

While you do not have to read chapter 5 before this one, it is recommended as I won’t be explaining test scenarios or the guided rule editor in as much detail this time around. For example, I focus instead on sharing the knowledge of what the differences are between using the guided rule editor with a domain specific language instead of repeating basic guided rule editor usage.

6.1   Complex domains as natural language rules

6.1.1   Domain specific languages to ease rule design

6.1.2   Your first DSL

6.1.3   Designing a rule using the DSL

6.2   Complex rules made easy with decision tables

6.2.1   Guided decision table wizard for complex rules

6.2.2   Finalize decision table with rows of rules

6.3   Summary