In any business entity, you can set rules against which you validate the entity attributes (minimum and maximum length, list of values, etc.).
Before you begin
You have already created a data model and the business entities and attributes in the data model. For further information, see Creating a data model, Creating business entities in a data model and Adding attributes to the business entity.
About this task
Consider as an example that your data model holds the following entities: Agency, Agent and Region. You have an attribute called Rating in the Agency entity.
To add a simple rule to a business entity, do the following:
In the data model editor, right-click the Rating
attribute and select Change to a Simple Type.
A dialog box is displayed.
- Select the Custom option and then enter RatingType in the Type field.
Click OK to validate your changes and close the dialog
The RatingType simple rule displays under the selected attribute in the data model editor and a reusable type of the same simple rule is created in the Data Model Types list.
Right-click the simple rule in the Data Model Types
panel and select Edit Enumeration.
A dialog box displays.
- In the New Item field, enter the first agency rating value and then click the plus button to clear the text field and add the value to the list.
Repeat the operation to add as many values as needed and then click
OK to close the dialog box.
The added values display under the simple rule in the data model editor.