MagicDraw UML and SysML Plugin eSchool
Motto: "Learn good ways to work with MagicDraw UML and its SysML Plugin !"
About the eSchool
UML2 in MagicDraw
MagicDraw UML tips
MagicDraw SysML Plugin
MagicDraw for Java
MagicDraw for XML
Advanced UML and SysML Training

HOWTO use relatable UML Classifiers as parsing containers that can carry Dependencies to other Elements

It is often handy to be able to parse text into a relatable UML Elements (rather than into a Comment with just "handles") so that one can leverage Dependencies and the Display Related Elements facility of MagicDraw UML. Although a DirectedRelationship can be made between base Elements, the UML Parsing Analysis recipe employs (at least) the Dependency as the relationship, and (at least) a NamedElement. as a "parsing container" to hold the parsed analysis text.

There a number of candidate Classifiers that are suitable as relatable parsing containers, including:

  • Component offers itself very well (if clearly stereotyped as a semantic misappropriation) because:
    • it can participate in ComponentRealization dependencies, which can be
      easily traced to the contents of the Component as parsing container
    • it can nest (both graphically and physically) to form trees of parsed text
    • it can graphically contain other elements to form "parasitic" logical views:
      • TIP: In MagicDraw UML the Component symbol does not "steal ownership" of elements moved into it in a diagram
        • WARNING: the Component element in the model browser will correctly steal ownership of elements moved into it in the browser
  • Artifact also offers itself because:
    • it is traditionally associated with documentation
    • it can nest (both graphically and physically) to form trees of parsed text
    • con: it can't graphically contain other important elements, such as Class
  • Class is NOT a candidate, as it can't graphically nest, so it fails an important requirement of the UML Parsing Analysis recipe

DO NOT use Package (or Model) as a parsing container, as it steals ownership of elements, and thus is ill-suited to forming logical views !

I recommend that you parse text into Comment first then only "upgrade" to a Classifier if really necessary. Reasons for upgrading include:

  1. you want to reuse the parsed text many times in different places easily by using Display Related Elements
  2. you want to relate other elements to the parsed text in a reusable way
Image: 
Search
Welcome to the MagicDraw UML "tips and tricks" tutorials !