The Package Diagram
A package diagram enables organization of modeling elements, in order to partition the work involved in specification and development.
An element should only appear in a single package.
Dividing into packages is generally carried out so as to minimize interactions between different packages.
Example of a package diagram
The "HBC" package contains the "Commercial IS" and "Production Management" packages.
The "Production Management" package can be divided into two packages, "Digital Control" and "Alarm System".
The "Commercial IS" package contains the "Prospect", "Client", "Company", "Person", "Order", and "Product" classes.
Creating a Package Diagram
A package diagram is created from a package.
To create Packages diagram with HOPEX IT Architecture from Design (UML) navigation pane:
1. In the navigation pane, select OO Implementation (UML).
2. In the edit area window, click the Packages tile.
3. Display all packages.
4. Right-click the name of the package concerned and select New > Package Diagram.
The diagram opens in the edit window.
Defining Packages
A package partitions the domain studied and the associated work. It enables grouping of various elements, in particular use cases and classes. A package can also contain other packages. Packages are interconnected through contractual reports defining their interface.
Examples of packages:
The commercial information system.
Accounting.
Production management.
Digital control of a machine.
Inventory management.
Alarm system and telephone management.
To add in the diagram an existing package:
1. In the package diagram, click the Package button in the object toolbar, then click the workspace.
2. In the Add Package dialog box, select List in the drop-down list box using the arrow.
The list of packages appears:
3. Select the desired package and click OK.
The name of the diagram appears in the Add UML Package dialog box.
4. Click Add.
The package appears in the diagram.
Defining Classes
The package diagram can be used to place classes in different packages.
To quickly add a set of classes to the package diagram:
1. Click Main Menu > Advanced Search to open the search assistant.
2. In the wizard, select the "Class" metaclass and click Query
The list of repository classes appears.
3. Select the classes you want and drop them in the diagram.
Specifying Dependencies in a Package Diagram
Links allow you to indicate if a package contains or references a class or another package.
To indicate that a package references a class or another package:
1. Click the button.
2. Then carry out the link from a package to the package or class that it references.
A dialog box asks you the type of link to be created.
3. Select "Referenced package" or "Referenced class" as required.