How to Organize Diagrams with Package?

At the beginning of the project, you only have a limited number of diagrams and everything is simple and beautiful. However, when time flies, more and more diagrams have been created and they start to become unmanageable. As a result, your project become hard to navigate and diagrams become difficult to locate when you want to review or make changes.

July 29, 2014
User Rating: / 61
Views: 139,946
PDF Link Add comments
Edition: Community or above (Edition comparison)

00 intro

How can we fix it up? We can make use of the Package Diagram to organize your diagrams into different packages. This helps you in categorizing your diagrams according to their natures, making them easier to be navigated and located. The Package Diagram also serves as a catalog for you to jump to the diagram that you want to look at. In this tutorial, we will show you how this can be done.

Create Packages for your diagrams

First, we need to have our packages ready. To create packages:

  1. Go to Application Tool Bar > UML > Package Diagram.
    01 create package diagram base
  2. Name the package diagram as Racing Game Packages.
    02 rename package diagram
  3. Click the Package button in diagram tool bar, then click on the blank area of the diagram to create the package.
    03 create package
  4. Name the package as Race.
    04 rename package
  5. Repeat the steps to create other packages, namely, Tuning, Security and General respectively.
    05 finish create package

Organize diagrams with Packages

Once the packages are ready, we can then start to organize our diagrams.

  1. Click on the Race package to bring up the sub-diagram resource icon.
    diagram resources
  2. Click on the resource icon, then select Existing Diagrams... from the popup menu.
    07 add existing diagram
  3. Select the following diagrams in the Add Sub Diagrams dialog, then Press OK to commit.
    1. [Class Diagram] Race Tracks
    2. [Class Diagram] Race Type
    3. [Class Diagram] Racing Game
    4. [Sequence Diagram] Register to race
    5. [Communication Diagram] Register to race - Communications
    6. [State Machine Diagram] Race Series State
    7. [Activity Diagram] Register to race
    8. [Entity Relationship Diagram] Player Race
    9. [Entity Relationship Diagram] Race Series
    10. [Entity Relationship Diagram] Racing Game

    08 add diagram
  4. Repeat the steps for the following packages and diagrams
    Package Diagram
    Tuning [Class Diagram] Tuning
    [State Machine Diagram] Car State
    [Entity Relationship Diagram] Cars
    Security [Sequence Diagram] Game Service Login
    [Sequence Diagram] Purchase Add-ons (fail)
    [Sequence Diagram] Purchase Add-ons (success)
    [Sequence Diagram] Racing Game Login
    [Business Process Diagram] Purchase Add-ons
    General [Use Case Diagram] Racing Game Use Cases
    [Component Diagram] Game Components
    [Deployment Diagram] Game Deployment
    [Requirement Diagram] General Requirements
    [Matrix Diagram] Classes Matrix
    [Matrix Diagram] Entity Matrix
    [Matrix Diagram] Process Matrix
    [Analysis Diagram] Player Analysis Diagram

Define relationships between packages

Now, since our diagrams are being structured with packages, we can define the relationships among them. To create relationships between packages:

  1. Click on the Race package to show up its resource icons.
  2. Drag out the Dependency -> Package icon and drop it over the Security package.
    09 define relationship
  3. Repeat the steps to create dependency from Tuning to Security and also from Security to General.
    10 relationship result

Navigate between packages and contained diagrams

The Package Diagram can act as a starting point for you to navigate within your project. To navigate from one diagram to another:

  1. Click on the package to bring up the resource icons, say the Race.
  2. Click on the sub-diagram resource icons. This will bring up a list of sub-diagrams under the Race package.
    diagram popup
  3. Locate the diagram from the popup menu, say the Racing Game class diagram and then click on it.
    12 open subdiagram
  4. You are now being brought to the Racing Game class diagram.
  5. You can go back to the package by clicking the link at the top left corner of the diagram.
    13 go back to parent

Publish a project to HTML with Package Diagram as the navigation map

This kind of handy navigation is not limited to within the application. You can also have it inside the published HTML website. To publish your project into a HTML website:

  1. Save your project by pressing the Save button at the Application Toolbar.
    14 save
  2. Go to Doc > Project Publisher... in Application Toolbar.
    15 publish
  3. Enter the output location for the publisher in the Output directory field.
    16 output path
  4. Press the Advanced Options... button to bring up the advanced settings.
    17 adv options
  5. Select index.html (without menu) in the Generate menu combo box.
    18 no menu
  6. Select Open subdiagrams in Drill down effect for general models.
    19 drill down
  7. Choose Select a diagram in the Default diagram combo box.
    20 select default
  8. Pick the Racing Game Packages and press OK.
    21 select default diagram
  9. Press OK to close the Advanced Options dialog and press OK again in the Project Publisher dialog to start publishing.
    22 publishing
  10. Press OK when publishing is completed. This will launch the browser and with the Racing Game Packages diagram showing.
    23 publish complete
  11. You can click on the package to bring up the popup menu to jump to the sub-diagram, say the Racing Game class diagram.
    24 published result
  12. And in the sub-diagram you can always go back to the parent package by clicking the link at the top of the page.
    25 published site navigation

Download Sample Project

You can download the sample project to walk through this tutorial.

Watch this Tutorial on YouTube

Here is the video version of this tutorial.

Related Links

  1. More about Package Diagram
  2. Publish project as web content
  3. Sub-diagram vs Reference diagram

Rate this Article

Click on one of the stars below to rate this article from 1 (lowest) to 5 (highest).

You may be interested in

  1. Data Flow Diagram (DFD) Tutorial
  2. Writing Effective Use Case
  3. Share Design, Discuss Design with PostMania
    Tagged:
  4. Draw Entity Relationship Diagram (ERD)
    Tagged:
  5. Generate Class Diagram from Entity Relationship Diagram (ERD)
    Tagged:
Tags of this article:

Comments (11)

written by tina on November 15, 2010

i have three packages"geometry, extent and relations". now i want to use these packages inside one package.. so i added all three packages inside a package but it do't make relation between them.. kindly help me in this regard..

written by tina on November 15, 2010

kindly provide a forums link in this website so that people can ask any question related to UML design and also provide chat room related to UML so that people can discuss there points and infact clear their problems..

written by Trevor Rose on June 9, 2011

This tutorial isn't all that useful, for the particular reason that it describes how to do something, without even remotely touching on WHY we are doing it and WHAT the result or influence of our actions are... if this is a typical example of your tutorials, then they are of little use to anyone, and you might as well remove them if you arent going to do them properly... they certainly wont be positively influencing your sales in any way i can guarantee you that (as someone who has sold software)

written by Jick Yeung on July 7, 2011

Hi Trevor Rose,

Thank you for your opinion. We have rewritten this page. The information is now more relevant. We will also review and correct the other pages.

Best regards,
Jick Yeung

written by Alex on September 22, 2011

Hi, why don't you consider doing short videos. I have gone through the tutorial above, twice now and can't see the point. In fact the software looks cumbersome the way it is presented, ie no clear drag and drop pallet. I am sure it is, but it just does not come across well

written by Jick Yeung on September 30, 2011

Dear Alex,

Thank you for your suggestion. We have prepared a video for this tutorial. Please watch at:
http://www.youtube.com/user/VisualParadigm?feature=mhee#p/a/u/0/BgvwzJnUt4A

Best regards,
Jick Yeung

written by Nynat on October 25, 2012

Thanks
However, please include another basic step in this tutorial by adding the attributes of the classes, thou the tutorial centers around packaging classes, but you can better package it you know the characteristic of what you are packaging.

Two packages: set A=three elements and B= 1element, with out attributes, thou it is implement.

written by arpit & shivam on July 1, 2014

we r hopping a lot but we r nt satisfy yet.........

written by Angus Chan on July 2, 2014

Thanks for your comment. We will do my best to improve the quality.

written by Angus Chan on July 2, 2014

Thanks for your comment. We will do my best to improve the quality.

written by ilhyung cho on September 30, 2014

How can you display components within a package in the package diagram? For example, if package A contains package X and Y, is there a way to show X and Y in package A?

Write comment

Rating

Comment

Enter the calculation result

security code