Model Validation

UML2 Modeler enables modeling in various languages (all supported by Papyrus UML). When we want to start modeling with Magik rules, we have to make sure that our model is valid. Validation checks all elements for rules defined in Magik profile.

There are two ways to validate a model:

  1. In the Outline by right-clicking on an element in Model Explorer. This will open context menu with Validation option.

    model explorer view

    We can validate or model using:
    1. Model validation - validation for entire model
    2. Subtree validation - validate subtree of the selected element
    Validation in model explorer shows error markers. To remove these markers use Remove markers from model

    remove markers

  2. In editor by selecting elements to validate (To select all elements press Ctr+A) Use right-click and press Magik Model Validation

editor view

Note: Model can be validated automatically before code generation.

Related reference
Code generation
Code Generation Preference Page