en ger

MagicUWE - Reference

This is a reference of MagicUWEs main functionalities (v1.3). (older reference v1.2)
("Navigation diagram" refers to the navigation class diagrams. "Navigation States diagram" denotes the representation with state diagrams.)

Basic Functions

Class Insertion

Class Modification

RIA Features

Navigation States Diagrams

Transformations

Miscellaneous

Basic Functions

MagicUWE features Similar user actions in MagicDraw

 Create a new UWE project

Create a new project (File / New Project.. / Blanc Project) and answer "Yes" to this question:

  Question

Recommendation: Don't display the operations: (class on a diagram) / Symbol properties / Suppress Operations = true / Make Default / OK
and create the UWE models (see next point)

If MagicUWE is not installed: Save the UWE profile as MagicDraw / profiles / UWE Profile.mdzip. Create a new project and add the UWE Profile (Options / Modules / Use Module / ..profiles / UWE Profile.mdzip / Finish)

 Create default UWE models

MagicUWE / Create default models
Create the models that are depicted in the following figure by yourself and call them "Content", "Navigation", "Presentation" and "Process" etc. Add the stereotypes «contentModel», «NavigationModel», «PresentationModel» and «ProcessModel» and so on.

default models

 Create UWE diagrams

new diagram from the UWE menu

or:

new Diagram from containment tree

s. configuration, if you prefer an UWE submenu.

Create proper diagrams (e.g. a class diagram).

Recommendation:
Move them into the right UWE models in the containment tree and give them unique names.

Class Insertion

MagicUWE features Similar user actions in MagicDraw

 Insert classes, associations, states, transitions, use cases or activities with UWE stereotypes

Click at the wanted class in the toolbar of a class diagram:

toolbar

..an activity diagram:

toolbar

..or an use case diagram:

toolbar

..and then draw the element into it:

drawing class

Inserting other elements is working similarly.
(Draw a new normal class or association and right-click on it) / Stereotype / (select the wanted stereotypes from the UWE profile) / Apply

set stereotype

 Draw properties with UWE stereotypes

First click at the object in the diagram, which should contain the new property and then select the wanted property-stereotype from the (presentation-)toolbar and draw it into the class you have previously selected.

property and class names

A new class is created and added (as property) to the previously selected one.
The destination class must be prepared:
Symbol(s) Properties / Suppress Structure = false.

Create a new class, give it a name and add the wanted stereotype. Drag and drop it from the containment tree into a class or property within the open diagram. Now you can name the property itself. The stereotype has to be set to the property, too.

 Navigation diagrams: Insert access primitives (index, query, ..)

This (and the following) context-menu appears according to the configuration of MagicUWE. If this menu isn't displayed, first select the association and then right-click beside it, so that MagicDraw doesn't de-select it, because of that second click.

Select one or more association(s) to insert a new class of the selected stereotype between one and all other classes. It's necessary that all associations have the same end at one side.

insert classes between others

Some useful logic -according to the selected stereotype- for the multiplicities, the new class name, the names of the properties and the association type is included.
Create and draw a new class, give it a name, drag all association ends to this new class and create a new association or eventually a composition to the head class. Finally add the right multiplicities and names.

Class Modification

MagicUWE features Similar user actions in MagicDraw

 Navigation, Navigation States diagrams or requirements: Set tagged values

Context menu of the selected element:

setTags

setRequirementsTag

(right click on the element) / Specification / Tags / <<navigationNode>> isHome or isLandmark / create or edit value.
Be careful, a boolean with more than one value doesn't seem to make sense.

set tags manually

 Use case diagrams: Copy stereotypes

Clicking on a package shows an option to apply its stereotypes on the use cases within this package.

setTags

For every use case in the selected package:
(Draw a new normal class or association and right-click on it) / Stereotype / (select the wanted stereotypes from the UWE profile) / Apply

set stereotype

RIA Features

MagicUWE features Similar user actions in MagicDraw

 Presentation Diagram: Add RIA patterns to properties or classes

The context menu of the element shows the applicable RIA patterns.

addRIAPatternsContextMenu

Click on RIA pattern opens the following selection dialog:

addRIAPatternsDialog

 Modelling of RIA features by tag only

If you choose "by tag only", only the tagged value for the element is set.

tagOnly

The tagged values can be set manually in the specification dialog of the element.

 Modelling of RIA features by adding dependencies

If you choose the option "adding dependencies between parts", the tagged value is set and additionally dependencies are added. I.e. adding a Collaboration Use for the corresponding Collaboration of the UWE Profile with the dependent parts.

Define the types of the parts with "Select type...":
The selected classes should have the same types like the parts of the collaboration of the UWE Profile (that are shown by the symbols).

typesOfParts

If the element is a property, the Collaboration Use is attached (in the containment tree) to the class of the property, otherwise to the element itself.

dependenciesContainmentTree

To add the dependencies manually add a Composite Stucture Diagram to create the Collaboration Use and all parts. You can find the related Collaboration in the UWE Profile in the directory UWEPatterns/RIAPatterns.

 Modelling of RIA features by adding behaviour

If you choose the option "by adding behaviour", first the dependencies are added like explained in "adding dependencies". And then a State Machine for the modelling of the behaviour is copied from the UWE Profile, that can be modified as necessary.

behaviour

If the element is a property, the State Machine is attached (in the containment tree) to the class of the property, otherwise to the element itself.

To add the behaviour manually first add the Collaboration Use with the dependencies like mentioned above. Then copy the State Machine from the UWE Profile (directory UWEPatterns/RIAPatterns) to the presentation element.

 Delete tagged value and possibly existing dependencies and behaviour

If the tagged value of a RIA pattern is already set, you also have the option "delete tag". By choosing this, the tagged value is deleted. If dependencies and/or behaviour are already existing for this tag, you will be asked how to treat with those.

deleteTag

The tagged values can be deleted in the specification dialog of the element. If the element is a property, delete also the tagged value of the class. Existing dependencies and/or behaviour can be deleted in the containment tree.

 RIA Patterns Menu: Configuring the modelling options of the RIA patterns

In the dialog "RIA Patterns Options" you can configure for every RIA pattern the option that is used for modelling by default. Change these options also in the configuration file.

MenuRIAPatterns

RIAPatternsOptions

The configured options are shown by symbol in the context menu of a presentation element.

RIAPatternsContextMenu

Navigation States Diagrams

MagicUWE features Similar user actions in MagicDraw

 Navigation States diagram: Copy stereotypes and tagged values of states

Tags of states can be set using the context menu.

The menu "Copy UWE stereotypes.." copies stereotypes and tags of the submachine state to the associated state machine (or vice versa).

copyUWEstateStersAndTags

In order to copy the tags manually, each stereotype and value has to be set equally on both elements.

 Navigation States diagram: Set «navigationalNode» to substates

Using the context menu the stereotype «navigationalNode» can be set to all nested states which are not stereotyped by another UWE navigation state stereotype.

Every sub-element has to be stereotyped manually.

 Navigation States Diagramm: Check changes of «session» {transmissionType} on substates

The context menu opens a tab that displays the results. Furthermore the resulting elements are outlined in the diagrams, if "Draw rectangles.." is activated.

sessionTransmissionTypeContextMenu

sessionTransmissionTypeTab

Every substate has to be checked in order to detect changes for the tag {transmissionType}.

Transformations

MagicUWE features Transformationtypes

 Available Transformations

You can run all transformations from the menu

transformation menu

.. and from the context menu of the containment tree:

transformation context menu

If you select more than one diagram, each one which has the right UWE diagram type for the selected transformation will be processed.

Within a class diagram there are two ways to transform a part of the requirements modes to this diagram and the corresponding model.

To create some additional model dependent data for an existing class there are one or more entries in the context menu for the class.

Transformation class context

If such a class doesn't exist, you can genertae it from the context menu of a diagram.

Transformation diagram context

Therefore a dialog is shown at the beginning of the transformation allowing you to select a relevant class. Also, you can select here a package to store the newly created class and some additional model dependent options.

 Transformation class dialog

 Content to Navigation

Create a new class (in the Navigation Model) for each class in a Content Diagram and give the new class the same name and add the «navigationClass»-stereotype. Then draw all of them into a new Navigation Diagram (a class diagram). Now you can redraw all associations you need.

 Navigation to Presentation

Create a new class (in the Presentation Model) for each class of a navigation diagram. Label the new class equally and add the «presentationGroup»-stereotype.

 Navigation to Process Structure

Draw each class with a «processClass» -stereotype of a Navigation Diagram into a new Process Structure Diagram. Don't create new classes!

 Navigation to Process Flow

Create a new Process Flow (=activity diagram) for each processClass with a proper name of a Navigation Diagram. Label the new diagrams "class name"+" Workflow", so that you can see easily which activity belongs to a class with a "processClass" -stereotype.

 Requirements to Content

Creates a first content model by converting object nodes of activities used during the requirements analysis to classes. If an object node has no associated type the name of the object is used as the name of the created class, otherwise the objects class is taken into the content model. The action pins related to a object node are transformed to attributes and associations of the corresponding class.

 Requirements to Navigation

The initial navigation model is generated by converting the use cases according to their stereotype into navigation or process classes. Also associations and menus are added to the classes and the tagged values are imported from the use cases.

 Requirements to Presentation

For each use case a presentation group or input form is created and filled with presentation elements, but only if such a group has some inner elements at all. The presentation elements inside of the group are computed from activities of the use case. According to their type tag, actions of type «displayAction» are converted into some kind of presentation group, whereas pins and «navigationAction» actions are transformed to presentation elements within them. In addition, the tags which denote the RIA features of these elements are imported wherever they are appropriate.

 Requirements to Process

Create a process class for each «processing» use case and a process flow for a use case activity. The structure of the original activity is copied with exception of elements having a stereotype specially created for the requirements analysis.

Some further features like e.g. the link to the web page in the help menu or the about-box need no explanation. If you have questions, please write us an email!

Miscellanous

Configuration of MagicUWE

Please have a look in the MagicDrawHome/plugins/de.lmu.ifi.pst.uwe.MagicUWE/MagicUWE.properties file where you can adapt the behaviour of the plugin.

There you can configure:

  • the names of the UWE-Profile. First, MagicUWE searches for the UWE-Profile in the directory of the actual project. If this file does not exist, the one in the "profiles" directory of MagicDraw will be chosen.
  • shortcuts for all UWE-Toolbar entries
  • which presentation elements can be inserted as class or as property from the toolbar
  • if the UWE "new diagram" menu is displayed as submenu in the containment tree (default behaviour)
  • default RIA options
  • the default port for connecting to the SDE (Service Development Environment) server of the MagicUWE wrapper, which is waiting for the project file

Known bugs

  • If you create a new diagram while drawing an association from the MagicUWE toolbar, an error will be shown and you should click "undo last action". This is a bug from MagicDraw-OpenAPI, not from the plugin itself. Model inconsistency dialogue
  • Properties can sometimes be drawn in another class/property than that one which was selected. If you do that anyhow, the new class will be created and added to the properties of the previously selected class, but not drawn anywhere.
    Property-drawing error
  • After the insertion of an access primitive, the undo function of MagicDraw does not work properly. The original association is deleted from the diagram, but can still be found in the containment tree.