Defining Validator Settings as Decision Tables - Gnorion/BizVR GitHub Wiki
Defining Validator Settings as Decision Tables
The rule author can control what the validator analyses and returns to BizVR by setting some parameters in a "settings" table.
The action entries contain the settings and values. The conditions are ignored.
Example:
String Handling Method
For example VV has four different ways that it can handle gaps in string values:
- Assume string values are complete and don't add any other values
- Use generic OTHER for missing values. Add "other" to cover any missing values
- Use explicit NOT(values) for missing values. eg not('red','green','blue')
- Determine gaps as explicit string ranges eg ['blue'..'green']
#2 is the current default.
Missing Rules Limit
If you have a lot of conditions with a lot of gaps in the various ranges you may have a considerable number of missing rules. Figuring out the missing rules is a time consuming process and so the Validator by default limits its search to 50 missing rules. If you have more missing rules than this you have two options
- Examine the list of gaps in your rules and add rules to cover those gaps. This will reduce the number of missing rules.
- Increase the missing rules limit by adding an entry in the settings table. Try to eliminate gaps first.
Test Cases Limit
Test case generation can be a time consuming process to since the validator will generate a test case for every possible combination of every value tested for every attribute that is specified as a decision input. For example if you had 6 input variables and each variable was tested in the rules for 2 possible outcomes then the total number of test cases would be 2x2x2x2x2x2 = 64. During the initial stages of testing when you just need a few sample test cases you can list this generation by adding a setting named "test cases limit". Once your decision is complete, consistent and redundancy free you can increase this limit.
Generally however its better to test each decision table independently first before you try to test the entire decision.
Validator will generate test cases on a table by table basis if you specify which table in the settings.
For example
Similarity Threshold
When Validator encounters a variable that is declared as an input to the decision but is never used in the condition of any rule it will flag it as a problem. The Validator will also scan the variable names looking for close matches to the name - often its just a simple misspelling that causes the problem. Validator will report the possible matches that exceed the similarity threshold (default is 50% but you can use settings to change the value)
Compression
Gap Method
Controls how the validator analyses gaps in variable values.
- ruleset looks for gaps at the ruleset level
- decision looks for gaps at the decision level
Dependency Type
This setting controls the kind of dependency diagram created by the validator You can choose from
- attribute
- rule
- ruleset
- decision
- project
Attribute Dependency Diagram
Ruleset Dependency
More complex example