Checking the rules for constraint violations - Gnorion/BizVR GitHub Wiki
Checking the rules for constraint violations
BizVR allows you to define constraints on the values that variables may take. These constraints are used at design time to check if you have written any rules that might break a constraint either by testing a value that is not allowed or by setting a value that is not allowed. This differs from actual business rules that you might write to check the values of variables - those rules are only effective at execution time. You might use both techniques in a decision model. Here's an example:
In this decision there is one decision table (DCM03) that contains the business rules and a second table named "constraints on Color,Age,Category" that contains the constraints.
At design time, the validation engine will detect these issues:
R1 DCM03 sets a value that breaks a constraint on attribute age
age=999 does not meet any of these constraints in[0..100] or >1000
R1 DCM03 Business Rules sets a value that breaks a constraint on attribute category
category='YY' does not meet any of these constraints in['AA'..'XX']
R1 DCM03 Business Rules tests a condition with a value that breaks a constraint on attribute color
if color ='purple' does not meet any of these constraints ='red' or ='green' or ='blue' or ='yellow'
Constraints apply independently to the variable they constrain. If you have constraints that are conditional then they need to be defined as business rules in a decision table.
Most likely the definitions of the constraints would be a part of the ontology that is shared by all decisions in a project in the same way that entity and attribute definitions can be shared.