Home / Model Expert Homepage / Model Expert Help / Validation rules / Built-in validation rules
Creating Reference Models
(13)
Import an MDG to create a Reference Model
Importing and exporting Reference Models
Editing RM Connector type properties
Stereotypes inheriting from other Element Types
Customizing Reference Model Properties
Customizing Reference Model Element Properties
Using Reference Models
(12)
Built-in validation rules
Customizing Validation Rules
When you validate a meta-model against a reference model, Model Expert applies a set of rules.
These rules can be customized:
Customization | Description | See Also |
---|---|---|
Change text | The text, as seen by the user can be customized, either by re-wording the supplied text, or translating into your national language.
Do this by editing the text in the list |
Validation Scripting Examples |
Changing the severity | The severity of all validation rules can also be changed | |
Disable rule | To stop a rule from running, set the severity to zero. |
Validation Rule details
Elements
Ref | Rule Explanation | Default Severity (editable) |
---|---|---|
1 | Checks that the element type is in the reference model | 10 |
6 | Checks that the element stereotype is in the reference model | 8 |
1003 | Element type is in the Reference Model, but this element is not from the correct package | 6 |
Connectors
Ref | Rule Explanation | Default Severity (editable) |
---|---|---|
2 | Checks that the relationship type is in the reference model | 10 |
7 | Checks that the relationship stereotype is in the reference model | 8 |
3 | Checks the multiplicity between two element types | 5 |
4 | For 1..* multiplicities, checks there is at least one element | 5 |
5 | For 0..X multiplicities, checks there are not too many related elements | 5 |
8 | Check that the Connector is in the right direction | 2 |
81 | Give the connector a direction | 1 |
82 | Element is linked to an element which is not defined in the Reference Model | 1 |
9 | Checks that elements of this type can be added to this type of diagram | 4 |
Diagrams
Ref | Rule Explanation | Default Severity (editable) |
---|---|---|
9 | Checks that elements of this type can be added to this type of diagram | 4 |
12 | Checks that there are enough required elements | 4 |
3 | Checks the multiplicity between two element types | 5 |
4 | For 1..* multiplicities, checks there is at least one element | 5 |
EA fields and tagged values
When it checks fields in your model, Model Expert checks for two things:
- Fields or Tagged Values which are required by your Reference Model, but are either not present or have default values
This indicates missing data. - Fields or Tagged Values which are in your model, but are not in your Reference Model.
This indicates that modellers are adding data which your RM thinks you don’t need. This may be true, or it may be that the extra information is useful, and your RM need extending.
Ref | Rule Explanation | Default Severity (editable) |
---|---|---|
100 | Attribute is not in the reference metamodel | 4 |
101 | Element does not have a required EA field | 4 |
102 | A required EA field has a default value | 1 |
103 | Required tagged value not present | 6 |
107 | Required tagged value is blank | 1 |
105 | Element has a tagged which is not in the Reference Model | 1 |
106 | Tagged value has value not contained in allowed values | 3 |
Instance Diagrams
Diagrams which contain only instances have some special rules
Ref | Rule Explanation | Default Severity (editable) |
---|---|---|
1001 | Classifier is not in this model | 10 |
1002 | Checks that the model defines a link between two instances | 8 |
1004 | Elements are linked in this model, but only by inheritance, so link is not valid | 6 |
1005 | Diagram object is an Element, not an instance of an element | 6 |
1006 | Classifier for this instance is not from a required package | 6 |
Sequence Diagram rules
Ref | Rule Explanation | Default Severity (editable) |
---|---|---|
1010 | Lifeline is not an instance, it’s a classifier | 10 |
1011 | Message does not invoke an operation on the target | 6 |
Attributes
You can set the default values for any attribute via the Reference Model properties.