23.2. Pricing Rule Example: Decision Table Configuration

Decision Table Configuration

Figure 23.1. Decision Table Configuration

  • The RuleSet declaration provides the package name. There are also other optional items you can put here, such as Variables for global variables, and Imports for importing classes. In this case, the namespace of the rules is the same as the fact classes and thus can be omitted.
  • The name after the RuleTable declaration (Pricing bracket) is used as the prefix for all the generated rules.
  • "CONDITION or ACTION", indicates the purpose of the column, that is, whether it forms part of the condition or the consequence of the rule that will be generated.
  • The driver's data is spread across three cells which means that the template expressions below it are applied. You can observe the driver's age range (which uses $1 and $2 with comma-separated values), locationRiskProfile, and priorClaims in the respective columns.
  • You can set a policy base price and message log in the Action column.