Please note : This help page is for an older version of Enteprise Archtiect. The latest help can be found here.

Model Validation

model_validation

You use Model Validation to check UML models against known UML rules (which you identify in configuring validation) as well as any constraints defined within the model, using the Object Constraint Language (OCL). You can run Model Validation against a single UML element, a diagram or an entire package.

Access:    Project | Model Validation | Validate Selected (Ctrl + Alt + V)

Topics:

Topic

Detail

See also

Validating

Validating a UML:

  • Element validates the element and its children, features (attributes and operations) and relationships (connectors)
  • Diagram validates the diagram itself (for correctness) as well as any elements and connectors within the diagram
  • Package validates the package and all sub-packages, elements, connectors and diagrams within it

 

Example - Model Violation

The following UML diagram contains several basic violations:

ModelValidationExample

If you run Model Validation on this diagram, Enterprise Architect displays the following violations in the Output window:

  • It contains a UML ExpansionRegion (ExpansionRegion1) that is missing its child input ExpansionNode
  • It contains an invalid self-generalization on Class2 (UML elements cannot be self-generalized)
  • It contains an OCL violation for the anonymous Association (between Class2 and Object1)
  • It contains a UML ExceptionHandler (ExceptionHandler1) that is missing its child input ObjectNode

 

How To:

To use Model Validation, follow the steps below:

Step

Action

See Also

1

Select the package, diagram or element either from the Project Browser or within an open diagram

 

2

Select the Validate Selected menu option

Enterprise Architect performs the validation, and displays the results in the Output window (if the Output window does not automatically display, select the View | System Output menu option)

While performing the validation, Enterprise Architect also displays a progress window containing the Cancel Validation button, which enables you to cancel the validation process at any time

Alternatively, select the Project | Model Validation | Cancel Validation menu option

Output Window

Notes:

  • If you double-click on an error in the Output window, you select the diagram element that the error message refers to

Learn More: