Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Topic
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:

  • MVR01... (Element: Well Formedness checkbox selected)
  • MVR05... (Relationship: Well Formedness checkbox selected)
  • MVR08... (Feature: Well Formedness checkbox selected)
  • MVR0B... (Diagram: Well Formedness checkbox selected)
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:

  • MVR02... (Element: Composition checkbox selected)
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:

  • MVR03... (Element: Property Validity checkbox selected)
  • MVR06... (Relationship: Property Validity checkbox selected)
  • MVR09... (Feature: Property Validity checkbox selected)
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:

  • MVR04... (Element: OCL Conformance checkbox selected)
  • MVR07... (Relationship: OCL Conformance checkbox selected)
  • MVR0A... (Feature: OCL Conformance checkbox selected)
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