Skip to content

Connect an imported package

An Extern package from a MIM-XML import, or one that a mapping produced (such as UML to MIM from an Enterprise Architect file), holds its own copies of another model’s elements. When that model is on ModelDesk, you can connect the package to it: the copies make way for the model’s own elements, and from then on the package follows the version of the model your model uses. Before anything changes, a comparison shows what happens to each copy. For what the two states mean, see Reuse elements of another model in a MIM model.

Connecting is optional. An unconnected package stays valid, editable and exportable for good.

  • A MIM model you can edit, with an Extern package that holds elements of its own.
  • The model the package represents is on ModelDesk, in your organization.

You can start connecting from these places. Each opens the same dialog.

  • The import result. When an import produced Extern packages that hold copies, the Model import page lists them under Packages for other models, each with Connect to a model. Where a model on ModelDesk has the package’s name, or is found at the package’s location, it is suggested (“Suggested: “NEN 3610””). Connect to a model opens the new model in the editor with the package selected and the connect dialog open, the suggested model already picked. The import itself connects nothing. See Packages from a MIM-LD import for what to expect.
  • The package. Right-click the package in the tree, or in its form open More actions, and choose Connect to a model….
  • Model settings. When an unconnected package points at elements of a model your model already uses, rather than holding copies of them, the Dependencies section says so, for example ““NEN3610” holds elements of “NEN 3610” but is not connected to it.”, with Connect “NEN3610”.

A model from Enterprise Architect reaches MIM by importing its XMI as a UML model and mapping that to MIM; see Map a model to a new model. Its Extern packages then hold copies, and you connect them from the package.

  1. In the Connect “NEN3610” to a model dialog, pick the Model and, for a model your model does not use yet, the version under Which version to use. For a model your model reaches only through another model, the dialog says “Already used through …, at the version they bring.”: connecting first makes your model use it directly, at that same version, as a change of its own. When the package has no Location yet, the dialog fills one in, which you can change.
  2. Select Compare. ModelDesk compares each element in the package with the model’s element of the same type and name, and sorts them into three groups:
    • Same (“Replaced by the model’s element.”): nothing differs.
    • Different (“Choose for each element.”): a property or a part, such as an attribute, differs. Expand an element to see its differences side by side, This package against The model.
    • Not in the model (“Stay in this package as they are.”): the model has no such element.
  3. For each element under Different, choose Use theirs (the default) or Keep mine. When more than one element of the model fits, each is offered with its place, such as Use “Punt” in Geometrie, and the choice starts at Keep mine.
  4. Check the line at the bottom, for example “14 replaced by the model’s elements, 3 kept.”, and select Connect.

Nothing changes until you select Connect. If your model did not use the other model yet, that goes into your draft first, as a change of its own, and the connection follows as the next change.

  • A value the copy holds that differs from the model’s. A value the copy leaves empty is no difference, since copies written by other tools are often bare.
  • A cardinality is compared as the number of values it allows, so 1 and 1..1 are the same, as are * and 0..*.
  • A reference, such as an attribute’s type, is compared by the name and type of what it points at.
  • A part of the copy, such as an attribute, that the model lacks or that differs. A part the model has and the copy lacks is no difference.

Some copies cannot be replaced. The comparison shows them as Kept, with the reason and no choice, for example ““Perceel” points at a part of it the model doesn’t have.”: something in your model points at an attribute or other part of the copy that the model’s element does not have, so replacing the copy would leave it pointing at nothing. Point that reference elsewhere, then connect again to replace the copy.

If two copies would use the same element of the model, the dialog says ““Punt” and “Point” would use the same element. Keep all but one.” and Connect stays disabled until you do.

A MIM-LD file describes some elements of an Extern in full and only names others by their identifier. The import makes a copy of each element the file describes, and keeps each element it only names as a reference to an element that is not in your model.

The import result lists such a package only when it holds at least one copy. A package that only points at named elements is not listed; you can still start from the package itself, in the tree or in its form under More actions.

Compare only looks at the copies. For a package without copies, the dialog says “This package holds no elements of its own.” You can still select Connect, but the named elements stay as they are: they are not replaced by the model’s elements, and the references to them in your model stay as they are.

For each element under Same, and each under Different set to Use theirs:

  • the package holds the model’s element instead of the copy;
  • every attribute type, supertype or relation in your model that pointed at the copy, or at one of its attributes, now points at the model’s element or its attribute;
  • the copy is removed.

Elements under Not in the model, and those you kept, stay in the package as editable copies. Everything happens as one change in your draft, which you can undo before you commit; see Work in a draft and commit.

To undo a connection after committing it, choose Disconnect in the package’s menu. Each element becomes an editable copy of the version your model uses, and everything that pointed at it points at the copy. The dialog lists under References left out the references a copy cannot keep: a reference into a model yours does not use, for example. See Disconnect a package.

  • The package offers no Connect to a model…. The package is connected already, it is not an Extern, or the model’s MIM version does not support connected packages yet.
  • There is no Connect to a model, or no More actions entry, at all. You can only read this model.
  • “This package holds no elements of its own.” There is nothing to compare. Connecting still links the package, and you add elements with its +. For a package from a MIM-LD import, see Packages from a MIM-LD import.
  • “This model uses “NEN 3610” only through another model.” The models your model uses changed while the dialog was open. Close it and try again, or select Make direct on that model’s row in Model settings first; see Manage model settings.
  • ““NEN 3610” is of a kind this model can’t use.” That model’s standard cannot be used by a MIM model. Pick another model.
  • ““NEN 3610” no longer exists, or you no longer have access to it.” The model was deleted, or you lost access to it, after the dialog opened. Pick another model.
  • “This package is connected already.” or “This package is not connected any more.” Someone else, or another tab, connected or disconnected the package after the dialog opened. Close the dialog and open it again from the package.
  • “Some elements can’t be replaced. They are now kept. Check and connect again.” Something in your model changed between the comparison and Connect. The elements concerned are now shown as Kept; check them and select Connect again.
  • “The package or the model changed. Compare again.” Select Back, then Compare.