Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WACADEMY and version 24.0

First, you will update the use case diagrams to consider the new functionality of the Web service.

Linking a Use Case to a Use Case Diagram

You already drew a more detailed use case diagram for the first use case Define Title in lesson 1. Now, you will link the use case Define Title to this use case diagram Define a Title. This facilitates navigating through the model and makes complex models easier to understand.

Image Modified

In the containment tree, navigate to the use case diagram Product Query Overview in the package Data / Overview / Use Cases, and double-click it to open it.

Right-click the tab of Product Query Overview and select Close All Tabs But Current. This will close all open diagrams except the use case diagram Product Query Overview.

Select the use case Define Title with the right mouse button and choose Specification from the context menu as shown below.

Image Modified

The UseCase Specification dialog opens. Select the entry Documentation / Hyperlinks in the left panel.

Image Modified

Click Add to insert a hyperlink.

Image Modified

Change to the tab Element/Symbol to select a UML diagram.

Image Modified

To choose a diagram of your UML model, click the button ....

Image Modified

The containment tree with a collection of UML models is listed.

Image Modified

Select the use case diagram Define a Title.

Click OK.

Image Modified

The path of the selected diagram is displayed in the field Select element/symbol or paste element URL.

Click OK.

Image Modified

The hyperlink to the use case diagram Define a Title is set.

Click Close.

When selecting a UML element, it shows the symbol  to add a hyperlink. If a hyperlink has been added to a use case symbol, the icon of the target diagram  will be embedded in the UML symbol (if the UML element has not the focus). The use case Define Title is linked to use case diagram Define a Title now.  Whenever you double-click a UML element having defined a hyperlink, the linked diagram will open:

Note
iconfalse

After changing any element in MagicDraw, the color of its corresponding entry in the containment tree will change to blue. When you save the model, the color will turn to black again.

Double-click the use case Define Title either on the diagram pane or in the containment tree in the package Data / Overview / Use Cases. The linked use case diagram opens:

Extending Use Case Diagram "Product Query Overview"

You now will extend the use case diagram Product Query Overview considering the additional functionality of the Web service.

Image Modified

In order to draw another use case, you will use a different technique. Select the Use Case symbol from the diagram toolbar, place it on the diagram pane, and start immediately typing the name Insert Product Data into List. Then, press Enter to finish entering the use case name.

Rearrange the UML elements on the diagram pane as shown below:

Draw an association between the actor Consumer and the use case Insert Product Data into List.

Save  the UML model.

Creating Use Case Diagram "Insert Product Data into List"

Select the package Data / Overview / Use Cases with the right mouse button and create a new package as shown below:

Image Modified 

Assign the name Insert Product Data Service.

Select the package Insert Product Data Service with the right mouse button and create a new use case diagram as shown below:

 Image Modified

Name the use case diagram Insert Product Data into List.

You will now add the actor and the use cases to the new use case diagram Insert Product Data into List. Reuse the actor Consumer from package Data / Overview / Use Cases.

Image Modified

Drag and drop the actor Consumer onto the use case diagram Insert Product Data into List in the diagram pane.

Image Modified
Draw the detailed use case diagram for lesson 2 by choosing the appropriate icons from the diagram toolbar.

Draw a use case and name it Insert Product Data into List.

Add the use cases Enter Product Data and View Product Data.

Draw an Association between the actor Consumer and the use case Insert Product Data into List.

Draw Include relations between the use case Insert Product Data into List and the other use cases.

Linking UML Elements via Drag & Drop

Linking UML Elements is also possible via drag & drop. You will now link the new use case diagram Insert Product Data into List to the corresponding use case in the overview diagram Product Query Overview.

Switch to the diagram Product Query Overview.

Image Modified

You will now use a different technique to link diagrams. In the containment tree, navigate to the use case diagram Insert Product Data into List.

Image Modified

Drag the diagram element from the containment tree to the use case Insert Product Data into List on the diagram pane until the UML element gets surrounded by a blue rectangle. Release the mouse button.

Image Modified

The use case Insert Product Data into List now is linked to use case diagram Insert Product Data into List and shows the icon Image Modified.

Save  the UML model.

moveon
Panel
Link

Image Added

Building a New Service Structure MD18

LinkTextBuilding a New Service Structure OtpFloatingfalse
Panel
titleOn this Page:

Table of Contents