Vous êtes sur la page 1sur 172

IBM Holosofx Workbench

UML Modeler
IBM
User Guide
Version 4.2.2
Note !
Before using this information and the products it supports, be sure to read the general information
under Notices and Trademarks on page 163.

Fourth Edition (December 2002)


This edition applies to Version 4, Release 2, Modification 2 of IBM Holosofx Modeler and Monitor
products (5724D40) and to all subsequent releases and modifications until otherwise indicated in new
editions.

IBM welcomes your comments. You can send to the following address:

Cairo Technology Development Center (CTDC)


Business Integration Product Development
IBM WTC Egypt Branch
Pyramids Heights Office Park, Building C10
Cairo Alexandria Desert Road, km. 22
P.O. Box 166 El-Ahram, Giza, Egypt

Include the title and order number of this book, and the page number or topic related to your comment.
When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the
information in any way it believes appropriate without incurring any obligation to you.

Copyright International Business Machines Corporation 2002. All rights reserved.


US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP
Schedule Contract with IBM Corp.
Contents

About This Guide ........................................... 1 Moving One Element: ......................25


Related Guides .............................................. 1 Moving More than One Element: ....25
Getting Started with UML Modeler ............... 3
Copying (or Cutting) and Pasting One or
Installing & Launching UML Modeler ............... 5 More Elements Within Diagram, or from
Getting Around in UML Modeler ...................... 6 One Diagram to Another ......................25
UML Modeler Main Window ............................ 7 Removing Elements from a Diagram ... 26
The Browser ................................................ 8 The Text Box ........................................26
Adding Items in the Browser .................. 9 The Note ...............................................27
Removing Items from the Browser ........ 9 The Group ............................................28
The Work Space area .................................. 9 Creating a Group Element ..............28
The Documentation Pane ............................ 9 Modifying .........................................28
UML Modeler Toolbars .................................. 10 Connecting a Note to a Diagram Element
Standard Toolbar ....................................... 10 29
Shape Style Toolbar .................................. 11 Organizing Items in a Diagram ...................29

Diagram View Toolbar ............................... 11 Layout feature ......................................30

Formatting Toolbar .................................... 12 Printing Diagrams .......................................30


Diagram Construction Toolbars ................. 13 Controlling The Diagrams Options .................33

Common Buttons in the Construction Options dialog box .....................................33


Toolbar ................................................. 14 Template Setting dialog box .................34
Other Buttons in the Construction Toolbars Activate Shapes Tab ....................... 34
14 Shape Default Tab ..........................34
Working with Fonts .................................... 15 Rules Tab ........................................35
Working with Colors ................................... 15 Text Tab .......................................... 36
UML Modeler Menus ..................................... 17 Working with Options Dialog Box ...............38
The File Menu ............................................ 17 Adding a Template ...............................38
The Edit Menu ........................................... 18 Modifying a Template ...........................39
The View Menu .......................................... 19 Modifying the Template Name and
The Help Menu .......................................... 20 Background Color ...........................39
UML Modeler Diagrams ................................. 21 Modifying the Object's Color, Pattern,
Diagram Tabs ............................................ 21 Line Style, and Size ........................39
Creating New Diagrams ............................ 22 Modifying the Object's In Shapes and
Out Shapes, and Object's In Sides and
Deleting Diagrams ..................................... 23 Out Sides ........................................40
Commonly Used Functions in Diagrams ... 24 Modifying the Object's Text Position(s)
Adding Diagram Elements ................... 24 40
Removing Diagram Elements .............. 24 Setting a Template as Default Template41
Moving One or More Elements to a Apply Template Settings to Current
Different Location Within a Diagram ... 25 diagram ................................................ 41

Copyright IBM Corp. 2002 I


Deleting a Template ............................. 42 Case ................................................ 67
Organizing Model Elements: Packages ......... 43 Viewing Diagrams Defined Under a Use
Adding Packages ....................................... 43 Case ................................................ 67

Deleting Packages ..................................... 44 Instances tab ........................................68

Working with UML Models ............................. 45 Sub Diagrams Tab ...............................69


Creating New Models ................................ 45 Actors ............................................................. 70

Opening Current Models ........................... 45 Adding Actors .............................................70

Saving Models ........................................... 46 Adding a New Actor to a Use Case Diagram


70
Exporting and Importing Models ................ 47
Adding an Existing Actor to a Use Case
Exporting/Importing a UML Model to/from Diagram ................................................ 71
Rational Rose ...................................... 48
Adding an Actor to the Browser ............71
Exporting/Importing UML Model to/from
XML Format ......................................... 49 The Actors Properties Dialog Box .............71
Exporting/Importing UML Activity Diagram Opening the Actors Properties Dialog Box
to/from IBM Holosofx Workbench Process 71
51 General tab ...........................................72
Exporting/Importing UML Use Case Naming Actors .................................72
diagram to/from IBM Holosofx Workbench Deleting Actors ................................73
Process Diagram ................................. 54
Adding Actor Description .................73
Exporting Sequence Diagram to Rules
XML ..................................................... 57 Assigning an Actor Stereotype ........73
Use Case Diagrams ..................................... 59 Creating Abstract, Singlton, Visible,
Persistent, and Transient Actors ..... 73
Creating and Opening Use Case Diagrams .. 60
Instances Tab .......................................74
Creating a New Use Case Diagram .......... 60
Sub Diagrams Tab ...............................75
Opening an Existing Use Case Diagram ... 60
Relationships ..................................................76
Working with Elements in Use Case Diagrams 61
Adding Relationships .................................76
Use Case Diagram Toolbar ....................... 61
Deleting relationships .................................76
Adding/Removing Elements to/from an
Existing Use Case Diagram ...................... 61 Opening the Relationship Properties Dialog
Box ............................................................76
Use Cases ..................................................... 63
Naming Relationships ..........................78
Adding Use Cases ..................................... 63
Assigning Stereotypes to a Relationship 78
Adding a New Use Case to a Use Case
Diagram ............................................... 63 Generalization Relationships Among Actors 78

Adding an Existing Use Case to a Use Use Cases Relationships ...........................78


Case Diagram ...................................... 63 Uses Relationship ................................79
Adding a Use Case to the Browser ...... 63 Extends Relationship ............................79
The Use Case Properties Dialog Box ........ 64 Communicates Relationship .................79
General Tab ......................................... 64 Roles ..........................................................80
Naming a Use Case ........................ 65 Naming Roles .......................................80
Adding a Use Case Description ...... 65 Aggregations ........................................81
Assigning a Use Case Stereotype .. 65 Setting Cardinality ................................81
Diagrams tab ....................................... 65 Adding Documentation .........................82
Adding a Diagram Under a Use Case 66 Interaction Diagrams ...................................83
Deleting Diagrams Defined Under a Use The Interaction Diagram Toolbars ..................84

II IBM Holosofx Workbench - XForm Designer - User Guide


Creating an Interaction Diagram .................... 85 Setting the Attribute Data Type ..........104
Creating a New Interaction Diagram ......... 85 Setting the Attribute Stereotype .........105
Opening an Existing Interaction Diagram .. 85 Setting the Attribute Initial Value ........ 105
Working with Objects ..................................... 86 Setting the Attribute Scope .................105
Object Properties ....................................... 86 Making an Attribute Static ..................106
Naming an Object ...................................... 87 Viewing Class Attributes ..........................106
Mapping an Object to a Class ................... 87 Class Properties / Operations Tab ...............107
Setting Object Persistence ........................ 88 Adding Operations ...................................107
Working with Messages ................................. 89 Deleting Operations .................................108
Adding Messages to an Interaction Diagram 89 Operation Properties ................................108
Adding Conditional Messages to an Setting the Operation Return Type .....108
Interaction Diagram ................................... 89 Setting the Operation Stereotype .......109
Deleting Messages in an Interaction Diagram Setting the Operation Scope .............. 110
90
Specifying the Operation Pre Conditions .
Message Properties ................................... 90 110
Naming Messages ..................................... 91 Specifying the Operation PostConditions .
Adding Documentation to a Message ........ 91 111
Setting Message Synchronization Options 92 Class Properties/Operations Arguments Tab 112
Setting Message Frequency ................ 92 Adding and Deleting Arguments to an
Mapping a Message to an Operation ........ 93 Operation .................................................113

Class Diagrams ............................................ 95 Setting Arguments Properties of an Operation


113
The Class Diagram Toolbar ........................... 96
Class Properties / Instance Tab ...................115
Classes .......................................................... 97
Class Properties / Sub Diagrams Tab ..........116
Adding Classes .......................................... 97
Relationships ................................................117
Adding a New Class to a Class Diagram97
Adding Relationships ...............................117
Adding an Existing Class to a Class
Diagram ............................................... 97 Deleting Relationships .............................118

Adding a Class to the Browser ............ 98 Assigning Stereotypes to Association


Relationship .............................................118
Deleting Classes ........................................ 98
Setting the Association Properties ...........119
Defining Class Properties .............................. 99
Naming Roles .....................................119
Class Properties / Classes Tab ................... 100
Adding Role Documentation ...............120
Naming a Class ....................................... 100
Setting Navigability .............................120
Class Stereotypes ................................... 101
Setting Containment ........................... 120
Assigning a Class Stereotype ............ 101
Setting Multiplicity/Cardinality .............121
Creating Persistent Classes .................... 101
Setting Generalizations Properties ...........122
Creating Singlton Classes ....................... 102
Setting Visible Classes in Generalization
Creating Visible Classes .......................... 102 Relationships ......................................122
Creating an Abstract Class (General/ASV) 102 State Machine Model .................................. 123
Class Properties / Attributes Tab ................. 103 State Machine Model Diagrams ...................124
Adding Attributes ..................................... 103 Defining a State Machine Model Diagram ....125
Deleting Attributes ................................... 104 The State Machine Model Diagrams Toolbars126
Attribute Properties .................................. 104 State Machine Model Diagrams Elements ...128

Copyright IBM Corp. 2002 III


Working with the State Machine Model Diagrams The Component Properties Dialog Box ....154
129 General Tab .......................................155
Working with Diagram Elements ............. 129 Implements Tab .................................. 156
Activity / State Properties Dialog Box ...... 129 Setting Dependencies Between Component
General Tab....................................... 130 Diagram Object .......................................157
Transitions Tab .................................. 131 Glossary ......................................................159
Actions Tab ........................................ 132 Notices and Trademarks ........................... 163
Actions Details Dialog Box ............ 133
Transition Specification Dialog Box ......... 134
General Tab ....................................... 135
Detail Tab .......................................... 136
Decision Properties Dialog Box ............... 137
General Tab ....................................... 137
Transitions Tab .................................. 138
Swimlane Specification Dialog Box ......... 139
Synchronization Properties Dialog Box ... 140
Dialog Tab ......................................... 140
Transitions Tab .................................. 142
Object Instance Specification Dialog Box . 142
General Tab ....................................... 143
Incoming / Outgoing Object Flows Tabs ..
144
Object Flow Properties Dialog Box .......... 145
Component Diagrams ................................ 147
The Component Diagram Objects ............... 148
Component Package ............................... 148
Component .............................................. 148
Component Stereotype ...................... 148
The Dependency Relationship ................ 148
The Component Diagram Toolbar ............... 149
Working With the Component Diagrams ..... 150
Creating and Opening Component Diagrams
150
Creating a New Component Diagram 150
Opening an Existing Component Diagram
150
Adding Elements to a Component Diagram 151
Working with Diagram Elements ............. 151
The Component Package Properties Dialog
Box .......................................................... 151
General Tab ....................................... 152
Diagrams Tab .................................... 153

IV IBM Holosofx Workbench - XForm Designer - User Guide


About This Guide
This guide introduces the IBM Holosofx Workbench - UML Modeler and its environment
and shows you how to use it to create UML design to your business applications.

Chapter 1: Getting Started with UML Modeler shows you how to install and launch the UML
Modeler as a stand-alone application; and introduces the main windows, toolbars, and
diagrams of UML Modeler. It also shows you how to organize model elements in packages
and provide general guidelines on how to work with UML Modeler.

Chapter 2: Use Case Diagrams shows you how to create and open Use Case diagrams and
work with their elements: Use Cases, Actors, and Relationships.

Chapter 3: Interaction Diagrams introduces the two types of Interaction Diagrams:


Sequence Diagrams and Collaboration Diagrams and shows you how to use the Interaction
Diagram Toolbars to create their main elements: Objects and Messages.

Chapter 4: Class Diagrams shows you how to use the Class Diagram Toolbar to create their
main elements: Classes and Relationships and how to use the Class Properties dialog box
define the Class properties.

Chapter 5: State Machine Model introduces the two types of diagrams: Activity Diagrams
and State Diagrams and shows you how to work with their elements.

Chapter 6: Component Diagrams shows you how to create and open Component diagrams
and work with their elements: Subprogram, Package, Task, and Database

Glossary: Includes detailed definitions of the terms mentioned in this guide.

Related Guides
User Guide provides a general introduction to IBM Holosofx Workbench, a description of
the contents of the Repository, and information about how to customize the IBM
Holosofx Workbench application.
Modeling Guide provides information about the objects used to create Process Models
and how to handle specific situations in a Process Model.
Analysis Guide provides information about how to perform Case, Weighted Average,
and Simulation Analysis.
Reporting Guide provides information about how to generate and use the many tables,
charts, and reports produced from analysis of IBM Holosofx Workbench Processes.
Tutorial provides a hands-on practice session that will familiarize you with the basic
components of IBM Holosofx Workbench and how to use the software for BPR. The
Tutorial takes approximately four to six hours to complete.

Copyright IBM Corp. 2002 1


Integration Guide provides documentation for capturing and exporting additional
modeling data that can be used by the workflow products that IBM Holosofx Workbench
supports.

2 IBM Holosofx Workbench - UML Modeler - User Guide


Chapter 1: Getting Started with UML
Modeler

The purpose of modeling using IBM Holosofx Workbench - UML Modeler is to


specify, visualize, and document your business application artifacts.
Modeling consolidates better understanding of requirements and provide you
with a clear picture of the system so that applying changes to existing systems,
or designing and building new ones, will present a much more pleasant
experience.
Before writing any code for an object-oriented system, having a sound analysis
and design model is very important in setting the fundamental architecture upon
which the system can be developed.
From an analysis perspective, UML Modeler enables you to design use cases
and develop use case diagrams. The use case diagrams will describe the
functionality of the systems as well as interactions with the users.
From a design perspective, UML Modeler enables you to create Interaction
diagrams to describe how objects interact together, and Class diagrams to
visually represent the objects in a system and how they relate to each other.
Having a documented design, developers can undertake brainstorming
sessions to finalize the design and to prepare for coding. Developers will have a
clear idea of who is responsible for what and how all their work will integrate.
Modeling is a process. During the modeling process you map business needs
or requirements to the model, and vice versa, in a clear and subtle fashion.
The UML Modeler Diagrams graphically depict the information in the model
using a set of graphical elements. Having such diagrams, all team members
and project participants can fully understand the aspects of interest to them, for
example:
System Analysts will be able to see how objects interact with each other.
They may look at the use case documentation to see what functionality the
system will provide.
Business users will be able to visualize the interactions between
themselves and the system. They may use the Use Case diagrams to get
a high-level conceptual view of the system and project scope, to look at
the use case documentation, and to see what functionality the system will
provide.
Developers will be able to understand what each object is intended to
accomplish.They may look at Sequence and Collaboration diagrams to
see the objects in the system, the messages among the objects, and how
the logic in the system will flow.

Copyright IBM Corp. 2002 3


Testers can see the interactions and develop test scripts based on these
interactions.
Project managers can have a solid view of all the parts of the system and
how they interact. They may use the Use Case diagrams and
documentation to break the project down into manageable pieces.
Executives can see how the systems in their enterprise interact with one
another.
Technical writers will look at the use case documentation to begin to write
the user manuals and other materials.
Quality assurance staff will use the use case documentation and the
Sequence and Collaboration diagrams to get the information they need for
testing scripts.
The whole team will use the model to ensure that the requirements are met
in the code, and that the code can be traced back to the requirements.
In conclusion, UML Modeler is a tool designed to be used by the entire project
team. It is a repository of analysis and design resources that each team
member can use to get the information he/she needs.

4 IBM Holosofx Workbench - UML Modeler - User Guide


1.1 Installing & Launching UML
Modeler
To install the UML Modeler on your computer, you have to install IBM Holosofx
Workbench. Installing IBM Holosofx Workbench automatically includes the UML
Modeler. For any questions you may have regarding the minimum system
requirements or installation procedure for IBM Holosofx Workbench, refer to the
IBM Holosofx Workbench manual entitled Getting Started.
To launch the UML Modeler:
1. Click the Start button in your Windows taskbar.

2. Select the Programs menu item. A sub-menu is displayed.

3. Select IBM Holosofx Workbench.

4. Select UML Modeler from the IBM Holosofx Workbench sub-


menu. The UML Modeler opens.

Copyright IBM Corp. 2002 5


1.2 Getting Around in UML Modeler
In the next few sections of this chapter, well describe each part of the UML
Modeler interface.
UML Modeler is largely a menu-driven application, with toolbars to help with
commonly used features. UML Modeler supports different types of UML
diagrams:
Use Case diagrams.
Class diagrams.
Sequence diagrams.
Collaboration diagrams.
Component diagrams.
State diagrams.
Activity diagrams.

6 IBM Holosofx Workbench - UML Modeler - User Guide


1.3 UML Modeler Main Window

The UML Modeler window consists of the menu bar, toolbars, Browser pane,
Work Space area, and Documentation pane. The table below lists the main
purpose of each of them.

User Interface Part Description Purpose


Menu Bar Consists of the main and standard Group and display lists of the
windows menu items most common commands.

Browser Tree structure of model elements Quick organization and


(UML objects & diagrams) and navigation of model elements
folder-like Containers (Packages) and their containers (Packages).

Work Space Visual environment for creating, Create and edit UML objects and
defining, and linking UML objects diagrams.

Documentation pane Visual environment for viewing the View the documentation
documentation associated with associated with a selected UML
UML objects object in the Browser pane.

Toolbars Consists of the Standard toolbar Quick access to commonly used


and the Work Space area toolbars commands
(Borders & Shading, Formatting,
Diagram Viewer, and Diagram
Construction toolbars)

Copyright IBM Corp. 2002 7


The Browser appears in the left upper portion of the UML Modeler window, the
Documentation window appears in the left bottom portion of the window, and
the Work Space appears in the right portion. It is possible to have more than
one window opened in the Work Space at the same time. Each opened Work
Space window is represented by its own tab to allow easy navigation through
the windows.

1.3.1 The Browser


The Browser is a hierarchical structure that you can use to easily navigate
through a model. When you add elements to the model, such as Actors, Use
Cases, and Classes, they appear in the Browser.
One of the easiest ways to go through the content of your model is to use the
Browser. With the Browser, you can quickly and easily get to the diagrams and
other elements in the model.
Using the Browser, you can:
Add model elements (Use Cases, Actors, Classes, diagrams, etc.).
View existing model elements.
View the hierarchical structure of the elements in your model.
Rename your model elements.
Add model elements to your diagram.
Group your model elements into packages.
Open a diagram and switch between diagrams.
Using the Browser, you can edit, or add new elements. By right-clicking an
element in the Browser, you can delete or rename it.
As the Browser is organized in a tree-view style, each model element may
contain other elements beneath it in the hierarchy.
By default, the Browser will appear in the upper-left area of the screen. You can
move the Browser to another location, dock the Browser, or hide it altogether.
To move the Browser:
1. Click to select the upper border of the Browser window.
2. Drag the Browser from its current location, and then drop it where you
want.
To dock the Browser:
1. Click to select the upper border of the Browser window.
2. Drag the Browser widow to either the Left or bottom border in UML
Modeler. The Browser will be docked in the place you want.
To show or hide the Browser:
1. Select View > Browser to show or hide the Browser.

8 IBM Holosofx Workbench - UML Modeler - User Guide


1.3.1.1 Adding Items in the Browser
1. Right-click an existing package or the Root package in the Browser. A
shortcut menu appears.

2. Select New from the shortcut menu. A sub-menu will be expanded


displaying options you may choose from.
3. Select the type of element you want to add.

1.3.1.2 Removing Items from the Browser


1. Right-click an element in the Browser.
2. Select Delete in the shortcut menu.The element is deleted.

1.3.2 The Work Space area


In the Work Space area, you can view one or more of the UML diagrams in your
model. You mainly use the Work Space window to create and edit UML objects
and diagrams. As you make changes to elements in a diagram, UML Modeler
automatically updates the Browser as necessary. Similarly, when you make
changes to an element using the Browser, UML Modeler automatically updates
the appropriate diagrams. By doing so, UML Modeler helps you maintain a
consistent model.

1.3.3 The Documentation Pane


In the Documentation pane, you can view the documentation associated with
the UML object in the model. To view the documentation of a UML object, you
need to locate this object in the Browser and select it.

Copyright IBM Corp. 2002 9


1.4 UML Modeler Toolbars
UML Modeler offers you a number of toolbars: The Standard toolbar; the
Shape Style; Formatting; Diagram Viewer; and Diagram Construction
toolbars for the Work Space window. The toolbars are available to you at all
times. They contain options that you can select in any diagram. The only
exception is the Diagram Construction toolbar, which changes for each type of
UML diagram. The Diagram Construction toolbar is also the only toolbar
appearing vertically, the others appear horizontally.

1.4.1 Standard Toolbar

The Standard toolbar is the only toolbar in the UML Modeler window. The
descriptions of its buttons are given below.

Icon Button Purpose


New Creates a new model

Opens Opens an existing model (.umm) file

Save Saves the model (.umm) file

New Creates a new Diagram in the model


Diagram

Copy Copies text to the clipboard

Paste Pastes text from the clipboard

Print Prints one or more diagrams from the current


Diagrams model

Help Opens the help file

10 IBM Holosofx Workbench - UML Modeler - User Guide


1.4.2 Shape Style Toolbar

The Shape Style toolbar appears in the Work Space in all UML Modeler
diagram windows. It is the leftmost horizontal toolbar in the Work Space. The
toolbar is activated only when a diagram element is selected. A description of
the toolbar buttons is given below.

Icon Button Purpose


Fill Color Adds, modifies, or removes the fill color from the selected
element.

Pattern Selects the background pattern

Background Selects the background color. To change the colors, click new
Color colors in the Foreground and Background boxes.Select the
background color you want for the pattern

Line Style Selects line style and thickness for the selected element.

Line Color Toggles the color of the outline of the selected Class, Package,
or Object image. Each click of the button changes the color to
the next in a sequence of 16

Shadow Toggles a shadow effect, on and off, for the selected Class,
Package, or Object image

1.4.3 Diagram View Toolbar

Copyright IBM Corp. 2002 11


The Diagram View toolbar appears in the Work Space in all diagram windows. It
is the second horizontal toolbar in the Work Space. A description of the toolbar
buttons is given below.

Icon Button/ Purpose


Box
Properties Opens the Properties dialog box for the
selected Class or Object.

Birds Eye Opens the Birds Eye View window, which


View shows a highly reduced-scale version of the
diagram in the active window.

Grid Toggles a background grid on and off in the


active window.

Zoom In Increases the scale of the diagram to the next


level.

Zoom Out Decreases the scale of the diagram to the next


level.

Zoom Selects the level of magnification, between 30


and 450, for the active window

1.4.4 Formatting Toolbar

The Formatting toolbar appears in the Work Space in all diagram windows. It is
the third horizontal toolbar in the Work Space. The toolbar is activated only
when a diagram element is selected. A description of the toolbar buttons is
given below.

Icon Button/Box Purpose


Font Type Selects the Font Type for the selected text.

Font Size Selects the Font Size for the selected text. The
sizes in the Font Size selection box depend on the
selection in the Font Type selection box and the
active printer

12 IBM Holosofx Workbench - UML Modeler - User Guide


Text Color Changes the color for the selected text. Each click
of the button changes the color to the next in a
sequence of 16.

Align Left Aligns the selected text with the left margin

Align Center Aligns the selected text directly between the left and
right margins

Align Right Aligns the selected text with the right margin

Bold Toggles bold typeset on and off for the selected text

Italic Toggles italic typeset on and off for the selected text

Underline Toggles underline typeset on and off for the


selected text

1.4.5 Diagram Construction Toolbars


In UML Modeler, each diagram appears with its own Construction toolbar,
which appears vertically on the left side in the Work Space. This toolbar allows
you to create your diagram elements and connect them properly. The first five
buttons on the toolbar are common to all the diagrams; the remaining buttons
vary depending on the type of diagram in the window. Selecting a button in the
Construction toolbar changes the shape of the mouse cursor within the
diagram area: Descriptions of all the Construction toolbar buttons are given
below:

Copyright IBM Corp. 2002 13


1.4.5.1 Common Buttons in the Construction Toolbar

Icon Button Purpose


Selection Enables the mouse cursor to be used for selecting
objects in a diagram. In this mode, you can move items
by selecting and dragging them.

Text Box Enables the mouse cursor to be used for inserting a


Text Box element in a diagram.

Note Enables the mouse cursor to be used for inserting a


Note element in a diagram.

Anchor Note Connects a note to a diagram element.


to Item

Group Enables the mouse cursor to be used for inserting a


Group element in a diagram.

1.4.5.2 Other Buttons in the Construction Toolbars


Aside from the common tools that exist in all diagrams in UML Modeler, there
are tools that are specific to the type of diagram you are working on. These
tools are displayed in the table below and will be discussed in detail in the
following chapters of this guide.

14 IBM Holosofx Workbench - UML Modeler - User Guide


Construction Toolbars:
Common Class Use Collaboration Component State Activity
Toolbar Case and Sequence

1.4.6 Working with Fonts


For readability purposes, you may use the Formatting toolbar to change the
font and font size of any individual element on your diagram.
To set the font, style, or size of a diagram element:
1. Select the desired diagram element or elements.
2. Use the Formatting toolbar to select the desired font, style, or size.

1.4.7 Working with Colors


The UML Modeler allows you to change the line color and fill color for any
individual element using the Shape Style toolbar.
To change the line color of a diagram element:
1. Select the desired diagram element.
2. Use the Line Color selectioin list on the Shape Style toolbar to select
the desired line color.
To change the fill color of a diagram element:
1. Select the desired diagram element.
2. Use the Fill Color selection list on the Shape Style toolbar to select the
desired fill color.

Copyright IBM Corp. 2002 15


To add a shadow to a diagram element:
1. Select the desired diagram element.
2. Use the Shadow button on the Shape Style toolbar to cast shadow on
the selected diagram element.
To add a pattern to a diagram element shape:
1. Select the desired diagram element.
2. Use the Pattern selection list on the Shape Style toolbar to select the
desired pattern.
To change the color of the pattern of a diagram element shape:
1. Select the desired diagram element.
2. Use the Pattern Color selection list on the Shape Style toolbar to select
the desired pattern color.

16 IBM Holosofx Workbench - UML Modeler - User Guide


1.5 UML Modeler Menus
This section provides a short description of each menu in the UML Modeler.
There are a number of menus on the UML Modeler window menu bar: File,
Edit, View, and Help. The following sections describe the menu items
contained in these menus.

1.5.1 The File Menu

The File menu is concerned with the organization of the files containing UML
Modeler diagrams. These files have an extension of umm. The File menu
items are described below.

Menu Item Description


New Model Creates a new model

Open Model Opens an existing model. Pressing Ctrl+O also activates this item

Save Model Saves the current model. Pressing Ctrl+S also activates this item

Save Model Saves the current model with a new filename


As

New Diagram Creates a new diagram

Close Closes the active diagram


Diagram

Export Exports a UML Modeler file in any of the following formats:


(Sub menu) Rational Rose file
UML Modeler XML file
BPM Workbench XML file
Sequence diagram to Rules XML

Copyright IBM Corp. 2002 17


Import Imports any of the following file formats into UML Modeler:
(Sub menu) Rational Rose file
UML Modeler XML file
BPM Workbench XML file

Print Opens the Print dialog box, which allows you to print model diagrams.
Pressing Ctrl+P also activates this item

Print Preview Shows on the screen how a file will look like when you print it

Print Setup Selects options for printing diagrams

Recent Files Opens a recent model file

Exit Closes UML Modeler

1.5.2 The Edit Menu

The Edit menu is concerned with basic editing functions, and conforms to the
Windows standard. The Edit menu items are described below.

Menu Item Description


Undo Undoes the last action. Pressing Ctrl+Z also activates this item

Redo Redoes the last action. Pressing Ctrl+Y also activates this item

Cut Cuts the elements selected in the diagram (does not delete the
elements from the model, but only from the diagram). Pressing
Ctrl+X also activates this item

Copy Copies the elements selected in the diagram. Pressing Ctrl+C


also activates this item

Paste Pastes the previously cut or copied elements into the diagram.
Pressing Ctrl+V also activates this item

Delete Deletes the elements selected in the diagram (does not delete
the elements from the model, but only from the diagram)

18 IBM Holosofx Workbench - UML Modeler - User Guide


1.5.3 The View Menu

The View menu is concerned with the visual display of the UML Modeler
window plus a list of the opened diagrams. There are a number of items on the
View menu. These items are described in the following table:

Menu Item Description


Standard Toolbar Toggles the display of the Standard toolbar. If a check mark appears next to the
Standard Toolbar item on the View menu, then the toolbar is displayed. If no
check mark appears, then the toolbar is not displayed.

Status Bar Toggles the display of the status bar. If a check mark appears next to the Status
Bar item on the View menu, then the status bar is displayed. If no check mark
appears, then the status bar is not displayed.

Browser Toggles the display of the Browser. If a check mark appears next to the Browser
item on the View menu, then the Browser is displayed. If no check mark appears,
then the Browser is not displayed.

Drawing Shape Style Toggles the display of the Shape Style toolbar of the active diagram. If a check
Toolbars mark appears next to the Shape Style item on the View menu, then the Shape
Style toolbar is displayed. If no check mark appears, then the Shape Style toolbar
is not displayed.

Formatting Toggles the display of the Formatting toolbar of the active diagram. If a check
mark appears next to the Formatting item , then the Formatting toolbar is dis-
played. If no check mark appears, then the Shape Style toolbar is not displayed.

Diagram Toggles the display of the Diagram View toolbar of the active diagram. If a check
View mark appears next to the Diagram View item on the View menu, then the Diagram
View toolbar is displayed. If no check mark appears, then the Diagram View tool-
bar is not displayed.

Construction Toggles the display of the Construction toolbar of the active diagram. If a check
mark appears next to theConstruction item on the View menu, then the Construc-
tion toolbar is displayed. If no check mark appears, then the Construction toolbar
is not displayed.

Layout Arranges the diagram objects in a more organized way, based on the diagram
objects' inter-relationships.

Options Opens the Options dialog box where you can add, modify and save several
templates that hold custom settings for current diagram-type objects.

<Opened Diagram Displays the diagrams' names in the order in which they were opened or added.
Windows List> The diagram name that is marked with a check mark is the current active
diagram. To cause a different diagram to become the active one, simply select it
from the list.

Copyright IBM Corp. 2002 19


1.5.4 The Help Menu

The Help menu offers information about the UML Modeler and its operation.
There are two items on the Help menu. These items are described below.

Menu Item Description


Help Shows the UML Modeler Help Topics

About UML Shows registration and version information about UML


Modeler Modeler (see the figure below)

20 IBM Holosofx Workbench - UML Modeler - User Guide


1.6 UML Modeler Diagrams
UML allows you to develop different diagram types:
Use Case diagram
Sequence diagram
Collaboration diagram
Class diagram
State diagram
Activity diagram
Component diagram
UML Modeler supports the development of diagrams that are related to the
analysis and design phases of a business application system. Each of these
model diagram types illustrates one aspect of the system. Each type has a
distinct purpose and an intended audience.

Diagram Type Purpose Audience


Use Case Shows the interactions between the Business Users & IT
business users and the application Analysts

Sequence Shows the interactions among objects with Developers & Architects
an emphasis on time & IT Analysts

Collaboration Shows the required interactions among Developers & Architects


objects in order to perform some
functionality of the system

Class Shows the relationships among Classes Developers & Architects

State Describes an object's behavior across Developers & Architects


several states.

Activity Illustrates workflow in a use case or across Developers & Architects


many use cases. Deals with multi-threaded
applications.

Component A component diagram shows the software Developers & Architects


components dependencies and
organization

1.6.1 Diagram Tabs


Just below the Work Space and the Browser is a bar of tabs, each tab
represents a diagram in the Work Space. There are different ways to make a
diagram active. To bring a diagram to the foreground for editing:

Copyright IBM Corp. 2002 21


Select its tab at the bottom of the UML Modeler window.

1.6.2 Creating New Diagrams


When you create a new model, UML Modeler automatically creates a Root
Package that contains a Main Class diagram. You can create new diagrams
directly within the Root package, or within any other packages you create later.
When you first start UML Modeler and load a model, the Main Class diagram
automatically opens.
To create a new diagram:
1. In the Browser window, right-click the Root or any package in which you
want to create your diagram. A shortcut menu appears.
2. Select New > Diagram from the shortcut menu. The New Diagram
dialog box appears.

From the menu bar, you can select File > New Diagram to access
the New Diagram dialog box.

22 IBM Holosofx Workbench - UML Modeler - User Guide


Through this dialog box, you can create in the Work Space a new diagram of
the basic types of diagrams: Class, Use Case, Collaboration, or Sequence.

3. Select a radio button indicating the type of diagram: Class, Use Case,
Collaboration, or Sequence.
* If you select Sequence or Collaboration, select or clear the
Enhanced check box to indicate whether the diagram is to be
enhanced or regular (That is, the toolbar for this diagram displays full
range of tools buttons or only some of them).
4. Type a name for this diagram in the Name text box.
5. Click OK.

1.6.3 Deleting Diagrams


As your project progresses, you may need to delete entire diagrams that have
become outdated or are no longer accurate. Do not delete, however, until you
are sure that you want to delete, as this action cannot be undone.
To delete a diagram:
1. Right-click the diagram icon in the Browser.
2. Select Delete from the shortcut menu. A deletion confirmation message
will appear.
3. Click Yes to confirm deletion, or click No to cancel the deletion.

UML Modeler does not allow you to Undo a deletion of a diagram.

Copyright IBM Corp. 2002 23


1.6.4 Commonly Used Functions in Diagrams
1.6.4.1 Adding Diagram Elements
After creating a diagram, you will need to add diagram elements. To add an
element to a diagram:
1. Select toolbar button for the desired element.
2. Click the location in the diagram where you want the element to reside.

In a Sequence diagram, Object elements are arranged in a row


near the top. All other types of elements may be positioned
anywhere in the diagram.

3. Type the name of the new element.

Some diagram elements are not editable from the diagram


workspace. To rename such diagram elements, you may right-
click the desired object and select Properties from the shortcut
menu to open the objects Properties dialog box.

4. Once you have added the elements, you can rearrange them by
dragging and dropping them where you please.

You can drag some element types, like Classes and Use Cases,
from the Browser and drop them in the diagram while other
element are not draggable.

1.6.4.2 Removing Diagram Elements


Occasionally, you may need to delete some of the elements from your model.
When deleting elements, the UML Modeler will do most of the work for you.
Moreover, if you delete an element from the Browser, it will be removed from the
entire model. That is, it will be deleted from the diagram in front of you, as well
as, all other diagrams that use the same element.
To remove an element from a diagram:
1. Select the element you want to remove from the diagram.
2. Press the Delete key.
OR
1. Right-click the element in the diagram.
2. Select Delete from the shortcut menu.
OR

24 IBM Holosofx Workbench - UML Modeler - User Guide


1. Select the element in the diagram.
2. Select Delete from the Edit menu.
To remove an element from all diagrams and the model:
1. Right-click the element in the Browser.
2. Select Delete from the shortcut menu. UML Modeler will remove the
element from all diagrams that contain this element, as well as, from the
Browser.

1.6.4.3 Moving One or More Elements to a Different


Location Within a Diagram
Moving One Element:
1. Drag the element to its new location.
2. Drop the element in the location you want.

Moving More than One Element:


1. Draw a marquee around the elements to be moved:
- Click and drag the mouse cursor to draw a dotted rectangle around the
entire elements.
- Release the mouse button.
2. Drag the marquee to its new location. The elements will be moved.

1.6.4.4 Copying (or Cutting) and Pasting One or More


Elements Within Diagram, or from One
Diagram to Another
1. Select the element(s) to be copied (or cut).
- If more that one element is to be copied (or cut), draw a marquee
around all the elements.
2. Select Copy (or Cut) from the Edit menu.

Pressing Ctrl+C also activates Copy.

Pressing Ctrl+X also activates Cut.

To copy or cut more than one element that are selected


using a marquee, select Copy or Cut from the Edit menu.

3. Navigate to the diagram into which you want to paste your copied (or
cut) elements, and make that the active diagram.
4. Select Paste from the Edit menu. The copied (or cut) element(s)
appear in the active diagram, in the same location, with respect to the
upper left corner of the Work Space, that the original elements occupied.

Copyright IBM Corp. 2002 25


Pressing Ctrl+V also pastes the cut or copied object (s).

You can also paste the cut or copied object (s) by right-
clicking the Work Space in the diagram where you want to
paste the selected element(s) and selecting Paste from the
shortcut menu.

1.6.4.5 Removing Elements from a Diagram


1. Select the element(s) to be removed.
2. Press the Delete key.

Right-clicking the element to be deleted and selecting Delete from


the shortcut menu also deletes the selected item.

1.6.4.6 The Text Box

Use the Text Box element to display free-floating text in your diagram. To add
a Text Box element into a diagram:

1. Select the Text Box button . The cursor within the diagram area
will resemble an asterisk.
2. Click inside the diagram area, in the approximate area where you want
the Text Box to be displayed. The word Text appears in the currently
active Font Type and Font Size.
- The program default Font Type is Arial 14, and the default Font Size is
12.

If you select a large italicized Font Type, then you may need to add
a space at the end of your text in order for the entire line of text to
be displayed.

3. Select the Font Type and Font Size you want to use from the
Formatting toolbar.
4. Select the other buttons on the
Formatting toolbar to color, align,
make you text bold, italic, or underlined.
5. Type over the word Text the text that you want to be displayed in this
location.

26 IBM Holosofx Workbench - UML Modeler - User Guide


6. Press the Esc key.

7. Select the Selection Tool button to drag the text to its final location.
To modify an existing Text Box element:
1. Double-click the Text Box element. The text cursor appears blinking at
the beginning of your existing text.
2. Edit the text.
3. Press the Esc Key when you are finished.

1.6.4.7 The Note

Use the Note element to display text in the form of a note in your diagram.
To add a Note element into a diagram:

1. Click the Note button . The cursor within the diagram area will
resemble an asterisk.
2. Click inside the diagram area, in the approximate area where you want
the Note to be displayed. A Note element appears.

3. Click the Selection Tool button , or right-click the diagram


background area.
4. Double-click the Note. A text box appears, hovering before the Note.
5. Select the desired Font Type, Size, and Color; the text alignment; and
bold, italic, or underline from Formatting toolbar.
6. Click within the text box.
7. Type the text you want to be displayed in the Note.

If you select a large italicized type, then you may need to add a
space at the end of your text in order for the last text character to
be displayed.

8. Press the Esc key.

Copyright IBM Corp. 2002 27


9. Click the Selection Tool button , to select and drag the Note to its
final location.
To modify an existing Note element:
1. Double-click the Note element. The text cursor appears blinking at the
beginning of your existing text.
2. Edit the text.
3. Press the Esc Key when you are finished.

1.6.4.8 The Group

Use the Group element to provide your diagram with a visible, logical grouping
of elements.

Creating a Group Element


To create a Group element in a diagram:

1. Click the Group button . The cursor within the diagram area will
resemble an asterisk.
2. Move the mouse cursor to where you want the center of the Group box
to be displayed.
3. Click in the workspace area.

To change the size of the Group element, refer to the following


section entitled Modifying a Group Element.

Modifying
To modify an existing Group element:
1. Select the Group element.

28 IBM Holosofx Workbench - UML Modeler - User Guide


2. Move the mouse cursor till it rests on the border of the Group element
that you would like to move inward or outward.
- When the mouse cursor is resting on the left or right side of
the Group element border, the cursor changes to an arrow
pointing left and right.
- When the mouse cursor is resting on the top or bottom side of the
Group element border, the cursor changes to an arrow pointing
upward and downward.
- When the mouse cursor is resting on the upper-left or lower-
right corner of the Group element border, the cursor changes
to an arrow pointing upward-left and downward-right.
- When the mouse cursor is resting on the lower-left or upper-
right corner of the Group element, the cursor changes to an
arrow pointing upward-right and downward-left.
3. Select the border and drag it to where it should be.
4. Repeat steps 2 and 3 until the Group element box has the appropriate
size and shape.

1.6.4.9 Connecting a Note to a Diagram Element

Use the Anchor button on any construction toolbar to connect a note to a


diagram element. To connect a note to a diagram element:

1. Click the Anchor button . The cursor within the diagram area will
resemble an asterisk.
2. Move the mouse cursor from the center of the diagram element to the
center of the Note element to be connected.

1.6.5 Organizing Items in a Diagram


As more and more items and connectors (relationships or messages) are added
to your diagram, it may become very cluttered and difficult to read. You can
reorganize your model elements by changing the locations of elements and
changing the shapes of the connectors.
When you select a connector, several square dots appear along its path.
According to the type of the square dot and its position, you may move and
control the overall shape of the connector:
Middle Dots: You can move any middle dot along an invisible line
perpendicular to the connector path line in order to change the shape of
the connector.
End Point Dots: You can move any end point dot along the border of the
element connected to it in order to change the position of the connection
point between the element and its connector.

Copyright IBM Corp. 2002 29


Red X: You can move any red X of a line label along the path of the line
connecting the two shapes in order to change the position of the label
along the path.

1.6.5.1 Layout feature


The Layout feature automatically arranges the objects in a diagram based on
the diagram type and the diagram objects' inter-relationships.
To arrange your diagram objects using the Layout feature, simply select View >
Layout and the diagram objects will be arranged according to the diagram type
and the objects' inter-relationships.

1.6.6 Printing Diagrams


To print a diagram:
Select File > Print to open the Print dialog box. Through this dialog box,
you can print the current diagram.

Pressing Ctrl+P also allows printing the current diagram.

30 IBM Holosofx Workbench - UML Modeler - User Guide


To edit printer settings:
Select File > Print Setup to open the Print Setup dialog box. In this dialog
box, you can edit paper and orientation settings, and, through the
Properties button, all other printer property settings as well.

To preview your diagram before printing:


Select File > Print Preview. The Print Preview window opens. This
window shows how your diagram will look like when printed. You may also
print directly from this window.

Copyright IBM Corp. 2002 31


32 IBM Holosofx Workbench - UML Modeler - User Guide
1.7 Controlling The Diagrams Options
Using the Options dialog box, you can add, delete, modify, and save templates
that hold custom settings for objects in the current diagram type. These
templates include information about the object's color, shape, pattern, size, and
font.
The Options dialog box also allows you to apply rules that can govern the other
shapes with which an object can establish a relationship, and those shapes
from which a relationship with the selected object can be established.

By default, UML Modeler comes with several templates for all


diagram types.

1.7.1 Options dialog box


The Options dialog box allows you to add, modify, and delete templates and,
through the Template Setting dialog box, save one template as the default
template for objects in the current diagram type.
The Options dialog box includes the following buttons:
Add: Adds a new template for objects in the current diagram type.
Modify: Modifies the configuration of a previously created template.
Delete: Deletes the selected template.
Apply: Applies the selected template settings to the currently opened
diagram.
Set As Default: Sets the selected template as the default template for the
current diagram type.

Copyright IBM Corp. 2002 33


1.7.1.1 Template Setting dialog box
The Template Setting dialog box appears when you click the Add or Modify
buttons in the Options dialog box. Using Template Setting dialog box, you can
configure templates for objects in the current diagram type. You may customize
diagram objects' colors, patterns sizes, and fonts.
The Template Setting dialog box allows you to apply to the diagram objects
rules that govern the shapes to which the selected object can connect and
establish a relationship (Out Shapes), and those shapes from which a
relationship with the selected object can be established (In Shapes).

Activate Shapes Tab


The Activate Shapes tab contains general settings for the template:
The default template's name, which you may change.
A check box to allow the use of Windows default-background color or a list
to allow the choice of another custom color.
An Active Shapes list of the available diagram objects in the current
diagram type.
A preview area that displays any selected active shape.

Shape Default Tab


The Shape Default tab allows you to apply the following settings:
Select the diagram object to which you will apply custom settings from the
Active Shapes list.

34 IBM Holosofx Workbench - UML Modeler - User Guide


Select the object's Color.
Select the object's Pattern and Pattern color.
Select the object's Line style and Line color.
Preview the object and resize it using the horizontal and vertical sizing
bars to the desired dimensions. The object is displayed in this area with
the object's actual size that will appear in the diagram.

Rules Tab
The Rules tab allows you to apply the following settings:
Select the diagram object to which you apply custom settings from the
Active Shapes list.
Select the In Shapes (diagram objects from which relationships can be
established with the selected object) and/or the Out Shapes (diagram
objects to which the selected object can connect and establish
relationships).
Add or remove one or more diagram objects from the In Shapes or the Out
Shapes list by using the Add (represented by a single right arrow), Add All
(represented by double right arrows), Remove (represented by a single left
arrow), or Remove All (represented by double left arrows) buttons.
Select the sides of the diagram object that relationships from other
diagram objects can be connected to (In Sides), and the sides of the
selected object from which the relationships can emerge to other diagram
objects (Out Sides).

Copyright IBM Corp. 2002 35


View the settings you have applied to the diagram object in the preview
area.

Text Tab
The Text tab allows you to apply the following settings:
Select the diagram object to which you will apply custom settings from the
Active Shape list.
Using the Text Edit dialog box, Add, Edit, and Delete the text position(s)
for the selected diagram object.
Preview the settings applied to the diagram object in the preview area.

36 IBM Holosofx Workbench - UML Modeler - User Guide


Text Edit dialog box
The Text Edit dialog box appears when you click the Add or Edit buttons in the
Text tab.
The Text Edit dialog box allows you to apply the following settings:
Select the text position for the diagram object.
Select the text alignment (Left, Center, Right).
Select the font settings through the Font dialog box.
Use the Enable Editing check box to enable editing of the object's text
while working in the diagram.
Preview the applied settings in the preview area.

Copyright IBM Corp. 2002 37


1.7.2 Working with Options Dialog Box
The Options dialog box allows you to add, modify, and delete templates and to
save one template as the default template for objects in the current diagram
type.

1.7.2.1 Adding a Template


To add a template for objects of the current diagram type:
1. Select View > Options. The Options dialog box opens.
2. Click Add. The Template Setting dialog box opens.
3. In the Activate Shapes tab, type the template's name in the Name field
if you want to change the default name that appears in this field.
4. To select a custom background color from the Other color list, clear the
Use Windows Default Background Color check box.
5. In the Shape Default tab, select the diagram object to which you want to
apply settings from the Active Shapes list. Then apply the desired
settings to the object's Color, Pattern, Pattern color, Line style, Line
color, and dimensions.

The object is displayed in the preview area with its actual


dimensions that will appear when working in the diagram.

6. In the Rules tab, select the diagram object to which you want to apply
settings from the Active Shapes list. Then click InShapes or
OutShapes to display the diagram objects that can have a relationship
with the selected shape.

38 IBM Holosofx Workbench - UML Modeler - User Guide


You can add or remove one or more diagram objects from the In
Shapes or the Out Shapes list by using the Add (represented by a
single right arrow), Add All (represented by double right arrows),
Remove (represented by a single left arrow), or Remove All
(represented by double left arrows) buttons.

7. In the Text tab, select the diagram object to which you want to apply
settings from the Active Shapes list. Then add, edit, or delete the text
positions in the selected diagram object.
- To add a text position, click Add. The Text Edit dialog box will open.
* Select a text position from the Position list.
* Select a text alignment by clicking one of the Align radio buttons
(Left, Center, Right).
* To change the font, click the Setting button. The Font dialog box
opens. Apply the selected font settings, and then click OK. The
Text Edit dialog will appear.
* To disable editing of the object's text while working in the diagram,
clear the Enable Editing check box.
* Click OK. The Template Setting dialog box appears.
8. Click OK. The Options dialog box will appear.

1.7.2.2 Modifying a Template


Modifying a template falls into one or more of the following categories:

Modifying the Template Name and Background Color


To modify a template's name and background color:
1. Select View > Options. The Options dialog box opens.
2. Select a template from the Current Templates list in the Options dialog
box.
3. Click Modify. The Template Setting dialog box opens.
4. In the Activate Shapes tab, select the template's name in the Name
field, and type the template's name.
5. To select a custom background color from the Other color list, clear the
Use Windows Default Background Color check box.
6. Click OK. The Options dialog box appears.

Modifying the Object's Color, Pattern, Line Style, and Size


To modify an object's color, pattern, line style, and size:
1. Select View > Options. The Options dialog box opens.
2. Select a template from the Current Templates list in the Options dialog
box.

Copyright IBM Corp. 2002 39


3. Click Modify.
The Template Setting dialog box opens.
4. In the Shape Default tab, select the object diagram to which you want to
apply changes from the Active Shapes list.
5. Apply the selected settings to the object's color, pattern, pattern color,
line style, line color, and/or dimensions.
6. Click OK. The Options dialog box appears.

Modifying the Object's In Shapes and Out Shapes, and


Object's In Sides and Out Sides
To modify an object's In Shapes and Out Shapes, and its In Sides and Out
Sides:
1. Select View > Options. The Options dialog box opens.
2. Select a template from the Current Templates list in the Options dialog
box.
3. Click Modify. The Template Setting dialog box opens.
4. In the Rules tab, select the object diagram to which you want to apply
changes from the Active Shapes list.
5. Click InShapes to display the diagram objects from which relationships
can be established with the selected object, or click OutShapes to
display the diagram objects to which the selected object can connect
and establish relationships.

You can add or remove one or more diagram objects from the In
Shapes or the Out Shapes list by using the Add (represented by a
single right arrow), Add All (represented by double right arrows),
Remove (represented by a single left arrow), or Remove All
(represented by double left arrows) buttons.

6. In the InSides area, clear the check box(es) next to the object's side(s)
to which relationships should not be connected, or in the OutSides
area, clear the check box (es) next to the object's side(s) from which the
selected object's relationships should not emerge.
7. Click OK.

Modifying the Object's Text Position(s)


To modify an object's text position(s):
1. Select View > Options. The Options dialog box opens.
2. Select a template from the Current Templates list in the Options dialog
box.
3. Click Modify. The Template Setting dialog box opens.

40 IBM Holosofx Workbench - UML Modeler - User Guide


4. In the Text tab, select the object diagram to which you want to apply
changes from the Active Shapes list.
- Click Add to add a text position for the selected diagram object. The
Text Edit dialog box opens.
* Select a text position from the Position list.
* Select a text alignment by clicking one of the Align radio buttons
(Left, Center, Right).
* To change the font, click the Setting button. The Font dialog box
opens. Apply the selected font settings then click OK. The Text
Edit dialog will appear.
* To disable editing of the object's text while working in the diagram,
clear the Enable Editing check box
* Click OK. The Template Setting dialog box appears.
- Click Edit to edit a text position for the selected diagram object. The
Text Edit dialog box opens.
* Select a text position from the Position list.
* Select a text alignment by clicking one of the Align radio buttons
(Left, Center, Right).
* To change the font, click the Setting button. The Font dialog box
opens. Apply the selected font settings then click OK. The Text
Edit dialog will appear.
* To disable editing of the object's text while working in the diagram,
clear the Enable Editing check box,
* Click OK. The Template Setting dialog box appears.
- To delete a text position, select the text position and click Delete.
5. Click OK. The Options dialog box appears.

1.7.2.3 Setting a Template as Default Template


To set a template as the default template:
1. Select View > Options. The Options dialog box opens.
2. Select the template to set as the default template for the current diagram
type.
3. Click SetAsDefault, and then click OK. The template is set as the
default template.

1.7.2.4 Apply Template Settings to Current diagram


To apply a templates settings to a currently opened diagram:
1. Select View > Options. The Options dialog box opens.
2. Select a template to apply its settings to the currently opened diagram.

Copyright IBM Corp. 2002 41


3. Click Apply, and then click OK. The current diagram will be updated
according to the applied templates settings.

1.7.2.5 Deleting a Template


To delete a template:
1. Select View > Options. The Options dialog box opens.
2. Select the template that you want to delete.
3. Click Delete, and then click OK. The template is deleted.

42 IBM Holosofx Workbench - UML Modeler - User Guide


1.8 Organizing Model Elements:
Packages
Packages are very useful in organizing your model elements. By placing
elements into a single Package, you emphasize their relatedness. You might,
for example, group a set of related Classes and Components, or related Use
Cases and Actors into a Package.
The use of Packages is not necessary, but is highly recommended. Packaging
can be done at the object level within a diagram, or at the diagram level such
that several diagrams are packaged together.

1.8.1 Adding Packages


In UML Modeler, you can add as many Packages as you need to organize the
items in your model. You can also create one Package inside another, nesting
Packages to further organize your model. When creating a new Package, UML
Modeler will automatically create a diagram with the same name of the
package.
To add a Package to the Browser:
1. Right-click the Root package or any other existing package in the
Browser in which you want to create the new package. A shortcut menu
appears.
2. Select New > Package from the shortcut menu.
3. Right-click the new Package.
4. Select Properties from the shortcut menu. The Package Properties
dialog box appears.
5. Type the name of the new Package in the Name text box in the
Package Properties dialog box.
OR
To add a new package to a diagram:
1. Click the Package button on the toolbar.
2. Click the area in the diagram where you want to place the package.
3. Right-click the new Package.
4. Select Properties in the shortcut menu. The Package Properties
dialog box appears.
5. Type the name of the new Package in the Name text box in the
Package Properties dialog box.

Copyright IBM Corp. 2002 43


1.8.2 Deleting Packages
In UML Modeler, you can delete a Package from a single diagram or from the
entire model. If you delete a package from the entire model, the package and
everything within it will be removed.
To remove a package from a single diagram (Use Case or Class diagram only):
1. Select the Package in the diagram.
2. Press the Delete key, or select Delete from the Edit menu.

The Package has been removed from the diagram, but still exists
in the Browser and in other diagrams.

To remove a package from the entire model:


1. Right-click the Package in the Browser.
2. Select Delete from the shortcut menu.

WARNING: When you delete a package from the model, all


Classes and diagrams within the Package also are deleted.

44 IBM Holosofx Workbench - UML Modeler - User Guide


1.9 Working with UML Models
In the following sections, we will look at how to create and save UML Modeler
models.

1.9.1 Creating New Models


The first step in working with UML Modeler is to create a new model. Models
can be created either from scratch, or from an existing model used as a
framework. A UML Modeler model, including all its diagrams and other model
elements, is saved in a single file with the extension umm.
To create a new model:
1. Open UML Modeler. A new model is automatically created.
Or
1. Select File > New from the menu bar.
- The Save Changes message appears. Select Yes to save the
changes in the current model before creating the new model or No to
close the current model without saving any changes.

1.9.2 Opening Current Models


To open an existing model:

Copyright IBM Corp. 2002 45


1. Select File > Open. The Open dialog box opens.

2. Browse to locate the UML Modeler file that you want to open.
3. When the UML Modeler file you want to open is displayed in the list box,
either:
- Double-click the file, or
- Select it and then click the Open button.

1.9.3 Saving Models


Each UML Modeler model is saved in a separate file. The following describes
how to save your UML Modeler file.
To save a model:
1. Select Save Model or Save Model As from the File menu.
Or
1. Click the Save button on the Standard toolbar.The Save As dialog box
appears.

46 IBM Holosofx Workbench - UML Modeler - User Guide


2. Type a file name and browse to define the location for the model you
want to save.
3. Click Save. The model will be saved on your machine.

1.9.4 Exporting and Importing Models


The UML Modeler allows you to export and import models and model elements.
The following paragraphs describe how you can export/import models in other
file formats.
The Export and Import sub menus in the UML Modeler's File menu allow you
to export/import a UML model to/from other file formats. The following two
figures show the menu commands in the Export and Import sub menus:
Export sub menu

Import sub menu

Copyright IBM Corp. 2002 47


1.9.4.1 Exporting/Importing a UML Model to/from
Rational Rose
You can export a UML model to a (.mdl) file that can be opened by Rational
Rose. You can also import a (.mdl) file from Rational Rose and open it in UML
Modeler.

The Rational Rose software should be installed on the same


machine on which the UML Modeler is installed, in order to allow
exchanging UML Models with Rational Rose.

To export a UML model to a (.mdl) file:


1. Open the UML model that you want to export.
2. Select File > Export > To Rational Rose. The Save As dialog box
appears.

3. Type the name of the (.mdl) to which you want to export the UML model
in the File name box, and select the location where you want to save
the exported file.

If you type a file name that already exists, then a warning message
will appear to ask you if you want to replace the existing file name
with another one. Click Yes to continue or No to re-type a different
file name.

4. Click Save. A progress indicator window appears notifying you with the
status of the model export, then disappears when export is completed.
The UML model is exported to a (.mdl) file and saved in the selected
location.

48 IBM Holosofx Workbench - UML Modeler - User Guide


To import a UML model from an (.mdl) file:
1. Select File > Import > From Rational Rose. The Open dialog box
appears.

2. Select the (.mdl) file that you want to import into the UML Modeler, and
click Open. A progress indicator window appears notifying you with the
status of the model import, then disappears when import is completed.
The UML Modeler will open the imported file.

1.9.4.2 Exporting/Importing UML Model to/from XML


Format
To export a UML model to XML file:
1. Select File > Export > UML Modeler XML. The Save As dialog box
appears.

Copyright IBM Corp. 2002 49


2. Type the name of the XML file to which you want to export the UML
model in the File name box, and select the location where you want to
save the XML file.

If you type a file name that already exists, then a warning message
will appear to ask you if you want to replace the existing file with
the new one. Click Yes to continue or No to re-type a different file
name.

3. Click Save. The UML model will be exported to an XML file and saved in
the selected location. A confirmation message will appear to inform you
that the export has been done.

To import a UML model from an XML file:


1. Select File > Import > UML Modeler XML. The Open dialog box
appears.

2. Select the XML file that you want to import into the UML Modeler, and
click Open. The file will be imported and opened in UML Modeler.

If you try to import a file that is not a valid UML Modeler XML file,
then an error message will appear notifying you of this.

50 IBM Holosofx Workbench - UML Modeler - User Guide


1.9.4.3 Exporting/Importing UML Activity Diagram to/
from IBM Holosofx Workbench Process
You can transform UML Activity diagram (s) to IBM Holosofx Workbench
process diagram (s). This transformation can be done by exporting the UML
model that contains Activity diagram (s) to an IBM Holosofx Workbench XML file
that can be imported directly in IBM Holosofx Workbench.
You can also transform IBM Holosofx Workbench process diagram (s) to UML
Activity diagram (s) by importing the IBM Holosofx Workbench XML file that
contains the process diagram (s) into the UML Modeler. The following steps
describe how to perform this transformation by using the Import/Export feature
in UML Modeler.
To export a UML Activity diagram to an IBM Holosofx Workbench process:
1. Select File > Export > To BPM Workbench > Process - Activity.

The Save As dialog box appears.

Copyright IBM Corp. 2002 51


2. Type the name of the IBM Holosofx Workbench XML file to which you
want to export the UML Activity diagram in the File name box, and
select the location where you want to save the file.

If you type a file name that already exists, then a warning message
will appear to ask you if you want to replace the existing file with
the new one. Click Yes to continue or No to re-type a different file
name.

3. Click Save. The Transformation Option dialog box appears.

4. Select the Stereo Type for the UML model's Activity diagram
swimlanes. You can select one of the following options:
- Role: The swimlanes in the exported Activity diagram will be
represented as roles associated with the IBM Holosofx Workbench
process tasks.
- Organization Unit: The swimlanes in the exported Activity diagram
will be represented as org. units that are associated with the IBM
Holosofx Workbench process tasks.
- Application: The swimlanes in the exported Activity diagram will be
represented as applications that are associated with the IBM Holosofx
Workbench process tasks.
5. Click Transform. The Activity diagram (s) will be exported to an IBM
Holosofx Workbench XML file where each Activity object is transformed
to an IBM Holosofx Workbench task, and the swimlanes are transformed
according to your selection from the Transformation Option dialog box.
To import a UML Activity diagram from an IBM Holosofx Workbench process
diagram:

52 IBM Holosofx Workbench - UML Modeler - User Guide


1. Select File > Import > From BPM Workbench > Process - Activity.
The Open dialog box appears.

2. Select the Workbench XML file of the process diagram that you want to
import into the UML Modeler as an Activity diagram, and then click
Open. The Transformation Option dialog box appears.

If you try to import a file that is not a valid Workbench XML file,
then an error message will appear notifying you of this.

3. Select the stereo type to which the swimlanes in activity diagrams will be
transformed from the IBM Holosofx Workbench process tasks. You can
select one of the following options:

Copyright IBM Corp. 2002 53


- Role: The swimlanes in the imported Activity diagram will represent
the roles associated with the IBM Holosofx Workbench process tasks.
- Organization Unit: The swimlanes in the imported Activity diagram
will represent the org. units that are associated with the IBM Holosofx
Workbench process tasks.
- Application: The swimlanes in the imported Activity diagram will
represent the applications that are associated with the IBM Holosofx
Workbench process tasks.
4. Click Transform. The Workbench XML file will be imported to Activity
diagram (s) where each IBM Holosofx Workbench task is transformed to
an Activity object, and the swimlanes will represent your selection from
the Transformation Option dialog box.

1.9.4.4 Exporting/Importing UML Use Case diagram to/


from IBM Holosofx Workbench Process Diagram
You can transform UML Use Case diagram (s) to IBM Holosofx Workbench
Process diagram (s). This transformation can be done by exporting the UML
model that contains Use Case diagram (s) to an IBM Holosofx Workbench XML
file that can be imported directly in IBM Holosofx Workbench.
You can also transform IBM Holosofx Workbench process diagram (s) to UML
Use Case diagram (s) by importing the IBM Holosofx Workbench XML file that
contains the process diagram (s) into the UML Modeler. The following steps
describe how this transformation can be performed by using the Import/Export
feature in UML Modeler.
To export a UML Use Case diagram to an IBM Holosofx Workbench process
diagram:
1. Select File > Export > To BPM Workbench > Process - Use Case.

The Save As dialog box appears.

54 IBM Holosofx Workbench - UML Modeler - User Guide


2. Type the name of the IBM Holosofx Workbench XML file to which you
want to export the Use Case diagram (s) in the File name box, and
select the location where you want to save the file, then click Save.

If you type a file name that already exists, then a warning message
will appear to ask you if you want to replace the existing file with
the new one. Click Yes to continue or No to re-type a different file
name.

The Transformation Option dialog box appears.

3. Select the stereo type to which the Actors in use case diagrams will be
transformed in the IBM Holosofx Workbench process tasks.You can
select one of the following options:
- Role: The Actors in the exported Use case diagram will be
represented as roles that are associated with the IBM Holosofx
Workbench process tasks.

Copyright IBM Corp. 2002 55


- Organization Unit: The Actors in the exported Use case diagram be
represented as org. units that are associated with the IBM Holosofx
Workbench process tasks.
- Application: The Actors in the exported Use case diagram be
represented as applications that are associated with the IBM Holosofx
Workbench process tasks.
4. Click Transform. The Use Case diagram (s) will be exported to an IBM
Holosofx Workbench XML file where each Use Case object is
transformed to an IBM Holosofx Workbench task, and the Actors are
transformed according to your selection from the Transformation
Option dialog box.
To import UML Use Case diagram (s) from an IBM Holosofx Workbench
process diagram (s):
1. Select File > Import > From BPM Workbench > Process - Use Case.

The Open dialog box appears.

56 IBM Holosofx Workbench - UML Modeler - User Guide


2. Select the Workbench XML file that contains the process diagram (s)
which you want to import into UML Modeler as Use Case diagram (s),
and then click Open. The Transformation Option dialog box appears.

3. Select the stereo type to which the Actors in use case diagrams will be
transformed from the IBM Holosofx Workbench process tasks. You can
select one of the following options:
- Role: The Actors in the imported Use case diagram will represent the
roles that are associated with the IBM Holosofx Workbench process
tasks.
- Organization Unit: The Actors in the imported Use case diagram will
represent the org. units that are associated with the IBM Holosofx
Workbench process tasks.
- Application: The Actors in the imported Use case diagram will
represent the applications that are associated with the IBM Holosofx
Workbench process tasks.
4. Click Transform. The Workbench XML file will be imported to Use Case
diagram (s) where each IBM Holosofx Workbench task is transformed to
Use Case object, and the Actors will represent your selection from the
Transformation Option dialog box.

1.9.4.5 Exporting Sequence Diagram to Rules XML


UML Modeler allows you to export a sequence diagram to a rule-based
language.
The Export Sequence Diagram to Rules XML capability in UML Modeler
enables you to produce two types of rule-based files in XML (BRML and
SuperRML) from a sequence diagram.
To export a sequence diagram to a SuperRML or a BRML file:
1. Open a sequence diagram in UML Modeler.

Copyright IBM Corp. 2002 57


2. Select File > Export > Sequence Diagram to Rules XML, and then
select SuperRML or BRML from the sub menu.

The Save As dialog box appears.

3. Type the name of the rule-based file to which you want to export the
sequence diagram in the File name box. Select the location where you
want to save the file and click Save. The sequence diagram will be
exported to a rule-based XML file.

If you type a file name that already exists, then a warning message
will appear to ask you if you want to replace the existing file with
the new one. Click Yes to continue or No to re-type a different file
name.

58 IBM Holosofx Workbench - UML Modeler - User Guide


Chapter 2: Use Case Diagrams

In UML Modeler, a Use Case diagram depicts the functionalities of your system
by displaying the use cases, actors, and the relationships among these objects.
A Use Case diagram represents detailed system requirements and describes
what the system can do and what the system is intended to accomplish. The
information contained in a Use Case diagram is important for establishing a
solid project foundation. Moreover, the Use Case diagram describes the
sequence of events of an actor that uses the system to complete a process. An
actor could be an external entity, a person, or another system that interacts with
the system.
A Use Case diagram may contain any of the following elements:
Use cases
Actors
Relationships:
* Association relationships between use cases and actors.
* Generalization and Association relationships between use cases.
* Generalization and Association relationships between Actors.
Through the use case diagram, you can determine which actors initiate which
use cases, and when a use case sends information to a actor.
There are several important points to remember while creating Use Case
diagrams in UML Modeler:
Do not model actor-to-actor relationships. By definition, the actors are
outside the scope of the current project, therefore, any relationship
between these actors is also outside the scope of the system. You may
model the actors initiating the system and/or receiving information from the
system.
Use cases must be initiated by an actor. In other words, every use case
should have an Association relationship starting from an actor and ending
at that use case.
Think of a Use Case diagram as being associated with a database. You
can enter information into the database using one use case, and access
the information in the database using another use case. You dont have to
draw arrows from one use case to another to show information flow.

Copyright IBM Corp. 2002 59


2.1 Creating and Opening Use Case
Diagrams
In UML Modeler, Use Case diagrams can be created in Root package or in any
existing package. You can create as many diagrams as you need to model your
system and organize them in any way you want.

2.1.1 Creating a New Use Case Diagram


1. In the Browser, right-click the package in which you want to create your
new Use Case diagram.
2. Select New > Diagram from the short-cut menu.

The New Diagram dialog box appears.

3. Select Use Case in the New Diagram dialog box.


4. Type the name of your new diagram in the Name text box, and then click
OK. The new Use Case diagram opens.

2.1.2 Opening an Existing Use Case Diagram


1. Navigate through the browser till you locate the desired Use Case
diagram.
2. Double-click the Use Case diagrams name or icon to open it.

60 IBM Holosofx Workbench - UML Modeler - User Guide


2.2 Working with Elements in Use
Case Diagrams
2.2.1 Use Case Diagram Toolbar
The Use Case Diagram toolbar, like all UML Modeler diagram toolbars,
contains two sets of buttons. One set is common to all the diagram toolbars
described earlier, and the other set is related only to the Use Case diagram
elements.
When a Use Case diagram is opened, the diagram toolbar changes to show the
set of buttons used in Use Case diagrams. These buttons are described in the
table below.

Icon Button Purpose


Actor Adds a new actor to the diagram.

Use Case Adds a new use case to the diagram.

Package Adds a new package to the diagram.

Generalization Draws a Generalization relationship between use


cases, or an inheritance relationship between
actors.

Aggregation Draws an Aggregation relationship between two


actors, two use cases or an Actor and a use
case.

Navigation Draws an Association relationship between two


actors, two use cases, or an Actor and a use
case, where their defaults are navigable.

2.2.2 Adding/Removing Elements to/from an


Existing Use Case Diagram
To add use cases, actors, and relationships to a Use Case diagram, use the
toolbar buttons as described in the sections below.
As with all UML Modeler diagrams, there are two ways to remove an element
from a Use Case diagram. The first way removes the element only from the
open diagram. The second removes the element from the entire model; that is
from all diagrams as well as from the Browser.

Copyright IBM Corp. 2002 61


To remove an element from the current diagram only, select the element in
the diagram and press the Delete key.
To remove the element from the entire model, which means removing the
element from all diagrams and the Browser, right-click the element in the
Browser, and then select Delete from the shortcut menu.

62 IBM Holosofx Workbench - UML Modeler - User Guide


2.3 Use Cases
UML Modeler provides detailed attributes for each use case, such as the use
case name, description, and stereotype.

2.3.1 Adding Use Cases


There are two ways to add a Use Case element to the model: Add the use case
to the active Use Case diagram, or directly to the browser.

2.3.1.1 Adding a New Use Case to a Use Case Diagram


1. Select the Use Case button in the Use Case toolbar.
2. Click the desired location inside the Use Case Diagram. The new use
case will be automatically added to the browser in the same location as
its Use Case diagram.

The new use case will be named UseCase 1. If this name is already
used by another use case in the model, the new name will be Use
Case 2, and so on.

2.3.1.2 Adding an Existing Use Case to a Use Case


Diagram
Select the desired Use Case in the browser and drag it to the opened Use Case
diagram.
OR
1. Select the Use Case button from the Use Case toolbar.
2. Click the desired location inside the Use Case diagram. A new use case
will be automatically named with the default name.
3. With the new use case selected, open the Use Case Properties dialog
box by right-clicking and selecting Properties from the shortcut menu.
4. Select the desired new use case name from the list in the Use Case
selection box.

2.3.1.3 Adding a Use Case to the Browser


1. Select Root, or any package into which you would like to add your new
use case.
2. Right-click the package in the browser.
3. In the shortcut menu, select New > Use Case. The new use case will
appear in the Browser.

Copyright IBM Corp. 2002 63


2.3.2 The Use Case Properties Dialog Box
The Use Case Properties dialog box allows you to define the essential
properties of each use case element. The Use Case Properties dialog box tabs
are: General, Diagrams, and Instance.
To open the Use Case Properties dialog box:
1. Right-click the Use Case element in a Use Case diagram.
2. Select Properties from the shortcut menu.
OR
1. Right-click the desired Use Case from the browser.
2. Select Properties from the shortcut menu.
OR
1. Select the Use Case in a Use Case Diagram.
2. Select the Properties button from the Diagram View toolbar.

2.3.2.1 General Tab


The General tab allows you to name, describe, and assign a stereotype for your
use case.

64 IBM Holosofx Workbench - UML Modeler - User Guide


Naming a Use Case
Each use case in the model must be given a unique name. The use case should
be named from the perspective of the business application user, as the use
cases depict business problems and their proposed solutions. The convention
for naming use cases is to use short verb phrases.
To name or rename a use case:
1. Select the use case.
2. Open the Use Case Properties dialog box.
3. In the General tab, type the name of the use case in the Name text box.
4. Click the Update button. The Use cases name will be updated in the
Browser and the diagram.
5. Click OK to close the Use Case Properties dialog box.

Adding a Use Case Description


Each use case should have a short description of what it will accomplish. The
description should include the users who will perform this use case, as well as
the expected outcome.
To add a description to a use case:
1. Select the use case in the browser or in the Use Case diagram.
2. Open the Use Case Properties dialog box.
3. In the General tab, type the use case description in the Documentation
text box.
4. Click OK.

Assigning a Use Case Stereotype


Use Stereotypes to categorize model elements. Although stereotypes are more
often used with classes and relationships, they can be used with use cases as
well.
To assign a use case stereotype:
1. Select the use case in the browser or in the Use Case diagram.
2. Open the Use Case Properties dialog box.
3. In the General tab, type the new stereotype name, or select an existing
stereotype name, in the Stereotype selection box.
4. Click OK.

2.3.2.2 Diagrams tab


The Diagrams tab in the Use Case Properties dialog box allows you to add,
view and delete different types of diagramsSequence, Collaboration, Class,
and Use Caseunder a particular use case in the Browser.

Copyright IBM Corp. 2002 65


This tab displays the diagrams names with icons next to them to indicate their
types. You can open any of these diagrams by selecting it and clicking the View
button.

Adding a Diagram Under a Use Case


You can add different types of diagramsSequence, Collaboration, Class, and
Use Caseunder a particular use case in the Browser.
To add a diagram to a use case:
1. Select the use case in the Browser or in the Use Case diagram.
2. Right-click the use case element. A shortcut menu appears.
3. Select Properties from the shortcut menu. The Use Case Properties
dialog box opens.
4. Select the Diagrams tab.

66 IBM Holosofx Workbench - UML Modeler - User Guide


5. Click the Add button. The New Diagram dialog box opens.

6. Select the Diagram Type: Use Case, Sequence, Collaboration, or


Class.
7. Type the diagram name in the Name text box.
8. Click OK to close the New Diagram dialog box. The diagram name will
be added to the Diagram list box in the Use Case Properties dialog
box.

Deleting Diagrams Defined Under a Use Case


1. Select the diagram name from the Browser.
2. Right-click the diagram, and then select Delete from the shortcut menu.
OR
1. Select the use case in the browser or in the Use Case diagram.
2. Open the Use Case Properties dialog box.
3. Select the Diagrams tab.
4. Select the diagram you want to delete from the Diagram List.
5. Click the Delete button, a warning message will appear. Click OK to
confirm deleting the diagram or Cancel to cancel deleting the diagram.

Viewing Diagrams Defined Under a Use Case


1. Right-click the Use Case in the Browser, or in a Use Case diagram.
2. Select Properties from the shortcut menu to access the Use Case
Properties dialog box.
3. Select the Diagrams tab. The diagrams defined under this use case will
be listed in the Diagram List.
4. Select the diagram you want to view from the Diagram List tab and click
the View button to open it.
OR

Copyright IBM Corp. 2002 67


1. Locate the desired Use Case in the Browser.
2. Expand the Use Case item. The diagrams for this use case will appear
underneath it in the Browser.
3. Double-click the diagram you want to view. The diagram is opened.

2.3.2.3 Instances tab


When modeling the Use Case diagrams, you may want to know which diagrams
contain a particular Use Case. UML Modeler provides this information in the
Instances tab in the Use Case Properties dialog box.

To view all Use Case diagrams containing a specific use case:


1. Select the use case in a Use Case diagram.
2. Open the Use Case Properties dialog box.
3. Select the Instances tab. UML Modeler displays a list of all Use Case
diagrams that contain that use case.
- To open a diagram, select the diagram in the list and then click the
View Diagram button.

68 IBM Holosofx Workbench - UML Modeler - User Guide


2.3.2.4 Sub Diagrams Tab
The Sub Diagrams tab allows you to add a State Machine model that contains
one or more Activity and / or State diagrams to the selected use case.

For more information about the State Machine model and its diagrams, please
refer to the chapter entitled State Machine Model in this guide.

Copyright IBM Corp. 2002 69


2.4 Actors
An actor is any entity that is outside the scope of the system, but interacts with
the system either by initiating it, or by receiving information from it. Actors can
be of many various types, for example:
People
Other systems
Time
The people who interact with the systemthe usersare the most common
type of actors.
Other systems may be represented by actors. For example, a company has an
Order Fulfillment system, this system sends information to the Warehousing
system. If you are modeling the Warehousing system, then you may consider
the Order Fulfillment system an actor with respect to the system you are
modeling; as it is only initiates the Warehousing system. By modeling the
Order Fulfillment system as an actor, this means that we are not at all
interested in what takes place inside the Order Fulfillment system.
Time is the third main type of actors. Extending the above example, suppose
that the Order Fulfillment system does not send information directly to the
Warehousing system, but instead, it sends these information to an
intermediary database. Every 3 hours the Warehousing system check this
database for information updates. In this case, time initiates the Warehousing
system and, thus, we can represent it in the model as an Actor.

2.4.1 Adding Actors


There are two ways to add an actor to the model: Add the actor to a Use Case
diagram, or add the actor directly to the Browser.

2.4.1.1 Adding a New Actor to a Use Case Diagram


1. Click the Actor button in the Use Case toolbar.
2. Click the desired location in the Use Case diagram. The Actor will
appear in the diagram.

The new actor will be named Actor 1. If this name is already used
by another actor in the model, the new name will be Actor 2, and
so on.

3. With the new actor selected, open the Actors Properties dialog box.
4. Type the name of the new actor in the Name text box.
5. Click the Update button to replace the default name.

70 IBM Holosofx Workbench - UML Modeler - User Guide


6. Click OK. The new actor will be automatically added to the browser in
the same location as its Use Case diagram.

2.4.1.2 Adding an Existing Actor to a Use Case Diagram


1. Click the Actor button on the Use Case toolbar.
2. Click the desired location in the Use Case diagram. The new Actor will
appear in the diagram.

The new actor will be named Actor 1. If this name is already used
by another actor in the model, the new name will be Actor 2, and
so on.

2.4.1.3 Adding an Actor to the Browser


1. Right-click the Root or any other package in which you would like to add
your new actor. A shortcut menu appears.
2. From the shortcut menu, select New > Actor. A new actor with the
default name appears in the browser with a class icon next to it.

2.4.2 The Actors Properties Dialog Box


In the Actors Properties dialog box, you can specify the actors name,
stereotype, and other details. Note that the Properties dialog box for an actor is
actually a Class Properties dialog box. This is because UML Modeler treats an
actor as a special form of a class. The Actors Properties dialog box includes
the same fields as the Class Properties dialog box, except that the stereotype
is defined as Actor.
Some of the tabs in this dialog box are not related to Actors. Therefore in this
chapter, we will discuss only the tabs and fields that pertain to actors. All tabs
and fields are discussed in the Classes chapter.

2.4.2.1 Opening the Actors Properties Dialog Box


1. Right-click the actor element in a Use Case diagram
2. Select Properties from the shortcut menu.
OR
1. Right-click the actor name or icon in the browser.
2. Select Properties from the shortcut menu.
OR
1. Select the actor element in a Use Case diagram.
2. Click the Properties button in the Diagram View toolbar.

Copyright IBM Corp. 2002 71


2.4.2.2 General tab

Through this tab, you can name an Actor, add a description to an Actor, delete
an Actor, assign a stereotype to an Actor, and create Abstract, Singlton, Visible,
Persistent, and Transient Actors

Naming Actors
Each actor should be given a unique name.
To name a new actor in the model:
1. Open the Actors Properties dialog box.
2. Click the New Class button. A new actor appears with the default name
in the Classes selection box.
3. Type the new name in the Name text box in the Classes selection box.
4. Click the Update button. The Actor name is update.
To rename an existing actor:
1. Open the Actors Properties dialog box.
2. Type the new name in the Name text box in the Classes selection box.

72 IBM Holosofx Workbench - UML Modeler - User Guide


3. Click the Update button.

Deleting Actors
If you want to delete an existing actor from the model, while the Actors
Properties dialog box is opened:
1. Select the actor or class you want to delete in the Classes selection box.
2. Click the Delete Class button. A warning message appears.
3. Click OK to confirm deleting the actor or class, or Cancel to cancel the
deletion.

Adding Actor Description


Each actor should have a short description that defines the main characteristics
of the actor.
To add a description to an actor:
1. Select the actor in the browser or in the Use Case diagram.
2. Open the Actors Properties dialog box.
3. In the Classes tab, type the actor description in the Documentation text
box.
4. Click OK.

Assigning an Actor Stereotype


A stereotype can be assigned to an actor, the same as with use cases.
However, if another stereotype is assigned to an actor, UML Modeler will
change the icon used to represent this actor in the Use Case diagram. In such a
case, the actor will be represented by the icon used for classes.
To distinguish classes from actors, you should assign stereotype for any actor
represented in the model. To assign an actor stereotype:
1. Select the actor in the browser or in the Use Case diagram.
2. Open the Properties dialog box for the Actor.
3. In the Classes tab, type the stereotype name in the Stereotype
selection box.
4. Click the Update button.

Creating Abstract, Singlton, Visible, Persistent, and Transient


Actors
An abstract actor is an actor that has no instances. For example, in a particular
system, you may have two actors, Accountant and Clerk. These two actors
are types of another actor business user and because --in this system --no
one can be just a business user, everyone must be an accountant or clerk. The
business user actor exists only to show that there is some commonality
between those two types. Since there are no instances of a business user actor,
we consider it an abstract actor.

Copyright IBM Corp. 2002 73


To create an abstract actor:
1. Select the actor use case in the browser or in the Use Case diagram.
2. Open the Properties dialog box for the Actor.
3. In the Classes tab, select the Abstract check box.
4. Click the Update button.

The steps above also enable you to create a singlton, visible,


persistent, or transient actor, simply by substituting for the
appropriate check box or radio button in step 3.

2.4.2.3 Instances Tab

When modeling the system and the Use Case diagrams, you may want to know
which Sequence and Collaboration diagrams contain a particular actor. UML
Modeler shows you this information in the Instances tab in the Actors
Properties dialog box.

74 IBM Holosofx Workbench - UML Modeler - User Guide


To view all Sequence and Collaboration diagrams containing an actor, or all
class diagrams containing the class that represents this actor:
1. Select the actor in a Use Case diagram.
2. Open the Actors Properties dialog box.
3. Select the Instances tab. UML Modeler displays a list of all sequence
and collaboration diagrams that contain that actor.

To view a diagram, select it in the list and then click the View
Diagram button.

2.4.2.4 Sub Diagrams Tab


The Sub Diagrams tab allows you to add a State Machine model that contains
one or more Activity and / or State diagrams to the selected Actor.

For more information about a State Machine model and its diagrams, please
refer to chapter entitled State Machine Model in this guide.

Copyright IBM Corp. 2002 75


2.5 Relationships
UML supports two types of relationships for Use Case diagrams:
Association: Between an actor and a use case, two actors, or two use
cases.
Generalization: Between two actors, or two use cases.
In this section, well take a look at the detailed properties of the relationships in
Use case diagrams. In your model, you can define relationships names, role
names, and many other details concerning the relationships.

2.5.1 Adding Relationships


1. Click the Generalization button or the Association buttons
(Aggregation or Navigation) on the Use Case toolbar.
2. Click and drag from one use case or an actor to another use case or
actor. UML Modeler draws a line representing the relationship between
the two elements.

When creating a Generalization relationship, drag the relationship


from the concrete Use Case/Actor to the abstract Use Case/Actor.

2.5.2 Deleting relationships


1. Select the line representing a relationship.
2. Right-click the line.
3. Select Delete from the shortcut menu.
OR
1. Select the line representing a relationship.
2. Press the Delete key.

2.5.3 Opening the Relationship Properties Dialog


Box
1. Select the line representing a relationship.
2. Right-click the line.
3. Select Properties from the shortcut menu. UML Modeler opens the
Generalization Properties or Association Properties dialog box.

76 IBM Holosofx Workbench - UML Modeler - User Guide


Copyright IBM Corp. 2002 77
2.5.3.1 Naming Relationships
The main purpose of a relationship name is to further clarify the relationship.
But relationship names are not required. In the diagram, relationship names are
shown along the relationship line.
You can define the relationship name in the relationship Properties dialog box.
To name a relationship:
1. Open the relationships Generalization/Association Properties dialog
box.
2. Type the name in the Name text box.
3. Click OK.
To move the relationship name in the diagram:
1. Click the Red X next to the relationship name and drag it along the line
representing the relationship.

2.5.3.2 Assigning Stereotypes to a Relationship


As with other model elements, you can assign a stereotype to a relationship.
Stereotypes are used to classify relationships, for example, a relationship you
frequently use.
To set the relationship stereotype:
1. Open the relationships Generalization/Association Properties dialog
box.
2. Type the name of the new stereotype in the Stereotype selection box, or
select an existing stereotype in the drop-down list.
Notice that your new stereotype names, once saved, are added to the drop-
down list for future use.

2.5.4 Generalization Relationships Among Actors


An Actor Generalization relationship shows the commonality of several actors,
called subactors, abstracted into a single, separate actor, called the super-actor.
Sub-actors are directly instantiated, but the superactor is never directly
instantiatedit exists only to show the commonality among the subactors.
To add a generalization relationship:
1. Click the Generalization button in the Use Case toolbar.
2. Click and drag the relationship from the sub-actor to the super-actor.

2.5.5 Use Cases Relationships


UML Modeler allows you to use the Generalization Properties dialog box to
model relationships among the use cases in your diagram. There are three
categories of use case relationships:

78 IBM Holosofx Workbench - UML Modeler - User Guide


Uses
Extends
Communicates

2.5.5.1 Uses Relationship


A uses relationship allows one use case to use the functionality of another use
case. This is beneficial when the functionality of one use case has features that
could also be used by several others. The uses relationship indicates that one
use case will always use the functionality of another use case.
To specify that a relationship is a uses relationship:
1. Open the Association relationships Association Properties dialog box.
2. Type uses in the Stereotype selection box.

2.5.5.2 Extends Relationship


An extends relationship allows one use case/Actor, the extending one, to
extend the functionality of another use case/Actor, the base one, but only at
certain extension points defined in the base use case/Actor. The extends
relationship is like a uses relationship, except that the use case/Actor
functionality is shared only at the extension points.
The relationship representing an extends relationship must be drawn from the
Use case/Actor providing the extending functionality to the use case/Actor
being extended. Then, to specify that a relationship is an extends relationship:
1. Open the relationships Generalization Properties dialog box.
2. Type extends in the Stereotype selection box.

2.5.5.3 Communicates Relationship


A communicates relationship is a relationship between a use case and an actor.
An actor or a use case can initiate the relationship. Information can also flow in
both directions, from an actor to a use case and then back again.
When you add a relationship between an actor and a use case, drag the mouse
from the actor to the use case. Then, to specify that a relationship is a
communicates relationship:
1. Open the relationships Association Properties dialog box.
2. Type communicates in the Stereotype selection box.

Copyright IBM Corp. 2002 79


2.5.6 Roles

2.5.6.1 Naming Roles


A role represents an actor engaged in an association relationship. A role name
can be substituted for a relationship name, with the advantage that a role name
better describes the reason the relationship exists. Like relationship names, role
names are optional, and are used only when the purpose of the relationship is
not obvious. Generally, you would use a relationship name or a role name.
To name a role:
1. Open the Association Properties dialog box of the relationship for
which you want to name one or both of the roles.
2. Select the Role A or Role B tab. Remember that Role A defines the
source (the actor you draw the relationship from) and Role B defines the
destination (the actor you draw the relationship to).
3. Type the role name in the Role Name text box.
4. Click OK.

80 IBM Holosofx Workbench - UML Modeler - User Guide


2.5.6.2 Aggregations
An aggregation is a stronger form of association. Aggregation shows the part-of
relationship. One actor may have several aggregation relationships with other
actors.
To set an actor to be an aggregate with respect to another:
1. Open the Association Properties dialog box of the relationship for
which you want to specify one of the roles as an aggregate.
2. Select the Role A or Role B tab, depending on which Role corresponds
to the aggregate actor.

Role A defines the source (the actor you draw the relationship
from) and Role B defines the destination (the actor you draw the
relationship to).

3. Select the Aggregate check box to set this role to aggregate.


4. Click OK.

2.5.6.3 Setting Cardinality


Cardinality is the number of instances of a class. You set cardinality in the Role
A and Role B tabs in the Association Properties dialog box. The following
table shows the meanings of the options in the Cardinality drop-down list:

Cardinality Meaning
n Many

0..0 Zero

0..1 Zero or one

0..n Zero or
more

1..1 Exactly one

1..n One or more

To set role cardinality:


1. Open the Association Properties dialog box of the relationship for
which you want to specify the cardinality of one of the roles.
2. Select the Role A or Role B tab. Remember that Role A defines the
source (the actor you draw the relationship from) and Role B defines the
destination (the actor you draw the relationship to).
3. Select the appropriate option from the Cardinality drop-down list.
4. Click OK.

Copyright IBM Corp. 2002 81


2.5.6.4 Adding Documentation
You can add documentation in the way of comments or notes to a role using the
Relationship Properties dialog box.
1. Open the Association Properties dialog box of the relationship for
which you want to add documentation for one of the roles.
2. Select the Role A or Role B tab.

Role A defines the source (the actor you draw the relationship
from) and Role B defines the destination (the actor you draw the
relationship to).

3. Type the documentation in the Documentation text box.


4. Click OK.

82 IBM Holosofx Workbench - UML Modeler - User Guide


Chapter 3: Interaction Diagrams

In the Interaction diagrams the information is presented in a way that is more


useful to the developers. These diagrams focus on the objects that will be
created to implement the system functionalities.
The Interaction diagrams contain:
Objects: An Interaction diagram can use Object names, Class names, or
both.
Messages: Through a message, one Object or Class can request that
another carry out some specific function.
Interaction diagrams present both objects and/or classes. Through the
interaction diagrams, designers and developers can determine the classes to
be developed, the relationships between classes, and the operations or
responsibilities of each class.
Interaction diagrams come in two forms, Sequence and Collaboration.
Sequence Diagrams: A Sequence diagram shows the sequence of
communications and is recommended for real-time specifications and
complex scenarios.
Collaboration Diagrams: A collaboration diagram shows an Interaction
organized around the roles in the Interaction and their relationships. The
collaboration diagram does not show time as a separate dimension, so it is
important to determine the sequence of communications using sequence
numbers.

Copyright IBM Corp. 2002 83


3.1 The Interaction Diagram Toolbars
The Collaboration Diagram toolbar is the same as the Sequence Diagram
toolbar. This table describes how to use each of the toolbar buttons to add items
to the diagram:.

Button Name Purpose


Object Adds a new object to the diagram.

Condition Adds a condition.

Condition Links a condition with an object.


Connector

Synchronous Creates a synchronous path for communication


Object Link, between two objects
Link to Self
Also adds a message in either direction between
two objects or from an object to itself.

Asynchronous Creates an asynchronous path for


Object Link, communication between two objects
Link to Self
Also adds a message in either direction between
two objects or from an object to itself.

84 IBM Holosofx Workbench - UML Modeler - User Guide


3.2 Creating an Interaction Diagram
The Sequence and Collaboration diagrams, like all UML Modeler diagrams, can
be created, opened, and deleted from either the Browser or using the menu
commands. However, remember that Sequence and Collaboration diagrams
can only reside directly in a Use Case or a Package.

3.2.1 Creating a New Interaction Diagram


1. In the Browser, right-click the Package in which you want to create your
new Use Case diagram.
2. Select New > Diagram, and then select Sequence diagram or
Collaboration diagram in the New Diagram dialog box.
3. With the new diagram type selected, type in the name of your new
diagram in the Name text box.
4. Click OK.

3.2.2 Opening an Existing Interaction Diagram


1. Navigate through the Browser till you locate the desired Interaction
diagram.
2. Double-click the Interaction diagrams name or icon to open it.

Copyright IBM Corp. 2002 85


3.3 Working with Objects
Objects in the Interaction diagrams can be associated with classes by assigning
classes to these interaction diagram object. It is important to distinguish
between classes and objects. A Class defines what information an object can
hold and what behaviors it can have.
The Sequence and Collaboration diagrams show you the objects that
participate in one flow through a particular use case. Once the class has been
assigned to an object, the next step is to add other objects. You can find the
objects that participate in a particular Sequence or Collaboration diagram by
examining the noting in the flow of events and scenario documents. After that,
you can add messages between the objects.

3.3.1 Object Properties


There are a number of different fields that UML Modeler provides to allow
adding some detail to the objects in your diagram. For example, you can set the
objects name, class, and persistence. You can also add documentation to the
object. In the following sections, well take a look at each of these options in the
Object Properties dialog box.
To open the Object Properties dialog box:

1. Right-click the object in the Sequence or Collaboration diagram.


2. Select Properties from the shortcut menu.
OR
1. Select the object in the Sequence or Collaboration diagram.
2. Click the Properties button on the Diagram View toolbar.

86 IBM Holosofx Workbench - UML Modeler - User Guide


3.3.2 Naming an Object
Each object in a Sequence or Collaboration diagram should be given a unique
name. Notice that objects names should be specific names. (For example, if the
Class name is Employee, the object name would be Mike).
To name an object:
1. Right-click the object in the Sequence or Collaboration diagram.
2. Select Properties from the shortcut menu. The Object Properties
dialog box appears.
3. In the Name field, type the objects name.
4. Click OK.
To add documentation to an object:
1. Right-click the object in the Sequence or Collaboration diagram.
2. Select Properties from the shortcut menu. The Object Properties
dialog box appears.
3. Type comments for the object in the Documentation text box.
4. Click OK.

3.3.3 Mapping an Object to a Class


In a Sequence or Collaboration diagram, each object may be mapped to a
class. In the Object Properties dialog box, you can use the Class field to set
the objects class.
When assigning a class to the object, you can either use an existing class or
create a new class. Both of these procedures are described below.
To map an object to an existing class:
1. Right-click the object in the Sequence or Collaboration diagram.
2. Select Properties from the shortcut menu. The Object Properties
dialog box appears.
3. Select the class from the Class drop-down list.
4. Click OK. Once you have mapped the object to a class, the class name
will appear with the object name in the diagram, preceded by a colon.
To create a new class for an object:
1. Right-click the object in the Sequence or Collaboration diagram.
2. Select Properties from the shortcut menu. The Object Properties
dialog box appears.
3. Select <Create Class> from the Class drop-down list. A class will be
created in the model.
4. Click OK.

Copyright IBM Corp. 2002 87


To remove an objects class mapping:
1. Right-click the object in the Sequence or Collaboration diagram.
2. Select Properties from the shortcut menu. The Object Properties
dialog box appears.
3. From the Class drop-down list, select <None>.
4. Click OK.

3.3.4 Setting Object Persistence


In UML Modeler, you can set the persistence option for each object in the
diagram. UML Modeler provides you with three options:
Persistent: The object continues to exist after its program terminates.
Static: The object exists until its program terminates.
Transient: The object exists only as long as the logic that calls it exists.
To set the persistence of an object:
1. Right-click the object in the Sequence or Collaboration diagram.
2. Select Properties from the shortcut menu. The Object Properties
dialog box appears.
3. From the Persistence region, select the appropriate radio button:
Persistent, Static, or Transient.
4. Click OK.

88 IBM Holosofx Workbench - UML Modeler - User Guide


3.4 Working with Messages
A message is a communication between objects, in which one object (the
sender) asks another object (the receiver) to perform a function.

3.4.1 Adding Messages to an Interaction Diagram


Once you have placed two objects in your Sequence or Collaboration diagram,
the next step is to add messages between them. The messages will be
displayed in the diagram area between the objects lifelines, or in the case of a
reflexive message, between the objects lifeline and itself. Messages are
displayed in chronological order, from the top of the diagram to the bottom.
To add a message to Sequence or Collaboration diagram:
1. Click the Synchronous/Asynchronous Object Link button on the
Interaction Diagram toolbar.
2. Click an object and drag to another object to create the line representing
the message.
3. Select the message between the two objects.
4. Right-click the message and select Properties to access the Message
Properties dialog box
5. In the Message Properties dialog box, type a name for the message.
6. Click OK.
To add a reflexive message to an Interaction diagram:
1. Click the Synchronous/Asynchronous Object Link button in the
Interaction Diagram toolbar.
2. Click an object and drag to the object itself to create the line
representing the reflexive message. UML Modeler will draw a half-circle
arrow on the object.
3. Right-click the message and select Properties to access the Message
Properties dialog box
4. In the Message Properties dialog box, type a name for the message.
5. Click OK.

3.4.2 Adding Conditional Messages to an


Interaction Diagram
If you want to specify a condition that has to be satisfied before a message is
sent:
1. Click the Condition button on the toolbar.
2. Place the condition object in the diagram.

Copyright IBM Corp. 2002 89


3. Click the Condition Connector button on the toolbar.
4. Drag the condition connector from the object sending the message to
the condition object.

A class should have been assigned to the selected object in order


for the condition connector to be drawn. Otherwise, an error
message will appear.

5. Right-click the condition object and select Properties from the shortcut
menu. The Condition Properties dialog box opens.

6. Select the operation that will evaluate the condition in the Operation
drop-down list, or create a new one.
7. Click the Object Link button on the toolbar.
8. Drag the mouse from the Condition object to the object receiving the
message.
9. Right-click the message and select Properties. The Message
Properties dialog box appears.
10. Type the name of the message.
11. Click OK.

3.4.3 Deleting Messages in an Interaction Diagram


To delete a message in a Sequence or Collaboration diagram:
1. Select the message to be deleted.
2. Select Edit > Delete, or press the Delete key. Both the condition
message and the condition object will be deleted.

3.4.4 Message Properties


You can set a number of different options for your messages. As with use cases
and actors, you can add names and documentation to messages. You can also
set synchronization and frequency options. In this section, we discuss each of
the options you can set for a message.

90 IBM Holosofx Workbench - UML Modeler - User Guide


To open the Message Properties dialog box:
1. Right-click the message in the diagram.
2. Select Properties. The Message Properties dialog box appears.
OR
1. Select the message in the diagram.
2. Click the Properties button on the Diagram View toolbar. The Message
Properties dialog box appears.

3.4.5 Naming Messages


In the Message Properties dialog box, you can name the message, and add
documentation to it. Each message should have a name that indicates its
function.
To name a message:
1. Right-click the message in the Sequence or Collaboration diagram.
2. Select Properties from the shortcut menu. The Message Properties
dialog box appears.
3. Type the name of the message in the Name text box.
4. Click OK.

3.4.6 Adding Documentation to a Message


To add documentation to a message:

Copyright IBM Corp. 2002 91


1. Right-click the message in the Sequence or Collaboration Diagram.
2. Select Properties from the shortcut menu. The Message Properties
dialog box appears.
3. Type comments for the message in the Documentation text box.
4. Click OK.

3.4.7 Setting Message Synchronization Options


In the Message Properties dialog box, you can specify the Synchronization of
the message being sent. These options are:
Simple: Specifies a message that runs in a single thread of control.
Synchronous: The client sends the message and then pauses until the
supplier has acted upon the message.
Asynchronous: The client sends the message and then continues
processing, without pausing.
Timeout: Specifies a message that has to wait for a specified amount of
time after it is sent.
Balking: Specifies a message that is abandoned if it is not immediately
accepted.
The arrows in the diagram represent whether the message is set to
synchronous or asynchronous.
To set the message Synchronization:
1. Right-click the message in the Sequence or Collaboration diagram.
2. Select Properties from the shortcut menu. The Message Properties
dialog box opens.
3. Select the appropriate radio button in the Synchronization region.
4. Click OK.

3.4.7.1 Setting Message Frequency


The message Frequency option lets you mark a message to be sent at regular
intervals.
The Frequency options are:
Periodic: The message is sent at regular intervals.
Aperiodic: The message may be sent only once, or at irregular points in
time.
To set the message Frequency:
1. Right-click the Message in the Sequence or Collaboration diagram.
2. Select Properties from the shortcut menu. The Message Properties
dialog box opens.

92 IBM Holosofx Workbench - UML Modeler - User Guide


3. Select the appropriate radio button in the Frequency region.
4. Click OK.

3.4.8 Mapping a Message to an Operation


When you first create your Sequence and Collaboration diagrams, you may use
message names that are English phrases rather than operation names.
However, before you generate code, you must be sure that each message is
mapped to the appropriate operation. The best time to do this mapping is right
when you identify an operation. In the end, every message in your Sequence
and Collaboration diagrams should be mapped to an operation of a class.
To map a message to an operation:
1. Right-click the message in the Sequence or Collaboration diagram.

Be sure the Sender object has been mapped to a class.

2. Select Properties from the shortcut menu. The Message Properties


dialog box opens.
3. Select the operation from the Operation List of the Receiver object.
- If the operation does not yet exist, select <Create Condition> from the
Operation List to create it.
4. Click OK.
To remove a messages operation mapping:
1. Right-click the message in the Sequence or Collaboration diagram.
2. Select Properties from the shortcut menu. The Message Properties
dialog box opens.
3. Select <None> from the drop-down list of the Operation List selection
box to remove the operation.
4. Click OK.

Copyright IBM Corp. 2002 93


94 IBM Holosofx Workbench - UML Modeler - User Guide
Chapter 4: Class Diagrams

A Class is created for each type of object in a Sequence or Collaboration


diagram. A Class diagram shows the attributes and operations of Classes in a
system. Class diagrams also show the relationships among the Classes. The
types of arrows connecting two Classes, its direction, and its associated data all
give important information about the relationship between the two connected
Classes.
In UML Modeler, by default, there is one Class diagram, called Main, that is the
root Class diagram for the system. This Class diagram displays the packages of
Classes in your model. Inside each package there is a Class diagram labeled
with the package name, which includes all of the Classes inside that package.
In UML Modeler, double-clicking a package in a Class diagram will
automatically open its main Class diagram.

Copyright IBM Corp. 2002 95


4.1 The Class Diagram Toolbar
In this chapter, well discuss how to add Classes to the model and to a diagram
using the Class Diagram toolbar. Well begin by describing the options
provided by each of the toolbar buttons.
The following table shows the descriptions of only the buttons related to the
Class.
The Class Diagram toolbar buttons are:

Icon Button Purpose


Class Add a new Class to the diagram.

Package Add a new package to the diagram.

Generalization Draw a Generalization relationship.

Aggregation Draw an Aggregation relationship between two


classes, two actors, or a class and an actor.

Navigation Draw an Association relationship between two


actors, two classes, or a class and an actor,
where their defaults are navigable.

96 IBM Holosofx Workbench - UML Modeler - User Guide


4.2 Classes
A Class encapsulates information as attributes, and behavior in the form of the
operations that the Class performs.
In UML, a Class is shown using the following notation:

The top section of the Class object in the diagram contains the Class name. The
middle section contains the attributes of the Class. The lower section contains
the operations of the Class.

4.2.1 Adding Classes


Like any UML Modeler element, you can add a Class through the toolbar or the
Browser. You may choose to add a new Class to the Browser only. This way,
the Class will not be added to any other diagram. On the other hand, if you add
a new Class to a diagram, it will be automatically added to the Browser as well.

4.2.1.1 Adding a New Class to a Class Diagram


1. Select the Class button from the Class diagram toolbar.
2. Click the desired location inside the Class diagram. A small pane
appears with the item Create New Class appears.
3. Select the Create New Class item. The new Class will be named Class
1. If this name is used by another Class in the model, then it will be
labeled as Class 2, and so on.

4.2.1.2 Adding an Existing Class to a Class Diagram


1. Select the Class button from the Class Diagram toolbar.
2. Click the desired location inside the Class diagram. A small pane
appears with the item Create New Class and a list of existing classes
appears
3. Select the class you want from the classes list in the pane. A copy of the
selected Class is placed in the diagram.

Copyright IBM Corp. 2002 97


4.2.1.3 Adding a Class to the Browser
1. Select the Root package or any package to which you would like to add
your new Class.
2. Right-click the package in the Browser. A shortcut menu appears.
3. Select New > Class from the shortcut menu.
4. The new Class will appear, with its default name, in the Browser with a
Class icon next to it.

4.2.2 Deleting Classes


As with other model elements, there are two ways of deleting Classes. You can
delete a Class from a diagram, but keep it in other diagrams. Or, you can
remove a Class from the entire model. Both methods are described below.
To remove a Class from a Class diagram:
1. Select the Class in the diagram.
2. Press the Delete key. The Class will be removed from the diagram, but
still exists in the Browser and in other Class diagrams.
To remove a Class from the model:
1. Right-click the Class in the Browser.
2. Select Delete from the shortcut menu. A warning message appears.
3. Click OK, to confirm deleting the Class, or Cancel to cancel the deletion.
The Class will be removed from all Class diagrams, as well as from the
Browser.

98 IBM Holosofx Workbench - UML Modeler - User Guide


4.3 Defining Class Properties
Most of the options that you can set for a Class are available in the Class
Properties dialog box. For example, this dialog box allows you to set the Class
Stereotype, visibility, and persistence. In the following sections, well discuss
each of the options available in the tabs of this dialog box.
To open the Class Properties dialog box:
1. Right-click the Class element on a Class diagram. A shortcut menu
appears.
2. Select Properties from the shortcut menu. The Class Properties dialog
box appears.

OR
1. Right-click the desired classs name or icon in the Browser. A shortcut
menu appears.
2. Select Properties from the shortcut menu. The Class Properties dialog
box appears.
OR
1. Select the Class in a Class diagram.

2. Select the Properties button from the Diagram View toolbar.


OR
1. Double-click the Class element in the Class diagram.

Copyright IBM Corp. 2002 99


4.4 Class Properties / Classes Tab
This tab allows you to set the main properties of the Class.

4.4.1 Naming a Class


Each Class in a model should have a unique name. Most organizations use
their own naming conventions for naming Classes. Generally, Classes are
named with singular nouns.
To Modify a Class name:
1. Select the Class in the Class diagram.
2. Double-click the upper part of the Class object, which contains the
name. A editing text field appears allowing you to edit Class name.
3. Modify the Class name.

100 IBM Holosofx Workbench - UML Modeler - User Guide


4. Click anywhere outside the class object or press Esc. The class name
will be updated.
OR
1. Open the Class Properties dialog box.
2. In the Classes tab, type the Class name you want in the Name text box.
3. Click OK.
To add documentation to a Class:
1. Select the Class in the Browser.
2. Open the Class Properties dialog box.
3. In the Classes tab, type your class documentation in the
Documentation text box.
4. Click OK.

4.4.2 Class Stereotypes


A Stereotype is used to categorize Classes. For example, you may create a
Stereotype named form, and assign this Stereotype to all the windows. To find
all the forms, you should search for the Classes that have the form Stereotype.

4.4.2.1 Assigning a Class Stereotype


1. Select the Class from the Browser or from the Class diagram.
2. Open its Class Properties dialog box.
3. In the Classes tab, type the Stereotype in the Stereotype field.
4. Click Update.

The new stereotype will be now available in the drop-down list box
for association with other classes in the model.

5. Click OK.

4.4.3 Creating Persistent Classes


Persistence determines whether object information is saved in internal storage.
There are two persistence options for a Class:
Persistent: Object information is saved in internal storage, and so remains
in the system after the execution of the objects application.
Transient: Object information is not saved in internal storage, and so is
lost as soon as the objects application finishes.

Copyright IBM Corp. 2002 101


To set the persistence of a Class:
1. Open the Class Properties dialog box of the selected class.
2. In the Classes tab, select the Persistent radio button to make the life
span of an Instance of this Class Persist beyond the life of its enclosing
program, or select the Transient radio button to make the life span of an
Instance of this Class end at the same time its enclosing program ends.
3. Click OK.

4.4.4 Creating Singlton Classes


A Singlton Class means that there could be one and only one instantiation of
this Class. In real life, for example, there should be only CEO for the company,
only one database connection to a particular database, and one timer used by
an application.
To set the Class to Singlton:
1. Open the Class Properties dialog box of the selected class.
2. In the Classes tab, select the Singlton check box.
3. Click OK.

4.4.5 Creating Visible Classes


For Classes, you can specify the type of access allowed among classes. You
can make a specific class visible for other classes using this feature.
To set the Class to Visible:
1. Open the Class Properties dialog box of the selected class.
2. In the Classes tab, select the Visible check box.
3. Click OK.

4.4.6 Creating an Abstract Class (General/ASV)


An Abstract Class is a Class that will not be instantiated. In other words, there
will be no objects created using the template of an abstract Class. Abstract
Classes are generally used in inheritance structures. They can hold information
and behavior that are common to some other Classes.
To create an abstract Class:
1. Open the Class Properties dialog box of the selected class.
2. In the Classes tab, select the Abstract check box.
3. Click OK.

102 IBM Holosofx Workbench - UML Modeler - User Guide


4.5 Class Properties / Attributes Tab
In UML Modeler, attributes can be added to each of the Classes in the model.
The following sections describe how to define attributes, add them to the model,
delete them from the model, and set detailed properties for each attribute.

4.5.1 Adding Attributes


There are different ways to add an attribute: You may add the attribute using the
Class Properties dialog box. Each attribute accepts three main pieces of
information: the attribute name, the data type, and the initial value. The name
and the data type are required, while the initial value is optional.
Once youve added an attribute, you can add documentation to it. Generally,
attribute documentation would include a short description.
To add an attribute to a Class:
1. Open the Class Properties dialog box of the Class to which you want
add an attribute.

Copyright IBM Corp. 2002 103


2. Select the Attributes tab.
3. Click the New Attribute button to add a new attribute. A new attribute is
added
4. Click OK.
To add documentation to an attribute:
1. Open the Class Properties dialog box of the selected class.
2. Select the Attributes tab.
3. Select the attribute you want to add documentation to.
4. Type the attribute documentation in the Documentation edit text area.
5. Click OK.

4.5.2 Deleting Attributes


As the project progresses, you may find that you need to delete an attribute.
You can delete an attribute from a Class through the Attributes tab in the Class
Properties dialog box.
To delete an attribute from a Class:
1. Open the Class Properties dialog box of the class having the attribute.
2. Select the Attributes tab.
3. Select the attribute you want to delete from the Attributes selection box.
4. Click Delete.
5. Click OK.

4.5.3 Attribute Properties


As with other UML Modeler model elements, there are a number of properties
you can add to an attribute, such as the data type, initial value, Stereotype, and
visibility. In the next sections, well take a look at each property.

4.5.3.1 Setting the Attribute Data Type


When creating the attribute, you must specify the data type. You can use either
built-in data types (string, integer, long, etc.) for your programming language, or
the names of Classes that you have defined in your UML Modeler model.
To set the attribute data type:
1. Open the Class Properties dialog box of the class having the attribute.
2. Select the Attributes tab.
3. Select the attribute you want to specify its data type from the Attributes
select list.

104 IBM Holosofx Workbench - UML Modeler - User Guide


4. Type the data type in the Type text box of the Attributes Specifications
region in the Attributes tab.
5. Click OK.

4.5.3.2 Setting the Attribute Stereotype


Like Actors and Use Cases, Classes and Attributes can be stereotyped. An
Attribute stereotype is a way to classify attributes. In UML Modeler, you are not
required to assign stereotypes to attributes. You can generate code without
using attribute stereotypes. Stereotypes can, however, improve the readability
and comprehensibility of your model.
To set the Attribute stereotype:
1. Open the Class Properties dialog box of the class having the attribute.
2. Select the Attributes tab.
3. Select the attribute from Attributes selection box.
4. Type the stereotype in the Stereotype combo box.
5. Click OK.

4.5.3.3 Setting the Attribute Initial Value


When you define an initial value for an attribute, this value will be assigned
every time the associated object is first instantiated as a default value.
To set the attribute initial value:
1. Open the Class Properties dialog box of the class having the attribute.
2. Select the Attributes tab.
3. Select the attribute from Attributes selection box.
4. Type the Initial Value in the Initial text box.
5. Click OK.

4.5.3.4 Setting the Attribute Scope


The attributes are contained in the Class, hidden away from other Classes. To
allow other Classes to view the attributes of a Class, you will need to set the
attributes visibility within this Class.
There are a number of visibility options available in UML Modeler for an
attribute: Public, Private, and Protected.
Public: The attribute is visible to all other Classes. Any other Class can
view or modify the value of the attribute.
Private: The attribute is not visible to any other Class.
Protected: Only the Class or any of its descendants has full access to the
attribute.
To set the attribute visibility:

Copyright IBM Corp. 2002 105


1. Open the Class Properties dialog box of the class having the attribute.
2. Select the Attributes tab.
3. Select the attribute from Attributes selection box.
4. Select the appropriate Scope radio button (Public, Protected, or
Private).
5. Click OK.

4.5.3.5 Making an Attribute Static


When an attribute is added to a Class, each instance of the Class receives its
own copy of the attribute. A static attribute is one that is shared by all instances
of a Class.
To make an attribute static:
1. Open the Class Properties dialog box of the class having the attribute.
2. Select the Attributes tab.
3. Select the appropriate attribute from Attributes selection box.
4. Select the Static check box.
5. Click OK.

4.5.4 Viewing Class Attributes


In the next section, well discuss in detail adding, deleting, and working with
attributes for a Class. The Class properties dialog box allows you to view the
attributes that have already been created for a Class.
To view the Class attributes:
1. Open the Class Properties dialog box.
2. Select the Attributes tab. The attributes for the Class, including the
attribute visibility, Stereotype, name, data type, and initial value, are
displayed in this tab, for each attribute selected from the Attributes
selection box.

106 IBM Holosofx Workbench - UML Modeler - User Guide


4.6 Class Properties / Operations Tab

4.6.1 Adding Operations


Like Attributes, Operations can be added to your UML Modeler model to a
Class through the Class Properties dialog box.
Once you have added an operation, you can add documentation to it.
Documentation for operations typically includes information like the purpose of
the operation, a short description of the operations parameters, and the
operation return type.
To add an operation to a Class:
1. Open the Class Properties dialog box of the class to which you want to
add an operation.
2. Select the Operations tab.
3. Click the New Operation button to add a new operation. A new
operation is added.

Copyright IBM Corp. 2002 107


4. Click OK.
To add documentation to an operation:
1. Open the Class Properties dialog box of the class having the Operation
you want to delete.
2. Select the Operations tab.
3. Select the operation you want to add documentation to.
4. Type the operation documentation in the Documentation edit window.
5. Click OK.

4.6.2 Deleting Operations


You delete an operation from the Class Properties dialog box. When deleting
an operation, be sure to keep the model consistent. You may have used the
operation in a Sequence or Collaboration diagram. If you delete the operation, it
will be automatically converted into a unconditional message in all Sequence
and Collaboration diagrams. Be sure to update the Sequence or Collaboration
diagram appropriately.
To delete an operation from a Class:
1. Open the Class Properties dialog box of the class having the
Operation.
2. Select the Operations tab.
3. Select the operation you want to delete from the Operations selection
box.
4. Click Delete.
5. Click OK.

4.6.3 Operation Properties


In the Operations tab of the Class Properties dialog box, you can set details
such as the operation parameters, return type, and visibility. In the next
sections, well take a look at each property.

4.6.3.1 Setting the Operation Return Type


The Return Type of an operation is the data type of the operations result. For
example, say we have an operation called Multiply, which takes as parameters
two Integers, A and B. The operation multiplies A and B together, and returns
the result as an integer. Thus the Return Type of Multiply is integer.
When specifying the return type, you can use either the data types built into
UML Modelersuch as string, char, or integeror data types that you have
defined yourself.
To set the operation return type:

108 IBM Holosofx Workbench - UML Modeler - User Guide


1. Open the Class Properties dialog box of the class to which you want to
define operation return type.
2. Select the Operations tab.
3. Select the Operation from the Operation selection box.
4. Type the return type of the operation in the Return Type text box.
5. Click OK.

You do not have to open the Class Properties dialog box for each
class in order to define this item for it. You can simply open the
Class Properties dialog box of any class, select the desired class
name from the Classes selection box, apply the changes you
want, and then click Update.

4.6.3.2 Setting the Operation Stereotype


As with other model elements, operations can be Stereotyped. Setting
Stereotypes for operations is not required to generate code. However,
Stereotypes can help improve the understandability of the model and the
readability of the code. Also, they can help you to ensure you have not missed
any operations.
The following are three of the most common operation Stereotypes:
Implementor: Operations that implement some business logic.
Manager: Constructors, destructors, and memory management
operations.
Access: Operations that allow other Classes to view or edit attributes.
Typically, these are named Get<attribute name> and Set<attribute
name>.
Helper: Private or protected operations used by the Class but not seen by
other Classes.
To set the operation Stereotype:
1. Open Class Properties dialog box of the class you to which you want to
set an operation stereotype.
2. Select the Operations tab.
3. Select the Operation from Operation selection box.
4. Type the appropriate Stereotype in the Stereotype selection box or
select an existing one.
5. Click OK.

You do not have to open the Class Properties dialog box for each
class in order to define this item for it. You can simply open the
Class Properties dialog box of any class, select the desired class

Copyright IBM Corp. 2002 109


name from the Classes selection box, apply the changes you
want, and then click Update.

4.6.3.3 Setting the Operation Scope


As discussed earlier, scope (visibility) describes the level of access other
Classes have to the attributes and operations inside a Class. There are three
scope options for operations:
Public: The operation is visible to all other Classes. Any other Class may
request that the operation be executed.
Private: The operation is not visible to any other Class.
Protected: Only the Class and any of its descendants have access to the
operation.
To set the Operation scope:
1. Open Class Properties dialog box of the class to which you want to set
operation scope.
2. Select the Operations tab
3. Select the Operation from Operation selection box.
4. Select the appropriate Scope radio button (Public, Protected, or
Private).
5. Click OK.

You do not have to open the Class Properties dialog box for each
class in order to define this item for it. You can simply open the
Class Properties dialog box of any class, select the desired class
name from the Classes selection box, apply the changes you
want, and then click Update.

4.6.3.4 Specifying the Operation Pre Conditions


A precondition is some condition that must be true before the operation can be
executed. You can enter any preconditions for the operation in the Pre
Conditions text box in the Operations tab. If you have an Interaction diagram
that illustrates the operation preconditions, you can enter the Interaction
diagram name in the Preconditions text box.
To specify the operation preconditions:
1. Open Class Properties dialog box of the class to which you want to
specify operation precondition.
2. Select the Operations tab
3. Select the Operation from Operation selection box.
4. Type the Precondition in the Precondition text area.
5. Click OK.

110 IBM Holosofx Workbench - UML Modeler - User Guide


4.6.3.5 Specifying the Operation PostConditions
Postconditions are conditions that must always be set to true after the operation
has completed execution. Postconditions are entered in the Postconditions
text box in the Operation tab.
To specify the operation postconditions:
1. Open Class Properties dialog box of the class to which you want to
specify operation postcondition.
2. Select the Operations tab.
3. Select the Operation from Operation selection box.
4. Type the Postcondition in the Postcondition text area.
5. Click OK.

Copyright IBM Corp. 2002 111


4.7 Class Properties / Operations
Arguments Tab
An operation is a behavior associated with a Class. An operation has three
parts: the operation name, the operation parameters, and the operation return
type. The operation takes the parameters as input, and produces the return type
as output.

Operations define the responsibilities of your Classes. In UML, operations are


displayed in the Class diagram using the following notation:
Operation Name (argument1 : argument1 data type, argument2 :
argument2 data type, ...) : return type

112 IBM Holosofx Workbench - UML Modeler - User Guide


4.7.1 Adding and Deleting Arguments to an
Operation
Operation arguments, also called parameters, are the input data the operation
receives. A Multiply operation, for example, would take two arguments, A and B,
and multiply them together.
As is the case with attributes, arguments require two pieces of information: the
argument name, and its data type. On a Class diagram, the argument names
and data types appear in parentheses after the operation name:
To add an argument to an operation:
1. Open the Class Properties dialog box of a class to which you want to
add an operation argument.
2. Select the Operation Arguments tab
3. Select the Operation from Operation selection box.
4. Click the New Argument button. A new argument for the selected
Operation will be created with a default name.
5. Click OK.
To delete an argument from an operation:
1. Open the Class Properties dialog box of the class having the operation
argument you want to delete.
2. Select the Operation Arguments tab
3. Select the Operation from Operation selection box.
4. Select the Argument you want to delete from the Arguments selection
box.
5. Click the Delete button. The argument will be deleted.
6. Click OK.

4.7.2 Setting Arguments Properties of an Operation


You can set the type and the initial value of an argument and whether the
argument is constant or not in the Operation Arguments tab of the Class
Properties dialog box.
To set Argument properties of an Operation:
1. Open the Class Properties dialog box of the class to which you want to
set Argument properties.
2. Select the Operation Arguments tab
3. Select the appropriate operation from the Operation selection box.
4. Select the Argument you want to update its properties from the
Arguments selection box.

Copyright IBM Corp. 2002 113


- Select the Constant check box if you consider the argument to be
constant.
5. Type the initial value of the argument in the Initial text box.
6. Type the type of the argument in the Type text box.
7. Click OK.

114 IBM Holosofx Workbench - UML Modeler - User Guide


4.8 Class Properties / Instance Tab
When you need to change a Class, it can be helpful to know exactly where in
the system the Class is being used. The two types of Interaction diagrams,
Sequence and Collaboration, show you where and how each Class is being
used. You can use the Instances tab to see which diagrams contain a particular
Class.

To view all diagrams containing a Class:


1. Select the Class in a Class diagram.
2. Open its Class Properties dialog box.
3. Select the Instances tab. UML Modeler will display a list of all diagrams
that contain the selected Class. To open a diagram, select it and click
the View Diagram button.

Copyright IBM Corp. 2002 115


4.9 Class Properties / Sub Diagrams
Tab
The Sub Diagrams tab allows you to add a State Machine model that contains
one or more Activity and / or State diagrams to the selected class.

For more information about State Machine model and its diagrams, please refer
to the chapter entitled State Machine Model chapter in this guide.

116 IBM Holosofx Workbench - UML Modeler - User Guide


4.10 Relationships
There must be a relationship between any two Classes to allow sending
messages from one to another in an Interaction diagram. A relationship allows
Classes to know about each others attributes and operations. In this section,
well discuss the different types of relationships that can be established between
Classes and between packages, and how to add them to your Class diagrams.
We will also explain how to define relationships.
UML Modeler supports three common types of relationships between Classes:
Associations
Aggregations
Generalizations
When an association connects two Classes, each connected Class can send
messages to the other in a Sequence or a Collaboration diagram. Associations
can be bi-directional or unidirectional. In UML Modeler, bi-directional
associations are drawn either with arrowheads on both ends or without
arrowheads at all. The uni-directional associations contain one arrowhead
showing the direction of the message. With an Association relationship, UML
Modeler will place attributes in the Classes.
Aggregations are stronger forms of association. An aggregation is a relationship
between a whole and its parts. Aggregations are shown as a line with a
diamond next to the Class representing the whole.
Generalizations are used to show an inheritance relationship between two
Classes. Generalizations are shown as an arrow directing from the child Class
to the parent Class.

4.10.1 Adding Relationships


In UML Modeler, you create associations directly in a Class diagram. The
diagram toolbar includes three buttons for creating Generalization, Association,
and Aggregation relationships.
If you create a bi-directional association, you can later change it to a
unidirectional association by changing its navigability. We will discuss
navigability in the Working with Relationships section.
To create relationship in a Class diagram:
1. Select the appropriate relationship button in the toolbar.
2. Drag the relationship line from one Class to the other Class.
To add documentation to a relationship:
1. Right-click the line representing the relationship and select Properties
from the shortcut menu.
2. The Association Properties dialog box or the Generalization dialog
box will appear, based on the type of the relationship.

Copyright IBM Corp. 2002 117


3. Type the relationship documentation in the Documentation text area.
4. Click OK.

4.10.2 Deleting Relationships


There are two ways to delete a relationship in a Class diagram.
To delete a relationship:
1. Select the relationship that you want to delete.
2. Press Delete.
OR
1. Select the relationship that you want to delete.
2. Select Edit > Delete.

4.10.3 Assigning Stereotypes to Association


Relationship
As with other model elements, you can assign a Stereotype to a relationship.
Stereotypes are used to classify relationships. You may, for example, have two
types of associations you frequently use. You can create stereotypes for these
association types.

118 IBM Holosofx Workbench - UML Modeler - User Guide


To set the Association relationship Stereotype, you can use the Association
Specifications tab of the Association Properties dialog box.
1. Open the Association Properties dialog box of the desired Association
relationship.
2. Select the Association Specifications tab.
3. Enter the Stereotype in the Stereotype field or select the appropriate
Stereotype from the drop down list.

4.10.4 Setting the Association Properties


4.10.4.1 Naming Roles
Role names can be used in Associations or Aggregations instead of relationship
names to describe the reason for which the relationship exists. Generally, you
would use a relationship name or a role name. Like relationship names, role
names are optional, and are only used when the purpose of the relationship is
not obvious. It is essential to use roles to specify the relationship.

To name the role that represents a class engaged in an association relationship:


1. Open the Association Properties dialog box of the desired association
relationship.
2. Select the Role A or Role B tab.

Copyright IBM Corp. 2002 119


3. Enter the role name in the Role Name text box.
4. Click OK.

4.10.4.2 Adding Role Documentation


You can add documentation or notes to a role using the Relationship
Properties dialog box.
1. Open the Association Properties dialog box of the relationship to
which you want to add documentation.
2. Select the Role A or Role B tab.
3. Enter the documentation in the Documentation text area.
4. Click OK.

4.10.4.3 Setting Navigability


The Class Diagram toolbar allows you to create both unidirectional and bi-
directional associations. The default is a bi-directional association.
If you create a bi-directional association, you can later change it to a
unidirectional association by changing its navigability.
To create a bi-directional association on a Class diagram:
1. Select the Association button in the Class Diagram toolbar.
2. Click and drag the relationship from one element to another use case.
UML Modeler will draw a bi-directional association line representing the
relationship between the two elements.
To change it to a bi-directional association to a unidirectional association:
1. Open the Association Properties dialog box of the relationship.
2. Select Role A or Role B tab, depending on which you one of the Roles
want to specify as none navigable class.

Remember that Role A defines the source (the Class you draw the
relationship from) and Role B defines the destination (the Class
you draw the relationship to).

3. Select the Navigable check box to set this class to navigable.


4. Click OK.

4.10.4.4 Setting Containment


The Containment region indicates how the generated attributes of an
aggregation relationship will be contained. These attributes can be contained
By Value, By Reference or Unspecified.
The By Value aggregation indicates that the whole and the part are created
and destroyed at the same time.

120 IBM Holosofx Workbench - UML Modeler - User Guide


The By Reference aggregation indicates that the whole and the part are
created and destroyed at different times.
The Unspecified aggregation means that the method of aggregation is not
specified yet.
To set containment:
1. Open the Association Properties dialog box of the relationship.
2. Select Role A or Role B tab that you want to set its containment
method.
3. Select the appropriate containment method as By Reference, By
Value, or Unspecified.
4. Click OK.

4.10.4.5 Setting Multiplicity/Cardinality


Multiplicity indicates how many instances of one class are related to a single
instance of another class at a given point in time.
For example, in a particular process, we have classes called Roles and classes
called Employees. Employees may have Roles, but in the same time Roles may
have Employees. Multiplicity indicates how many Roles an Employee may have
at a time, and how many Employees a Role may have at a time.
The multiplicity is defined at the two ends of the relationship. In our process,
each Employee may play 1 to 4 Roles, and each Role may be assigned to 1 to
3 Employees.So, to represent this relationship in the diagram, you would place
a multiplicity of 1..4 at the Role end, and 1..3 at the Employee end.
Typically, multiplicity among forms, screens, or windows will be 0..1 on each
side of the relationship. Although this doesnt always hold true, this multiplicity
would indicate that each form may exist independently of the other. In other
words, 0..1 multiplicity is used occasionally to indicate mutually exclusive
relationships.
The following table shows the cardinality options that are available in the
Cardinality drop-down list box of the Role A or Role B tab.

Cardinality Meaning
n Many

0..0 Zero

0..1 Zero or one

0..n Zero or more

1..1 Exactly one

1..n One or more

To set relationship multiplicity:

Copyright IBM Corp. 2002 121


1. Open the Association Properties dialog box of the relationship for
which you want to specify multiplicity.
2. Select Role A or Role B tab that you want to set its cardinality.

Remember that Role A defines the source and Role B defines the
destination.

3. Set the appropriate multiplicity using the Cardinality selection box.


4. Click OK.

4.10.5 Setting Generalizations Properties


Generalization relationships are created in Class diagrams. It is common that
an organization will create one or two Class diagrams that are dedicated to the
inheritance structure. These Class diagrams will typically show only limited
attribute or operation information.
As you add generalization relationships, you may need to change some of the
attributes and operations.

4.10.5.1 Setting Visible Classes in Generalization


Relationships
To create Visible Classes:
1. Open the Generalization Properties dialog box.
2. Select the Visible check box to make this Class Visible to other classes.
3. Click OK.

122 IBM Holosofx Workbench - UML Modeler - User Guide


Chapter 5: State Machine Model

State Machine Model is a container that holds two types of diagrams. These
types are State diagrams and Activity diagrams. The State Machine Model and
its diagrams are used as a sub diagram of a Package, Class, or Use Case. This
chapter will illustrate the purpose of these two diagram types, how to create an
Activity or State diagram as a sub diagram of a Package, Class, or Use Case,
and how to work with these diagrams.

Copyright IBM Corp. 2002 123


5.1 State Machine Model Diagrams
The State Machine Model consists of two diagram types: State Diagrams, and
Activity Diagrams.
State Diagrams: State diagrams are used in describing a system's
behavior. They illustrate the possible states that a particular object can
have and show how the object's state changes as a function of the events
that reach the object.
Activity Diagrams: Activity diagram has the advantage that it allows you
to choose the sequence of doing things and handle parallel processes.
This is important for business modeling because processes are not
necessarily sequential. Activity diagramming is a technique that
encourages moving away from unnecessary sequential behavior and
toward identifying opportunities for performing tasks in parallel, which can
improve processes' efficiency and responsiveness.

124 IBM Holosofx Workbench - UML Modeler - User Guide


5.2 Defining a State Machine Model
Diagram
To define a new State or Activity diagram within a State Machine model:
1. Select the Sub Diagrams tab from the Class Properties, Use Case
Properties, or Package Properties dialog boxes.
2. Click Add State Diagram to create a new State Diagram or click Add
Activity Diagram to create a new Activity Diagram that will be
associated with the State Machine Model of the Class, Use Case or
Package from which you are creating the diagram.
- If there is no existing State Machine model associated with the
selected Class, Use Case or Package, then a new State machine
model will be created when you create a new Activity or State diagram.
All created diagrams will be associated with this model for the selected
Use Case, Class or Package.

You cannot create more than one State Machine Model for each
class, use case or package.

To View a State Machine Model diagram:


From the Browser, double click the State or Activity diagram you want to
view. The diagram opens.
Or,
Select the diagram tab from the bottom side of the diagrams area. The
diagram opens.
Or,
1. Select the Sub Diagrams tab from the Class Properties, Package
Properties or Use Case Properties dialog boxes.
2. Select a diagram from the Activity/State Diagram List.
3. Click View. The selected diagram will be displayed.
To delete an existing State or Activity Diagram from a State Machine model:
1. Select the Sub Diagrams tab from the Class Properties Package
Properties or Use Case Properties dialog boxes.
2. Select the diagram to be deleted from the Activity/State Diagram List.
3. Click Delete. The selected diagram will be deleted from the model.

Copyright IBM Corp. 2002 125


5.3 The State Machine Model
Diagrams Toolbars
This section describes how to add elements to the State or Activity diagram
within a State Machine model using the State or Activity Diagram toolbar. The
following tables are a description of each toolbar button's features.
This table illustrates the buttons related to the State diagram:

Icon Button Purpose


Start State Adds a new Start State to the State diagram.

End State Adds a new End State to the State diagram.

State Adds a new State to the State diagram.

Transition Draws a Transition between two states.

Transition to Self Draws a Transition from a state to itself.

This table illustrates the buttons related to the Activity diagram:

Icon Button Purpose


Start State Adds a new Start State to the Activity diagram.

End State Adds a new End State to the Activity diagram.

State Adds a new State to the Activity diagram.

Activity Adds a new Activity to the Activity diagram.

Object Instance Adds a new Object Instance to the Activity diagram.

126 IBM Holosofx Workbench - UML Modeler - User Guide


Decision Adds a new Decision to the Activity diagram.

Vertical Adds a new Vertical Synchronization bar to the Activity


Synchronization diagram.

Horizontal Adds a new Horizontal Synchronization bar to the


Synchronization Activity diagram.

Swimlane Adds a new Swimlane to the Activity diagram.

Transition Draws a Transition between two states or activities.

Transition to Self Draws a Transition from a state to itself.

Object Flow Draws an object flow between object instances and


activities.

Copyright IBM Corp. 2002 127


5.4 State Machine Model Diagrams
Elements
Activity: An activity represents the execution of a sequence of tasks or
Actions that occurs while the state machine is in the corresponding state.
State: A state represents a condition in an object's life. During this
condition, the object satisfies a condition, performs an action or waits for
an event.
Start and End States: A start state manifests the beginning of a process
on an Activity diagram or the beginning of the events that cause a
transition on a State diagram. Only one start state can be placed on a
State diagram or Activity diagram. An end state shows a final or terminal
state on an activity diagram or state diagram. An end state is placed to
show the end of a workflow on an activity diagram or the end of a state
diagram.
Transition: A transition indicates that an object in the source state will
perform certain specified actions and enter the destination state when a
specified event occurs or when certain conditions are satisfied. A state
transition is a relationship between two states, two activities, or between
an activity and a state. One or more transitions from a state can be drawn
only if each transition is unique. Transitions originating from a state cannot
have the same event unless there are conditions placed on the event.
Transitions appear on State and Activity diagrams.
Transition to Self: A Transition to Self is very similar to a transition.
However, a transition to self does not move the focus of control to another
state or activity when an event occurs. A Transition to Self contains the
same source and target state or activity. A Transition to Self contains
actions and events just as transitions contain actions and events. The icon
for a transition to self is a looped line with an arrowhead pointing toward
the originating source state or activity.
Decision: A decision represents a specific location on an Activity diagram,
where the flow may branch as a function of conditions. Usually a decision
has two outgoing transitions that are determined by a Boolean expression.
However, there may be more than two outgoing transitions according to
the existing conditions.
Synchronization: Synchronization enables representing concurrent
regions in an Activity diagram. Synchronization is used in conjunction with
forks and joins to represent the synchronized regions.
Swimlane: Swimlanes are helpful when modeling a business Process
because they can help to identify the activities of organizational units or
roles within a business model. Swimlanes can only appear on Activity
diagrams and are very similar to objects because swimlanes provide a
way to tell who is performing a certain role.

128 IBM Holosofx Workbench - UML Modeler - User Guide


5.5 Working with the State Machine
Model Diagrams
The following sections describe how to work with State and Activity diagrams.

5.5.1 Working with Diagram Elements


This section contains a description of the Activity and State diagrams elements
properties. All elements' properties can be displayed and edited through the
elements Properties dialog box.
To open the Properties dialog box of any diagram element:
1. Right-click the element in a diagram.
2. Select Properties from the shortcut menu.
OR
1. Select an element in a diagram.
2. Select the Properties button from the Diagram View toolbar.
OR
1. Double-click the element in a diagram.

5.5.2 Activity / State Properties Dialog Box


The Activity Properties or State Properties dialog box allows you to enter the
required data for each added state or activity. The dialog box tabs are: General,
Transitions and Actions. The following sections describe each of these tabs
and its elements.

Copyright IBM Corp. 2002 129


5.5.2.1 General Tab

The General tab of the Activity Properties or State Properties dialog box
contains the activity or state properties. These properties are:
Name: When you add a new State or Activity to the diagram, a default
Name Activity 1 or State 1 will be assigned to this State or Activity. If this
name is used by another Activity or State, then the default name will be
Activity 2 or State 2, and so on. You can rename the Activity or State to
give it a name that represents its actual behavior.
Stereotype: The Stereotypes are used to categorize model elements. You
can use this field to create a new category or to select one of the existing
categories for the selected Activity or State.
Owner: This is a read-only field that displays the Class, Use Case or
Package name for the current State Machine model and its diagram. The
name displayed in this field is the same for all elements in the diagram.
Swimlane: This field displays the Swimlane name in which you placed the
selected Activity or State. If you did not add any swimlanes to the diagram,
this field will be empty.
Documentation: This field allows you to add a short description for a State
or Activity.
To edit the Activity or State properties in the General tab:

130 IBM Holosofx Workbench - UML Modeler - User Guide


1. Select a State or an Activity.
2. Open the State Properties or Activity Properties dialog box.
3. In the General tab, type the State or Activity name in the Name text box.
4. Type the new stereotype name, or select an existing stereotype name,
in the Stereotype combo box.
5. Type the description in the Documentation text box.
6. Click Apply or OK.

5.5.2.2 Transitions Tab

The Transitions tab displays a table of all transitions that start from the
selected State or Activity. The transitions table consists of three columns:
Source: The Transition Source State or Activity.
Event: The Transition Event that occurs during the transition.
Target: The Transition Target element. The target can be any diagram
element that can be added to the State or Activity diagram.
When you double-click any transition in the Transitions table, the Transition
Specification dialog box will open to display the selected Transition's details.

Copyright IBM Corp. 2002 131


5.5.2.3 Actions Tab

Each state and activity on a State or Activity diagram may contain a number of
internal actions. An action is best described as a "task" that takes place inside a
state or activity. There are various action triggers within a state or activity. Each
action trigger represents the timing options for specifying when the action is
performed:
Entry: Specifies an action to be performed upon entering a state.
Exit: Specifies an action to be performed upon exiting a state.
Do: Specifies an action to be performed upon entering a state and
continues until exiting the state.
Event: Triggers an action only if a specific event is received.
The Actions tab of the State Properties or Activity Properties dialog box
displays the Actions table that lists all actions associated with the selected State
or Activity. The table consists of two columns:
Type: The Type column lists action trigger of each existing action in the
selected Activity or State.
Name: The Name column lists the Action Name that occurs on the
specified trigger.
To add a new Action click Add to open the Action Details dialog box and edit
the new action settings.

132 IBM Holosofx Workbench - UML Modeler - User Guide


To delete an existing action, select the action you want to delete from the grid
and click Delete or press Delete on the keyboard.
To modify an action setting, select the action from the grid. Then click Details to
open the Action Details dialog box with the settings of the selected action

Actions Details Dialog Box

The Action Details dialog box allows you to enter the action settings for the
actions that were added to a state or activity. The Action Details dialog box
displays the following fields:
Action Trigger: The timing option that specifies when to perform an
action.
Event Name: The name of the event that will trigger the action.
Event Argument: Any optional arguments associated with the event.
Event Condition: A conditional Boolean expression.
Response: The type of the action that is performed: either a simple action
(Action) or an action that triggers another event (Send Event).
Action Name: The name of the action that is performed.
Send Argument: The arguments that are sent with the sent event
Send Target: The object that will receive the transition event.
To edit the Activity or State Actions Details:

Copyright IBM Corp. 2002 133


1. From the Actions tab of the Activity Properties or State Properties
dialog box, click Add to create a new action or double-click an existing
action in the Actions List.

To modify the data of an existing action, select an action and click


Details, or simply double-click it in the Actions table. The Action
Details dialog box opens.

2. Select the action trigger from the Action Trigger combo box. The
available action triggers are Do, Entry, Exit, and Event.
3. If the selected action trigger is Event, then:
- Type the Event Name in the Event Name text box.
- Type the Event Argument in the Event Argument text box.
- ype the Event Condition in the Event Condition text box.
4. Select the trigger response from the Response combo box. The
available response options are Action and Send Event.
5. Type the Action Name in the Action Name text box.
6. If the Response is Send Event, then type the Send Argument in the
Send Argument text box.
7. Type the Send Target in the Send Target text box
8. Click OK to save the entered data and to close the dialog box, or
Cancel to discard the entered data and to close the dialog box without
saving any changed data.

5.5.3 Transition Specification Dialog Box


The Transition Specification dialog box lists the events and actions that
compose the transition and allows you to enter the required data for the
transitions. The dialog box tabs are: General tab and Detail tab. The following
section describes these tabs and their fields.

134 IBM Holosofx Workbench - UML Modeler - User Guide


5.5.3.1 General Tab

The General Tab of the Transition Specification dialog box allows you to
enter the following data:
Trigger Event: The name of the event that causes a transition.
Trigger Arguments: The transition's trigger-event arguments.
Stereotype: A category of the entered transition. You can use this field to
create or select a transition category.
Documentation: You can use this field to type a detailed transition
description.
To edit the Transition data in the General tab:
1. Select a Transition
2. Open the Transition Specification dialog box.
3. In the General tab, type the Trigger Event's name in the Trigger Event
text box.
4. Type the Trigger Arguments in the Trigger Arguments text box
5. Type the stereotype name in the Stereotype text box.
6. Type the description in the Documentation text box.
7. Click OK.

Copyright IBM Corp. 2002 135


5.5.3.2 Detail Tab

The Detail tab of the Transition Specification dialog box allows you to enter
the required values for additional fields that are related to conditional state or
activity transitions. The Detail tab also displays the source and the target
elements of the selected transition.
These fields are:
Guard Condition: The expression that triggers the transition when the
expression returns true.
Trigger Action: The action that occurs to trigger the transition.
Send Event: The name of the event that will trigger the action.
Send Argument: The sent events arguments.
Send Target: The object that will receive the transition event.
Source: The Source element's name (Activity, State, Decisionetc).
Target: The Target element's name (Activity, State, Decisionetc).
To edit the Transition data in the Detail tab:
1. Select a Transition
2. Open the Transition Specification dialog box.
3. Select the Detail tab.
4. Type the Guard Condition's name in the Guard Condition text box.

136 IBM Holosofx Workbench - UML Modeler - User Guide


5. Type the Trigger Action in the Trigger Action text box
6. Type the Send Event in the Send Event text box
7. Type the Send Argument in the Send Argument text box
8. Type the Send target in the Send target text box
9. Click OK.

5.5.4 Decision Properties Dialog Box


5.5.4.1 General Tab

The General tab of the Decision Properties dialog box displays the decision
properties. These fields are:
Name: A default Name, Decision 1, will be assigned to this decision when
you add a new decision to the diagram. If this name is used by another
decision, then the default name will be Decision 2, and so on. You can
rename the Decision to give it a name that represents its actual behavior.
Stereotype: The Stereotypes are used to categorize model elements. You
can use this field to create a new category or to select previously defined
decision's stereotype.

Copyright IBM Corp. 2002 137


Owner: This is a read-only field that displays the Class, Use Case or
Package name for the current State Machine model and its diagram. The
name displayed in this field is the same for all elements in the diagram.
Swimlane: This field displays the Swimlane name in which you placed the
selected Decision. If you did not add any swimlanes to the diagram, this
field will be empty.
Documentation: This field allows you to add a short description for each
Decision.
To edit the Decision data in the General tab:
1. Select a Decision
2. Open the Decision Properties dialog box.
3. In the General tab, type the name of the Decision in the Name text box.
4. Type the new stereotype name, or select a previously defined
stereotype, in the Stereotype combo box.
5. Type the description in the Documentation text box.
6. Click Apply or OK.

5.5.4.2 Transitions Tab

The Transitions tab displays a grid of all transitions that start from the selected
decision. The transitions grid consists of three columns:

138 IBM Holosofx Workbench - UML Modeler - User Guide


Source: The Transitions Source Decision
Event: The Transitions Event that occurs during the transition
Target: The Transitions Target element. The target can be any diagram
element that can be added to the State or Activity diagram.
When you double-click a transition row in the Transitions table, the Transition
Specification dialog box will open to display the selected Transition's details.

5.5.5 Swimlane Specification Dialog Box

The Swimlane Specification dialog box contains the required Swimlane fields.
These fields are:
Name: A default name, Swimlane 1, will be assigned to this Swimlane
when you add a new Swimlane to the diagram. If this name is used by
another swimlane, then the default name will be Swimlane 2, and so on.
You can rename the Swimlane to give it a name that represents its actual
behavior.
Class: For each Swimlane, you can assign a class that is responsible of
the selected Swimlane. This class can be different from the owner of all
elements in the State Machine model.
Owner: This is a read-only field that displays the Class, Use Case or
Package name for which you created the current State Machine model
and its diagram. The name displayed in this field is the same for all
elements in the diagram.

Copyright IBM Corp. 2002 139


Documentation: This field allows you to add a short description for each
Swimlane.
To edit the Swimlane fields values:
1. Select a Swimlane.
2. Open the Swimlane Specification dialog box.
3. Type the Swimlane name in the Name text box.
4. Select the Swimlane Class from the Class combo box.
5. Type the description in the Documentation text box.
6. Click OK.

5.5.6 Synchronization Properties Dialog Box


The Synchronization Properties dialog box allows you to enter the required data
for the synchronization bar. The dialog box consists of two tabs: Dialog tab and
Transitions tab. The following section describes these tabs and their fields

5.5.6.1 Dialog Tab

The Dialog tab of the Synchronization Properties dialog box contains the
Synchronization bar fields. These fields are:

140 IBM Holosofx Workbench - UML Modeler - User Guide


Name: A default Name, Synchronization 1, will be assigned to this
decision when you add a new Synchronization bar (Horizontal or vertical)
to the diagram. If this name is used by another synchronization bar, then
the default name will be Synchronization 2, and so on. You can rename
the Synchronization bar to give it a name that represents its actual
behavior.
Stereotype: The Stereotypes are used to categorize model elements. You
can use this field to create a new category or to select one of the selected
Synchronization bar categories.
Owner: This is a read-only field that displays the Class, Use Case or
Package name for the current State Machine model and its diagram. The
name displayed in this field is the same for all elements in the diagram.
Documentation: This field allows you to add a short description for each
Synchronization bar.
To edit the Synchronization bar fields values of the Dialog tab:
1. Select a synchronization bar.
2. Open the Synchronization Properties dialog box.
3. In the Dialog tab, type the synchronization bar's name in the Name text
box.
4. Type the new stereotype name, or select an existing stereotype name,
from the Stereotype combo box.
5. Type the description in the Documentation text box.
6. Click Apply or OK.

Copyright IBM Corp. 2002 141


5.5.6.2 Transitions Tab

The Transitions tab displays a grid of all transitions that start from the selected
Synchronization bar. The transitions table consists of three columns:
Source: The Transitions Source Synchronization bar.
Event: The Transitions Event that occurs during the transition.
Target: The Transitions Target element. The target can be any diagram
element that can be added to the State or Activity diagram.

When you double-click the row of any transition in the Transitions


grid, the Transition Specification dialog box will open and display
the selected Transition's details.

5.5.7 Object Instance Specification Dialog Box


In Activity diagrams, object instances are model elements that allow you to
diagram the input and output relationships between activities. Object instances
are connected to activities through object flows.
The Object Instance Specification dialog box allows you to set the required
data for each object instance in the activity diagram. The dialog box tabs are:
General, Incoming Object Flows, and Outgoing Object Flows. The
following sections describe each of these tabs and their fields.

142 IBM Holosofx Workbench - UML Modeler - User Guide


5.5.7.1 General Tab

The General tab of the Object Instance Specification dialog box contains the
Object Instance data. These data are:
Name: The object instance's name.
Class: The class to which the Object instance belongs.
State: The selected object's state. All existing states in the model will be
listed in the combo box. You can use the combo box to select one of these
states or to create a new state and associate it with the object instance.
Stereotype: The name of the object instances stereotype. The stereotype
can be used to categorize the object instances.
Persistence: The lifetime of the object instances. There are three types of
object instance persistence:
* Persistent: The object continues to exist after its program terminates.
* Static: The object exists until its program terminates.
* Transient: The object exists only when the logic that calls it exists.
Multiple Instances: Shows that this object represents multiple instances
of the same class.
Documentation: This field allows you to add a short description for each
Object Instance.

Copyright IBM Corp. 2002 143


To edit the Object Instance data in the General tab:
1. Select an Object Instance.
2. Open the Object Instance Specification dialog box.
3. In the General tab, type the object instance's name in the Name text
box.
4. Select the object instance's class from the Class combo box.
5. Select the object instance's state from the State combo box
6. Type the new stereotype name, or select an existing stereotype name
from the Stereotype combo box.
7. From the Persistence region, select the appropriate radio button:
Persistent, Static, or Transient.
8. Type the description in the Documentation text box.
9. Click Apply or OK.

5.5.7.2 Incoming / Outgoing Object Flows Tabs

In the Object Instance Specification dialog box, The Incoming Object Flows
tab displays all object flows that are received by the selected object instance
and sent by an activity. The Outgoing Object Flows tab lists the Object flows
that are sent by the selected object instance and received by an activity.

144 IBM Holosofx Workbench - UML Modeler - User Guide


If you double-click an Object Flow name in both tabs, then the Object Flow
Properties dialog box opens and displays the selected Object Flow properties.

5.5.8 Object Flow Properties Dialog Box

The Object Flow Properties dialog box allows you to enter the properties of
the Object Flows that connect object instances to activities in Activity diagrams.
The data in the Object Flow Properties dialog box are:
Name: The Object Flow name.
Stereotype: The object instances stereotype. The stereotype can be used
to categorize the object instances.
Class: The Object Flow's class. This field is a read-only field.
Documentation: This field allows you to add a short description for each
Object Flow.
To edit the object flow fields values:
1. Select an Object Flow.
2. Open the Object Flow Properties dialog box.
3. Type the object flow's name in the Name text box.
4. Type a new stereotype name, or select a stereotype from the
Stereotype combo box.
5. Type a description in the Documentation text box.
6. Click OK.

Copyright IBM Corp. 2002 145


146 IBM Holosofx Workbench - UML Modeler - User Guide
Chapter 6: Component Diagrams

A Component diagram enables having a physical view of your model, as it


shows the software components dependencies and organization. This includes
binary code components, source code components and executable
components. Component diagrams also depict the interfaces of the
components, and thus, display the externally visible behavior of these
components. Dependencies among components are illustrated as relationships
between components, and/or between component packages and components.
It is important to note that components pertain to elements in other UML
Modeler diagrams such as the Class diagrams.
Component diagrams contain:
Component packages
Components
Dependency relationships
You can create one or more component diagrams and relate them to the Root
Component package, or to other component packages in the model.
In Component diagram, you can modify the properties and specifications of a
component package or component. Special objects representing component
packages and components in component diagrams allow you to easily
represent the behavior of your software components.
In Component diagram you can easily change properties, and/or relationships,
that are related to component packages or components by simply altering the
properties of these elements. The Component diagram will automatically reflect
such changes and update the elements in the diagram.

Copyright IBM Corp. 2002 147


6.1 The Component Diagram Objects
The component diagram contains three main objects, Component Package,
Component and Dependency Relationship. the following sections describe
each of these objects.

6.1.1 Component Package


A Component Package is used to group related components, and thus, helps
organizing your model. Component packages are similar to packages in class
diagrams. They allow you to break down the model of the system in a more
organized manner.

6.1.2 Component
A Component represents a logical part of a system that encapsulates
implementation and software entities, such as source code files, DLLs, and
documents.
A component is assigned to one or more Classes to represent physical
implementation of the class(es). Classes assigned to this component represent
services that are provided by this component.

6.1.2.1 Component Stereotype


A UML component is classified by its stereotype. The UML Modeler provides
you with predefined components stereotypes, such as Package, Subprogram,
Task, and Database. Also, the UML Modeler provides you the ability to define
additional stereotypes according to the modeling needs.

6.1.3 The Dependency Relationship


The Dependency relationships between components are used to signify that
one component uses the services or facilities of another.
Dependency relationships are unidirectional. They show calling dependencies
among components with arrows drawn from components to others.

148 IBM Holosofx Workbench - UML Modeler - User Guide


6.2 The Component Diagram Toolbar
The Component Diagram toolbar, like all UML Modeler diagram toolbars,
contains two sets of buttons. One set is common to all the diagrams described
earlier, and the other set is related only to the Component diagram.
When a Component diagram is opened, the diagram toolbar changes to show
the set of buttons used in Component diagrams. The Component diagram
toolbar buttons are described in the following table.

Icon Button Purpose


Package Adds a new component package to the diagram.

Component Adds a new Component element to the diagram.

Subprogram Adds a new Component element of the stereotype


(Stereotype) Subprogram to the diagram.

Package Adds a new Component element of the stereotype


(Stereotype) Package to the diagram.

Task Adds a new Component element of the stereotype


(Stereotype) Task to the diagram.

Database Adds a new Component element of the stereotype


(Stereotype) Database to the diagram.

Dependency Draws a Dependency relationship between


Component Diagram objects.

Copyright IBM Corp. 2002 149


6.3 Working With the Component
Diagrams
The following sections guide you step by step on how to work with Component
Diagrams.

6.3.1 Creating and Opening Component Diagrams


To start working with Component diagrams, you have to create a new
Component diagram or you can open one of the existing diagrams that you
have created before.

6.3.1.1 Creating a New Component Diagram


To create a new Component Diagram:
1. In the Browser, right-click the Root Component package or any other
component package that belongs to a previously created Component
Diagram. A shortcut menu appears.

2. Select New > Component Diagram from the shortcut menu. The New
Component Diagram dialog box appears.

3. Enter the name of the new Component diagram and click OK, or press
Enter. A new component diagram will be created with the entered name
and will open.

6.3.1.2 Opening an Existing Component Diagram


To open an existing Component diagram:
1. Navigate through the browser until you locate the desired Component
diagram.
2. Double-click the Component diagram's name or icon to open the
Component diagram.

150 IBM Holosofx Workbench - UML Modeler - User Guide


6.3.2 Adding Elements to a Component Diagram
To add elements to a Component diagram:
1. Select the corresponding button in the diagram toolbar. The shape of the
mouse cursor resembles an asterisk.
2. Click anywhere in the diagram area. The new element will be placed in
the diagram and will be added to the Browser tree under the package to
which the diagram belongs.

6.3.3 Working with Diagram Elements


This section contains a description of the Component diagram elements
properties and their uses. All properties fields can be displayed and edited
through the elements Properties dialog box.
To open the Properties dialog box of any diagram element:
1. Right-click the element in a diagram. A shortcut menu appears.
2. Select Properties from the shortcut menu.
OR
1. Select an element in a diagram.
2. Select the Properties button from the Diagram View toolbar.
OR
1. Double-click the element in the diagram.

6.3.4 The Component Package Properties Dialog


Box
The Component Package Properties dialog box contains two tabs: General
and Diagrams.

Copyright IBM Corp. 2002 151


6.3.4.1 General Tab
The General tab of the Component Package Properties dialog box allows you
to name the component package, select its stereotype, and enter the
component package documentation.

To edit the data in the General tab:


1. Select a component package.
2. Open the Component Package Properties dialog box.
3. In the General tab, type the component package name in the Name text
box.
4. Type a new stereotype name, or select an existing stereotype name, in
the Stereotype combo box.
5. Type the description in the Documentation text area.
6. Click Apply or OK.

152 IBM Holosofx Workbench - UML Modeler - User Guide


6.3.4.2 Diagrams Tab
The Diagram tab of the Component Package Properties dialog displays a list
of all component diagrams that belong to this component package. Through the
Diagrams tab, you can also add a new component diagram to the package,
delete one of the existing diagrams, and view one of these diagrams.

To edit the data in the Diagrams tab:


1. Select a component package
2. Open the Component Package Properties dialog box.
3. Select the Diagrams tab.
4. To view one of the existing component diagrams that belong to the
selected package:
- Select the diagram name from the Diagram List.
- Click View. The selected diagram will open.
5. To add a new component diagram to the selected package:
- Click Add. The New Component Diagram dialog box appears

Copyright IBM Corp. 2002 153


- Enter the new Component Diagrams name.
- Click OK. The new diagram will be created and will open, and its name
will be added to the Diagram List.
6. To delete one of the existing diagrams:
- Select the diagram to be deleted from the Diagram List.
- Click Delete. The diagram will be deleted from the model and its name
will be removed from the list.
- Click Apply or OK.

6.3.5 The Component Properties Dialog Box


The Component Properties dialog box allows you to set the properties of a
component. The properties of each component sub-object that has a particular
stereotype can be also set through this dialog box. But in this case, the dialog
box name will match the stereotype of the object that you select to set its
properties. For example, if you select a Task object and opened its properties
dialog box, then the dialog box name will be Task Properties dialog box, and it
will contain the same fields and tabs of the Component Properties dialog box.

154 IBM Holosofx Workbench - UML Modeler - User Guide


6.3.5.1 General Tab
The General tab of the Component Properties dialog box allows you to name
the component, set its stereotype, and edit its documentation.

To edit the data in the General tab:


1. Select a Component, Package, Subprogram, Task or Database.
2. Open the Properties dialog box of the selected object.
3. In the General tab, type the object name in the Name text box.
4. Type the new stereotype name, or select an existing stereotype name,
in the Stereotype combo box.

Selecting a different stereotype for the selected object will change


the objects drawing shape in the diagram to match the new
selected stereotype.

5. Type the description in the Documentation text area.


6. Click Apply or OK.

Copyright IBM Corp. 2002 155


6.3.5.2 Implements Tab
The Implements tab allows you to add classes to each component object or
sub-object, view the properties of any associated class, and delete classes from
the selected component object or sub-object.

To edit the data of the General tab:


1. Select a Component, Package, Subprogram, Task or Database.
2. Open the Properties dialog box of the selected object.
3. Select the Implements tab.
4. To add a class to the selected object:
- Click Add. the Classes dialog box appears displaying all defined
classes in the model.

156 IBM Holosofx Workbench - UML Modeler - User Guide


- Select the check box next to each class you want to add to the
component object.
- Click OK. The selected classes will be added to the component object
and their names will appear in the Class List.
5. To view the properties of any class:
- Select the class from the Class List.
- Click View. The Class Properties dialog box of the selected class will
open displaying its properties.
6. To delete a class from the component object:
- Select the class from the Class List.
- Click Delete. The class will be deleted from the Class List.

Deleting a class from a component object will not delete the class
from the model. It will only be removed from the component
object.

7. Click Apply or OK.

6.3.6 Setting Dependencies Between Component


Diagram Object
To set a Dependency relationship between the Component Diagram objects:

Copyright IBM Corp. 2002 157


1. Create a new Component diagram or an existing Component diagram as
described above.
2. Add two or more objects in the diagram.
3. To set a dependency relationship between two objects:
- Select the Dependency button from the Component diagram toolbar.
- Click and drag the relationship from one object to another object. UML
Modeler draws an arrow representing the dependency relationship
between the two objects.

158 IBM Holosofx Workbench - UML Modeler - User Guide


Glossary
A relationship between a whole and its parts. For exam-
ple, you may have a Company Class, as well as a
Finance Department Class, a Marketing Department
Class, and an Information Technology Department
Class. In this case, a Company object would be made
Attributes up of the department objects, and so on. Aggregations
Every object encapsulates some information and some are shown as a line with a diamond next to the Class
behavior. Joes account, for example, has some infor- representing the whole.
mation: The account number is 123456789, the
account belongs to Joe Smith, and the current account Association
balance is $350. Joes account also has some behavior. It is a type of classes relationships.When an associa-
It will know how to add money when Joe makes a tion connects two Classes, each connected Class
deposit, how to remove funds when Joe makes a with- can send messages to the other in a Sequence or a
drawal, and how to figure out whether its overdrawn. Collaboration diagram. Associations can be bi-
The pieces of information held by an object are directional or unidirectional. In UML, With an
known as its attributes. association, UML Modeler will place attributes
in the Classes. For example, if there is an associ-
Abstract Actor ation relationship between a Company Class and
An abstract actor is an actor that has no instances. For an Employee Class, UML Modeler will place an
example, you may have three actors: accountant, mar-
employee attribute inside Company to let the
keting associate, and operations manager. All of these
are types of a fourth actor, business user. For this par-
company know whos employed, and a company
ticular system, however, no one can be just a business attribute inside Employee to let the employee
usereveryone must be an accountant, a marketing know which company he works for.
associate, or an operations manager. The business user
actor exists only to show that there is some common-
ality between accountant, marketing associate, and
operations manager. Since there are no instances of a
business user actor, it is an abstract actor.
B
Abstract Class
An abstract Class is a Class that will not be instanti- Bi-directional associations
ated. In other words, there will be no objects created In UML, Associations can be bi-directional or unidi-
using the template of an abstract Class. Abstract rectional. bi-directional associations are drawn either
Classes are generally used in inheritance structures. with arrowheads on both ends or without arrowheads
They can hold information and behavior that is com- at all.
mon to some other Classes.
Boundary Classes
Actor Generalization Boundary Classes are those Classes that exist on the
An actor generalization relationship shows the com- boundary between your system and the rest of the
monality of several actors, called subactors, world. Such Classes would be your forms, reports,
abstracted into a single, separate actor, called the interfaces to hardware such as printers, and interfaces
superactor. Subactors are directly instantiated, but to all actors in your system.
the superactor is never directly instantiatedit exists
only to show the commonality among the subactors.

Aggregations
It is a type of classes relationships. Aggregations are
stronger forms of association. An aggregation is a

Copyright IBM Corp. 2002 159


C D
Class Data Type
A Class can be seen as a blueprint for objects. A Class When creating the attribute, you must specify the data
is created for each type of object in a Sequence or Col- type, that is, the language-specific type. You can use
laboration diagram. either built-in data types (string, integer, long, etc.) for
your programming language, or the names of Classes
Class Diagram that you have defined in your UML Modeler model.
A Class diagram shows the attributes and opera-
tions of Classes in a system. It also shows the
relationships among the Classes. Developers use
Class diagrams to develop the Classes. Analysts use
Class diagrams to understand the details of the sys-
E
tem. Architects also look at Class diagrams to see the
design of the system. Class diagrams help all mem-
bers of the team to validate the functionality of the Entity Classes
Classes and the relationships among them. Entity Classes hold information that you will save to
storage. An employee is a good example of an entity
Class Stereotype Class, for it holds name, address, and other informa-
A Stereotype is a mechanism used to categorize tion to be stored permanently. Entity Classes are usu-
Classes. For instance, you may create a Stereotype ally found in the flow of events and Interaction
called form, and assign this Stereotype to all the win- diagrams. They are the Classes that have the most
dows. To find all the forms, you look for the Classes meaning to the user and are typically named using
that have the form Stereotype. There are three main business-domain terminology. On many occasions,
Class Stereotypes in UML: Boundary, Entity, and these entity Classes would be used in designing the
Control. databases, where a table is created for each Entity
Class. Each Class attribute, then, becomes a field in
Collaboration Diagrams the database.
Collaboration diagrams are useful for assessing the
impact of a change. A Collaboration diagram clearly Extends Relationship
shows which objects communicate with each other. If An extends relationship allows one use case, the
you need to change an object, you can easily see extending use case, to extend the functionality of
which other objects might be affected. another use case, the base use case, but only at certain
extension points defined in the base use case. The
Communicates Relationship extends relationship is like a uses relationship, except
A communicates relationship is a relationship that the use case functionality is shared only at the
between a use case and an actor. In UML, communi- extension points.
cates relationships are drawn using an arrow. The
arrowhead points away from the initiator of the com-
munication. An actor or a use case can initiate the
communication. Information can also flow in both
directions, from an actor to a use case and then back
G
again.
Generalizations
It is a type of classes relationships. Generalizations
are used to show an inheritance relationship between
two Classes. Most object-oriented languages directly
support the concept of inheritance. Inheritance allows
one Class to inherit all of the attributes, operations,
and relationships of another Class. In UML, an inher-
itance relationship is known as a generalization, and is

160 IBM Holosofx Workbench - UML Modeler - User Guide


shown as an arrow from the child Class to the parent
Class.
P
I Packages
Packages are very useful in organizing your model
elements. By placing related, but otherwise disparate,
elements into a single Package, you emphasize their
Interaction Diagram relatedness. You might, for example, group a set of
An Interaction diagram shows you, step-by-step, one
related Classes and Components into a Package, or
of the flows through a Use Case. It also shows the
related Use Cases and Actors. In UML notation, the
objects participating in a flow through a Use Case,
following symbol represents a Package: Package 1.
and the messages that are sent among the objects.
The use of Packages is not necessary, but is highly
recommended.

M Persistent Class
Persistence determines whether object information is
saved in internal storage. There are two persistence
options for a Class:
Persistent
Messages
Object information is saved in internal storage, and so
Through a message, one Object or Class can request
remains in the system after the execution of the
that another carry out some specific function. For
objects application.
example, a form may ask a report object to print itself.
Transient: Object information is not saved in internal
storage, and so is lost as soon as the objects applica-
Multiplicity (Cardinality)
tion has finished.
Multiplicity indicates how many instances of one
class are related to a single instance of another class at
PostConditions
a given point in time.
Postconditions are conditions that must always be true
For example, lets look at the case of accounts in a
after the operation has completed execution. Postcon-
bank. In this case, we will have classes called
ditions are entered in the Postconditions tab of the
Accounts and classes called Customers. The relation-
Operation Properties window.
ship is: customers may have accounts, but also
accounts may have customers. Multiplicity indicates
PreConditions
how many accounts a customer may have at one time,
A precondition is some condition that must be true
and how many customers an account may have at one
before the operation can be executed. You can enter
time.
any preconditions for the operation in the Precondi-
tions tab in the operation properties dialog box. If you
have an Interaction diagram that illustrates the opera-
O tion preconditions, you can enter the Interaction dia-
gram name at the bottom of the Preconditions tab.

Objects
An Interaction diagram can use Object names, Class
names, or both.
R
Operation Role Name
An operation is a behavior associated with a Class.
Role names can be used in associations or aggrega-
An operation has three parts: the operation name, the
tions instead of relationship names to describe the rea-
operation parameters, and the operation return type.
son for which the relationship exists. Generally, you
The operation takes the parameters as input, and pro-
would use a relationship name or a role name, but not
duces the return type as output.
both. Like relationship names, role names are

Copyright IBM Corp. 2002 161


optional, and are only used when the purpose of the tionship is shown in UML using arrows and the word
relationship is not obvious. uses. The uses relationship indicates that one use
case will always use the functionality of another use
Roles case.
A role represents an actor engaged in an association
relationship. A role name can be substituted for a
relationship name, with the advantage that a role name
better describes the reason the relationship exists. For
example, a relationship between an employee and a
customer is not as descriptive as a relationship
between the role the employee plays (account man-
ager, customer representative, etc.) and the role the
customer plays (account owner, buyer, etc.). Like
relationship names, role names are optional, and are
used only when the purpose of the relationship is not
obvious.

S
Static Attribute
A static attribute is one that is shared by all instances
of a Class. Returning to the above example, if Salary
were a static attribute, the value in the Static attribute
would be shared by Bill and John.

Unidirectional associations
In UML, Associations can be bi-directional or unidi-
rectional. Unidirectional associations contain one
arrowhead showing the direction of the message.

Use Case
A use case describes the sequence of events of an
actor using the system to complete a process. An actor
is any external entityfor example, a person or
another systemthat interacts with the system. The
entity can be in the form of a person, or another sys-
tem that sends or receives information from the sys-
tem. Use cases include all objects within an
application system.

Use Case Diagram


In UML Modeler, a Use Case diagram represents the
functionality of your system by displaying the use
cases in the system, the actors involved, and the rela-
tionships among them.

Uses Relationship
A uses relationship allows one use case to use the
functionality of another use case. This is beneficial
when the functionality of one use case has features
that could also be used by several others. A uses rela-

162 IBM Holosofx Workbench - UML Modeler - User Guide


Notices and Trademarks
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA
ADP Schedule Contract with IBM Corp.

Notices
IBM may not offer the products, services, or features discussed in this document in all
countries. Consult your local IBM representative for information on the products and services
currently available in your area. Any reference to an IBM product, program, or service is not
intended to state or imply that only that IBM product, program, or service may be used. Any
functionally equivalent product, program, or service that does not infringe any IBM intellectual
property right may be used instead. However, it is the users responsibility to evaluate and
verify the operation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matter described in
this document. The furnishing of this document does not give you any license to these
patents. You can send license inquiries, in writing, to:

IBM Director of Licensing


IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.

The following paragraph does not apply to the United Kingdom or any other country
where such provisions are inconsistent with local law:

INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS


PUBLICATION AS IS...WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-
INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Some states do not allow disclaimer of express or implied warranties in certain transactions;
therefore, this statement may not apply to you.

This information could include technical inaccuracies or typographical errors. Changes are
periodically made to the information herein; these changes will be incorporated in new
editions of the publication. IBM may make improvements and/or changes in the product(s)
and/or program(s) described in this publication at any time without notice.

Any references in this information to non-IBM Web sites are provided for convenience only
and do not in any manner serve as an endorsement of those Web sites. The materials at
those Web sites are not part of the materials for this IBM product and use of those Web sites
is at your own risk.

IBM may use or distribute any of the information you supply in any way it believes appropriate
without incurring any obligation to you.

Licensees of this program who wish to have information about it for the purpose of enabling:
(i) the exchange of information between independently created programs and other programs

Copyright IBM Corp. 2002 163


(including this one) and (ii) the mutual use of the information which has been exchanged,
should contact:

IBM Holosofx Lab Director


IBM RTP Laboratory
3039 Cornwallis Road
P.O. BOX 12195
Raleigh, NC 27709-2195
U.S.A

Such information may be available, subject to appropriate terms and conditions, including in
some cases, payment of a fee.

The licensed program described in this document and all licensed material available for it are
provided by IBM under terms of the IBM Customer Agreement, IBM International Program
License Agreement, or any equivalent agreement between us.

Any performance data contained herein was determined in a controlled environment.


Therefore, the results obtained in other operating environments may vary significantly. Some
measurements may have been made on development-level systems and there is no
guarantee that these measurements will be the same on generally available systems.
Furthermore, some measurement may have been estimated through extrapolation. Actual
results may vary. Users of this document should verify the applicable data for their specific
environment.

Information concerning non-IBM products was obtained from the suppliers of those products,
their published announcements or other publicly available sources. IBM has not necessarily
tested those products and cannot confirm the accuracy of performance, compatibility or any
other claims related to non-IBM products. Questions on the capabilities of non-IBM products
should be addressed to the suppliers of those products.

This information may contain examples of data and reports used in daily business operations.
To illustrate them as completely as possible, the examples may include the names of
individuals, companies, brands, and products. All of these names are fictitious and any
similarity to the names and addresses used by an actual business enterprise is entirely
coincidental.

All statements regarding IBMs future direction or intent are subject to change or withdrawal
without notice, and represent goals and objectives only.

COPYRIGHT LICENSE:

This information may contain sample application programs in source language, which
illustrates programming techniques on various operating platforms. You may copy, modify,
and distribute these sample programs in any form without payment to IBM, for the purposes
of developing, using, marketing or distributing application programs conforming to the
application programming interface for the operating platform for which the sample programs
are written. These examples have not been thoroughly tested under all conditions. IBM,
therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.

164 IBM Holosofx Workbench - UML Modeler - User Guide


Programming interface information
Programming interface information, if provided, is intended to help you create application
software using this program.

General-use programming interfaces allow you to write application software that obtain the
services of this programs tools.

However, this information may also contain diagnosis, modification, and tuning information.
Diagnosis, modification and tuning information is provided to help you debug your application
software.

Warning: Do not use this diagnosis, modification, and tuning information as a programming
interface because it is subject to change.

Trademarks and service marks

The following terms are trademarks or registered trademarks of International Business


Machines Corporation in the United States or other countries, or both:

IBM DB2 Universal Database


the IBM logo MQSeries
AIX WebSphere
AIX 5L FlowMark
e-Business (Logo) OS/2
CrossWorlds OS/390
DB2 RS/6000

Lotus is a trademark of International Business Machines Corporation and Lotus Development


Corporation in the United States, other countries, or both.

Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft
Corporation in the United States, other countries, or both.

MMX, Pentium and ProShare are trademarks of Intel Corporation in the United States, other
countries, or both.

Solaris, Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the
United States, other countries, or both.

Other company, product or service names may be trademarks or service marks of others.

Copyright IBM Corp. 2002 165


166 IBM Holosofx Workbench - UML Modeler - User Guide

Vous aimerez peut-être aussi