Prev | Next |
Rules Reference
Model Validation works by applying a set of validation rules to the selected object. These rules are arranged in groups.
Rule Groups
Group |
Description |
See also |
---|---|---|
Well-Formedness |
The validator applies these rules to check whether or not an element, relationship, feature or diagram is well-formed; for example, whether the object is a valid UML item or whether a diagram contains valid elements within it. As explained in Error Message Format, these rules generate messages with the codes:
|
Well-Formedness |
Element Composition |
The validator applies these rules to check whether or not a UML element contains valid children, whether it contains the right number of valid children, and whether or not the element is missing any required children. These rules generate messages with the code:
|
Element: Composition |
Property Validity |
The validator applies these rules to check whether or not the element, relationship or feature has the correct UML properties defined, and whether the properties contain incorrect or conflicting values. These rules generate messages with the codes:
|
Property Validity |
Custom Properties |
The validator applies these rules to check an element, relationship or feature against any defined constraints in OCL. These rules generate messages with the codes:
|
OCL Conformance |
Error Message Format
When you perform a validation, any violations of the rules are listed on the System Output window. Each violation has a violation ID of the format:
MVRxxnnnn
- MVR stands for Model Validation Rule
- xx is a hexadecimal number corresponding to the position of the validation rule in the 'Model Validation Configuration' dialog, thus indicating which rule is applied and violated
- nnnn is the number of the violation message
For example:
- Messages with the ID MVR01nnnn indicate that the 'Element: Well-Formedness' checkbox is selected and a violation of that rule has been detected
- Messages with the ID MVR0Annnn indicate that the 'Feature: OCL Conformance' checkbox (10th in order on the dialog, or Ath in hexadecimal) is selected and a violation of that rule has been detected