It can be useful to get a CER rule set "up and running" quickly by deferring certain rule development tasks.
Consider using one or more of the following short cuts:
- Create empty rule classes (i.e. no rule attributes) for each of your business concepts; rule attributes can be added later. For example, you can use the CER Editor to create an empty rule class and add an attribute to it later.
- Create hard-coded derivations for rule attributes; the business rules can be added later. For example, declaring the calculation of an isEligible rule attribute to be <true> may enable you to write tests and/or integrate CER with your own application - you can replace the hard-coded "always eligible" derivation with the real business rules later. For example, you can use the CER Editor to drag the "Boolean" rule element (its default value is set to true) to an isEligible rule attribute.
- Create messages as plain single-locale hard-coded Strings; you can convert the Strings to localizable messages later. For example, you can use the CER Editor to drag the "Resource Message" or "XML Message" rule element to a rule attribute.
- Use String values instead of application code table values; you can convert the Strings to codes later (and update rules that test for them). For example, you can use the CER Editor to drag the "String" rule element to a rule attribute.
Important: Simply taking these shortcuts does
not remove the need to do the work more rigorously, it merely defers some of this working until after the point at which your rule set is "runnable".
You should not hold off on creating tests for your rules; in particular, if you take these shortcuts, a good body of rule set tests will help prevent you introducing certain types of error when you come to undo the shortcuts. Create your tests as you write your rules.
You may also be tempted to hold off on creating description rule attributes for your rule classes; however, in the early stages of rule set design, such a short cut can prove to be false economy, as the description rule attributes can greatly assist you in debugging rules, for a relatively cheap cost.