Skip to content

Validate your model

ModelDesk checks your model against the rules of its metamodel: required properties, allowed relation targets, cardinalities, value formats, keys that must not repeat, and so on. Each thing a check reports is a finding. The Validation Report lists the findings of the whole model, and the editor shows them under the fields you edit, so you can work through them and keep the model consistent with its standard. Typical moments to validate: before you export or transform the model, and before you release a version. For where these rules come from, see Metamodels & standards.

A finding has one of three levels:

  • Violation: the model breaks a rule of its metamodel. Only violations make a model invalid, and they stop a release until you fix them or override them (see Release a version with violations). A violation cannot be dismissed.
  • Warning: something you should look at, which does not make the model invalid. A warning is never counted as a violation. You can dismiss it.
  • Information: advice, called a note in the app. You can dismiss it too.

The level shows in its color: red for a violation, orange for a warning, blue for information. In the report, each group carries the icon of its most severe finding, and each finding’s message has the color of its level. Under a field, each finding has the icon and color of its level.

Which checks a model gets depends on its metamodel. Some rules the metamodel states itself, such as which properties need a value. Some findings come from a standard’s own published rules, which the metamodel brings along.

The metamodel also decides the level of each rule. A value it requires is a violation when it is missing. A value it only recommends, as good practice rather than a rule of the standard, is a warning: the report says Element is missing recommended attribute rather than Element is missing required attribute.

  • A model you can open in ModelDesk.
  • To dismiss findings or undo a dismissal: permission to edit the model.
  1. Open your model and select Model validation in the left navigation. The Validation Report loads.

  2. Read the summary at the top: Violations, Warnings and Elements. Violations counts violations only, Warnings counts warnings, and Elements counts the elements that have either. None of them counts information or dismissed findings. If no violation is left, the report shows No violations found!, and below it the warnings left, for example 2 warnings to review. Warnings and information findings may still be listed below it.

  3. Choose how to work through the findings with the tabs: Group by type (all findings of the same kind together, the default) or Group by element (all findings on the same element together).

  4. Select a group to expand it. Each finding shows the element, where it sits in the model, and a message describing what does not fit. Groups with violations come first, then warnings, then information. Grouped by type, a group holds findings of one level: when a check reports both violations and warnings, they are two groups. The badge on a group counts what it holds, for example 3 violations, 2 warnings or 1 note. Grouped by element, the badge names violations and warnings apart, for example 2 violations, 6 warnings.

  5. Select a finding to open that element in the Model editor, fix the problem there, and save.

  6. Return to Model validation to load a fresh report and confirm the finding is gone.

The Validation Report with summary counts and violations grouped by type

The report shows the model as the editor does: your draft if you have one, otherwise the branch you have open. When No violations found! shows, the model has no violations left. Warnings may remain: they never stop a release. A finding whose work item the team closed as Not a problem is not resolved: it stays in the report, in the Closed as not a problem group, and counts in the totals.

The element form in the Model editor and the dialogs that create elements check your values while you type. A finding shows under the field it is about, the most severe first.

Most findings do not stop you saving. A required field left empty shows Required under it, in red, and the element saves anyway. A field the metamodel only recommends shows Recommended under it, in orange, as a warning. Other examples are Needs at least 2 values, Recommended: at least 2 values and Doesn’t match the expected format. The finding stays under the field, and in the report, until you fill in the value.

A duplicate key is the exception. Some element types have a key: a property, or a combination of properties, whose value no two elements may share. While you type a key that another element already has, the field shows Already used by followed by that element’s name. Where the key is made of several properties, each of their fields shows Key already used by followed by the name. A save that would give a second element the same key is refused with Not saved: this key is already in use. Change the key and save again.

When you have looked at a warning or an information finding and accept it as it is, dismiss it. A dismissed finding no longer counts and moves out of the way, so the report keeps showing what still needs attention. A violation cannot be dismissed: fix it, or override it when you release (see Release a version with violations).

  1. Find the finding:

    • In the Validation Report, expand its group.
    • In the Model editor, open the element. The finding shows under its field.
  2. Select Dismiss beside the finding in the report, or under the field. Where a field has several findings you can dismiss, each has its own button, named Dismiss: followed by the finding.

The finding leaves its group and the counts, and leaves the field. In the report it moves to the Dismissed group at the end, which is collapsed. Select Dismissed to expand it. Each row shows the element, the message, and who dismissed it and when, for example Dismissed by Sam, followed by the date and time.

Dismissing applies to the value as it is. When the value changes, the finding comes back as a new finding, and you can look at it again.

Things to know:

  • A dismissal takes effect at once. It does not go into your draft and needs no commit. It counts for everyone working on the model, on every branch and in every draft where the value is the same.
  • Someone else’s dismissal shows after a reload. It shows for you the next time you open the model or Model validation.
  • Under a field, only findings on saved values can be dismissed. Save the element first.
  • Dismiss shows only where you can edit. It does not show on elements that come from a dependency or from the metamodel, or when you cannot edit the model.

Dismissing is not the same as closing a tracked finding’s work item as Not a problem. A dismissal settles a warning or an information finding for everyone working on the model: it leaves the counts. Dismissing a tracked finding does not close its work item. Not a problem records the team’s decision on the work item only: the finding stays in the report, in the Closed as not a problem group, and still counts.

  1. In the Validation Report, select Dismissed to expand the group.

  2. Select Undo beside the finding.

The finding goes back to its group and into the counts, for everyone working on the model. Undo is only in the report, not under a field.

When your organization uses work items and you have a seat on the model’s metamodel, each violation and warning has Track, and each group and the whole report have Track all followed by the count. Tracking makes a work item of type Finding on the element or property, or opens the item that already tracks the finding. ModelDesk closes that item when the finding is gone and reopens it when the finding comes back. A tracked row shows the item’s number and state. See Track validation findings.

When you release a version of a model, ModelDesk checks the model first. A model with violations cannot be released, unless you choose to release it anyway. Warnings and information never stop a release. See Release a version with violations.

  • The report keeps showing a violation you fixed. The report checks the model when you open the page and again when your draft or branch changes. If the fix is still in an open form, save it. Then navigate back to Model validation (or reload) to check the model again.
  • You do not understand a finding. The message names the rule that is not met, and grouping by type collects all elements with the same problem. See Metamodels & standards for how the metamodel defines these rules.
  • There is no Dismiss beside a finding. It is a violation, which cannot be dismissed, or it is on an element you cannot edit. Under a field, save the element first.
  • Dismissing says Couldn’t dismiss. Try again. The dismissal did not go through. Select Dismiss again.
  • Dismissing says Couldn’t dismiss. ModelDesk refused the dismissal, for example because the draft you had open is gone. Open Model validation again.
  • Dismissing says This finding is no longer reported. The model no longer has this finding, for example because someone changed the value since the report loaded. The report loads again without it.
  • Dismissing says Violations can’t be dismissed. The model now reports this finding as a violation. Fix it, or override it when you release.
  • Dismissing says This model has reached its limit of 5,000 dismissals. Undo one first. A model holds at most 5,000 dismissals. At the limit, ModelDesk first removes the dismissals that no longer match a finding on main or in the branch or draft you have open, so this message means every one still applies. Undo one you no longer need in the Dismissed group, then select Dismiss again.
  • Dismissing says The model couldn’t be checked just now. Try again shortly. ModelDesk checks the model before it records a dismissal, and a check could not run. Wait a moment and select Dismiss again.
  • Dismiss or Undo says You can’t change this model. You need permission to edit the model.
  • Undo says Couldn’t undo. Try again. The undo did not go through. Select Undo again.
  • Undo says Couldn’t undo. ModelDesk refused the undo. Open Model validation again.
  • There is no Undo beside a dismissed finding. You cannot edit the model. If you can, the dismissal is newer than your report: open Model validation again.
  • A dismissed finding is back. Its value changed since it was dismissed, or someone undid the dismissal. On a model at its limit of dismissals, ModelDesk may also have removed one that applied only on another branch or draft, to make room. Look at the finding again and dismiss it if it is still fine.