Defining Constraints in Decision Tables - Gnorion/BizVR GitHub Wiki

Defining Constraints in Decision Tables

  • Constraints are defined in the standard decision table by using the keyword “constraints”
  • Constraints are used primarily in the validation engine to check that there are no rules that set (or test) a variable using a value that would break a constraint.
  • Constraints specify the allowable values for an attribute
  • Constraints on different variables may be grouped in a single decision table, or you can create a separate table for each attribute
  • No action is required for validation-only constraints
  • Constraints may also be used to specify the behavior when a constraint is broken at execution time
  • For execution time constraints just add the the optional “warn” or “stop” actions
  • NOTE Only the first rule column is used for the constraints. If there are multiple constraints for an attribute enter them separated by commas

Example

Table DCM03 is a standard decision table containing the business rules. The other table defines some constraints on the values image image image

The validation engine will produce messages like this:

image