skip to main content
Corticon Studio: Rule Modeling Guide : Building the Vocabulary : Custom Data Types : Constraint Expressions : Using non-enumerated Custom Data Types in Rulesheets and Ruletests
 

Try Corticon Now
Using non-enumerated Custom Data Types in Rulesheets and Ruletests
Non-enumerated custom data types use Constraint Expressions and do not cause Rulesheet drop-downs to become populated with custom sets. Also, manually entering a cell value that violates the custom data type's Constraint Expression is not prohibited in the Rulesheet. For example, in the example below, weightLimit is defined as a non-enumerated custom data type with Base Data Type of Integer.
Figure 6. Non-enumerated Custom Data Types
Then, after assigning it to the Vocabulary attribute Cargo.weight, it is used in a Rulesheet Condition row as shown below:
Figure 7. Using Custom Data Types in a Rulesheet
Notice in Using Custom Data Types in a Rulesheet that the 300000 entry violates the Constraint Expression of the custom data type assigned to Cargo.weight,  but does not turn red or otherwise indicate a problem. The indication comes when data is entered for the attribute in a Ruletest, as shown below:
Figure 8. Violating a Custom Data Type's Constraint Expression
Notice that the small yellow warning icon  indicates a problem in the attribute, entity, and both Ruletest tabs. Such an error is hard to miss!  Also, a Warning message will appear in the Problems tab (if open and visible) as shown below. If the Problems tab is closed, you can display it by selecting Window > Show View > Problems from the Studio menubar.
Figure 9. Violating the Constraint Expression of a Custom Data Type
A Warning will not prevent you from running the Ruletest. However, an Error, indicated by a small red icon , will prevent the Ruletest execution. You must fix any errors before testing.