You are on page 1of 321

www.it-ebooks.

info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
by Dan Pilone with Neil Pitman
Publisher:O'Reilly
Pub Date: June 2005
Copyright © 2005 O'Reilly Media, Inc. All rights reserved.
ISBN:0-596-00795-7
Pages:234
Printed in the United States of America.

Published by O'Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
Table of Contents | Index

O'Reilly books may be purchased for educational, business, or sales promotional use. Online
editions are also available for most titles (safari.oreilly.com). For more information, contact
System
our developers have used
corporate/institutional salesmodeling languages
department: (800) for decadesortocorporate@oreilly.com.
998-9938 specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language
Editor: that applies to a multitude of different
Jonathansystems. Essentially, it enables you to
Gennick
communicate solutions in a consistent, tool-supported language.
Production Editor: Mary Anne Weeks Mayo
Today, UML has become the standard method for modeling software systems, which means
Cover Designer: Ellie Volckhausen
you're probably confronting this rich and expressive language more than ever before. And
even though
Interior you may not write UML diagrams
Designer: Davidyourself,
Futato you'll still need to interpret
diagrams written by others.
Printing History:
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
June 2005: First Edition.
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

Nutshell Handbook, the


This comprehensive newNutshell
edition Handbook logo, and
not only provides the O'Reilly logoto
a quick-reference are
allregistered
UML 2.0 diagram
trademarks of explains
types, it also O'Reilly Media, Inc. The
key concepts in In a Nutshell
a way series to
that appeals designations, UML 2.0
readers already in a with
familiar
Nutshell
UML or ,object-oriented
the image of a programming
chimpanzee, and related trade dress are trademarks of O'Reilly
concepts.
Media, Inc.
Topics include:
Unified Modeling Language, UML, Model Driven Architecture, MDA, Common Object Request
Broker Architecture, and CORBA are all trademarks of Object Management Group.
The role and value of UML in projects
Many of the designations used by manufacturers and sellers to distinguish their products are
claimedThe
asobject-oriented paradigm
trademarks. Where thoseand its relationappear
designations to the in
UML
this book, and O'Reilly Media,
Inc. was aware of a trademark claim, the designations have been printed in caps or initial
caps. An integrated approach to UML diagrams

While Class
every and Object, has
precaution Usebeen
Case,taken
Sequence,
in the Collaboration,
preparation of Statechart, Activity,
this book, the Component,
publisher and
and
authors Deployment
assume Diagrams for errors or omissions, or for damages resulting from the
no responsibility
use of the information contained herein.
Extension Mechanisms
ISBN: 0-596-00795-7
The Object Constraint Language (OCL)
[M]

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Dedication ...............................................
Publisher:O'Reilly
Pub Date: June 2005
For my family: the reason I wrote this book and the reason I was able to
ISBN:0-596-00795-7
.
Pages:234
Dan Pilone

For Laurie Ann:


Table of Contents | Index

Giorraíonn beirt bóthar/Two people shorten the road .

System
Neil developers have used modeling languages for decades to specify, visualize,
Pitman
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Preface ...............................................
Publisher:O'Reilly
Pub Date: June 2005
About ThisISBN:
Book0-596-00795-7
Pages:234
How to Use This Book

Typographic Conventions
Table of Contents | Index

Safari Enabled

System developers
Comments andhave used modeling languages for decades to specify, visualize,
Questions
construct, and document systems. The Unified Modeling Language (UML) is one of those
Acknowledgments
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
About This Book
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Welcome to UMLISBN:2.0 0-596-00795-7
in a Nutshell . The Unified Modeling Language (UML) has expanded quite
a bit since its inception
Pages:234 and can be applied to many different domains, however it still has its
roots in software development. We have tried to make this book applicable to as broad an
audience as possible, but it's helpful to have at least a cursory knowledge of Object Oriented
Programming
Table of Contents | (OOP)
Index because UML draws much of its terminology from that domain.

Before going any further we'd like to clarify how this book refers to the Unified Modeling
Language. Grammatically
System developers speaking,
have used "the languages
modeling UML" is correct. However,
for decades it sounds
to specify, weird. This book
visualize,
uses the more colloquial "UML".
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
UML 2.0 in that
language a Nutshell
appliesistoa adetailed reference
multitude for the
of different UML 2.0
systems. Superstructure,
Essentially, fromyou
it enables a user's
to
perspective. Whenever it would be helpful to clarify a UML
communicate solutions in a consistent, tool-supported language. concept with a concrete example,
we will present Java code.
Today, UML has become the standard method for modeling software systems, which means
In general we assume that you are familiar with OOP and the type of constructs that go with
you're probably confronting this rich and expressive language more than ever before. And
it (classes, methods, inheritance, etc.). However, we make no assumptions about what you
even though you may not write UML diagrams yourself, you'll still need to interpret
know about UML. Each chapter starts with a top-to-bottom discussion of the chapter's topic.
diagrams written by others.
This will be fast paced and thorough, meant for those who understand the basics and want to
know the "nitty-gritty" of a piece of UML. Subsequent sections are kinder, gentler discussions
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
of the topic. This includes examples that show how the topic may be applied to typical
you who must read, create, and understand system artifacts expressed using UML.
problems, help you further refine your models to eliminate ambiguity, capture details that
Furthermore, it's been fully revised to cover version 2.0 of the language.
might otherwise be lost, or add information to your model that aids in tool-based
development.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
A brief word of warning: UML has a strict terminology for just about every aspect of modeling.
UML or object-oriented programming concepts.
This is necessary to reduce ambiguity and confusion as much as possible. However, in
everyday use some terms are used interchangeably with others that have completely different
Topics include:
meanings in UML. A classic example of this is operation and method. These are frequently
treated as being synonymous in a software development environment but have different
meanings
The when used
role and in the
value context
of UML of UML. We will make a point to use the correct UML term
in projects
even if it may not be the most colloquial name.
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
How to Use This Book
...............................................
Publisher:O'Reilly
Pub Date: June 2005
This book is divided
ISBN:based on UML diagram type. Obviously there is some crossover, as some
0-596-00795-7
diagrams build on concepts
Pages: 234 from others. Chapter 1, Fundamentals of UML, covers the basics
of UML and presents some background information that will help you understand the context
for the rest of the book. If you are familiar with previous versions of UML, you can probably
skim
Table ofthis chapter.
Contents | Index If you don't have a strong background in UML, you should definitely start

here.

The next developers


System set of chapters
havecover
used what is called
modeling static modeling
languages for decadesin UML. Static visualize,
to specify, modeling captures
the
construct, and document systems. The Unified Modeling Language (UML) is one of structure).
physical structure of a piece of software (as much as software has a "physical" those
For example:UML
languages. what operations
makes and attributes
it possible a class contains,
for team members what interfaces
to collaborate a class
by providing realizes,
a common
or what packages
language contain
that applies to aall this mess.
multitude of The staticsystems.
different modelingEssentially,
chapters include:
it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
Chapter 2, Class Diagrams
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
This chapter introduces the class diagram. It discusses the various elements that can be
diagrams written by others.
used on a class diagram, what they represent, and how to extend them. Because class
diagrams are often a centerpiece of a UML model, you should know this chapter inside
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
and out. The last part of the chapter discusses how class diagrams fit into the overall
you who must read, create, and understand system artifacts expressed using UML.
UML model and how the diagrams are typically mapped to code.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive
Chapter new edition not only provides a quick-reference to all UML 2.0 diagram
3, Package Diagrams
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented
This programming
chapter introduces packagesconcepts.
and grouping within a UML model.

Topics include:
Chapter 4, Composite Structures

The role
This and introduces
chapter value of UMLtheinnew
projects
UML 2.0 concept of composite structures. Composite
structures are specifically designed to represent patterns and are a major new
The object-oriented
component paradigm
to the modeling and its relation to the UML
language.
An integrated approach to UML diagrams
Chapter 5, Component Diagrams
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment
This Diagrams
chapter introduces components and the component diagram. Topics such as the
stereotypes used in component diagrams, relationships between components, and
Extension Mechanisms
component metainformation are discussed. The latter part of this chapter discusses how
components are typically realized in a programming language.
The Object Constraint Language (OCL)

Chapter 6, Deployment Diagrams


If you're new to UML, a tutorial with realistic examples has even been included to help you
This chapter introduces the concept of capturing system deployment using deployment
quickly familiarize yourself with the system.
diagrams. Deployment fundamentals such as nodes, node stereotypes, and
relationships to components are explained. This chapter also includes a discussion on
modeling a distributed system using deployment diagrams.

The next set of chapters cover the second half of UMLbehavioral modeling. Behavioral
modeling captures how the various elements of a system interact during execution. Diagrams
www.it-ebooks.info

such as the use case diagram can capture requirements from an external actor's perspective,
and sequence diagrams can show how objects interact to implement a particular use case.
The behavioral modeling chapters include:
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Chapter 7, Use Publisher:
Case Diagrams
O'Reilly
Pub Date: June 2005
This chapter introduces
ISBN: use cases, actors, and system boundaries. It goes slightly
0-596-00795-7
beyond pure UML
Pages:234in that the chapter touches on common practices regarding use cases,
such as use case scoping, use case documents, and use case realizations.

Table of Contents | Index


Chapter 8, Statechart Diagrams

This chapter introduces state machine modeling using states, actions, and transitions.
System developers have used modeling languages for decades to specify, visualize,
Statecharts can be used to model a simple algorithm all the way up to a complex
construct, and document systems. The Unified Modeling Language (UML) is one of those
system.
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate
Chapter solutions
9, Activity in a consistent, tool-supported language.
Diagrams
Today, UML
This has become
chapter the standard
introduces methodtofor
a close relative themodeling software
statechart systems,
diagram, whichdiagram.
the activity means
you'reActivity
probably confronting
diagrams this rich
resemble and expressive
old-school language
flowcharts and aremore thanused
typically evertobefore.
model And
an
even algorithm
though you ormay not write
use case UML diagrams yourself, you'll still need to interpret
realization.
diagrams written by others.

UML 2.010,
Chapter in aInteraction
Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
Diagrams
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been
This chapter fully revised
introduces to cover
the large set of version 2.0 of
interaction the language.
diagrams supported by UML 2.0. The
two best-known diagrams are sequence and collaboration diagrams. This chapter also
This comprehensive
discusses the new newtiming-centric
edition not only providesdiagram.
interaction a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
The
UMLfinal part of the bookprogramming
or object-oriented covers extension and applications of UML 2.0:
concepts.

Topics include:

Chapter 11, Tagged Values, Stereotypes, and UML Profiles


The role and value of UML in projects
This chapter discusses how UML 2.0 may be extended and refined.
The object-oriented paradigm and its relation to the UML

Chapter
An12, Effectiveapproach
integrated Diagramming
to UML diagrams

This
Classchapter departs
and Object, Usefrom theSequence,
Case, specification side of UMLStatechart,
Collaboration, 2.0 and offers real-world
Activity, advice
Component,
on
andmodeling, what
Deployment parts of UML 2.0 to use when, and how to effectively convey the
Diagrams
right information.
Extension Mechanisms

The A,
Appendix Object
MDA:Constraint Language
Model-Driven (OCL)
Architecture

This appendix introduces the Model-Driven Architecture (MDA). While MDA isn't a new
idea, UML 2.0 has MDA in mind in several places, and next-generation tools may be
If you're
ablenew to UML,
to make MDAa tutorial with realistic examples has even been included to help you
a reality.
quickly familiarize yourself with the system.

Appendix B, The Object Constraint Language

This appendix describes the Object Constraint Language (OCL), a simple language
defined to express constraints on UML diagrams. It can be applied in countless ways
www.it-ebooks.info

and is introduced here in its basic form.

If you're familiar with the fundamental UML concepts, you can read this book's chapters in
nearly any order.UML 2.0 in a Nutshell
However, there is always a certain amount of overlap between chapters
because some elements
ByDan Pilone, can
Neilappear
Pitman on many diagrams. Instead of repeating the information
in each chapter,...............................................
we fully define elements (and their associated stereotypes, attributes, etc.)
the first time they are encountered,
Publisher: O'Reilly and in subsequent chapters, we provide detailed cross
references backPubto the
Date: original
June 2005 definition, when needed.
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Typographic Conventions
...............................................
Publisher:O'Reilly
The following typographic conventions
Pub Date: June 2005 are used in this book:
ISBN:0-596-00795-7
Pages:234

Constant width
Table of Contents | Index
Used in the text to refer to class names, stereotypes, and other elements taken from
UML diagrams.
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
Constant width italic
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
Used in UML diagrams to indicate text that would be replaced by the user.
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
Italic
you're probably confronting this rich and expressive language more than ever before. And
even Used
though you new
when mayterms
not write
are UML diagrams
introduced, andyourself,
for URLsyou'll still references.
and file need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
...
you who must read, create, and understand system artifacts expressed using UML.
Ellipses indicate
Furthermore, it's beennonessential
fully revisedmaterial
to coverthat has 2.0
version beenofomitted from a diagram for the
the language.
sake of readability.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented
Indicates programming concepts.
a tip, suggestion, or general note.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML


Indicates an aspect of UML that you must be particularly careful about
using.
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Note that UML makes frequent use of curly braces ({}) and guillemots («»). When these are
used in a syntax Mechanisms
Extension definition, they are required by UML.

NearlyThe
everything in UML notation
Object Constraint is optional,
Language (OCL) so there is no specific notation to indicate an
optional field. If a particular piece of syntax is required, it is noted in the text.

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Safari Enabled
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
When you see a Safari® Enabled icon on the cover of your favorite technology
book, it means the book is available online through the O'Reilly Network Safari Bookshelf.
Table of Contents | Index
Safari offers a solution that's better than e-books. It's a virtual library that lets you easily
search thousands of top tech books, cut and paste code samples, download chapters, and find
quick answers
System when have
developers you need
usedthe most accurate,
modeling current
languages information.
for decades Try itvisualize,
to specify, for free at
http://safari.oreilly.com.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Comments and Questions
...............................................
Publisher:O'Reilly
Please address comments and2005
Pub Date: June questions concerning this book to the publisher:
ISBN:0-596-00795-7
O'Reilly Media,
Pages:Inc.
234
1005 Gravenstein Highway North
Sebastopol, CA 95472
800-998-9938
Table of Contents | Index (in the United States or Canada)
707-829-0515 (international/local)
707-829-0104 (fax)
System developers have used modeling languages for decades to specify, visualize,
There is a web
construct, and page for this
document book that
systems. Thelists errata,
Unified examples,
Modeling or any(UML)
Language additional information.
is one of those
You can access
languages. UMLthis pageitat:
makes possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
http://www.oreilly.com/catalog/umlnut2
communicate solutions in a consistent, tool-supported language.
To comment or ask technical questions about this book, send email to:
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
bookquestions@oreilly.com
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams
For written by others.
more information about books, conferences, Resource Centers, and the O'Reilly Network,
see the O'Reilly web site at:
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
http://www.oreilly.com
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Acknowledgments
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
From Dan Pages:234

This book was truly a team effort. Without support, emails, comments, harassment, and
suggestions
Table of Contents from
| Indexfriends, family, and colleagues, this book would not have happened. First I'd
like to thank my editor, Jonathan Gennick, for his astonishing amount of patience. He is
fantastic to work with and helped keep this book on track.
System developers have used modeling languages for decades to specify, visualize,
Next, I'd like
construct, andto document
thank the systems.
technical The
reviewers
Unifiedwho were never
Modeling short(UML)
Language on suggestions or
is one of those
comments.
languages. At UML times
makesI felt
it like this was
possible the fourth
for team edition
members of the book,by
to collaborate after working
providing in all their
a common
ideas.
language The that
techapplies
reviewers to awere: Stephen
multitude Mellor, Michael
of different systems.Chonoles, Mike
Essentially, it Hudson, Bernie
enables you to
Thuman,
communicate Kimberly Hamilton,
solutions Russ Miles,tool-supported
in a consistent, and Julie Webster.
language.

Finally,
Today, I'd
UMLlike
hasto become
thank mythefamily:
standardmy method
parents for
for modeling
supporting me from
software the startwhich
systems, and setting
means
an example
you're that has
probably driven me
confronting thisinrich
both myexpressive
and professional and personal
language more thanlife, and
evermy wife, And
before.
Tracey, for somehow
even though you maymanaging
not writeto UMLhold everything
diagrams together
yourself, while
you'll stillI need
wrotetothis book.
interpret
Compared to the magic
diagrams written by others.she has been working, writing this book was a piece of cake. Last but
not least, I'd like to thank my son Vinny: now we can head to the park!
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
From Neil it's been fully revised to cover version 2.0 of the language.
Furthermore,

This
I'd comprehensive
like new edition
to thank Ron Wheeler andnot only provides
Jacques Hamel ofaArtifact-Software
quick-reference to
forall UML 2.0
allowing thediagram
use of
types, it also explains key concepts in a way that appeals to readers already
XML examples. Thanks also to Derek McKee of Mindset Corporation for the use of LamMDA familiar with
UML or object-oriented
examples. Finally, I'd likeprogramming
to especially concepts.
thank Jonathan Gennick for his depth of patience.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Chapter 1. Fundamentals of UML
...............................................
Publisher:O'Reilly
Pub Date: June 2005
On the surface, ISBN:
the Unified Modeling Language (UML) is a visual language for capturing
0-596-00795-7
software designs and
Pages:234 patterns. Dig a little deeper, though, and you'll find that UML can be
applied to quite a few different areas and can capture and communicate everything from
company organization to business processes to distributed enterprise software. It is intended
to beof aContents
Table common way of capturing and expressing relationships, behaviors, and high-level
| Index
ideas in a notation that's easy to learn and efficient to write. UML is visual; just about
everything in it has a graphical representation. Throughout this book we'll discuss the
meaning behind the various UML elements as well as their representations.
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
1.1. Getting Started
...............................................
Publisher:O'Reilly
If you're new toPub UML, you
Date: should
June 2005be sure to read this chapter all the way through to get
acquainted withISBN: 0-596-00795-7
the basic terminology used throughout the book. If you are a developer, class
diagrams tend to Pages: 234simplest diagrams to start with because they map closely to code.
be the
Pick a program or domain you know well, and try to capture the entities involved using
classes. Once you're convinced you've modeled the relationships between your entities
Table of Contents
correctly, pick| Index
a piece of functionality and try to model that using a sequence diagram and
your classes.

IfSystem
you're developers
more of a process person
have used (business
modeling or otherwise),
languages you to
for decades may be more
specify, comfortable
visualize,
starting with
construct, andocument
and activity diagram.
systems.Chapter 9 shows
The Unified examples
Modeling of modeling
Language (UML) business
is one of processes
those
with different
languages. groups
UML makes(Human Resources,
it possible for teamIT,members
etc.) and to
progresses to by
collaborate modeling parallel
providing a common
processes
language over different
that applies togeographic
a multituderegions.
of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
1.2. Background
...............................................
Publisher:O'Reilly
UML has become the
Pub de June
Date: facto 2005
standard for modeling software applications and is growing in
popularity in modelingISBN:0-596-00795-7
other domains. Its roots go back to three distinct methods: the Booch
Method by Grady Pages: 234 the Object Modeling Technique coauthored by James Rumbaugh, and
Booch,
Objectory by Ivar Jacobson. Known as the Three Amigos, Booch, Rumbaugh, and Jacobson
kicked off what became the first version of UML, in 1994. In 1997, UML was accepted by the
Table of Contents
Object | Index
Management Group (OMG) and released as UML v1.1.

Since then, UML has gone through several revisions and refinements leading up to the current
2.0 release.
System Each revision
developers has tried
have used to address
modeling problems
languages and shortcomings
for decades identified in the
to specify, visualize,
previous versions,
construct, leading systems.
and document to an interesting expansion
The Unified andLanguage
Modeling contraction of the
(UML) language.
is one of thoseUML
2.0 is by far UML
languages. the largest
makes UML specification
it possible for teamin members
terms of page count (theby
to collaborate superstructure alone is
providing a common
over 600 pages),
language but itto
that applies represents theofcleanest,
a multitude differentmost compact
systems. version it
Essentially, ofenables
UML yet. you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell

1.3. UML By Dan Pilone,Neil Pitman


Basics
...............................................
Publisher:O'Reilly
Pub Date: June 2005
First and foremost,
ISBN:it0-596-00795-7
is important to understand that UML is a language . This means it has
both syntax andPages:
semantics.
234 When you model a concept in UML, there are rules regarding how
the elements can be put together and what it means when they are organized in a certain
way. UML is intended not only to be a pictorial representation of a concept, but also to tell you
something about
Table of Contents its context. How does widget 1 relate to widget 2? When a customer orders
| Index

something from you, how should the transaction be handled? How does the system support
fault tolerance and security?
System developers have used modeling languages for decades to specify, visualize,
You can apply
construct, andUML in any systems.
document number ofThe
ways, but common
Unified Modeling uses include:
Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
Designing software
communicate solutions in a consistent, tool-supported language.
Communicating software or business processes
Today, UML has become the standard method for modeling software systems, which means
you're probablydetails
Capturing confronting
about this rich and
a system for expressive language
requirements more than ever before. And
or analysis
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by
Documenting anothers.
existing system, process, or organization

UML has
UML 2.0 been
in a Nutshell from
applied to O'Reillydomains,
countless feels yourincluding:
pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Banking and investment sectors
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
Health
types, care
it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Defense
Topics include:
Distributed computing

Embedded systems
The role and value of UML in projects
Retail sales and supply
The object-oriented paradigm and its relation to the UML
The basic building block of UML is a diagram. There are several types, some with very specific
An integrated approach to UML diagrams
purposes (timing diagrams) and some with more generic uses (class diagrams). The following
sections touch
Class andon some of
Object, Usethe major
Case, ways UML
Sequence, has been employed.
Collaboration, TheActivity,
Statechart, diagrams mentioned
Component,
in each section
and are by no
Deployment means confined to that section. If a particular diagram helps you
Diagrams
convey your message you should use it; this is one of the basic tenants of UML modeling.
Extension Mechanisms

1.3.1.The Object Constraint


Designing Language (OCL)
Software
Because UML grew out of the software development domain, it's not surprising that's where it
still finds its
If you're new greatest
to UML,use. When with
a tutorial applied to software,
realistic UML
examples attempts
has to bridge
even been thetogap
included between
help you
the original
quickly idea foryourself
familiarize a piece with
of software and its implementation. UML provides a way to
the system.
capture and discuss requirements at the requirements level (use case diagrams), sometimes
a novel concept for developers. There are diagrams to capture what parts of the software
realize certain requirements (collaboration diagrams). There are diagrams to capture exactly
how those parts of the system realize their requirements (sequence and statechart diagrams).
Finally there are diagrams to show how everything fits together and executes (component and
www.it-ebooks.info

deployment diagrams).

Books describing previous versions of UML made a point to emphasize that UML was not a
UML 2.0
visual programming in a Nutshell
language; you couldn't execute your model. However, UML 2.0 changes
the rules somewhat.
ByDan OnePilone,of
Neilthe major motivations for the move from UML 1.5 to UML 2.0 was
Pitman
to add the ability for modelers to capture more system behavior and increase tool
...............................................
automation. A relatively new technique called Model Driven Architecture (MDA) offers the
Publisher:O'Reilly
potential to develop executable
Pub Date: June 2005 models that tools can link together and to raise the level of
abstraction aboveISBN:traditional
0-596-00795-7 programming languages. UML 2.0 is central to the MDA effort.
Pages:234
It is important to realize the UML is not a software process. It is meant to be used within a
software process and has facets clearly intended to be part of an iterative development
approach.
Table of Contents | Index

While UML was designed to accommodate automated design tools, it wasn't intended only for
tools.
SystemProfessional
developerswhiteboarders were kept
have used modeling in mind for
languages when UML was
decades designed,
to specify, so the language
visualize,
lends itself to quick sketches and capturing "back of the napkin" type designs.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
1.3.2. Business
communicate Process
solutions Modeling
in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're
UML hasprobably confronting
an extensive this rich
vocabulary and expressive
for capturing language
behavior more than
and process flow.ever before.
Activity And
diagrams
even though you may not write UML diagrams yourself, you'll still need to interpret
and statecharts can be used to capture business processes involving individuals, internal
diagrams
groups, or written by others.
even entire organizations. UML 2.0 has notation that helps model geographic
boundaries (activity partitions), worker responsibilities (swim lanes), and complex
UML 2.0 in a (statechart
transactions Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
diagrams).
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell

1.4. UML By Dan Pilone,Neil Pitman


Specifications
...............................................
Publisher:O'Reilly
Physically, UML Pub
is aDate:
set of specifications
June 2005 from the OMG. UML 2.0 is distributed as four
ISBN:
specifications: the 0-596-00795-7
Diagram Interchange Specification, the UML Infrastructure, the UML
Superstructure,Pages: 234Object Constraint Language (OCL). All of these specifications are
and the
available from the OMG web site, http://www.omg.org.

The Diagram
Table of Contents |Interchange
Index Specification was written to provide a way to share UML models
between different modeling tools. Previous versions of UML defined an XML schema for
capturing what elements were used in a UML diagram, but did not capture any information
about
System how a diagramhave
developers was used
laid out. To address
modeling this, for
languages the decades
Diagramto Interchange Specification
specify, visualize,
was developed
construct, and along with systems.
document a mapping from
The a new
Unified XML schema
Modeling to a Scalable
Language (UML) is Vector
one of Graphics
those
(SVG) representation.
languages. UML makes Typically thefor
it possible Diagram Interchange
team members Specification
to collaborate byisproviding
used only by tool
a common
vendors,
languagethough the OMG
that applies to amakes an effort
multitude to include
of different "whiteboard
systems. tools."
Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
The UML Infrastructure defines the fundamental, low-level, core, bottom-most concepts in
UML;
Today, theUML
infrastructure
has become is the
a metamodel that is used
standard method to produce
for modeling the rest
software of UML.which
systems, The means
infrastructure
you're probably isn't typically used
confronting by an
this rich end
and user, but language
expressive it providesmore
the foundation for the And
than ever before. UML
Superstructure.
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
The UML Superstructure is the formal definition of the elements of UML, and it weighs in at
over
UML 600 pages.
2.0 in This isfrom
a Nutshell the authority on all
O'Reilly feels thatpain.
your is UML,
It's at least
been as farfor
crafted as professionals
the OMG is like
concerned.
you who must The read,
superstructure
create, and documentation is typically
understand system usedexpressed
artifacts by tool vendors and those
using UML.
writing books on
Furthermore, it'sUML,
beenthough some effort
fully revised hasversion
to cover been made
2.0 oftothemake it human readable.
language.
The OCL specification defines a simple language for writing constraints and expressions for
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
elements in a model. The OCL is often brought into play when you specify UML for a particular
types, it also explains key concepts in a way that appeals to readers already familiar with
domain and need to restrict the allowable values for a parameter or object. Appendix B is an
UML or object-oriented programming concepts.
overview of the OCL.
Topics include:
It is important to realize that while the specification is the definitive source of the formal
definition of UML, it is by no means the be-all and end-all of UML. UML is designed to be
extended
The and
role interpreted
and value ofdepending on the domain, user, and specific application. There is
UML in projects
enough wiggle room in the specification to fit a data center through it... this is intentional. For
example,
The there are typically
object-oriented two or more
paradigm ways
and its to represent
relation a UML concept depending on what
to the UML
looks best in your diagram or what part of a concept you wish to emphasize. You may choose
to represent a particular
An integrated element
approach using
to UML an in-house notation; this is perfectly acceptable as
diagrams
far as UML is concerned. However, you must be careful when using nonstandard notation
becauseClass
partand Object,
of the Usefor
reason Case, Sequence,
using UML in theCollaboration,
first place is Statechart, Activity, Component,
to have a common
and Deployment
representation Diagrams with other users.
when collaborating

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
1.5. Putting UML to Work
...............................................
Publisher:O'Reilly
Pub Date: June 2005
A UML model provides a view of a systemoften just one of many views needed to actually
ISBN:0-596-00795-7
build or document the234
Pages: complete system. Users new to UML can fall into the trap of trying to
model everything about their system with a single diagram and end up missing critical
information. Or, at the other extreme, they may try to incorporate every possible UML
diagram into |their
Table of Contents Index model, thereby overcomplicating things and creating a maintenance

nightmare.

Becoming proficient have


System developers with UML
usedmeans understanding
modeling languages for what each diagram
decades hasvisualize,
to specify, to offer and
knowing when to apply it. There will be many times when a concept
construct, and document systems. The Unified Modeling Language (UML) is one could be expressed
of thoseusing
any number UML
languages. of diagrams;
makes it pick the one(s)
possible for teamthat will mean
members to the most to by
collaborate your users. a common
providing
language that applies to a multitude of different systems. Essentially, it enables you to
Each chapter ofsolutions
communicate this bookindescribes a type
a consistent, of diagram and
tool-supported gives examples of its use. There
language.
are times when you may need to have more than one diagram to capture all the relevant
details
Today,for
UMLa single part of the
has become your system.method
standard For example, you may
for modeling need asystems,
software statechart diagram
which to
means
show how
you're an embedded
probably controller
confronting processes
this rich input from
and expressive a user more
language as well as aever
than timing diagram
before. And to
show
even how the you
though controller
may notinteracts withdiagrams
write UML the rest of the system
yourself, you'llasstill
a result of that
need to input.
interpret
diagrams written by others.
You should also consider your audience when creating models. A test engineer may not care
about the low-level implementation (sequence diagram) of a component, only the external
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
interfaces it offers (component diagram). Be sure to consider who will be using each diagram
you who must read, create, and understand system artifacts expressed using UML.
you produce and make it meaningful to that person.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
1.5.1.
types, itUML Profiles
also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics
In include:
addition to a variety of diagram types, UML is designed to be extended. You can informally
extend UML by adding constraints, stereotypes, tagged values, and notes to your models, or
you can use the formal UML extension and define a full UML profile . A UML profile is a
The of
collection role and value and
stereotypes of UML in projects
constraints on elements that map the otherwise generic UML to
a specific problem domain or implementation. For example, there are profiles for CORBA,
The object-oriented paradigm and its relation to the UML
Enterprise Application Integration (EAI), fault tolerance, database modeling, and testing. See
ChapterAn11 for moreapproach
integrated information on UML
to UML 2.0 Profiles.
diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
1.6. Modeling
...............................................
Publisher:O'Reilly
It should go without saying
Pub Date: that
June the focus of UML is modeling. However, what that means,
2005
exactly, can be ISBN: 0-596-00795-7
an open-ended question. Modeling is a means to capture ideas, relationships,
Pages:234
decisions, and requirements in a well-defined notation that can be applied to many different
domains. Modeling not only means different things to different people, but also it can use
different pieces of UML depending on what you are trying to convey.
Table of Contents | Index

In general a UML model is made up of one or more diagrams . A diagram graphically


represents things, and the relationships between these things. These things can be
representations of real-world
System developers have usedobjects,
modelingpure softwarefor
languages constructs, or specify,
decades to a description of the
visualize,
behavior of and
construct, some other object.
document It is The
systems. common forModeling
Unified an individual thing (UML)
Language to showis up
oneon
ofmultiple
those
diagrams;
languages.each
UMLdiagram
makes itrepresents a particular
possible for interest,
team members or view , of by
to collaborate theproviding
thing being modeled.
a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
1.6.1. Diagrams
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
UML 2.0 divides diagrams into two categories: structural diagrams and behavioral diagrams .
diagrams written by others.
Structural diagrams are used to capture the physical organization of the things in your
systemi.e., how one object relates to another. There are several structural diagrams in UML
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
2.0:
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive
Class diagrams new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented
Class diagrams useprogramming concepts. to capture details about the entities that
classes and interfaces
make up your system and the static relationships between them. Class diagrams are
Topicsone
include:
of the most commonly used UML diagrams, and they vary in detail from fully
fleshed-out and able to generate source code to quick sketches on whiteboards and
napkins. Class diagrams are discussed in Chapter 2.
The role and value of UML in projects

The object-oriented
Component diagrams paradigm and its relation to the UML

An integrated
Component approach
diagrams to UML
show the diagrams
organization and dependencies involved in the
implementation of a system. They can group smaller elements, such as classes, into
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
larger, deployable pieces. How much detail you use in component diagrams varies
and Deployment Diagrams
depending on what you are trying to show. Some people simply show the final,
deployable version of a system, and others show what functionality is provided by a
Extension Mechanisms
particular component and how it realizes its functionality internally. Component
diagrams
The Objectare discussedLanguage
Constraint in Chapter 5.
(OCL)

Composite structure diagrams


If you're new to UML, a tutorial with realistic examples has even been included to help you
Composite
quickly structure
familiarize yourselfdiagrams
with the are new to UML 2.0. As systems become more complex,
system.
the relationships between elements grow in complexity as well. Conceptually, composite
structure diagrams link class diagrams and component diagrams; they don't emphasize
the design detail that class diagrams do or the implementation detail that composite
structures do. Instead, composite structures show how elements in the system combine
to realize complex patterns. Composite structures are discussed in Chapter 4.
www.it-ebooks.info

Deployment diagrams
UML 2.0 in a Nutshell
DeploymentByDandiagrams
Pilone,Neilshow
Pitmanhow your system is actually executed and assigned to
various pieces of hardware. You typically use deployment diagrams to show how
...............................................
components are configured
Publisher: O'Reilly at runtime. Deployment diagrams are discussed in Chapter
6. Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
Package diagrams

Package
Table of Contents diagrams
| Index are really special types of class diagrams. They use the same
notation but their focus is on how classes and interfaces are grouped together. Package
diagrams are discussed in Chapter 3.
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
Object diagrams
languages. UML makes it possible for team members to collaborate by providing a common
language that
Object applies to
diagrams usea the
multitude of different
same syntax systems.
as class Essentially,
diagrams and show it enables youinstances
how actual to
communicate solutions in a consistent, tool-supported language.
of classes are related at a specific instance of time. You use object diagrams to show
snapshots of the relationships in your system at runtime. Object diagrams are discussed
Today,
asUML
parthas become
of class the standard
diagrams method
in Chapter 2. for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though
Behavioral you may
diagrams not on
focus write
theUML diagrams
behavior yourself,inyou'll
of elements still need
a system. For to interpret
example, you can use
diagrams written by others.
behavioral diagrams to capture requirements, operations, and internal state changes for
elements. The behavioral diagrams are:
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Activity diagrams
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types,Activity
it also diagrams capture
explains key the flow
concepts in a from one appeals
way that behaviortoorreaders
activity already
, to the familiar
next. They
withare
UML orsimilar in concept to
object-oriented a classic flowchart,
programming but are much more expressive. Activity
concepts.
diagrams are discussed in Chapter 9.
Topics include:

Communication diagrams
The role and value of UML in projects
Communication diagrams are a type of interaction diagram that focuses on the
The object-oriented
elements involved inparadigm andbehavior
a particular its relation
andtowhat
the messages
UML they pass back and
forth. Communication diagrams emphasize the objects involved more than the order
An integrated
and approach
nature of the to UML
messages diagramsCommunication diagrams are discussed as part
exchanged.
of interaction diagrams in Chapter 10.
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Interaction overview diagrams
Extension Mechanisms
Interaction overview diagrams are simplified versions of activity diagrams. Instead of
The Object Constraint
emphasizing Language
the activity at each (OCL)
step, interaction overview diagrams emphasize which
element or elements are involved in performing that activity. The UML specification
describes interaction diagrams as emphasizing who has the focus of control throughout
the execution of a system. Interaction overview diagrams are discussed as part of
If you're new to UML, a tutorial with realistic examples has even been included to help you
interaction diagrams in Chapter 10.
quickly familiarize yourself with the system.

Sequence diagrams

Sequence diagrams are a type of interaction diagram that emphasize the type and
order of messages passed between elements during execution. Sequence diagrams are
www.it-ebooks.info

the most common type of interaction diagram and are very intuitive to new users of
UML. Sequence diagrams are discussed as part of interaction diagrams in Chapter 10.

UML 2.0 in a Nutshell


State machine diagrams
ByDan Pilone,Neil Pitman
...............................................
State machine diagrams
Publisher:O'Reillycapture the internal state transitions of an element. The
element could be as
Pub Date: small
June 2005as a single class or as large as the entire system. State
machine diagrams are commonly used to model embedded systems and protocol
ISBN:0-596-00795-7
specifications or234
Pages: implementations. State machine diagrams are discussed in Chapter 8.

Timing diagrams
Table of Contents | Index

Timing diagrams are a type of interaction diagram that emphasize detailed timing
specifications
System developers for
havemessages. They are
used modeling often used
languages to modelto
for decades real-time
specify, systems
visualize,such as
construct, and document systems. The Unified Modeling Language (UML) is notation
satellite communication or hardware handshaking. They have specific to
one of those
indicate
languages. how
UML long a
makes it system
possiblehas
for to process
team or respond
members to messages,
to collaborate and howa external
by providing common
interruptions
language are to
that applies factored into execution.
a multitude of differentTiming diagrams
systems. are discussed
Essentially, asyou
it enables parttoof
interaction diagrams in Chapter 10.
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
Use case diagrams
you're probably confronting this rich and expressive language more than ever before. And
even Use
though
caseyou may not
diagrams write UML
capture diagrams
functional yourself, you'll
requirements for a still needThey
system. to interpret
provide an
diagrams written by others.
implementation-independent view of what a system is supposed to do and allow the
modeler to focus on user needs rather than realization details. Use case diagrams are
UML 2.0 in a Nutshell
discussed from7.
in Chapter O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

1.6.2. Views
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
While not strictly part of UML itself, the concept of views of a system helps the modeler
choose
Topics diagrams
include: that help convey the correct information depending on his goals.
Specifically, models are often divided into what is called the 4+1 views of a system. The 4+1
notation represents four distinct views of a system and one overview of how everything fits
The The
together. rolefour
and views
value are:
of UML in projects

The object-oriented paradigm and its relation to the UML

DesignAn integrated approach to UML diagrams


view

Classdesign
The and Object, Use Case,
view captures theSequence, Collaboration,
classes, interfaces, Statechart,
and patterns thatActivity,
describeComponent,
the
and Deployment
representation of Diagrams
the problem domain and how the software will be built to address it.
The design view almost always uses class diagrams, object diagrams, activity diagrams,
Extension Mechanisms
composite structure diagrams, and sequence diagrams to convey the design of a
system. The design view typically doesn't address how the system will be implemented
The Object Constraint Language (OCL)
or executed.

Deployment view
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
The deployment view captures how a system is configured, installed, and executed. It
often consists of component diagrams, deployment diagrams, and interaction diagrams.
The deployment view captures how the physical layout of the hardware communicates
to execute the system, and can be used to show failover, redundancy, and network
topology.
www.it-ebooks.info

Implementation view

The implementation view emphasizes the components, files, and resources used by a
UML 2.0 in a Nutshell
system. Typically the implementation view focuses on the configuration management of
ByDan Pilone,Neil Pitman
a system; what components depend on what, what source files implement what classes,
...............................................
etc. Implementation
Publisher:O'Reilly
views almost always use one or more component diagrams and
may include
Pub interaction
Date: June 2005 diagrams, statechart diagrams, and composite structure
diagrams.ISBN:0-596-00795-7
Pages:234

Process view
Table of Contents | Index
The process view of a system is intended to capture concurrency, performance, and
scalability information. Process views often use some form of interaction diagrams and
activity diagrams to show how a system actually behaves at runtime.
System developers have used modeling languages for decades to specify, visualize,
construct,
The and document
four distinct views of asystems.
system areThebrought
Unified Modeling Language
together with (UML)
the final view:is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Use case view
Today, UML has become the standard method for modeling software systems, which means
you'reThe use case
probably view captures
confronting the and
this rich functionality required
expressive languageby the
more end users.
than everThe concept
before. Andof
even end users
though youis may
deliberately broad
not write UML in the use yourself,
diagrams case view; theystill
you'll include
need the primary
to interpret
stakeholders,
diagrams written bythe system administrator, the testers, and potentially the developers
others.
themselves. The use case view is often broken down into collaborations that link a use
case
UML 2.0 in with one or from
a Nutshell moreO'Reilly
of the four
feelsbasic
yourviews. Thebeen
pain. It's use case
craftedviewforincludes use case
professionals like
diagrams
you who and typically
must read, usesunderstand
create, and several interaction diagramsexpressed
system artifacts to show use case
using details.
UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive
1.6.3. Notes new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
UML provides a catchall element, or note, for adding information to your diagram. The note
Topics include:
symbol is a dog-eared rectangle with an optional dashed line to link it to some element.
Figure 1-1 shows a simple note.
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML


Figure 1-1. A simple note
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
In general,
quickly you canyourself
familiarize use notes to the
with capture just about anything in your diagram. Notes are often
system.
used to express additional information that either doesn't have its own notation or would
clutter a diagram if you drew it right on the element. Some tools allow you to embed URL
links in notes, providing an easy way to navigate from one diagram to the next, or to HTML
documents, etc.
www.it-ebooks.info

1.6.4. Classifiers and Adornments


The basic modeling
UML 2.0element in UML is the classifier . A classifier represents a group of things
in a Nutshell
with common properties.
ByDan Pilone,Remember,
Neil Pitman at the level of classifier, we are discussing UML itself,
not a particular ...............................................
system. So, when we say a class is a classifier, we mean that classes are
things that havePublisher:
common properties: methods, attributes, exceptions, visibility, etc. A specific
O'Reilly
class, such as Automobile
Pub Date: June , isn't a UML classifier; it's an instance of a classifier, or a class.
2005
ISBN:0-596-00795-7
Pages:234
For the truly self-abusing, this is a glimpse into the UML meta-model .
The full metamodel is quite complex and begins with the UML
Table of Contents | Index
infrastructure specification.

System developers have used modeling languages for decades to specify, visualize,
Aconstruct,
classifier'sand document
generic systems.
notation The Unified
is a rectangle thatModeling Language
can be divided into (UML) is one of to
compartments those
show
languages. UML makes
classifier-specific it possible
information, such for team members
as operations, to collaborate
attributes, or stateby providingHowever,
activities. a common
language
many UML that appliessuch
classifiers to aasmultitude of different
states, activities, systems.
objects, Essentially,
etc., have customit enables youtotohelp
notations
communicate
distinguish themsolutions
visually.in a consistent, tool-supported language.

AToday,
classifier
UML can
has have several
become thetypes of extra
standard information
method attached
for modeling to it via
software a UML which
systems, mechanism
means
called
you'readornments . For example,
probably confronting this classifiers can have restrictions
rich and expressive language more placed onever
than the values
before.aAnd
feature of the you
even though classifier canwrite
may not take.UMLIn general,
diagrams constraints
yourself, are written
you'll neartothe
still need classifier or in an
interpret
attached
diagramsnote. Seeby
written the specific diagram types for details on what notation to use for a
others.
constraint when writing it near the classifier.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
Another
you whotypemustof read,
adornment
create,isand
a stereotype
understand . Just as you
system would expressed
artifacts expect, a stereotype
using UML.is intended
to give the reader
Furthermore, a general
it's been fully idea
revisedof what a particular
to cover classifier
version 2.0 of therepresents.
language. Stereotypes are
usually associated with implementation concepts, such as «TRansactional» or «singleton»,
though that isn't required
This comprehensive by the UML
new edition specification.
not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell

1.7. UML By Dan Pilone,Neil Pitman


Rules of Thumb
...............................................
Publisher:O'Reilly
Pub Date: June 2005
While UML provides
ISBN:a0-596-00795-7
common language for capturing functionality and design information, it
is deliberately open-ended
Pages:234 to allow for the flexibility needed to model different domains.
There are several rules of thumb to keep in mind when using UML:

Table of Contents | Index

Nearly everything in UML is optional


System developers have used modeling languages for decades to specify, visualize,
UML provides a language to capture information that varies greatly depending on the
construct, and document systems. The Unified Modeling Language (UML) is one of those
domain of the problem. In doing that, there are often parts of UML that either don't
languages. UML makes it possible for team members to collaborate by providing a common
apply to your particular problem or may not lend anything to the particular view you are
language that applies to a multitude of different systems. Essentially, it enables you to
trying to convey. It is important to realize that you don't need to use every part of UML
communicate solutions in a consistent, tool-supported language.
in every model you create. Possibly even more importantly, you don't need to use every
allowable symbol for a diagram type in every diagram you create. Show only what helps
Today, UML has become the standard method for modeling software systems, which means
clarify the message you are trying to convey, and leave off what you don't need. At
you're probably confronting this rich and expressive language more than ever before. And
times there is more than one way to convey the same information; use what is familiar
even though you may not write UML diagrams yourself, you'll still need to interpret
to your audience.
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
UML models are rarely complete
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully
As a consequence revised tobeing
of everything coveroptional,
version 2.0
it isofcommon
the language.
for a UML model to be
missing some details about a system. The trick is to not miss key details that could
This comprehensive new edition
impact your system design.not only provides
Knowing a key
what is a quick-reference
detail versustoextraneous
all UML 2.0information
diagram
types,comes
it alsowith
explains
experience; however, using an iterative process and revisiting your with
key concepts in a way that appeals to readers already familiar model
UML or object-oriented
helps programming
to flesh out what needs to concepts.
be there. As UML moves closer to tool automation with
practices like MDA and Software Factories, the models often become more and more
Topicsdetailed
include:and therefore complete. The difference is the tool support that helps vary the
level of abstraction depending on your needs.
The role and value of UML in projects
UML is designed to be open to interpretation
The object-oriented paradigm and its relation to the UML
While the UML specification does a good job of laying down the groundwork for a
An integrated approach to UML diagrams
modeling language, it is critical that within an organization or group of users you
establish
Class andhow and Use
Object, when to use
Case, a language
Sequence, feature. ForStatechart,
Collaboration, example, some organizations
Activity, Component,
use
and an aggregation
Deployment relationship to indicate a C++ pointer and a composition
Diagrams
relationship to indicate a C++ reference. There is nothing inherently wrong with this
distinction, but it's something that isn't going to be immediately obvious to someone
Extension Mechanisms
not familiar with that organization's modeling technique. It is a good practice to put
together
The Objecta document
Constrainton modeling
Language guidelines; it helps novice users get up to speed
(OCL)
quicker and helps experienced users really think about how they represent something
and consider a potentially better notation.

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly
UML familiarize
is intended toyourself with the system.
be extended

UML includes several mechanisms to allow customization and refinement of the


language. Such mechanisms as adornments, constraints, and stereotypes provide ways
to capture specific details that aren't easily expressed using classifiers and
relationships. Typically these are grouped into what are known as UML profiles . For
www.it-ebooks.info

example, you can put together a Java 2 Enterprise Edition (J2EE) profile that includes
stereotypes for sessionbean or javadataobject. If you are modeling a complex domain,
consider putting together a UML profile that lets you easily identify elements as
UML
concepts in 2.0 in
your a Nutshellsuch as mutualfund or securitymonitor.
domain,
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Chapter 2. Class Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Class diagrams ISBN:
are one of the most fundamental diagram types in UML. They are used to
0-596-00795-7
capture the static relationships
Pages:234 of your software; in other words, how things are put together.

When writing software you are constantly making design decisions: what classes hold
references to other classes, which class "owns" some other class, and so on. Class diagrams
Table of Contents | Index
provide a way to capture this "physical" structure of a system.

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
2.1. Classes
...............................................
Publisher:O'Reilly
Pub Date: June 2005
A class represents a 0-596-00795-7
ISBN: group of things that have common state and behavior. You can think of a
class as a blueprint for
Pages: an object in an object-oriented system. In UML speak, a class is a kind
234
ofclassifier . For example, Volkswagen, Toyota, and Ford are all cars, so you can represent
them using a class named Car. Each specific type of car is an instance of that class, or an
object . A class
Table of Contents may represent a tangible and concrete concept, such as an invoice; it may be
| Index

abstract, such as a document or a vehicle (as opposed to an invoice, or a motorcycle greater


than 1000 cc), or it may represent an intangible concept such as a high-risk investment
strategy.
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
You represent
languages. UML a class
makeswith a rectangular
it possible boxmembers
for team divided into compartments
to collaborate . A compartment
by providing a common is
simply
language an area in the rectangle
that applies to write
to a multitude of information. The first
different systems. compartment
Essentially, holdsyou
it enables the to
name of
the class, the second
communicate holds
solutions in aattributes
consistent,(see "Attributes"),language.
tool-supported and the third is used for operations
(see "Operations"). You can hide any compartment of the class if that increases the
readability
Today, UML of has
yourbecome
diagram.theWhen reading
standard methoda diagram, you can
for modeling make no
software assumptions
systems, which about
meansa
missing compartment;
you're probably it doesn't
confronting this mean it isexpressive
rich and empty. You may add
language compartments
more to a class
than ever before. Andto
show
even additional
though you information, suchUML
may not write as exceptions or events,
diagrams yourself, though
you'll still this
needistooutside of the typical
interpret
notation.
diagrams written by others.

UML
UML suggests that the from
2.0 in a Nutshell class O'Reilly
name: feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Start with a capital letter
This Be
comprehensive newtop
centered in the edition not only provides a quick-reference to all UML 2.0 diagram
compartment
types, it also explains key concepts in a way that appeals to readers already familiar with
UML Be
or object-oriented programming
written in a boldface font concepts.

Topics
Beinclude:
written in italics if the class is abstract (see "Abstract Classes")

Figure 2-1 shows a simple class.


The role and value of UML in projects

The object-oriented paradigm and its relation to the UML


Figure 2-1. Simple class representation
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
2.1.1. Objects

An object is an instance of a class. For example, you may have several instances of a class
namedCar: one two-door red car, one four-door blue car, and one hatchback green car. Each
www.it-ebooks.info

instance of Car is an object and may be given its own name, though it is common to see
unnamed, or anonymous, objects on object diagrams. Typically you show the name of the
object followed by a colon followed by its type (i.e., class). You show that this is an instance
UML 2.0 in athe
of a class by underlining Nutshell
name and type. Figure 2-2 shows an instance of a class Car
namedToyota. Note
ByDanthat inNeil
Pilone, this figure, we have hidden the empty compartments.
Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7Figure 2-2. An instance of Car
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
2.2. Attributes
...............................................
Publisher:O'Reilly
Details of a class (the
Pub color
Date: Juneof2005
a car, the number of sides in a shape, etc.) are represented as
ISBN:0-596-00795-7
attributes . Attributes can be simple primitive types (integers, floating-point numbers, etc.) or
relationships to Pages:
other,234
complex objects (see "Relationships").

An attribute can be shown using two different notations: inlined or relationships between
classes. In addition,
Table of Contents | Index notation is available to show such things as multiplicity, uniqueness, and
ordering. This section introduces both notations, and then describes the details of the
attribute specification.
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages.
2.2.1. InlinedUML makes it possible for team members to collaborate by providing a common
Attributes
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
You can list a class's attributes right in rectangle notation; these are typically called inlined
Today, UML has become the standard method for modeling software systems, which means
attributes . There is no semantic difference between inlined attributes and attributes by
you're probably confronting this rich and expressive language more than ever before. And
relationship; it's simply a matter of how much detail you want to present (or, in the case of
even though you may not write UML diagrams yourself, you'll still need to interpret
primitives like integers, how much detail you can present).
diagrams written by others.
To represent an attribute within the body of a class, place the attribute in the second
UML 2.0 in a Nutshell
compartment fromUML
of the class. O'Reilly
refersfeels your pain.
to inlined It's been
attributes crafted for
as attribute professionals
notation . Inlinedlike
you who must
attributes read,
use the create,notation:
following and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

visibility / name new


This comprehensive : type multiplicity
edition = default
not only provides a quick-reference to all UML 2.0 diagram
types, it also strings
{property explains and
key concepts in a way
constraints } that appeals to readers already familiar with
UML or object-oriented programming concepts.
visibility ::= {+|-|#|~}
Topics include:
multiplicity ::= [lower ..upper ]

The role and value of UML in projects

FigureThe
2-3 object-oriented paradigm
lists several attributes, and its relation
demonstrating to theaspects
various UML of attribute notation.

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
Figure 2-3. Example attributes
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

The syntax elements are:


www.it-ebooks.info

visibility

Indicates the visibility of the attribute. Use the following symbols: +, -, #, or ~ for
UML 2.0
public,private in a Nutshell
,protected , or package, respectively (see "Visibility" in Chapter 3).
ByDan Pilone,Neil Pitman
...............................................
/ Publisher:O'Reilly
Pub Date: June 2005
Indicates ISBN:
the attribute
0-596-00795-7 is derived . A derived attribute is simply one that can be
computedPages:
from 234other attributes of the class. See "Derived Attributes."

name
Table of Contents | Index

Is a noun or short phrase naming the attribute. Typically the first letter is lowercase,
anddevelopers
System the first letter
haveofused
eachmodeling
subsequent word isfor
languages capitalized.
decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
type
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions
Is the type in a consistent,
of the attribute tool-supported
as another language.
classifier, typically a class, interface, or built-in
type like int .
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
multiplicity
diagrams written by others.
Specifies how many instances of the attribute's type are referenced by this attribute.
UML 2.0
Caninbe
a Nutshell from O'Reilly
absent (meaning feels your
multiplicity pain.
of 1), It's been
a single crafted
integer, or afor professionals
range of values like
you who must between
specified read, create,
squareandbrackets
understand systembyartifacts
separated expressed
"..". Use using UML. to
* as the upperbound
Furthermore,
representit's been
the fully
upper revised
limit to cover
or * on its ownversion
to mean2.0zero
of the
or language.
more. See "Multiplicity."

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
default
UML or object-oriented programming concepts.
Is the default value of the attribute.
Topics include:

property strings
The role and value of UML in projects
Is a collection of properties, or tags, that can be attached to attributes. These are
The object-oriented
typically paradigm
context-specific and itssuch
and denote relation to the
things UML
as ordering or uniqueness. They are
surrounded by {} and separated by commas. See "Properties."
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
constraints
and Deployment Diagrams
Are one or more restrictions placed on an attribute. They may be natural language or
Extension
use Mechanisms
a formal grammar such as the OCL. See "Constraints."

The Object Constraint Language (OCL)

2.2.2. Attributes by Relationship


If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly
You mayfamiliarize yourself
also represent with the
attributes system.
using the relationship notation. The relationship notation
results in a larger class diagram, but it can provide greater detail for complex attribute types.
The relationship notation also conveys exactly how the attribute is contained within a class
(see "Relationships" for information on the types of relationships). For example, if you are
modeling a Car, you can show that a car contains an Engine much more clearly using
relationships than you can just by listing an attribute in the Car's rectangle. However, showing
www.it-ebooks.info

theCar's name by relationship is probably overkill because it is likely just a string.

To represent an attribute using relationships you use one of the association relationships
between the class UMLcontaining
2.0 in a Nutshell
the attribute and the class that represents the attribute, as
shown in FigureBy 2-4, whichNeil
Dan Pilone, shows
Pitmanthat the relationship between a car and its engine has a
multiplicity of 1;...............................................
a car has one engine.
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Figure
Pages:234 2-4. Attribute using relationship notation

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's
Yes,been
yes,fully
as myrevised
editortopointed
cover version 2.0 cars
out, some of the language.
like the Toyota Prius have
two engines. Work with me here.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:
Relationship notation supports the same syntax as inlined notation, though the layout is
slightly different. The attribute's visibility and name are placed near the relationship line.
Don't use square brackets for multiplicity, but do place the multiplicity specification near the
The role and value of UML in projects
attribute's classifier.
The object-oriented paradigm and its relation to the UML
Like multiplicity, you can place constraints on attributes (see "Constraints"). In relationship
notation, you write constraints
An integrated approach tonear
UMLthe attribute's classifier along the relationship line. UML
diagrams
allows relationship notation to also express constraints between attributes, as shown in Figure
2-5. Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms
Figure 2-5. Relationship notation using constraints
The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

InFigure 2-5, the standard UML constraint xor shows that only automaticTransmission or
manualTransmission can be set at any given time (exclusive or). You need to express this
constraint in a note ifhave
System developers the used
inlined attributelanguages
modeling notation was used. to specify, visualize,
for decades
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language
2.2.3. that applies
Derived to a multitude of different systems. Essentially, it enables you to
Attributes
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
The derived notation, which is the leading forward slash (/), can be used as an indicator to
you're probably confronting this rich and expressive language more than ever before. And
the implementer that the attribute may not be strictly necessary. For example, let's say you
even though you may not write UML diagrams yourself, you'll still need to interpret
modeled a bank account with a simple class named Account. This class stores the current
diagrams written by others.
balance as a floating-point number named balance. To keep track of whether this account is
overdrawn, you add a boolean named overdrawn. Whether the account is overdrawn is really
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
based on whether the balance is positive, not the boolean you added. You can indicate this to
you who must read, create, and understand system artifacts expressed using UML.
the developer by showing that overdrawn is a derived attribute, with its state based on
Furthermore, it's been fully revised to cover version 2.0 of the language.
balance.Figure 2-6 shows how balance and overdrawn can be represented using a note to
convey the relationship.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:
Figure 2-6. Derived attribute

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension
The UML Mechanisms
specification notes that a derived attribute is typically readOnly, meaning a user may
not modify the value. However, if a user is permitted to modify the value, the class is
The Object Constraint Language (OCL)
expected to update the source of the derived information appropriately.

2.2.4. Attribute
If you're Multiplicity
new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
The multiplicity of an attribute specifies how many instances of the attribute's type are
created when the owning class is instantiated. For example, our Car class will likely have four
wheels, so the multiplicity of the wheel attribute is 4. If no multiplicity is specified, 1 is
implied. Multiplicity can be a single integer, a list of integers separated by commas, or a
range of values. When specifying a range of values, an infinite upper bound can be
www.it-ebooks.info

represented as an *; if no lower bound is specified, an * means zero or more. The multiplicity


value is shown between square brackets as a single integer or as two integers separated by
two dots (..).Figure 2-7 shows the various ways to represent an attribute's multiplicity.
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Figure 2-7. Multiplicity
Publisher:O'Reilly examples
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
2.2.4.1. Ordering
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
An attribute
you're with confronting
probably a multiplicity greater
this than
rich and 1 can be language
expressive specified to be ordered
more . If before.
than ever the attribute
And
iseven
ordered,
thoughtheyou
elements
may not must beUML
write stored sequentially.
diagrams Foryou'll
yourself, example, you can
still need specify that a list
to interpret
of names be
diagrams storedbyalphabetically
written others. by marking the list as ordered. Exactly what it means for
attributes to be stored sequentially typically depends on the attribute type. By default,
attributes
UML 2.0 inare not ordered.
a Nutshell fromTo mark feels
O'Reilly an attribute as ordered,
your pain. It's beenspecify
craftedthe forproperty
professionals likeafter
ordered
the
youattribute
who must in read,
braces, as shown
create, in Figure 2-8.
and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains keyFigure
concepts2-8. Ordered
in a way multiplicity
that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and
2.2.4.2. Deployment Diagrams
Uniqueness
Extension Mechanisms
In addition to being ordered, an attribute with multiplicity greater than 1 may be required to
beunique
The. Object
If an attribute is required
Constraint Language to (OCL)
be unique, each element of this attribute must be
unique. By default, attributes with multiplicity greater than 1 are unique , meaning there can
be no duplicates in the elements this attribute holds. For example, if a class held a list of
voters and each person was allowed to vote only once, each element in the list would be
unique. Tonew
If you're make an attribute
to UML, unique,
a tutorial place the
with realistic keywordhas
examples evenafter
unique beenthe attribute
included to in braces,
help you
as shownfamiliarize
quickly in Figure yourself
2-9. To allow an attribute
with the system. to hold duplicates of an object, simply use the
propertynotunique.

Figure 2-9. Unique multiplicity


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

2.2.4.3. Collection types


Table of Contents | Index

The UML specification specifies a set of mappings from the various ordered and uniqueness
System developers
properties have used
to UML collection modeling
types. languages
Table 2-1 for mappings
shows the decades tofrom
specify, visualize,
attribute properties to
construct,
the and document
UML collection systems.
type. Note Thecollection
that the Unified Modeling Language
types shown (UML)
in Table is one
2-1 are UML of mappings
those
languages.
and may notUMLmapmakes it to
directly possible
classesfor
inteam members
a target to collaborate by providing a common
language.
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
Table 2-1.
you're probably confronting Collection
this rich types
and expressive for attributes
language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Order Uniqueness Associated collection type
UML 2.0False
False in a Nutshell Bag
from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
True True OrderedSet
Furthermore, it's been fully revised to cover version 2.0 of the language.
False True Set
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
True False Sequence
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

For example,
Topics to show that a bank's clients should be represented using an OrderedSet, you
include:
can model the clients attribute as shown in Figure 2-10.

The role and value of UML in projects

TheFigure
object-oriented
2-10. paradigm
Exampleandattribute
its relation to the UML
stored in an OrderedSet
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
2.2.5.
quickly Attribute Properties
familiarize yourself with the system.

In addition to the properties associated with multiplicity, an attribute may have a number of
properties set to convey additional information to the reader of the diagram. The common
properties defined by UML are:
www.it-ebooks.info

readOnly
UML 2.0 in a Nutshell
Specifies that
ByDanthe attribute
Pilone, Neil Pitman may not be modified once the initial value is set. This
typically maps to a constant in a development language. UML doesn't specify when the
...............................................
initial value must be
Publisher: set, though if you specify the default value for an attribute it is
O'Reilly
considered Pubthe initial
Date: June value
2005and may not be changed.
ISBN:0-596-00795-7
Pages:234
union

Specifies
Table of Contents that
the attribute type is a union of the possible values for this attribute.
| Index
Frequently this is used with the derived property to indicate that an attribute is a
derived union of another set of attributes.
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
subsets <attribute-name>
languages. UML makes it possible for team members to collaborate by providing a common
language that applies
Specifies that thistoattribute
a multitude
typeofisdifferent
a subsetsystems.
of all theEssentially,
valid valuesitfor
enables you to
the given
communicate solutions in a consistent, tool-supported language.
attribute. This isn't a common property, but if used, it is typically associated with
subclasses of an attribute type.
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though
redefines you may not write UML diagrams yourself, you'll still need to interpret
<attribute-name>
diagrams written by others.
Specifies that this attribute acts as an alias for the given attribute. Though uncommon,
UML 2.0
thisinattribute
a Nutshell
canfrom O'Reilly
be used feelsthat
to show youra pain. It's been
subclass crafted
has an for professionals
attribute that is an aliaslike
for a
you who must read,
superclass's create, and understand system artifacts expressed using UML.
attribute.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
composite
types, it also explains key concepts in a way that appeals to readers already familiar with
UML orSpecifies that this programming
object-oriented attribute is part of a whole-part relationship with the classifier. See
concepts.
"Relationships" for more information on composition.
Topics include:

2.2.6.The
Constraints
role and value of UML in projects

The object-oriented paradigm and its relation to the UML


Constraints represent restrictions placed on an element. They may be natural language or use
a formal
An grammar
integratedsuch as theto
approach OCL;
UMLhowever,
diagramsthey must evaluate to a boolean expression.
You typically show constraints between curly braces ({}) after the element they restrict,
thoughClass
theyand
mayObject, Usein
be placed Case, Sequence,
a note and linkedCollaboration, Statechart,
to the element Activity,line.
using a dashed Component,
and Deployment Diagrams
You can name a constraint by specifying the name followed by a colon (:) before the boolean
Extension
expression. This Mechanisms
is frequently used to identify constraints on an operation (see "Operation
Constraints").
The Object Constraint Language (OCL)
Figure 2-11 shows several constraints on attributes and operations.

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize
Figureyourself
2-11. with the system.
Examples of inlined and note constraints
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
2.2.7. Static Attributes
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Static attributes are attributes of the class rather than of an instance of the class. For
example,
Today, UMLyouhas
canbecome
initializethe
constant
standardvalues for afor
method class and share
modeling themsystems,
software between which
all instances
means
of the class.
you're You confronting
probably represent static attributes
this rich by underlining
and expressive theirmore
language specification in before.
than ever both inlined
And
and
evenrelationship-based
though you may not presentations, as shownyourself,
write UML diagrams in Figureyou'll
2-12.still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create,Figure 2-12. system
and understand Staticartifacts
attribute
expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
2.3. Operations
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Operations are features of classes that specify how to invoke a particular behavior. For
ISBN:0-596-00795-7
example, a classPages:
may234offer an operation to draw a rectangle on the screen or count the
number of items selected in a list. UML makes a clear distinction between the specification of
how to invoke a behavior (an operation) and the actual implementation of that behavior (a
method). See| Index
Table of Contents "Methods" for more information.

You place operations in a separate compartment with the following syntax:


System developers have used modeling languages for decades to specify, visualize,
construct, and
visibility document
name systems.
( parameters ) :The Unified Modeling
return-type Language (UML) is one of those
{properties}
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
where parameters are written as:
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
direction parameter_name : type [ multiplicity ]
even though you may not write UML diagrams yourself, you'll still need to interpret
= default_value
diagrams written by{others.
properties }

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who
Figure must
2-13 read,
shows create,
several and understand
example operationssystem artifacts expressed using UML.
on a class.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
Figure 2-13. Example operations on a class
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
The syntax elements are:
Extension Mechanisms

The Object Constraint Language (OCL)


visibility

Indicates the visibility of the operation. Use the following symbols: +, -, #, or ~ for
If you're new
public to UML,
,private a tutorial, with
,protected realistic
or package examples has
, respectively even
(see been included
"Visibility" to help
in Chapter 3). you
quickly familiarize yourself with the system.

name

Is a short phrase naming the operation. Operations are usually verb phrases
representing actions the classifier should perform on behalf of the caller. The UML
www.it-ebooks.info

specification recommends that the first letter of an operation be lowercase, with all of
the following words starting with a capital letter and running together. See Figure 2-13
for an example.
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
return-type ...............................................
Publisher:O'Reilly
Is the type
PubofDate:
information
June 2005 the operation will return, if any. If no information is returned
from the operation (called a subroutine in some development languages), the return
ISBN:0-596-00795-7
type should be void
Pages: 234 . If the operation does return a value (called a function in some
development languages), you should show the type of the returned value, such as
another classifier, a primitive type, or a collection. The UML specification states that the
return type
Table of Contents | Indexis optional. If it's left off, you can't assume anything about the return value
of the operation, or even if one exists.

System developers have used modeling languages for decades to specify, visualize,
properties
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
Specifies
language constraints
that applies to a and properties
multitude associated
of different with an
systems. operation.it These
Essentially, areyou
enables optional;
to if
you don't use properties you don't show the curly braces.
communicate solutions in a consistent, tool-supported language. See "Operation Constraints"
for more information.
Today, UML has become the standard method for modeling software systems, which means
Parameter syntax elements are:
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
direction
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read,
An optional partcreate,
of the and understand
syntax system
that indicates howartifacts expressed
a parameter using
is used by UML.
an operation.
Furthermore, it's been fully revised to cover version 2.0 of the language.
It is one of in,inout,out, or return.in states that the parameter is passed to the
operation by the caller. inout states that the parameter is passed by the caller and is
This comprehensive new edition
then possibly modified notoperation
by the only provides a quick-reference
and passed to all
back out. out UMLthat
states 2.0 the
diagram
types,parameter
it also explains keybyconcepts
isn't set in but
the caller a way that appeals
is modified by theto operation
readers already
and is familiar with
passed back
UML orout.object-oriented
return indicates programming concepts.
that the value set by the caller is passed back out as a return
value.
Topics include:

parameter_name
The role and value of UML in projects
Is a noun or noun phrase naming the parameter. Typically the parameter name starts
The object-oriented
with paradigm
a lowercase letter, andsubsequent
with any its relation words
to the starting
UML with a capital letter.
An integrated approach to UML diagrams
type
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and
Is Deployment
the type of theDiagrams
parameter. This is typically another class, interface, collection, or
primitive type.
Extension Mechanisms

The Object Constraint Language (OCL)


multiplicity

Specifies how many instances of the parameter's type are present. Can be absent
(meaning multiplicity of 1), a single integer, a list of integers separated by commas, or
If you're new to UML, a tutorial with realistic examples has even been included to help you
a range of values specified between square brackets separated by "..". An infinite upper
quickly familiarize yourself with the system.
bound can be represented as an *; if no lower bound specified, an * means zero or
more. See "Multiplicity."

default_value
www.it-ebooks.info

Specifies the default value of this parameter. The default value is optional. If it isn't
present, you don't show the equals sign. Note that UML doesn't specify if a parameter
with a default value may be left out when invoking an operation (e.g., C++'s default
parameterUML 2.0 in
value a Nutshell
implementation). The actual syntax for invoking an operation is
language-dependent.
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
properties Pub Date: June 2005
ISBN:0-596-00795-7
Specifies any
Pages: parameter-related
234 properties and is specified between curly braces. These
are typically defined within the context of a specific model, with a few exceptions:
ordered,readOnly, and unique. See "Multiplicity" and "Properties" for more information.
Properties
Table of Contents are optional for parameters; if they aren't used, don't show the curly braces.
| Index

SystemOperation
2.3.1. developers have used modeling languages for decades to specify, visualize,
Constraints
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
An operation may have several constraints associated with it that help define how the
communicate solutions in a consistent, tool-supported language.
operation interacts with the rest of the system. Together, constraints on an operation
establish a contract that an implementation of the operation must obey.
Today, UML has become the standard method for modeling software systems, which means
you're probably
Constraints on anconfronting this rich
operation follow theand expressive
usual language
constraint notationmore thanplaced
and are ever before.
either And
even though you may not write UML diagrams yourself, you'll still need to interpret
immediately after the operation signature or in a note attached with a dashed line. See
diagrams written
"Constraints" by others.
for more information.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
2.3.1.1. Preconditions
Furthermore, it's been fully revised to cover version 2.0 of the language.

Preconditions capturenew
This comprehensive what the state
edition not of theprovides
only system amust be before antooperation
quick-reference candiagram
all UML 2.0 be
invoked.
types, it also explains key concepts in a way that appeals to readers already familiar Instead,
Practically speaking, you really can't express the state of the entire system. with
preconditions typically express
UML or object-oriented the valid
programming values for parameters, the state of the class owning
concepts.
the operation, or a few key attributes of the system.
Topics include:
The specification explicitly states that the operation doesn't need to check the preconditions in
the body of the operation before executing; theoretically the operation will not even be
invoked if the
The role preconditions aren't
and value of UML in met. In practice, few languages offer such protection. If
projects
someone took the time to express them, it is usually in your best interest to verify the
The object-oriented
preconditions paradigm
are correct when and its relation
implementing to the UML
an operation.

An integrated
As a developer, approach offer
preconditions to UML diagrams
you one of the few chances to "cover your butt" and say
exactly how you expect things to be when your implementation is invoked; use them.
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
Figureand Deployment
2-14 Diagrams
shows several examples of preconditions.

Extension Mechanisms

The Object Constraint Language


Figure 2-14. (OCL)
Preconditions for operations

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

2.3.1.2. Postconditions
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
Postconditions capture guarantees about the state of the system after an operation has
...............................................
executed. Like preconditions,
Publisher:O'Reilly postconditions typically express the state of one or more key
attributes of thePub
system,
Date: Juneor some2005guarantee about the state of the class owning the
operation. ISBN:0-596-00795-7
Pages:234
Figure 2-15 shows example postconditions linked to an operation.

Table of Contents | Index

Figure 2-15. Postconditions for operations


System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
2.3.1.3. Body conditions
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
An operation may have a bodyCondition that constrains the return value. The bodyCondition
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
is separate from the postcondition because the bodyCondition may be replaced by methods of
types, it also explains key concepts in a way that appeals to readers already familiar with
subclasses of the owning class. (See "Generalization" for more information on subclasses.) For
UML or object-oriented programming concepts.
example, a class named Window may specify a body condition for a method named getSize( )
that requires the length and width of a window be nonzero. A subclass named SquareWindow
Topics include:
may provide its own body condition stating that the width must equal the height. The
bodyCondition is similar to the pre- and postconditions in that the constraint may be
expressed in natural
The role language
and value orin
of UML inprojects
OCL. See "Constraints" for more information. Figure 2-16
shows an example of a bodyCondition on an operation.
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams


Figure 2-16. Body conditions for operations
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

2.3.1.4. Query operations

An operation mayUMLbe 2.0declared


in a Nutshell as a query operation if the implementation of the operation
doesn't modify the owning class
ByDan Pilone,Neil Pitman
in any way. In practice, modelers often use the query
property to indicate a method that doesn't change any meaningful attribute of an object. For
...............................................
example, there Publisher:
may be internal
O'Reilly
cache attributes that are updated as a result of a query. The
important thing Pub
is that
Date: theJunestate
2005 of the system, from an external perspective, isn't changed by
the query method;
ISBN:0-596-00795-7 side effects to calling the method.
there can be no
Pages:234
You indicate a query method by placing the query constraint after the operation signature. For
example, an operation named getAge( ) that simply returns an integer without changing any
internal value| Index
Table of Contents of the owning class would be considered a query method. In C++, this typically
maps to a const method. Figure 2-17 shows several query methods on a class.

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makesFigure 2-17.
it possible for Example query
team members operations
to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
2.3.1.5. Exceptions
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or
While object-oriented
they're technically programming concepts.
not constraints, you may express exceptions thrown by an operation
using similar notation. Exceptions are typically other classes (often stereotyped with the
Topics include:
keyword «exception», though this is simply by convention) that are thrown by an operation in
the event of an error. You can list thrown exceptions in a note attached to an operation using
a dashed line. Figure 2-18 shows an example of an operation that throws several exceptions.
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

Figure 2-18.
An integrated A to
approach method that
UML diagrams throws several exceptions
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

2.3.2. Static Operations


Operations typically specify
UML 2.0 behavior for an instance of a class. However, UML allows for an
in a Nutshell
operation to specify behavior for the class itself . These operations are called static operations
ByDan Pilone,Neil Pitman
and are invoked...............................................
directly on the class, not on an instance. Static operations are frequently
used as utility operations that don't need to use the attributes of the owning class. UML
Publisher:O'Reilly
doesn't formallyPub
discuss
Date: theJunenotation
2005 of these operations, but it is typical to see them
represented with the0-596-00795-7
ISBN: same convention as static attributes. You indicate an operation is static
by underlining the operation
Pages: 234 signature. Figure 2-19 shows an example of a static operation.

Table of Contents | Index


Figure 2-19. A class with a static operation

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
2.4. Methods
...............................................
Publisher:O'Reilly
Amethod is an implementation of an operation. Each class typically provides an
Pub Date: June 2005
implementation ISBN: 0-596-00795-7
for its operations or inherits them from its superclass (see "Generalization").
If a class doesn't Pages: 234 an implementation for an operation, and one isn't provided by its
provide
superclass, the operation is considered abstract . See "Abstract Classes" for more information.
Because methods are implementations of operations, there is no notation for a method;
Table of Contents
simply show an | Index
operation on a class.

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
2.5. Abstract Classes
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Anabstract classISBN:
is typically a class that provides an operation signature, but no
0-596-00795-7
implementation;Pages:
however,
234 you can have an abstract class that has no operations at all. An
abstract class is useful for identifying common functionality across several types of objects.
For example, you can have an abstract class named Movable. A Movable object has a current
position and the
Table of Contents ability to move somewhere else using an operation named move( ). There
| Index

can be several specializations of this abstract classa Car, a Grasshopper, and a Person, each of
which provides a different implementation of move( ). Because the base class Movable doesn't
have
System an implementation
developers havefor used ), the languages
modeling
move( class is said todecades
for be abstract.
to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
You show a class
languages. is abstract
UML makes by writing
it possible its name
for team in italics.
members Show eachby
to collaborate abstract operation
providing in
a common
italics
languageas well.
that Figure
applies2-20
to a ismultitude
an example of the abstract
of different systems. class Movable. it enables you to
Essentially,
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting Figure 2-20.
this rich and Abstract
expressive class
language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

An abstract
Topics class can't be instantiated; it must be subclassed and then a subclass which does
include:
provide the operation implementation can be instantiated. See "Relationships" for more
information on subclasses.
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
2.6. Relationships
...............................................
Publisher:O'Reilly
Classes in isolation wouldJune
Pub Date: not 2005
provide much insight into how a system is designed. UML
provides severalISBN: ways0-596-00795-7
of representing relationships between classes. Each of UML relationship
Pages:234
represents a different type of connection between classes and has subtleties that aren't fully
captured in the UML specification. When modeling in the real world, be sure that your
intended viewers understand what you are conveying with your various relationships. We say
Table of
this Contents
both as a| Index
warning to the modeler and as a slight disclaimer that the following
explanations are our interpretation of the UML specification. For example, the debate over
when to use aggregation versus composition is ongoing. To help determine which relationship
isSystem developers have
most appropriate, useda modeling
we offer languages
short phrase for eachfor decades
type to specify,
that may visualize,
help make the distinction.
construct,
Again, and document
the important thingsystems. The Unified
is to be consistent Modeling
within your Language
model. (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
2.6.1. Dependency
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
The
evenweakest
thoughrelationship
you may notbetween classes
write UML is a dependency
diagrams relationship.
yourself, you'll still need Dependency
to interpret between
classes means that one class
diagrams written by others. uses, or has knowledge of, another class. It is typically a
transient relationship, meaning a dependent class briefly interacts with the target class but
typically
UML 2.0 doesn't retain from
in a Nutshell a relationship withyour
O'Reilly feels it forpain.
any real lengthcrafted
It's been of time.
for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Dependencies are typically read as "...uses a...". For example, if you have a class named
Furthermore, it's been fully revised to cover version 2.0 of the language.
Window that sends out a class named WindowClosingEvent when it is about to be closed, you
would say "Window uses a WindowClosingEvent."
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types,
You it also
show explains key
a dependency concepts
between in a way
classes that
using appealsline
a dashed to readers already
with an arrow familiarfrom
pointing withthe
UML or object-oriented programming concepts.
dependent class to the class that is used. Figure 2-21 shows a dependency between a class
namedWindow and a class named WindowClosingEvent.
Topics include:

The role and value of UML in projects


Figure 2-21. Window's dependency on WindowClosingEvent
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

You can likely assume from Figure 2-21 that Window doesn't retain a relationship with a
WindowClosingEvent
If you're new to UML,foraany real length
tutorial of time.
with realistic It simplyhas
examples uses them
even when
been needed
included to and
helpthen
you
forgets about them.
quickly familiarize yourself with the system.

2.6.2. Association
Associations are stronger than dependencies and typically indicate that one class retains a
www.it-ebooks.info

relationship to another class over an extended period of time. The lifelines of two objects
linked by associations are probably not tied together (meaning one can be destroyed without
necessarily destroying the other).
UML 2.0 in a Nutshell
Associations areBytypically
Dan Pilone,read as "...has a...". For example, if you have a class named Window
Neil Pitman
that has a reference to the current mouse cursor, you would say "Window has a Cursor". Note
...............................................
that there is a fine line between
Publisher: O'Reilly "...has a..." and "...owns a..." (see "Aggregation" later in this
section). In thisPub
case,Date: doesn't own the Cursor;Cursor is shared between all
June 2005
Window
applications in the
ISBN:system. However, Window has a reference to it so that the Window can hide
0-596-00795-7
Pages:etc.
it, change its shape, 234 You show an association using a solid line between the classes
participating in the relationship. Figure 2-22 shows an association between Window and Cursor.

Table of Contents | Index

Figure 2-22. Association showing Window "has a" Cursor


System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
2.6.2.1.
you whoNavigability
must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Associations have explicit notation to express navigability. If you can navigate from one class
to another,
This you shownew
comprehensive an arrow
edition in not
the only
direction of the
provides class you can navigate
a quick-reference to. 2.0
to all UML If you can
diagram
navigate
types, it in both
also directions,
explains it is common
key concepts practice
in a way that to not show
appeals any arrows
to readers at all,
already but aswith
familiar the
UML
UMLspecification points programming
or object-oriented out, if you suppress all arrows you can't distinguish nonnavigable
concepts.
associations from two-way associations. However, it is extremely rare to use a nonnavigable
association in the real world, so this is unlikely to be a problem.
Topics include:

You can explicitly forbid navigation from one class to another by placing a small X on the
The role
association lineand value
at the endofofUML
the in projects
class you can't navigate to. Figure 2-23 shows an association
between a class named Window and a class named Cursor. Because you can't navigate from an
Theofobject-oriented
instance paradigm
Cursor to an instance and its, relation
of Window to theshow
we explicitly UMLthe navigability arrow and an X
where appropriate.
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Figure 2-23. Association between Window and Cursor showing you
can't navigate from Cursor to Window
Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

2.6.2.2. Naming an association

UML 2.0 in a Nutshell


Associations may be adorned with several symbols to add information to your model. The
ByDan Pilone,Neil Pitman
simplest is a solid arrowhead showing the direction in which the viewer should read the
association. It is...............................................
common to include a short phrase along with the arrowhead to provide some
Publisher:O'Reilly
context for the association. The phrase used with the association doesn't typically generate
Pub Date: June 2005
into any form of code representation; it is purely for modeling purposes. Figure 2-24 shows
ISBN:0-596-00795-7
the solid arrowhead on the Window to Cursor association.
Pages:234

Table of Contents | Index


Figure 2-24. Shows how to read the association between Window
and Cursor
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 Multiplicity


2.6.2.3. in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Because associations typically represent lasting relationships, they are often used to indicate
attributes of a class. As mentioned in the "Attributes by Relationship" section, you can
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
express how many instances of a particular class are involved in a relationship. If you don't
types, it also explains key concepts in a way that appeals to readers already familiar with
specify a value, a multiplicity of 1 is assumed. To show a different value, simply place the
UML or object-oriented programming concepts.
multiplicity specification near the owned class. See "Attribute Multiplicity" for the allowable
multiplicity types. Note that when you use multiplicity with an association, you don't use
Topics include:
square brackets around the values. Figure 2-25 shows an association with explicit multiplicity.

The role and value of UML in projects

Figure
The 2-25. A simple
object-oriented association
paradigm showing
and its relation four Buttons in a Window
to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

The properties
If you're related
new to UML, to multiplicity
a tutorial with may be applied
realistic to associations
examples has even beenas included
well. Seeto
"Properties"
help you
for the names
quickly and definitions
familiarize of allowed
yourself with properties.
the system.

2.6.3. Aggregation
www.it-ebooks.info

Aggregation is a stronger version of association. Unlike association, aggregation typically


implies ownership and may imply a relationship between lifelines. Aggregations are usually
read as "...owns a...". For example, if you had a classed named Window that stored its position
UML 2.0 inclass,
and size in a Rectangle a Nutshell
you would say the "Window owns a Rectangle." The rectangle
may be shared with
ByDanother classes,
Pilone,Neil Pitmanbut the Window has an intimate relationship with the
Rectangle. This ...............................................
is subtly different from a basic association; it has a stronger connotation.
However, it's not the strongest
Publisher: O'Reilly relationship you can have between classes. If the relationship
Pub part
is more of a whole Date:(class
June 2005A "...is part of..." class B), you should look at composition .
ISBN:0-596-00795-7
Pages:234 with a diamond shape next to the owning class and a solid line
You show an aggregation
pointing to the owned class. Figure 2-26 shows an example aggregation between a class
namedWindow and a class named Rectangle.
Table of Contents | Index

System developersFigure
have used2-26. Window
modeling "owns
languages a" Rectangle
for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you
As who
with must
the read, create,
association and understand
relationship, system
you can show artifacts expressed
navigability using UML.
and multiplicity on an
Furthermore, it's been fully revised to cover version
aggregation line. See "Association" for examples. 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
2.6.4. Composition
UML or object-oriented programming concepts.

Composition represents a very strong relationship between classes, to the point of


Topics include:
containment. Composition is used to capture a whole-part relationship. The "part" piece of the
relationship can be involved in only one composition relationship at any given time. The
The
lifetime of role and value
instances of UML
involved in projects relationships is almost always linked; if the
in composition
larger, owning instance is destroyed, it almost always destroys the part piece. UML does allow
The
the part toobject-oriented paradigm
be associated with and its
a different relation
owner to the
before UML
destruction, thus preserving its
existence, but this is typically an exception rather than the rule.
An integrated approach to UML diagrams
A composition relationship is usually read as "...is part of...", which means you need to read
Class and Object,
the composition from theUse
partCase, Sequence,
to the Collaboration,
whole. For Statechart,
example, if you say thatActivity,
a window Component,
in your
system and
mustDeployment Diagrams
have a titlebar, you can represent this with a class named Titlebar that "...is
part of..." a class named Window.
Extension Mechanisms
You show a composition relationship using a filled diamond next to the owning class and a
The Object Constraint Language (OCL)
solid line pointing to the owned class. Figure 2-27 shows an example composition relationship
between a class named Window and a class named Titlebar.

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
Figure 2-27. Titlebar "is a part of" Window
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
As with the association relationship, you can show navigability and multiplicity on a
composition line. See "Association" for examples.
Table of Contents | Index

2.6.5. Generalization
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
Ageneralization relationship conveys that the target of the relationship is a general, or less
language that applies to a multitude of different systems. Essentially, it enables you to
specific, version of the source class or interface. Generalization relationships are often used to
communicate solutions in a consistent, tool-supported language.
pull out commonality between difference classifiers. For example, if you had a class named
Cat and a class named Dog, you can create a generalization of both of those classes called
Today, UML has become the standard method for modeling software systems, which means
Animal. A full discussion of how and when to use generalization (especially versus interface
you're probably confronting this rich and expressive language more than ever before. And
realization) is the subject for an object-oriented analysis and design book and isn't covered
even though you may not write UML diagrams yourself, you'll still need to interpret
here.
diagrams written by others.
Generalizations are usually read as "...is a...", starting from the more specific class and
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
reading toward the general class. Going back to the Cat and Dog example, you would say "a
you who must read, create, and understand system artifacts expressed using UML.
Cat...is a...Animal" (grammar aside).
Furthermore, it's been fully revised to cover version 2.0 of the language.
You show a generalization relationship with a solid line with a closed arrow, pointing from the
This comprehensive
specific new edition
class to the general class.not only2-28
Figure provides
showsa quick-reference to all
an example of the CatUML 2.0 diagram
to Animal
types, it also
relationship. explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:
Figure 2-28. Cat specializes the Animal base class
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
Unlike associations, generalization relationships are typically not named and don't have any
quickly familiarize yourself with the system.
kind of multiplicity. UML allows for multiple inheritance, meaning a class can have more than
one generalization with each representing an aspect of the decedent class. However, some
modern languages (e.g., Java and C#) don't support multiple inheritance; interfaces and
interface realization are used instead.
www.it-ebooks.info

2.6.6. Association Classes


UML 2.0 in a Nutshell
Often the relationship between two elements isn't a simple structural connection. For
ByDan Pilone,Neil Pitman
example, a football player may be associated with a league by virtue of being on a team. If
...............................................
the association between two elements is complex, you can represent the connection using an
Publisher:O'Reilly
association classPub
. An association class is an association that has a name and attributes, like a
Date: June 2005
normal class. You show an association class like a regular class with a dashed line connecting
ISBN:0-596-00795-7
it to the association it
Pages:234 represents. Figure 2-29 shows a football player's relationships to a
league.

Table of Contents | Index

Figure 2-29. Example association class


System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive
When translated into newcode,edition not onlywith
relationships provides a quick-reference
association classes oftentoresult
all UML 2.0 diagram
in three classes:
one for each end of the association and one for the association class itself. There may with
types, it also explains key concepts in a way that appeals to readers already familiar or may
UML
not beora object-oriented programming
direct link between concepts.
the association ends; the implementation may require you to
traverse through the association class to get to the opposite end of the link. In other words,
Topics include: may not have a direct reference to FootballLeague but may have a reference
FootballPlayer
toFootballTeam instead. FootballTeam would then have a reference to FootballLeague. How
the relationships are constructed is a matter of implementation choices; however, the
The role and value of UML in projects
fundamental concept of an association class is unchanged.
The object-oriented paradigm and its relation to the UML

2.6.7.AnAssociation
integrated approach to UML diagrams
Qualifiers
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
Relationships between elements
and Deployment Diagramsare often keyed, or indexed, by some other value. For
example, a bank patron may be identified by her account number, or a tax payer by his Social
Security number.Mechanisms
Extension UML provides association qualifiers to capture such information. A qualifier
is typically an attribute of the target element, though this isn't required. You show a qualifier
by placing a smallConstraint
The Object rectangle Language
between the association and the source element. Draw the name
(OCL)
of the qualifier (usually the name of an attribute) in the rectangle. Figure 2-30 shows the
relationship between the IRS and a taxpayer qualified by the taxpayer's Social Security
number.
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

Figure 2-30. An association qualifier


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
Notice that and
construct, the multiplicity between The
document systems. the Unified
association qualifier
Modeling and TaxPayer
Language (UML) isis one
1. Obviously
of those the
IRS is associated
languages. with more
UML makes than one
it possible forTaxPayer , but by to
team members using qualifiers,
collaborate by you indicate
providing that a
a common
socialSecurityNumber uniquely identifies a single TaxPayer within the IRS .
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
2.7. Interfaces
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Aninterface is a ISBN:
classifier that has declarations of properties and methods but no
0-596-00795-7
implementations. You234
Pages: can use interfaces to group common elements between classifiers and
provide a contract a classifier that provides an implementation of an interface must obey. For
example, you can create an interface named Sortable that has one operation named
. Any class that realizes the Sortable interface must provide an
Table of Contents | Index
comesBefore(...)
implementation of comesBefore(...).

Some
Systemmodern languages,
developers such modeling
have used as C++, don't support
languages forthe concept
decades to of interfaces;
specify, UML
visualize,
interfaces are typically represented as pure abstract classes. Other languages,
construct, and document systems. The Unified Modeling Language (UML) is one of those such as Java,
do support interfaces
languages. UML makes butit don't allow
possible forthem
teamtomembers
have properties. The moral
to collaborate is that you
by providing should be
a common
aware of how
language thatyour model
applies to aismultitude
going to be implemented
of different whenEssentially,
systems. modeling your system.
it enables you to
communicate solutions in a consistent, tool-supported language.
There are two representations for an interface; which one you should use depends on what
you're
Today,trying to show.
UML has becomeThethefirst representation
standard method isfor
the standard
modeling UML classifier
software systems, notation
which with
meansthe
stereotype «interface»
you're probably .Figurethis
confronting 2-31 shows
rich the Sortable
and expressive interface.
language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

Figure
UML 2.0 in a Nutshell from 2-31.
O'Reilly feelsThe
your Sortable interface
pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects


The second representation of an interface is the ball-and-socket notation. This representation
showsThe
lessobject-oriented paradigm
detail for the interface and
but its relation
is more to thefor
convenient UMLshowing relationships to classes.
The interface is simply shown as a ball with the name of the interface written below it. Classes
An integrated
dependent approach
on this interface toshown
are UML diagrams
attached to a socket matching the interface. Figure 2-
32 shows the Sortable interface using the ball-and-socket notation.
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms
Figure 2-32. Examples of providing and requiring interfaces
The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

Because an interface specifies the contract only for a set of features, you can't instantiate an
interface directly. Instead, a class is said to realize an interface if it provides an
implementation
System developersfor the operations
have and properties.
used modeling languagesYoufor show realization
decades using
to specify, a dashed line
visualize,
starting at the
construct, andrealizing
document classifier
systems.and leading
The to Modeling
Unified the interface, with a(UML)
Language closedis arrowhead
one of thoseat the
end. ClassesUML
languages. thatmakes
are dependent
it possibleonfor
theteam
interface are shown
members using a dashed
to collaborate line with
by providing an open
a common
arrow (dependency).
language that appliesFigure 2-33 shows
to a multitude a class that
of different realizes
systems. the Sortable
Essentially, interface
it enables youand
to a
class that is dependent
communicate solutions on
in ait.consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
Figure 2-33.
even though Person
you may realizes
not write the Sortable
UML diagrams interface
yourself, you'll and
still need Alphabetizer
to interpret
diagrams written by others. depends on it
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

Providing
The an implementation
Object of an operation
Constraint Language (OCL) is straightforward. You must provide an
implementation on a realizing classifier with the same signature as the operation on the
interface. Typically there are semantic constraints associated with an operation that must be
honored by any implementation. Realizing a property is more subtle. A property on an
If you're states
interface new tothat
UML, a tutorial
any with
class that realistic
realizes theexamples
interfacehas even
must been
store theincluded to helpby
data specified you
the
quickly familiarize yourself with the system.
propertyin some way . A property on an interface doesn't necessarily mean there will be an
associated property on a realizing classifier. However, the classifier must be able to store the
data represented by the property and provide a means to manipulate it.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
2.8. Templates
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Just as interfaces allow
ISBN: you to provide specifications for objects your class will interact with,
0-596-00795-7
UML allows you Pages:
to provide
234 abstractions for the type of class your class may interact with. For
example, you can write a List class that can hold any type of object (in C++ this would
probably be a void*, in Java and C# it would probably be an Object). However, while you
wanted your List
Table of Contents | Indexclass to be able to support any type of object, you want all of the objects in

a given list to be of the same type. UML allows you to create and specify these kinds of
abstractions using templates .
System developers have used modeling languages for decades to specify, visualize,
You can indicate
construct, that a class
and document is a templated
systems. (also
The Unified called parameterized
Modeling Language (UML) ) class by drawing
is one of those a
dashed
languages.rectangle in the upper-right
UML makes corner
it possible for teamofmembers
the class.toFor each element
collaborate you would
by providing like to
a common
template,
language you thatneed
appliesto specify a nameof
to a multitude todifferent
act as a systems.
placeholder for the actual
Essentially, type. you
it enables Writeto the
placeholder
communicate name in the in
solutions rectangle. Figure
a consistent, 2-34 shows an
tool-supported example of a List class that can
language.
support any type.
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others. Figure 2-34. A templated List class

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects


This example uses ElementType as the name of the templated type for
clarity. In practice,
The object-oriented paradigmthis
andis its
often abbreviated
relation to just T.
to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
You canandhave multiple templated
Deployment Diagrams types within a single class; just separate the type names
with a comma (,). If you need to restrict the types the user may substitute, show that with a
colon (Extension
:) followed by the type name. Figure 2-35 shows a more complicated version of the
Mechanisms
List class that requires a Sorter along with the type of object to store in the list.
The Object Constraint Language (OCL)

Figure 2-35. A templated class with type restrictions


If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
Specifying restrictions on a type that may be used is functionally similar to specifying an
interface for a templated member, except that the user may be able to further restrict an
instance of your
Table of Contents class by specifying a subclass of your type.
| Index

When a user creates an instance of a List, she needs to specify the actual type to use in
place of ElementType
System . Thisused
developers have is called binding
modeling a type tofor
languages a template.
decades toYou show visualize,
specify, binding with the
keyword , followed by a type specification using the following syntax:
construct, and document systems. The Unified Modeling Language (UML) is one of those
«bind»
languages. UML makes it possible for team members to collaborate by providing a common
<language that applies
TemplatedType to a multitude
-> RealType > of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're
You canprobably confronting
use the binding thiswhenever
syntax rich and expressive
you refer tolanguage moreclass
a templated thantoever before.
indicate youAnd
want
even though you may not write UML diagrams yourself, you'll still need to interpret
to use a bound version of that class. This is called explicit binding . For example, Figure 2-36
diagrams
shows written of
a subclass byList
others.
called EmployeeList that binds the ElementType of List to a class
namedEmployee.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Figure 2-36. Explicit template binding
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)


Thebind keyword also indicates what types should be used with an instance of a template.
This is called implicit binding and is shown in Figure 2-37.

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
Figure 2-37. Implicit template binding
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
2.9. Variations on Class Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Because class diagrams model structures well, they can be used to capture well-defined,
ISBN:0-596-00795-7
hierarchical information.
Pages:234Class diagrams have been used to capture XML and database
schemas with some degree of success. In the interest of full disclosure, people who deal with
XML and database schemas extensively have reservations about using class diagrams to
capture the information,
Table of Contents | Index specifically because class diagrams are so generic. Each domain has
its own notation that may be better suited to capturing complex relationships or domain-
specific information. However, UML has the benefit of being a common language that is
understood by thosehave
System developers outside the
used XML andlanguages
modeling database for
domains.
decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language
2.9.1. XML that Schemas
applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
The structural design of an XML document can be captured in an XML schema. XML schemas
you're probably confronting this rich and expressive language more than ever before. And
are to XML documents as classes are to objects; XML documents are instances of a schema.
even though you may not write UML diagrams yourself, you'll still need to interpret
Therefore, it's not a giant leap to realize that class diagrams can be used to model XML
diagrams written by others.
schemas. XML schemas are described using the XML Structure Definition Language (XSDL).
XSDL is a text language (as opposed to the graphical nature of UML) and can be verbose;
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
mapping XSDL to UML can make it much easier to digest a schema document.
you who must read, create, and understand system artifacts expressed using UML.
Furthermore,
The fundamentalit'selements
been fullyofrevised to cover
XSDL are version 2.0
XML elements, of the
which language.
are connected in sequences,
choices, and complex structures. Each element may have extra information attached to it
This comprehensive
using new edition
(conveniently enough) not only
attributes. providestypically
Modelers a quick-reference to allelements
represent XML UML 2.0 as
diagram
classes
types, it also explains key concepts in a way that appeals to readers already familiar
and XSDL attributes as UML attributes. Each element is linked to the next using composition with
UML or Multiplicity
arrows. object-oriented programming
specifications on theconcepts.
relationships show how many times one element
appears within another. Example 2-1 is a sample XML document that describes a piece of
Topics include:
equipment.

The role and value of UML in projects


Example 2-1. A sample XML document
The object-oriented paradigm and its relation to the UML

<?xml Anversion="1.0" encoding="UTF-8"?>


integrated approach to UML diagrams
<equipmentlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
xsi:noNamespaceSchemaLocation="equipment.xsd">
and Deployment
<equipment Diagrams
equipmentid="H-1">
<shortname>
Extension Mechanisms lang="en">Hammer</langstring>
<langstring
</shortname>
The<technicalcontact>
Object Constraint Language (OCL)
<contact>
<name>Ron</name>
<telephone>555-1212</telephone>
If you're new to UML, a tutorial with realistic examples has even been included to help you
</contact>
quickly familiarize yourself with the system.
</technicalcontact>
<trainingcontact>
<contact>
<name>Joe</name>
<email>joe@home.com</email>
</contact>
www.it-ebooks.info

</trainingcontact>
</equipment>
</equipmentlist>
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Example 2-2 is the XSDLO'Reilly
Publisher: that describes the XML document.
Pub Date: June 2005
ISBN:0-596-00795-7
Example 2-2. XML
Pages: 234 schema describing Example 2-1

<?xml version="1.0"
Table of Contents | Index encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
System developers have used modeling languages for decades to specify, visualize,
<!-- ~Class:
construct, contact
and document ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
systems. The Unified Modeling Language (UML) --> is one of those
<xs:element
languages. name="contact"
UML makes type="contact"/>
it possible for team members to collaborate by providing a common
<xs:complexType
language that applies name="contact">
to a multitude of different systems. Essentially, it enables you to
<xs:sequence>
communicate solutions in a consistent, tool-supported language.
<xs:element name="name" type="xs:string"/>
<xs:choice>
Today, UML has become the standard method for modeling software systems, which means
<xs:element
you're probably confrontingname="telephone" type="xs:string"/>
this rich and expressive language more than ever before. And
even though <xs:element
you may notname="email" type="xs:string"/>
write UML diagrams yourself, you'll still need to interpret
diagrams</xs:choice>
written by others.
</xs:sequence>
UML</xs:complexType>
2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
<!-- ~Class:
Furthermore, equipment
it's been ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fully revised -->
to cover version 2.0 of the language.
<xs:element name="equipment" type="equipment"/>
<xs:complexType
This comprehensive new name="equipment">
edition not only provides a quick-reference to all UML 2.0 diagram
<xs:sequence>
types, it also explains key concepts in a way that appeals to readers already familiar with
<xs:element programming
UML or object-oriented ref="shortname"/>
concepts.
<xs:element name="technicalcontact" type="technicalcontact"/>
<xs:element name="trainingcontact" type="trainingcontact"/>
Topics include:
</xs:sequence>
<xs:attribute name="equipmentid" type="xs:string" use="required"/>
The role and value of UML in projects
</xs:complexType>

The~Class:
<!-- object-oriented paradigm ~~~~~~~~~~~~~~~~~~~~~~~~~~~
equipmentlist and its relation to the UML -->
<xs:element name="equipmentlist" type="equipmentlist"/>
An integrated approach
<xs:complexType to UML diagrams
name="equipmentlist">
<xs:sequence>
Class<xs:element
and Object, Use Case, Sequence,minOccurs="1"
ref="equipment" Collaboration, Statechart, Activity, Component,
maxOccurs="unbounded"/>
and Deployment Diagrams
</xs:sequence>
</xs:complexType>
Extension Mechanisms
<!--
The~Class: <<XSDtopLevelAttribute>>
Object Constraint Language (OCL) lang~~~~~~~~~~~~ -->
<xs:attribute name="lang" type="xs:language"/>

<!-- ~Class: langstring ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->


<xs:element
If you're name="langstring"
new to UML, type="langstring"/>
a tutorial with realistic examples has even been included to help you
<xs:complexType
quickly name="langstring">
familiarize yourself with the system.
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="lang" use="required">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
www.it-ebooks.info

<xs:enumeration value="en"/>
<xs:enumeration value="fr"/>
</xs:restriction>
UML 2.0 in a Nutshell
</xs:simpleType>
ByDan Pilone,Neil Pitman
</xs:attribute>
</xs:extension>
...............................................
Publisher:O'Reilly
</xs:simpleContent>
Pub Date: June 2005
</xs:complexType>
ISBN:0-596-00795-7
<!-- ~Class: Pages: 234
shortname ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<xs:element name="shortname" type="shortname"/>
<xs:complexType name="shortname">
Table of Contents | Index
<xs:sequence>
<xs:element ref="langstring" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
System developers have used modeling languages for decades to specify, visualize,
</xs:complexType>
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages.
<!-- ~Class: UML makes it possible for team
technicalcontact members to collaborate by
~~~~~~~~~~~~~~~~~~~~~~~~ -->providing a common
language that applies
<xs:element to a multitude of different
name="technicalcontact" systems. Essentially, it enables you to
type="technicalcontact"/>
communicate
<xs:complexType solutionsname="technicalcontact">
in a consistent, tool-supported language.
<xs:sequence>
Today, UML has become ref="contact"
<xs:element the standard method for modeling
minOccurs="1" software systems, which means
maxOccurs="unbounded"/>
you're </xs:sequence>
probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
</xs:complexType>
diagrams written by others.
<!-- ~Class: trainingcontact ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
UML 2.0 in a Nutshell
<xs:element from O'Reilly feels yourtype="trainingcontact"/>
name="trainingcontact" pain. It's been crafted for professionals like
you<xs:complexType
who must read, create, and understand system artifacts expressed using UML.
name="trainingcontact">
Furthermore, it's been fully revised to cover version 2.0 of the language.
<xs:sequence>
<xs:element ref="contact" minOccurs="1" maxOccurs="unbounded"/>
This comprehensive
</xs:sequence> new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
</xs:complexType>
UML or object-oriented programming concepts.
</xs:schema>

Topics include:

Figure 2-38 is a UML representation of the schema. Elements are represented as classes, with
The role and
one exception: the value of definition
contact UML in projects
includes a choice option. Figure 2-38 represents this
using another class stereotyped as XSDchoice, and the options are represented as attributes
of the The object-oriented paradigm and its relation to the UML
class.

An integrated
So, while approach
UML simplifies to UML
a schema by diagrams
representing the information graphically, details such as
sequencing and type information can be lost without using a UML extension mechanism such
Class and
as constraints orObject, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
stereotypes.
and Deployment Diagrams

Extension Mechanisms
2.9.2. Database Schemas
The Object Constraint Language (OCL)

By mapping database tables to classes and table rows to attributes, you can capture a
database schema fairly well using UML. Additional information such as primary keys, foreign
If you're
keys, and new to UML,can
constraints a tutorial with realistic
be captured using UMLexamples has even
constraints been included
or stereotypes. Youtocan
help you
show
quickly familiarize yourself with the system.
relationships between tables using associations between classes (usually composition
relationships, but that is just by convention). Figure 2-39 shows a sample database schema
represented using a UML class diagram.

As with XML schemas, few professional database administrators model databases using class
diagrams. UML class diagrams are useful for conveying schema information in a common
www.it-ebooks.info

language, but they lack the expressive (and custom) capabilities of the more standard
database notation, Entity Relation Diagrams (ERDs).

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Figure ...............................................
2-38. A class diagram representation of Example 2-2
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Figure
Topics 2-39.
include: An example database schema using a class diagram

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Chapter 3. Package Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Packages provide a way to group related UML elements and scope their names. For example,
ISBN:0-596-00795-7
you can put all elements
Pages:234 having to do with 3D rendering into a package named 3DGraphics.
Package diagrams provide a great way to visualize dependencies between parts of your
system and are often used to look for problems or determine compilation order.
Table of Contents | Index
Nearly all UML elements can be grouped into packages, including packages themselves. Each
package has a name that scopes each element in the package. For example, if you had a class
namedTimer in a package named Utilities, the fully qualified name for the class is
System developers have used modeling languages for decades to specify, visualize,
Utilities::Timer. Elements in the same package can refer to each other without qualifying
construct, and document systems. The Unified Modeling Language (UML) is one of those
their names.
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
3.1. Representation
...............................................
Publisher:O'Reilly
Pub Date: June 2005
You show a package using a rectangle with a tab attached to the top left. Figure 3-1 shows
ISBN:0-596-00795-7
theUtilities package.
Pages:234

Table of Contents | Index

Figure 3-1. A simple package


System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
You can show the elements contained within a package in two different ways. First, you can
UML 2.0
show the in a Nutshell
elements from O'Reilly
contained within feels your pain.
the package by It's beenthem
drawing crafted for professionals
inside like
the large rectangle.
Ifyou
youwho
usemust read, create, and
this representation, understand
write the namesystem artifacts expressed
of the package in the tab. using
FigureUML.
3-2 shows the
Furthermore,
contents of theit's been fully
Utilities revisedinside
package to cover version
of the 2.0 of
package. Tothe language.
refer to the Timer class from
outside of the Utilities package, you say Utilities::Timer.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Figure 3-2. Several classes contained inside the Utilities package
Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

The second representation uses a solid line pointing from the package to each contained
element.
If you're You
newplace a circle
to UML, with awith
a tutorial plusrealistic
sign in examples
it at the end
hasnearest the included
even been package to
to help
indicate
you
containment. If youyourself
quickly familiarize use thiswith
representation,
the system.you should show the name of the package in the
large rectangle rather than in the tab. This notation allows you to show more detail of the
packaged elements. Figure 3-3 shows the same Utilities package but with the classes
broken out.
www.it-ebooks.info

Figure 3-3. Elements owned by a package, shown outside of the


package
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language
You that applies
don't need to showtoalla the
multitude of different
elements containedsystems.
within aEssentially,
package; if itnoenables youare
elements to
communicate solutions in a consistent, tool-supported language.
shown, no assumptions can be made about what the package contains.
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
3.2. Visibility
...............................................
Publisher:O'Reilly
Pub Date: June 2005
A package may ISBN:
specify visibility information for owned and imported elements, however
0-596-00795-7
elements may have
Pages:only
234 one of two levels of visibility: public or private. Public visibility means
the element may be used outside the package (scoped by the package name). Private
visibility means the element may be used only by other elements of the same package.
Private visibility
Table of Contents is useful for marking utility classes that help implement a subsystem or
| Index

component you don't want to expose to the rest of the system.

You showdevelopers
System public visibility
have by placing
used a plus
modeling sign before
languages for the element
decades name. You
to specify, show private
visualize,
visibility using a minus sign. Figure 3-4 shows the Utility package with
construct, and document systems. The Unified Modeling Language (UML) is one some private helper
of those
classes.
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Figure
Today, UML3-4. The Utilities
has become package
the standard method with public
for modeling and private
software members
systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
3.3. Importing and Accessing Packages
...............................................
Publisher:O'Reilly
Pub Date: June 2005
When accessingISBN:
elements in one package from a different package, you must qualify the
0-596-00795-7
name of the element you are accessing. For example, if Car is a class in the transportation
Pages:234
package and you are trying to access it from a package named RoutePlanning, you need to
qualifyCar as transportation::Car.
Table of Contents | Index
To simplify accessing elements in a different package, UML allows a package to import
another package. Elements of the imported package are available without qualification in the
importing package. So,
System developers if the
have usedRoutePlanning package
modeling languages forimported
decadesthe
to specify, visualize,package,
transportation
you can refer to Car without any qualifications from within the RoutePlanning
construct, and document systems. The Unified Modeling Language (UML) is one package.
of those
languages. UML makes it possible for team members to collaborate by providing a common
To show a that
language package import,
applies you draw a
to a multitude ofdashed
different line with anEssentially,
systems. open arrowitfrom the importing
enables you to
package to the imported package. Label this line with
communicate solutions in a consistent, tool-supported language.the «import» keyword. Figure 3-5 shows
theRoutePlanning package importing the transportation package.
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
Figurewritten
diagrams 3-5. byRoutePlanning
others. importing the Transportation package

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

By default, imported elements are given public visibility in the importing package. UML allows
you toThe role that
specify and value of UML
imported in projects
elements should be given private visibility, meaning they can't be
used by anyone outside the importing package (including any packages that may import that
The object-oriented
package). paradigmelements
To specify that imported and its relation
should to the private
have UML visibility, you use the
«access» keyword rather than the «import» keyword. Figure 3-6 shows the RoutePlanning
An importing
package integratedthe
approach to UML diagrams
TRansportation package and accessing the Algorithms package. If a
package imports the RoutePlanning package, both packages can use public elements from
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
TRansportation, but they can't use anything in Algorithms.
and Deployment Diagrams

Extension Mechanisms

Figure
The 3-6.
ObjectRoutePlanning importing
Constraint Language (OCL) the Transportation package but
accessing only the Algorithms package

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

What package import and access actually mean in implementation can vary dramatically
depending on your target
System developers language.
have used For example,
modeling languagesC# forand Java have
decades an explicit
to specify, concept of
visualize,
packages
construct, and document systems. The Unified Modeling Language (UML) is onethe
and importing elements from packages. Java developers often import of those
java.util
package intoUML
languages. theirmakes
program so theyfor
it possible canteam
reference
membersthe Java Vector class
to collaborate without qualifying
by providing a common it.
However,
language C++ has a somewhat
that applies subtler
to a multitude of concept
differentofsystems.
packages, called namespaces.
Essentially, Howto
it enables you
packages map solutions
communicate to an implementation language
in a consistent, is often up
tool-supported to the implementer.
language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
3.4. Merging Packages
...............................................
Publisher:O'Reilly
Pub Date: June 2005
UML supports a ISBN:
somewhat complex concept of merging packages. Merging packages differs
0-596-00795-7
from importing Pages:
packages
234 in that merge, by definition, creates relationships between classes of
the same name. The motivation behind package merging comes directly from the evolution of
UML from 1.x to 2.0. UML 2.0 defines the base concept of elements and allows specific
diagram types
Table of Contents to extend a base concept without needing to provide a new name for it. For
| Index

example, UML extends several core Behavioral State Machine concepts into Protocol State
Machine concepts while retaining their original name.
System developers have used modeling languages for decades to specify, visualize,
When a package
construct, merges another
and document systems. package, any class
The Unified of the
Modeling same type
Language andisname
(UML) one of those
automatically
languages. UML extends
makes (or
it has a generalization
possible relationship
for team members to) the original
to collaborate class. For
by providing example,
a common
UML can define
language the concept
that applies of the include
to a multitude relationship
of different at aEssentially,
systems. generic level and thenyou
it enables specialize
to it
for use cases inclusion
communicate solutionsand
in aretain the name
consistent, include. This
tool-supported type of extension has simplified the
language.
internals of the UML model but rarely makes an appearance in real-world development.
Today, UML has become the standard method for modeling software systems, which means
You show
you're package
probably merging using
confronting a dashed
this rich line with an
and expressive open arrow
language morefromthantheevermerging
before.package
And
to the though
even mergedyou package. Label
may not this
write linediagrams
UML with the yourself,
keyword you'll
«merge» .Figure
still need 3-7 shows an
to interpret
example
diagramsofwritten
merging bytwo packages.
others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Figure 3-7.
Furthermore, ProtocolStateMachines
it's been fully revised to cover versionmerging the elements from
2.0 of the language.
BehavioralStateMachines so it can add to the contained classes
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams


The rules for package merge are:
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment
Private members ofDiagrams
a package aren't merged with anything.
Extension
Classes Mechanisms
in the package performing the merge that have the same name and type as
classes in the merged package(s) get a generalization relationship to the merged
The Object Constraint Language (OCL)
class(es). Note that this can result in multiple inheritance, but UML allows this.

You can still reference any of the original classes by explicitly scoping the class using the
original package name.
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
Classes that exist only in the merged package or the merging package remain
unchanged and are added to the merging package.

Subpackages within the merged package are added to the merging package if they don't
already exist.
www.it-ebooks.info

If a subpackage with the same name already exists in the merging package, another
merge is started between the two subpackages.

UMLimports
Any package 2.0 in a Nutshell
from the merged package become package imports from the
merging package.
ByDan Pilone, Elements
Neil Pitman that are imported aren't merged (i.e., aren't given
generalization relationships). If an imported element conflicts with an element in the
...............................................
merging package,
Publisher:the merging package's element takes precedence and the imported
O'Reilly
element must be explicitly
Pub Date: June 2005 qualified.
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
3.5. Variations on Package Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
This section presents two applications of class package diagrams and one application of use
ISBN:0-596-00795-7
case packages. Pages:
Although
234 layering and simplification always motivate packaging, the term
"simplification" means different things to different people. Simplification can mean:

Table of Contents | Index


Easier to build and test

Better tracking and project transparency


System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
Working at a stable overview without the noise of low-level churn
languages. UML makes it possible for team members to collaborate by providing a common
language that applies
Less conflict to a distributed
between multitude ofteams
different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Easy refactoring and extension
Today, UML has become the standard method for modeling software systems, which means
you're probably
Simplification confronting
likely means morethis apparent
rich and expressive
complexitylanguage more than ever
to some constituency. before.
Unless And
your
even though
packaging you may
balances notdiverse
these write UML diagrams
needs, you areyourself,
likely toyou'll stillcomplaints
receive need to interpret
of unnecessary
diagrams written
complexity, by others.
no matter how noble your motives are.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
3.5.1. Structuring a Project with Package Diagrams
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
Class
types,packages organize
it also explains a logical
key system
concepts during
in a way construction.
that They provide
appeals to readers alreadythe terms with
familiar for
management and external
UML or object-oriented stakeholders,
programming as well as structure to contain all classes and code to
concepts.
be built. Class package diagrams are the UML equivalent of block diagrams.
Topics include:
Different parties think of a project according to their different needs. Programmers think in
terms of language and tactical design. Architects think in terms of dependencies, risk,
technology, building,
The role testing,
and value andinOO
of UML principles. Project managers think in terms of risk,
projects
tracking, resources, need, ownership, required skills, and delivery. Although all issues are
important, and good packaging
The object-oriented recognizes
paradigm and itsits responsibility
relation to all needs, architects tend to
to the UML
identify top-level packaging with an eye on the control functions of project management. For
An integrated
example, approachmight
a project manager to UML diagrams
draw a package diagram for a web application such as that
shown in Figure 3-8.
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension
Figure Mechanisms
3-8. Top-level packages defining a web application
The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
The diagram
diagrams in Figure
written 3-8 carries very little meaning by itself. It must be accompanied by an
by others.
auxiliary, textual document that describes the basis for the packaging. Such a document
might,
UML 2.0forinexample,
a Nutshellcontain a list as feels
from O'Reilly follows:
your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
web
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types,Requires
it also explains key concepts
special skills: in a way
HTML, CSS, and that appeals
Struts, to readerstechnology;
a presentation already familiar
mostwith
UML or object-oriented programming concepts.
dependencies.

Topics include:
database

The role and


Requires value management
database of UML in projects
and modeling skills; most independent/fewest
dependencies.
The object-oriented paradigm and its relation to the UML

user An integrated approach to UML diagrams


Class
To be and
builtObject,
off-siteUse
by aCase, Sequence,
remote team. Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms
search
The Object
Requires Constraint
familiarity Language
with (OCL) technology and techniques; self-contained
search engine
subsystem.

If you're new to UML, a tutorial with realistic examples has even been included to help you
editing
quickly familiarize yourself with the system.
Comprises the basic editing features to be delivered in the first release; different skills
and different team.

rtf-editing
www.it-ebooks.info

Comprises those editing features scheduled for release 2.

UML 2.0 in a Nutshell


x-editing
ByDan Pilone,Neil Pitman
Comprises...............................................
editing features requested by a specific client. These features to be
withdrawnPublisher:
or delayed O'Reilly
depending on that client. Risk is independent of the other
features. Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
Figure 3-8 doesn't show the complete set of packages in the system. It is merely enough for
management to track and control the project. Programmers create lower-level packages as
needed for correct code design. Managers, however, allocate resources and track progress on
Table of Contents | Index
the relatively large grains of the project shown in Figure 3-8 without getting disturbed by the
addition or refactoring of internal packages and contents.

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
3.5.2. UseUML
languages. Case
makesPackages
it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Use case packages organize the functional behavior of a system during analysis. Figure 3-9
shows
Today,the
UMLmajor functional
has become areas
the of a content
standard methodmanagement
for modeling system.
softwareThe packages
systems, provide
which means
understandable
you're probablyterms for team
confronting thismembers
rich and outside the language
expressive analyst team.
moreManagers
than evercan discuss
before. Andthe
project at an appropriate
even though you may notlevel ofUML
write detail without yourself,
diagrams getting bogged down
you'll still in details.
need to interpret
diagrams written by others.
The CMS system shown in Figure 3-9 comprises packages created for the following reasons:
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
The complex editing packages separate the preliminary delivery and the advanced
Furthermore, it's been fully revised to cover version 2.0 of the language.
delivery from the client-based delivery.
This The
comprehensive new edition
simple interactions, viewnot
andonly providescontain
feedback, a quick-reference to all
basic, low-risk UML 2.0 diagram
functions.
types, it also explains key concepts in a way that appeals to readers already familiar with
UML The
or object-oriented programming
reporting has more concepts.
sophisticated functions.

Topics
Theinclude:
search and the user management separate complex functions.

Just as with the class packages in Figure 3-8, you manage the use case packages to manage
The role
the project. and valuethat
Remember of UML in projects
tracking use case packages tracks customer value.

The object-oriented paradigm and its relation to the UML

3.5.3.AnDirected Dependency
integrated approach Graphs
to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and
Directed Deployment
dependency Diagrams
graphs of the packages in a system reveal nonfunctional issues related
to buildability, testability, and robustness; they provide a guide for several roles in software
Extension Mechanisms
development.
The Object Constraint Language (OCL)

Figure 3-9. A set of functional major use case packages


If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

When Class
all theand Object, Useflow
dependencies Case, Sequence,
in one Collaboration,
direction, as in FigureStatechart, Activity,
3-10, without Component,
any loops or
cycles,and
theDeployment Diagrams
graph is acyclic . Acyclic graphs show a project in good health.

Extension
Directed Mechanisms
dependency graphs can help you avoid problems with build scripts and project
testing. Looking at Figure 3-10, you can see that refactoring timer will invalidate testing and
The Object
potentially Constraint
break the build ofLanguage (OCL)
visualizers,threads,controllers, and top; you should thus
change the timer package with caution.

Directed dependency graphs can also help you divide project work among different staff
If you're new
members. For to UML, a Figure
example, tutorial3-10
withshows
realistic
noexamples has even
dependencies beenthreads
between included to visualizers.
and help you
quickly familiarize yourself with the system.
Thus, different groups of people can work on those two packages without destabilizing each
other.

Figure 3-10. Dependency graph of modified JMeter with no cycle


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Through time, projects evolve, and new dependencies creep in because of misunderstanding
Topics include:
or expediency. Figure 3-11 shows such a case; three bidirectional dependencies ruin the
desirable, acyclic nature of the graph:
The role and value of UML in projects
utils now depends on
The object-oriented threads.and its relation to the UML
paradigm
threads now depends
An integrated on to
approach controllers .
UML diagrams

Class andnow
samplers depends
Object, Use on tHReads
Case, .
Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
The problem here is that the reverse of each dependency already existed in Figure 3-10. The
result Extension
is the tangle of bidirectional arrows in level 1 of Figure 3-11, which contrasts with the
Mechanisms
clear flow of arrows in Figure 3-10. The further result is pain, for the developers, testers, and
likely, The
managers
Object and users. Changes
Constraint Languagein(OCL)
threads will confound the team responsible for
controllers and utils, and vice versa because fixes in one require fixes in the code or unit
tests of the others. It may take several iterations until all packages stabilize.[*]

[*] For new


If you're more theory and metrics
to UML, regarding
a tutorial withpackages andexamples
realistic their dependencies,
has evensee John
been Lakos' Large-Scale
included C++ Software
to help you
Design . Also see Robert C. Martin's http://c2.com/cgi/wiki?PrinciplesOfObjectOrientedDesign.
quickly familiarize yourself with the system.

Figure 3-11. Dependency graph of modified JMeter with three cycles


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Chapter 4. Composite Structures
...............................................
Publisher:O'Reilly
Pub Date: June 2005
As a system becomes more complex, it is often helpful to decompose it in terms of
ISBN:0-596-00795-7
functionality (see
Pages:234 7). To realize a piece of functionality, different elements of a
Chapter
system often work together and communicate information. UML 2.0 formalizes the concept of
complex relationships between elements into the idea of composite structures. Much of the
material in this
Table of Contents chapter is new to UML 2.0.
| Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
4.1. Composite Structures
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Astructure is a set of0-596-00795-7
ISBN: interconnected elements that exist at runtime to collectively provide
some piece of functionality.
Pages:234 For example, you can use a structure to represent the internal
makeup of a classifier such as a subsystem (what objects are related to each other, who is
communicating with whom, etc.). UML calls such structures internal structures . UML defines
several symbols
Table of Contents to capture the relationships and communications between elements in an
| Index

internal structure.

System developers have used modeling languages for decades to specify, visualize,
construct,
4.1.1. and document systems. The Unified Modeling Language (UML) is one of those
Connectors
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Connectors represent communication links between instances of classes participating in an
internal structure. They can be runtime instances of associations, or they can represent
Today, UML has become the standard method for modeling software systems, which means
dynamic communication set up at runtimefor example by being values of local variables. You
you're probably confronting this rich and expressive language more than ever before. And
show a connector as a solid line between two instances. Note that while associations between
even though you may not write UML diagrams yourself, you'll still need to interpret
classes represent a link between any instances of those classes, a connector represents a link
diagrams written by others.
between only the two instances specified at each end of the connector (see "Collaborations").
UMLcan
You 2.0provide
in a Nutshell
name from O'Reilly
and type feels your
information forpain. It's beenusing
a connector crafted
the for professionals
following format:like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
name :classname
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
where:
Topics include:

name
The role and value of UML in projects
Is
Thethe name of the connector.
object-oriented The its
paradigm and name can be
relation to used later in collaborations to reference
the UML
this connector.
An integrated approach to UML diagrams
classname
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Is the name of an association this connector represents.
Extension Mechanisms
Figure 4-1 is an example of a named connector.
The Object Constraint Language (OCL)

Figure 4-1. The link between a Pedal and a Wheel is a connector


If you're new to UML, a tutorial
namedwith realistic examples
"c," which is has even been included to help you
a Chain
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
UML specifies several rules for determining the types of the elements at each end:

Table of Contents | Index


If a connector is an instance of an association, the types of the instances at either end of
the connector must be the same types at either end of the association.
System developers have used modeling languages for decades to specify, visualize,
If an instance
construct, at one systems.
and document end of a connector
The Unifiedhas required
Modeling interfaces,
Language the instance
(UML) is one of at the
those
other end
languages. UMLofmakes
the connector must
it possible for provide one of those
team members interfaces.
to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
If an instance at one end of a connector has required interfaces and a port is connected
communicate solutions in a consistent, tool-supported language.
to the other end of the connector, the port must provide a required interface.
Today,
The UML
actual has become
means the standard
of communication method
isn't for modeling
specified software itsystems,
by the connector; which means
can represent a simple
you're probably
method confronting
call or a complex this rich
protocol and
over expressive
a socket language
connection. Youmore
can than ever before.
constrain And
the connection
even though you may not write UML diagrams yourself, you'll still need to interpret
using the normal UML note notation. Simply specify the constraint in a note, and link it to the
diagrams using
connector written
a by others.
dashed line. Figure 4-2 shows a constrained connector.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Figure 4-2. A constrained connector
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)


You may specify the multiplicity of each connector end using the normal multiplicity syntax.
Simply write the number of instances for a given end near the end of the connector. For
example, a student/teacher relationship may require at least 5 students and no more than 20.
If you're
You new the
can show to UML, a tutorial with
student/teacher realistic examples
relationship hasineven
as depicted been
Figure included to help you
4-3.
quickly familiarize yourself with the system.

Figure 4-3. A Teacher must have at least 5 Students but no more


than 20
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

4.1.2. Ports
Table of Contents | Index

Aport is a way to offer functionality from a composite structure without exposing the internal
details
System ofdevelopers
how that functionality is realized.
have used modeling For example,
languages you may
for decades to have a subsystem
specify, visualize, that can
perform
construct, and document systems. The Unified Modeling Language (UML) isfunctionality
credit card payment verification. The actual implementation of this one of thosemay
be spread over
languages. UMLseveral
makesclasses working
it possible in conjunction.
for team members to The organization
collaborate of these classes
by providing a commoncan
be represented
language as an internal
that applies structure
to a multitude of within thesystems.
different subsystem, and the overall
Essentially, functionality,
it enables you to or
credit card verification,
communicate solutions can
in abe exposed using
consistent, a port. Exposing
tool-supported language.the functionality through a port
allows the subsystem to be used by any other classifier that conforms to the port's
specifications.
Today, UML has Starting
become with
theUML 2.0, classes
standard method have been extended
for modeling software to allow for ports
systems, whichand
means
internal structures.
you're probably By default,
confronting ports
this rich are
andpublic, however
expressive UML 2.0
language more allows
thanyou
evertobefore.
have internal
And
ports
even that
thoughare you
available
may notonlywrite
to theUML composite
diagramsstructure
yourself,hosting them.
you'll still need to interpret
diagrams written by others.
You show a port as a small square. You typically draw the name and multiplicity of the port
near
UML the
2.0 square, though
in a Nutshell both
from may be
O'Reilly hidden.
feels your Ifpain.
you It's
draw the crafted
been port onfor theprofessionals
edge of a classifier,
like
the
youport
whoismust
public and create,
read, is available to the environment.
and understand If you draw
system artifacts the port
expressed inside
using a classifier,
UML.
the port is protected
Furthermore, and
it's been available
fully revisedonly to theversion
to cover composite 2.0 structure. Figure 4-4 shows an
of the language.
example port.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Figure 4-4. The CreditCardVerificationSubsystem with a single public
Topics include: port, CreditCardServices

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms
4.1.2.1. Required and provided interfaces
The Object Constraint Language (OCL)
Ports are associated with required and provided interfaces (see "Interfaces" in Chapter 2).
Required interfaces show what the owning classifier may ask of its environment through a
given port.new
If you're Provided interfaces
to UML, a tutorialshow
with what functionality
realistic examples ahas
classifier exposes
even been to the
included to help you
environment. For example,
quickly familiarize yourself our
withcredit card payment system may provide an interface to verify
the system.
credit cards, CreditCardProcessor, while requiring access to an account verification system,
AccountServices, offered by the credit card company. If you use ports in your diagrams, the
required and provided interfaces capture all the interaction the system may have with a given
classifier. Provided and required interfaces are typically shown using the ball and socket
(lollipop) notation, though you may explicitly type a port (see "Port typing"). If there are
www.it-ebooks.info

multiple required or provided interfaces, simply list each interface name followed by a
comma; don't show multiple lollipops. Figure 4-5 shows a port with a required interface and
two provided interfaces.
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Figure 4-5. TheO'Reilly
Publisher: CreditCardVerificationSubsystem providing two
interfacesPub Date: June 2005
(CreditCardProcessor and CardHolderVerification) and
ISBN:0-596-00795-7
Pages:234
requiring one (AccountServices)

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

4.1.2.2.
UML 2.0 Realizing
in a Nutshellport implementations
from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Ports are wired to an internal implementation using connectors. See "Connectors" for
This comprehensive
information on how tonew edition anot
represent only provides
connector. If theaclassifier
quick-reference to all
owning the UML
port 2.0 diagram
provides the
types, it also explains
implementation key conceptsitself,
of the functionality in a way that is
the port appeals to readers
considered alreadyport
a behavioral familiar with
. In this
UML or
case, theobject-oriented
connector linksprogramming concepts.
to a state inside the classifier. This state is used to explain the
behavior of the classifier when the port is used (see Chapter 8 for more information on using
Topicstoinclude:
states model behavior). This is typically used for simple classifiers (not complex structures)
that implement functionality themselves. Figure 4-6 shows a behavioral port.

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML


Figure 4-6. A behavioral port
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're
On newhand,
the other to UML, a tutorial
if the with realistic
functionality examples
is realized has even
by internal been you
elements, included to help
link the you
connector
quickly familiarize yourself with the system.
to internal classifiers that provide the implementation. This is typically used for composite
structures such as components and subsystems. Figure 4-7 shows such a port.

Figure 4-7. A port linked to an internal implementation


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
4.1.2.3. Multiple connectors
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
UML
even2.0 allows
though you
you to have
may multiple
not write UMLconnectors leading from
diagrams yourself, you'lla still
portneed
to different internal
to interpret
elements. However, it doesn't
diagrams written by others. specify what happens when communication is received at that
port; this is left up to the modeler. Some possible solutions are to forward the communication
toall connectors,
UML forward
2.0 in a Nutshell based
from on priority,
O'Reilly forward
feels your pain. on
It'sabeen
round-robin basis,
crafted for or simply like
professionals
randomly choose
you who must a connector.
read, create, andRegardless
understandof your decision,
system be expressed
artifacts sure to document
using UML.it in your
model, probably using a note attached to the port. Figure 4-8 shows
Furthermore, it's been fully revised to cover version 2.0 of the language. an example of using a
port with many connectors.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Figure 4-8. A port with multiple connectors
Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

4.1.2.4. Port multiplicity


If you're new to UML, a tutorial with realistic examples has even been included to help you
Aquickly familiarize
classifier yourself
may specify with thefor
multiplicity system.
a port like any other element. Simply place the desired
number of port instances in brackets after the port name and type (if present). When the
classifier is instantiated, the associated ports are instantiated as well. These are called
interaction points and can be uniquely identified by the classifier. For example, if your
classifier has two ports, one with provided interfaces that offer anonymous access to data and
one with a provided interface that offers authenticated access to data, your classifier can
www.it-ebooks.info

distinguish which port was used by the external system. Figure 4-9 shows the credit card
verification system offering two instances of the credit card verification port.

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Figure 4-9................................................
A component with two instances of the CCServices port
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
4.1.2.5.
languagePort
thattyping
applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

In practice,
Today, UMLwhen a port isthe
has become instantiated, it is represented
standard method for modelingby asoftware
classifiersystems,
that realizes
whichthemeans
provided interfaces.
you're probably Any communication
confronting this rich andwith this interaction
expressive language point
more simply
than passes the And
ever before.
information
even though toyou
internal
may classifiers
not write UMLthat diagrams
realize theyourself,
behavior. UMLstill
you'll 2.0need
allowsto you to specify the
interpret
type of a port
diagrams using
written byclasses
others.to provide more sophisticated behavior. For example, you can
specify that the port is typed using a class that filters the communications it receives or
prioritizes
UML 2.0 indelivery.
a Nutshell When
fromthis port isfeels
O'Reilly instantiated,
your pain. the corresponding
It's been crafted class has a chance
for professionals to
like
manipulate
you who must the read,
communication
create, and it understand
receives before passing
system it to expressed
artifacts the realizing classifiers.
using UML. To
show that a port
Furthermore, it'sshould be represented
been fully usingversion
revised to cover a specific
2.0classifier, simply follow the name of
of the language.
the port with a colon and the name of the classifier to use. Note that the classifier must
realize the provided interfaces.
This comprehensive new edition Younotcan
onlyuse this notation
provides to show provided
a quick-reference interfaces
to all UML by using
2.0 diagram
an interface
types, it also asexplains
the portkeytype, thoughinthe
concepts lollipop
a way thatnotation
appealsistooften more
readers flexible.
already Figurewith
familiar 4-10
shows
UML oranobject-oriented
explicitly typedprogramming
port. concepts.

Topics include:

Figure 4-10. A port explicitly typed as a PacketPrioritizer


The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

4.1.3. Structured Classes and Properties


www.it-ebooks.info

As described in Chapter 3, classifiers with whole-part relationships typically use composition


arrows to show their relationships. In the context of composite structures, UML 2.0 has
defined the term property to describe the "part" piece of the whole-part relationship. For
UML 2.0 inoperating
example, in a graphical a Nutshell system, an application may be made up of a main window
and several buttons.
ByDan ThePilone,buttons
Neil Pitman are a part of the application, so that the whole-part
relationship between the application and the buttons can be shown using composition.
...............................................
However, the main window
Publisher: is shared with the operating system (so the system can reposition
O'Reilly
Pub Date:
the window or hide it); as June 2005 the operating-system-to-window relationship is slightly
a result,
ISBN: 0-596-00795-7
weaker and is shown using association. You can model the application, window, and button
relationships as Pages:
shown 234 in Figure 4-11.

Table of Contents | Index

Figure 4-11. The Application, Window, Button relationship


System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
When used in composite structure diagrams, relationships between properties are shown in
Thisowning
the comprehensive
classifier'snew edition This
rectangle. not only provides
allows you to afurther
quick-reference
restrict thetoassociation
all UML 2.0between
diagram
types,
parts ofitthe
also explains key
composite concepts
classifier. For in a way that
example, appeals
Figure 4-11 to readers
shows thatalready
Buttonsfamiliar
can be with
UML or object-oriented
associated with any Window programming concepts.structure diagram, you can restrict the Window
. Using a composite
to be associated only with a Button owned by the same application. When you draw the
Topics include:
composite structure diagram, properties that are associated with the composite structure
through composition are shown with solid rectangles, and properties that are shared with
other structures are shown using a dashed rectangle. You may place multiplicity information
The role in
for a property and
itsvalue of UML
rectangle in projects
in the upper right corner, or after the name of the property in
brackets.Figure 4-12 shows the composite structure diagram of application, window, and
The object-oriented paradigm and its relation to the UML
button relationships.
An integrated approach to UML diagrams
In addition to simply specifying how properties fit together, you can use composite structures
to specify
Classhow
andinstances are Case,
Object, Use instantiated.
Sequence,As in Chapter 3, instances
Collaboration, areActivity,
Statechart, shown by underlining
Component,
the name and type of the
and Deployment Diagramsclassifier. You may specify initial values for each attribute of a
classifier by specifying the name of the attribute followed by an equals sign and the value of
the attribute.
ExtensionWhen used as instances, you can specify the roles each property will take on by
Mechanisms
showing a slash "/" followed by the role name after the property name and type. Figure 4-13
showsThethe Object
initialization of a button
Constraint with(OCL)
Language its appropriate values.

You can show that the instance of the owning classifier is related to a particular constructor of
a classifier using a dependency line labeled with the keyword «create». You can use any
If you're new
parameters to to
theUML, a tutorial
constructor withinitializing
when realistic examples has
properties even by
simply been included
using to help you
the parameter
quickly
name. familiarize
Figure yourself
4-14 shows thewith the system.
application composite diagram tied to a constructor on the
Application class.

Figure 4-12. The Application, Window, and Button relationships as a


www.it-ebooks.info

composite structure

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Figure
Today, UML4-13. Application
has become composite
the standard method for structure withsystems,
modeling software property values
which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and
Figure Object,
4-14. Use Case, Sequence,
Application Collaboration,
constructor relatingStatechart,
to an Activity,
instanceComponent,
of an
and Deployment Diagrams Application
Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
4.2. Collaborations
...............................................
Publisher:O'Reilly
Pub Date: June 2005
One of the primaryISBN:purposes for composite structures is to document how a particular piece of
0-596-00795-7
functionality is implemented
Pages:234 within a system. This organization of elements to realize
behavior is called a collaboration . A collaboration is a collection of instances wired together
using connectors to show the communication flow.
Table of Contents | Index
Because the purpose of collaborations is to describe how a particular piece of functionality
works, details outside the scope of the desired functionality are typically left off a diagram.
Instead, a collaboration
System developers havediagram shows the
used modeling requiredfor
languages links between
decades instances
to specify, and the
visualize,
attributes involved in the collaboration. You may have multiple
construct, and document systems. The Unified Modeling Language (UML) is one collaborations involving
of those the
same instances
languages. UMLbut showing
makes different
it possible forviews
team of each based
members on the functionality
to collaborate by providingexpressed.
a common One
effective
languagewaythatofapplies
showing to different
a multitudeviews of a classifier
of different is to Essentially,
systems. use interfaces to collect
it enables yourelated
to
functionality.
communicateAsolutions
single class
in amay realize multiple
consistent, interfaces,
tool-supported but each collaboration can focus
language.
on a single interface. See "Interfaces" in Chapter 2 for more information.
Today, UML has become the standard method for modeling software systems, which means
Within
you're aprobably
collaboration, it is helpful
confronting to name
this rich the instances
and expressive involved.
language moreYou typically
than name an
ever before. And
instance basedyou
even though on may
its role
notinwrite
the collaboration.
UML diagramsFor example,
yourself, if you
you'll still wish
need toto model the
interpret
Observer/Observable design pattern, you will likely have an instance in the role of Observer
diagrams written by others.
and an instance in the role of Subject.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
You show a collaboration using a dashed ellipse with the name of the collaboration written
you who must read, create, and understand system artifacts expressed using UML.
inside.Figure 4-15 shows a collaboration named "Observer/Observable."
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-orientedFigure 4-15.
programming A simple collaboration
concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
There and Deployment
are two Diagrams
ways to render the details of a collaboration. The first is to add a compartment
to the collaboration ellipse and draw the instances involved in the collaboration inside. Links
Extension Mechanisms
between instances are shown as solid lines. Each instance is named according to its role in the
collaboration.Figure 4-16 shows the internal structure of the Observer/Observable
The Object Constraint Language (OCL)
collaboration.

If you're new to UML, a tutorial with realistic examples has even been included to help you
Figure
quickly familiarize 4-16.
yourself Internal
with the system. details of a collaboration
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index


Alternatively, you can show the instances that make up a collaboration outside of the
collaboration ellipse and use communication links to tie them back in. In this case, you don't
specify the role name inside the classifiers; instead, you write the role name along the
System developers have used modeling languages for decades to specify, visualize,
communication link for each instance. The advantage of this notation is that you can specify
construct, and document systems. The Unified Modeling Language (UML) is one of those
the attributes and operations that are involved in the collaboration (remember, you can leave
languages. UML makes it possible for team members to collaborate by providing a common
off any attribute or operation that isn't directly related to the functionality you are
language that applies to a multitude of different systems. Essentially, it enables you to
expressing). The disadvantage of this notation is that you don't model the direct
communicate solutions in a consistent, tool-supported language.
communication paths between the various instances. Figure 4-17 shows the
Observer/Observable pattern using this alternate notation.
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Figure 4-17. The Observer/Observable collaboration with details
outside
UML 2.0 in a Nutshell from offeels
O'Reilly theyour
collaboration ellipse
pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

The UMLClass and Object,


specification Use Case,
makes it clearSequence,
that any Collaboration, Statechart,
classifier can be Activity,
substituted for anyComponent,
member of
and Deployment
the collaboration Diagrams
as long as they provide the appropriate attributes and operations to fulfill
their role. For example, in the Observer/Observable collaboration shown in Figure 4-17, the
Extension
Observable mustMechanisms
have a means of adding, removing, and notifying observers, and the
Observer must have a way to handle changes to the observable. Any other classifier may be
used inThe Object
this Constraint
collaboration as Language
long as it can(OCL)provide the message font attribute and the
appropriate operation. As mentioned earlier, interfaces lend themselves nicely to
collaborations. You can define an Observable interface and programmatically capture exactly
what attributes and operations are needed to fulfill a role.
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly
UML 2.0 familiarize yourself with
makes collaborations fullthe system. meaning you can attach sequence diagrams,
classifiers,
state machines, or any other behavioral diagram to help capture the details of the
implementation.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
4.3. Collaboration Occurrences
...............................................
Publisher:O'Reilly
Pub Date: June 2005
UML 2.0 introduced
ISBN:a0-596-00795-7
new concept to allow you to attach a collaboration to a specific
operation or classifier to show how it is realized by other elements. When you associate a
Pages:234
collaboration with an operation or classifier, you create a collaboration occurrence . You can
think of collaboration occurrences as instances of collaborations. For example, you can use a
collaboration
Table of Contents |occurrence
Index to document how various classes make up a subsystem, what is
responsible for persistence, what is really a façade to another subsystem, etc. The advantage
of using a collaboration occurrence to document the implementation of functionality is that
you can assign
System role names
developers have usedto internal
modelingelements of the
languages forclassifier.
decades to There mayvisualize,
specify, be multiple
occurrences
construct, and of adocument
particularsystems.
collaboration within aModeling
The Unified classifier, each with
Language different
(UML) internal
is one of those
elements
languages. fulfilling
UML makesthe roles of the collaboration.
it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
You show a collaboration
communicate solutions inoccurrence using
a consistent, the same dashed
tool-supported ellipse used to show a
language.
collaboration, except that you list the name of the occurrence followed by a colon, and then
the name
Today, UMLof the
has collaboration type. Formethod
become the standard each role
forused in thesoftware
modeling original collaboration,
systems, which you draw
means
ayou're
dashed line from
probably the collaboration
confronting this richoccurrence to thelanguage
and expressive element more
fulfilling
thanthe role.
ever You label
before. And the
dashed line with
even though youthemayname
not of theUML
write role.diagrams
For example, a collaboration
yourself, occurrence
you'll still need of our
to interpret
Observer/Observable
diagrams written by others. collaboration is shown in Figure 4-18.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore,Figure
it's been4-18. Two to
fully revised collaboration
cover version 2.0occurrences
of the language.of the
Observer/Observable collaboration
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Chapter 5. Component Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
When modeling ISBN:
large0-596-00795-7
software systems it is common to break the software into manageable
subsystems. UML
Pages:234 the component classifier for exactly this purpose. A component is a
provides
replaceable, executable piece of a larger system whose implementation details are hidden.
The functionality provided by a component is specified by a set of provided interfaces that the
component
Table of Contentsrealizes
| Index (see "Black-Box View"). In addition to providing interfaces, a component
may require interfaces in order to function. These are called required interfaces .

The functionality of a component's provided interfaces is implemented with one or more


System developers have used modeling languages for decades to specify, visualize,
internal classifiers. These are typically classes but can be other components (see "White-Box
construct, and document systems. The Unified Modeling Language (UML) is one of those
View"). Components should be designed to be reused, with dependencies on external
languages. UML makes it possible for team members to collaborate by providing a common
interfaces, strong encapsulation, and high cohesion.
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
5.1. Components
...............................................
Publisher:O'Reilly
Pub Date: June 2005
In UML 2.0, youISBN:
represent a component with the classifier rectangle stereotyped as
0-596-00795-7
«component». Like other
Pages: 234classifiers, if the details of the component aren't shown, you place the
name of the component in the center of the rectangle. Optionally, you may show the
component icon (a rectangle with two smaller rectangles on the left side) in the upper-right
corner. Figure| 5-1
Table of Contents Indexshows a simple component.

System developers have used modeling languages for decades to specify, visualize,
construct, and documentFigure
systems.5-1. A simple
The Unified component
Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
The representation for a component has changed from previous versions
This comprehensive new
of UML. edition
UML not only provides
1.4 recognized a quick-reference
a, rectangle to allrectangles:
with two smaller UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams


This notation is still recognized for backward compatibility but is no
longer recommended.
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms
5.1.1. Component Dependencies
The Object Constraint Language (OCL)

Components may need other components to implement their functionality. You can show
component dependencies using the dependency relation (a dashed line with an open arrow)
If you'rethe
between newtwo
to UML, a tutorial
components. with realistic
Figure 5-2 shows examples has even been included
the AccountManagement to help
component you
dependent
quickly familiarize yourself
on two other components. with the system.

Figure 5-2. Component dependency


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

Representing component dependencies in this fashion is a relatively high-level view of a


system. To further refine the diagram you may want to show inter-component relationships as
System developers have used modeling languages for decades to specify, visualize,
dependencies on the interfaces provided by other dependent components (see "Black-Box
construct, and document systems. The Unified Modeling Language (UML) is one of those
View"; also see "Interfaces" in Chapter 2).
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
5.2. Component Views
...............................................
Publisher:O'Reilly
UML uses two views of components,
Pub Date: June 2005 a black-box view and a white-box view. The black-box
ISBN:0-596-00795-7
view shows a component from an outside perspective; the white-box view shows how a
Pages:
component realizes 234
the functionality specified by its provided interfaces.

Table of Contents | Index


5.2.1. Black-Box View
The black-box
System view of
developers a component
have shows
used modeling the interfaces
languages the component
for decades to specify,provides, the
visualize,
interfaces
construct, and document systems. The Unified Modeling Language (UML) is one of those of
it requires, and any other detail necessary to explain the guaranteed behavior
the component.
languages. UMLItmakes
does not specify for
it possible anything about theto
team members internal implementation
collaborate by providingof athe
common
component.
language thatThis distinction
applies is central of
to a multitude to different
the concept of replaceable
systems. components.
Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

5.2.1.1. Assembly
Today, UML connectors
has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though
When modelingyou may not write
a black-box viewUML
of a diagrams yourself,
component, you'll still
you represent theneed to interpret
provided and required
diagrams written by others.
interfaces using assembly connectors. Assembly connectors are illustrated using ball-and-
socket icons. To show a required interface, use the socket icon and write the name of the
UML 2.0 in
interface a Nutshell
near from O'Reilly
the connector symbol.feels your
Figure pain.
5-3 It'sabeen
shows crafted with
component for professionals
two required like
you who must read, create, and understand system artifacts expressed using UML.
interfaces.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains
Figure key concepts
5-3. Componentin a way that appeals
with to readers interfaces
two required already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
Show and Deployment
a provided Diagrams
interface with the ball half of an assembly connector, again with the name of
the interface near the symbol. Figure 5-4 shows a component with a provided interface.
Extension Mechanisms

The Object Constraint Language (OCL)


Figure 5-4. Component with a provided interface

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

To wire components together, simply connect the matching provided and required interfaces.
UML 2.0 in a Nutshell
Component dependencies using assembly connectors provide more details about the actual
ByDan Pilone,
relationships between Neil Pitman than simple dependency relations. Figure 5-5 shows the
components
same three components from the "Component Dependencies" section, but using assembly
...............................................
connectors. Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Figure 5-5. Component relationships using assembly connectors


Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
5.2.1.2.
you whoInterface dependencies
must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
While assembly connectors provide more detail than simple component dependencies, they
This comprehensive
don't provide detailednew edition not
information onlythe
about provides a quick-reference
interface to all UML
that is being realized. UML2.0 diagram
provides a
types,
third it also explains
black-box key concepts
representation in a way that
of components appeals
using to readers
realization already familiar
and dependency with
relationships
UML
to or object-oriented
interfaces. programming
If a component provides concepts.
an interface, use a realization arrow from the
component to the interface. If the component requires an interface, use a dependency arrow
Topics
from theinclude:
component to the required interface. Figure 5-6 shows the same three components
asFigure 5-2, but with explicit interface dependencies.

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML


Figure 5-6. Components with explicit interface dependencies
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

An advantage
Today, UML hasto the interface
become dependency
the standard stylefor
method of modeling
modeling software
is that you can attach
systems, other
which means
modeling elements,
you're probably such as athis
confronting state
richmachine or use case,
and expressive to an more
language interface.
than This
ever isbefore.
particularly
And
useful when ayou
even though component
may notimplements a protocolyourself,
write UML diagrams becauseyou'll
you can
still link
needthe
to provided
interpret interface
to a protocol
diagrams stateby
written machine
others.to further clarify the component's usage (see "Protocol State
Machines" in Chapter 8).
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
5.2.1.3. Component
Furthermore, it's beencompartments
fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types,
UML it provides
also also explains key concepts
a black-box in components
view of a way that appeals to readers already
using compartments. familiar
You may addwith
a
UML or object-oriented
compartment programming
to show provided concepts.
and required interfaces. Label provided interfaces with the
stereotype«providedinterfaces» and required interfaces with the stereotype «required
Topics include:
interfaces» .Figure 5-7 shows the AccountManagement component using compartments to
identify the provided and required interfaces.
The role an
UML suggests andadditional
value of UML in projectsstereotyped «artifacts», that can show which
compartment,
artifacts actually implement a component (typically one or more JARs, DLLs, etc.). Figure 5-8
showsThe object-oriented
a component paradigm
with an and its relation to the UML
artifact compartment.
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
Figure
and 5-7.Diagrams
Deployment Interface dependencies in compartment form

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

Figure 5-8. A component with an artifacts compartment

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
5.2.2. White-Box View
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even
In though
order you may
to provide not about
details write UML diagrams yourself,
the implementation of ayou'll still need
component, to defines
UML interpreta white-
diagrams
box written
view. The by others.
white-box view shows exactly how a component realizes the interfaces it
provides. This is typically done using classes and is illustrated with a class diagram; however
aUML 2.0 in a Nutshell
component from some
may delegate O'Reilly
or feels
all of your pain. It's
its behavior tobeen
othercrafted for professionals like
components.
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
5.2.2.1. Realization compartment
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
The simplest white-box view of a component is to add a compartment to the component and
UML or object-oriented programming concepts.
list the classifiers that realize it. The compartment should be labeled with the «realizations»
stereotype. While this provides more detail than a black-box view, it is of limited use to
Topics include:
component developers. Figure 5-9 shows a component with a realizations compartment.

The role and value of UML in projects


5.2.2.2. Classifier dependencies
The object-oriented paradigm and its relation to the UML

To showAn the
integrated approach
internals to UML diagrams
of a component, you may show each classifier that realizes a
component with a dependency on the component itself. Note that the relationship between
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
the classifiers and the component is a dependency relationship (dashed line, open arrow), not
and Deployment Diagrams
a realization relationship. This notation is useful
Extension Mechanisms

The Object Constraint Language (OCL)


Figure 5-9. Component with a realizations compartment

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

for identifying
Today, UML has which classifiers
become make upmethod
the standard a component, but the
for modeling focus ofsystems,
software the diagram
whichismeans
still on
the component
you're probablyasconfronting
a whole. Figure 5-10
this rich shows
and a white-box
expressive viewmore
language of a component and itsAnd
than ever before.
constituent
even though classifiers.
you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
Figure
you who must read,5-10.
create, White-box
and understandview
systemofartifacts
AccountManagement
expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
To shift the focus to the structure of the classifiers making up the component, you may show
the classifiers
Extension inside the component's rectangle. This tends to have the effect of emphasizing
Mechanisms
the relationships of the classifiers making up the component, and it encourages component
encapsulation.
The ObjectFigure 5-11 shows
Constraint the detailed
Language (OCL) realization of a component.

If the internals of a component are sufficiently complex, it is common to use a separate class
diagram to model the details. You can link the new class diagram back to its component using
aIfnote.
you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

Figure 5-11. Detailed realization of AccountManagement


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
5.2.2.3.
languagePorts and connectors
that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

UML 2.0UML
Today, introduces the concept
has become of portsmethod
the standard to allowforyou to explicitly
modeling software identify functionality
systems, that is
which means
exposed to the outside
you're probably world.this
confronting A port
rich groups together language
and expressive related provided
more than andever
required
before.interfaces
And
and
evenuses connectors
though you may to not
mapwrite
them to adiagrams
UML classifieryourself,
that realizes
you'llthe
stillfunctionality. If a port has
need to interpret
both provided
diagrams and by
written required
others.interfaces, it is called a bidirectional port . A port is shown as a
small rectangle on one of the sides of a classifier. An assembly connector (ball and socket)
indicates
UML 2.0 in provided
a Nutshelland from
required interfaces.
O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
In order to show
Furthermore, it'sthe
beenrealization of functionality,
fully revised a connector
to cover version maps
2.0 of the the port to an internal
language.
classifier. A connector is shown as a solid line with a filled arrow from the port to the
classifier. A connectornew
This comprehensive indicates
editionthat
not any
onlymessages
provides a arriving at the port
quick-reference to(typically
all UML 2.0in the form
diagram
of
types, it also explains key concepts in a way that appeals to readers already familiar with a
method calls) are forwarded to the specified classifier. You can also use connectors from
classifier to a port to show
UML or object-oriented messages being
programming passed through a provided interface. Figure 5-12
concepts.
shows a white-box view of a component with three ports.
Topics include:

Figure
The role5-12. Component
and value realization with ports and connectors
of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

5.2.3. Component Stereotypes


www.it-ebooks.info

UML defines several stereotypes that apply specifically to components:


UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
Entity ...............................................
Publisher:O'Reilly
A componentPub Date: June 2005 a business concept. An entity component typically passes
that represents
ISBN: 0-596-00795-7
information in and out of interfaces and is often persisted as a whole. Entities don't
Pages:
typically have 234functionality, or service capabilities, associated with them; they are
any
usually just for data storage and retrieval.
Table of Contents | Index

Process

SystemA component
developers that
havecan
usedfulfill functional
modeling requests
languages for(as opposed
decades to to an entity
specify, component). A
visualize,
process
construct, andcomponent
document is transaction-based
systems. The Unifiedand typically
Modeling has some
Language (UML)typeisofone
state associated
of those
with itUML
languages. (as opposed
makes it to stateless
possible for service components).
team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Realization
Today, UML has become the standard method for modeling software systems, which means
you'reA probably
component that doesn't
confronting thishave its own
rich and specification.
expressive Rather
language more it is
thana realization
ever before.of aAnd
even specification
though you maycomponent,
not writeasUML shown in Figure
diagrams 5-13. you'll still need to interpret
yourself,
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
Figure 5-13.
you who must A specification
read, component
create, and understand associated
system artifacts with
expressed a UML.
using realization
component
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Service
Extension Mechanisms
A stateless component that can fulfill functional requests. Service components are
The Object Constraint Language (OCL)
rarely persisted because they contain no state.

Specification
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
A component that has provided and required interfaces but no implementation
(realizing classifiers). A specification component, shown in Figure 5-13, should be
paired with a realization component or implement component.

Subsystem
www.it-ebooks.info

A larger component that makes up part of a bigger software system. UML provides no
real definition for a subsystem; however, subsystem generally means a self-contained
set of functionality
UML 2.0 in athat is larger than a simple component.
Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Chapter 6. Deployment Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Deployment diagrams model the mapping of software pieces of a system to the hardware that
ISBN:0-596-00795-7
is going to execute it.
Pages:234 Software elements (components, classes, etc.) are typically manifested
usingartifacts and are mapped to the hardware or software environment that will host them,
callednodes . Because many nodes may be associated with the deployment of a system,
communication between nodes can be modeled using communication paths .
Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
6.1. Artifacts
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Artifacts represent physical
ISBN: pieces of information related to the software development
0-596-00795-7
process. For example, you can use an artifact to represent a DLL needed by your system, a
Pages:234
user's manual, or an executable produced when your software is compiled.

Typically artifacts
Table of Contents | Indexare used to represent the compiled version of a component (see Chapter
5); however, UML 2.0 allows artifacts to represent any packageable element, which includes
just about everything in UML. You show an artifact using the classifier rectangle with a dog-
eared
System paper in the upper
developers have right. Figure 6-1languages
used modeling shows a basic artifact.to specify, visualize,
for decades
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a Figure 6-1.
consistent, A simplelanguage.
tool-supported artifact

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
UML allows
types, artifacts
it also to key
explains haveconcepts
properties
in aand
wayoperations thatto
that appeals manipulate the artifact.
readers already familiarThese
with are
most
UML commonly used when
or object-oriented an artifact concepts.
programming represents a set of configurable options. For example,
deployment specifications , which represent configuration settings for deployed artifacts,
frequently use attributes to represent the allowed settings (see "Deployment Specifications").
Topics include:
Figure 6-2 shows an artifact with attributes.

The role and value of UML in projects

The object-oriented paradigm


Figure 6-2.and
Anits relation to
artifact the UML
with attributes
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

6.1.1. Artifact Instances


Like nearly all other UML classifiers, artifacts are really types . This means that technically a
physical DLL on a node is an instance of an artifact. For example, you can have an artifact
www.it-ebooks.info

namedlogging.jar that represents your logging framework implementation. However, you


may have several web applications installed on a server, each with their own copy of
logging.jar. Each physical copy is an instance of the original artifact.
UML 2.0 in a Nutshell
You show an instance of an
ByDan Pilone, artifact
Neil Pitman by underlining the name of the artifact. Figure 6-3 shows
an instance of the logging.jar artifact.
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Figure
Pages:2346-3. An instance of the logging.jar artifact

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML
Typically you has
can become thewhether
determine standardanmethod
artifactfor modeling to
is intended software systems,
be a type which means
or an instance based
you're
on probably
context, confronting
so UML allows thethis rich and
normal expressive language
(nonunderlined) more than
representation of anever before.
artifact And
to be
even though
interpreted asyou may not of
an instance write
thatUML diagrams
artifact if the yourself,
context isyou'll
clear.still need to speaking,
Practically interpret this
diagrams into
translates written
mostbymodels
others.using artifacts as instances, but not underlining the title.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
6.1.2. Manifestations
Furthermore, it's been fully revised to cover version 2.0 of the language.

An artifact
This is a manifestation
comprehensive of another
new edition not onlyUML element.
provides For example, logging.jar
a quick-reference may
to all UML 2.0 be a
diagram
manifestation of the LoggingSubsystem component. You capture the manifestation relationship
types, it also explains key concepts in a way that appeals to readers already familiar with
with
UMLaordashed line from the
object-oriented artifact to the
programming element it represents, and label the line with the
concepts.
keyword«manifest».Figure 6-4 shows the LoggingSubsystem manifestation.
Topics include:

Figure
The 6-4. Showing
role and theinmanifestation
value of UML projects of a component as an artifact
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

In UML 1.x, manifestations were known as implementations . In UML 2.0 it was decided that
implement had been overused, so it has been deprecated in favor of the keyword manifest.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
6.2. Nodes
...............................................
Publisher:O'Reilly
Pub Date: June 2005
A node is a physical
ISBN:entity that can execute artifacts. Nodes can vary in size from a simple
0-596-00795-7
embedded device to a234
Pages: server farm. Nodes are a critical piece of any deployment diagram
because they show where a particular piece of code executes and how the various pieces of
the system (at the execution level) communicate.
Table of Contents | Index
You show a node as a 3D box with the name of the node written inside. However, possibly
more than any other classifier in UML, modelers typically use specific icon representations of
nodes
Systemto developers
help conveyhave
the type
used of hardware
modeling represented.
languages Figure 6-5
for decades shows avisualize,
to specify, simple node as a
cube, as well as example icon representations.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Figure 6-5. Several nodes using the cube representation, and some
example
Today, UML has become the icon representations
standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML


Previous
An versions of approach
integrated UML did not define
to UML any specializations of a node. UML 2.0 specializes a
diagrams
node into two different aspects of hosting code: the required software and the required
hardware . Therefore,
Class it is
and Object, less
Use common
Case, to seeCollaboration,
Sequence, a generic nodeStatechart,
in UML 2.0Activity,
diagrams than it was
Component,
in UMLand
1.x.Deployment
See "Execution Environments" and "Devices" for more information.
Diagrams

Extension Mechanisms
6.2.1.The
Execution Environments
Object Constraint Language (OCL)

Anexecution environment is a specialized node that represents a software configuration


hosting specific
If you're new totypes
UML,ofa artifacts. An execution
tutorial with environment
realistic examples is expected
has even to provide
been included specific
to help you
services to hosted artifacts
quickly familiarize yourself by means
with of mutually agreed upon interfaces. For example, a Java
the system.
2 Enterprise Edition (J2EE) application expects to run in a software environment called an
Application Server. The J2EE specification enumerates several services that should be
provided by an Application Server, such as database connectivity, lifecycle contracts, and
resource location. You can express that a node is an Application Server (and therefore
provides the required services) by defining a stereotype for the node. For example, a typical
www.it-ebooks.info

stereotype for an Application Server is J2EE Container.Figure 6-6 shows an Application


Server execution environment.

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Figure 6-6. A J2EE execution
............................................... environment
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages.
You UMLhow
can specify makes it possible
services for team
provided by themembers toenvironment
execution collaborate by areproviding a common
configured using
language that applies to a multitude of different systems. Essentially, it
configuration files or deployment specifications (see "Deployment Specifications").enables you to
communicate solutions in a consistent, tool-supported language.
An execution environment is technically a node by itself but is typically shown as part of
Today, UML
another, has become the
hardware-based standard
node. methoda for
For example, modeling
J2EE software
Container systems,
may itself whichon
be hosted means
a
you're probably
machine confronting. You
named AppServer1 this can
rich show
and expressive language
the hosting morebythan
relationship ever before.
embedding the And
even though
execution you may not
environment write
in the UML diagrams
hardware node, oryourself,
by usingyou'll still need to
a composition interpret
arrow. Figure 6-7
diagrams
shows bothwritten by others.
representations.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore,
Figure 6-7. it's Two
been fully revised to cover version
representations of an2.0 of the language.
execution environment in a
node
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
6.2.1.1.
andExecution environment
Deployment Diagrams stereotypes

Extension
The UML Mechanisms
specification intends for people to create UML 2.0 Profiles that define unique
execution environments and their required deployment specifications. These unique
The Object
environments are Constraint
each givenLanguage
their own(OCL)
stereotype and are applied to nodes when
appropriate. For example, the UML specification suggests stereotypes such as «OS»,«database
system», and «J2EE Container».

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
6.2.1.2. Explicit services

Usually, any services offered by the execution environment are implicit in the stereotype
used. However, you may explicitly show the services if that increases the readability of your
www.it-ebooks.info

model. The specification doesn't state how to represent explicit services but suggests listing
them in a compartment within the execution environment. Figure 6-8 shows an example
execution environment with an explicit list of the services offered.
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Figure Publisher:
6-8. An execution environment with explicit services
O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
6.2.2.
you whoDevices
must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Adevice is a specialization of a node that represents a physical machine capable of
This comprehensive
performing newThere
calculations. edition
arenot
noonly provides
implied a quick-reference
size restrictions to all UML
on a device; 2.0 diagram
a device can be an
types, it also
embedded explains
controller orkey
the concepts
hardwareinthe
a way that appeals
controller to readers
is installed in. already familiar with
UML or object-oriented programming concepts.
You show a device as a node with the stereotype «device».Figure 6-9 shows a node
stereotyped as a device.
Topics include:

The role and value of UML in projects


Figure 6-9. A node stereotyped as a device
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

One of the more powerful features of devices is that they can be nested. For example, you
If you're
can modelnew to UML,
a server a internal
with tutorial with realistic
devices examples
representing has controllers,
RAID even been included to help
video cards, etc.you
A
quickly familiarize yourself with the system.
real-world use of nested devices can be pixel and vertex shading code running on a video card
(represented as a device) while the rest of the application runs on the machine's CPU. Figure
6-10 shows an example of what this diagram might look like.
www.it-ebooks.info

Figure 6-10. A device (the video card) nested inside another device
(the desktop machine)
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
6.2.3. Communication Paths
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Communication paths represent generic communication between nodes. For example, a
router
Today,may
UMLpass
has HTTP
becomerequests to a web
the standard serverfor
method that uses a proprietary
modeling socket connection
software systems, which meansto a
database. Assuming
you're probably the database
confronting is hosted
this rich on its ownlanguage
and expressive machine,moreyou than
can model the
ever before. And
deployment
even thoughofyou
themay
system
not as nodes
write UMLlinked via communication
diagrams yourself, you'll paths. Theto
still need concept of links
interpret
between nodes existed prior
diagrams written by others. to UML 2.0, however now the specification formally names them.

You show a communication path as a solid line drawn from one node to another. You typically
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
don't show any directionality on the line because the communication is assumed to be
you who must read, create, and understand system artifacts expressed using UML.
bidirectional.Figure 6-11 shows an example web server configuration with several nodes
Furthermore, it's been fully revised to cover version 2.0 of the language.
communicating over communication paths.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Figure 6-11. Several nodes linked with communication paths
Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly
UML familiarize
doesn't specifyyourself
a way ofwith the system.
modeling the actual messages passed between nodes. However,
protocol state machines (see Chapter 8) often provide a good way to represent information
flow if a particular protocol is spoken between nodes. If a link represents messages between
components that aren't captured in a protocol state machine, it may make sense to link to
one or more component diagrams (see Chapter 5) using a note. Figure 6-12 shows an
example communication path linked to a component diagram.
www.it-ebooks.info

Figure 6-12.
UML A communication path with a note attached
2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
6.3. Deployment
...............................................
Publisher:O'Reilly
Pub Date: June 2005
The most important
ISBN:aspect of deployment diagrams is conveying the relationship between
0-596-00795-7
artifacts and thePages:
node(s)
234 they execute on. When you associate an artifact with a deployment
target (anything that can host an artifact, such as a device or execution environment), you
deploy that artifact. For example, you may have an artifact named ccvalidator.jar that
represents the
Table of Contents credit card validation subsystem of an application. When you say
| Index

ccvalidator.jar executes on the node Appserver1, you have deployed the artifact.

System developers have used modeling languages for decades to specify, visualize,
construct,
6.3.1. and documentRepresentation
Deployment systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
UML provides several
communicate ways
solutions in atoconsistent,
show deployment. You may
tool-supported show artifact deployment by simply
language.
drawing an artifact in the hosting node's cube. Figure 6-13 shows an artifact named
Today, UML has deployed
ccvalidator.jar become theto the devicemethod
standard Appserver1 .
for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
UML also allows you to show deployment using a dashed line with an open arrow
even though you may not write UML diagrams yourself, you'll still need to interpret
(dependency) pointing from the artifact to the deployment target. You should stereotype this
diagrams written by others.
line with the keyword «deploy».Figure 6-14 shows the same deployment relationship as
Figure 6-13, but uses the dependency notation.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who
Finally, must
you mayread,
showcreate, and understand
deployment by simply system artifacts artifacts
listing deployed expressed in using UML.
a compartment in
Furthermore, it's been fully revised to cover version 2.0 of the language.
the deployment target's classifier. This notation is particularly useful if you have a lot of
artifacts deployed to a single node. Figure 6-15 shows an execution environment with several
This comprehensive
deployed artifacts. new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:
Figure 6-13. An artifact deployed to a device

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

Figure 6-14. Artifact deployment using a dependency relationship


If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Figure 6-15. An execution environment with a list of the deployed


Table of Contents | Index
artifacts

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
UML 2.0 introduced the term deployed artifact for artifacts that have been associated with
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
nodes. There is no new notation; UML 2.0 just added a formal recognition of the concept.
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

6.3.2. Deployment
This comprehensive newSpecifications
edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Adeployment specification is a collection of properties that specify how an artifact is to be
Topics include:
deployed on a deployment target. For example, you can specify that an artifact requires
database transactions or connection information to communicate with a server. You model the
specific deployment information as a deployment specification artifact.
The role and value of UML in projects
You show a deployment specification using the classifier rectangle stereotyped as «deployment
spec»,The
withobject-oriented paradigm
required deployment and its relation
information to the UML
as attributes. Figure 6-16 shows an example
deployment specification captured in a file named web.xml .
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Figure 6-16. A sample deployment specification
Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

The specific information in a deployment specification depends on the type of artifact being
deployed. You may need a separate model to capture the type of information used by the
www.it-ebooks.info

specification. For example, Figure 6-16 uses a type named Resource that should be defined on
another diagram.

It's common to UML


bundle 2.0 inana Nutshell
artifact and its deployment specification into a larger artifact. You
show the relationship between
ByDan Pilone, an artifact and its deployment specification using a dashed line
Neil Pitman
with an open arrow (dependency) pointing from the specification to the artifact. Figure 6-17
...............................................
shows bundling Publisher:
the weatherserver.jar
O'Reilly application with its deployment descriptor in a web
archive called weatherserver.war
Pub Date: June 2005 .
ISBN:0-596-00795-7
Pages:234

Figure 6-17. An artifact that contains another artifact and its


Table of Contents | Index
deployment specification

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
6.4. Variations on Deployment Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Most of the timeISBN:
deployment diagrams are used for their intended purpose: to show how an
0-596-00795-7
application is physically
Pages:234 deployed. Some modelers prefer to display the bare minimum, just
showing how many machines they will need and how they are supposed to talk. Modelers
often take liberties with the official notation and will specify minimum requirements for their
machines, as |in
Table of Contents Figure 6-18.
Index

System developers have used modeling languages for decades to specify, visualize,
Figure systems.
construct, and document 6-18. ATheminimal deployment
Unified Modeling Languagediagram
(UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore,
Obviously it's6-18
Figure been fully revised
doesn't providetoany
cover version 2.0
information on of the language.
actual software deployment.
Instead of focusing on the node's configuration, you can focus on the software deployment
This comprehensive
configuration new details
and specify edition for
notexecuting
only provides
your asoftware,
quick-reference
as shownto in
allFigure
UML 2.0 diagram
6-19.
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Figure
Topics include: 6-19. Detailed application deployment diagram

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

For the sake of completeness, we should mention that deployment diagrams have been used
to
If show
you'renetwork
new to configurations. Properties
UML, a tutorial with and
realistic tagged values
examples canbeen
has even be used to show
included network
to help you
configuration options
quickly familiarize rather with
yourself thanthe
machine
system.hardware details. Figure 6-20 shows an example
network modeled as a deployment diagram. Be warned, though: deployment diagrams were
not designed with network modeling in mind, so a professional network administrator may
find the syntax lacking.
www.it-ebooks.info

Figure 6-20. A sample network topology using a deployment


diagram
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Chapter 7. Use Case Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Use cases are aISBN:
way 0-596-00795-7
to capture system functionality and requirements in UML. Use case
diagrams consist of named
Pages:234 pieces of functionality (use cases ), the persons or things invoking
the functionality (actors ), and possibly the elements responsible for implementing the use
cases (subjects ).
Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
7.1. Use Cases
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Use cases represent distinct pieces of functionality for a system, a component, or even a
ISBN:0-596-00795-7
class. Each use Pages:
case must
234 have a name that is typically a few words describing the required
functionality, such as View Error Log. UML provides two ways to draw a use case. The first is
an oval with the name of the use case in the center. Figure 7-1 shows a basic use case.
Table of Contents | Index

System developers have usedFigure 7-1.languages


modeling A simple use case
for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
youcan
You whodivide
must aread, create,oval
use case's andinto
understand systemtoartifacts
compartments provideexpressed using
more detail UML.
about the use
Furthermore,
case, it's been fully
such as extension revised
points to cover
(see "Use Caseversion 2.0 of included
Extension"), the language.
use cases (see "Use Case
Inclusion"), or the modeling of specific constraints. Figure 7-2 shows a use case oval with a
This comprehensive
compartment new edition
listing extension not only provides a quick-reference to all UML 2.0 diagram
points.
types, it also explains key concepts in a way that appeals to readers already familiar with
However, the oval representation
UML or object-oriented of use
programming cases doesn't hold up well with detailed
concepts.
compartments. UML recommends you use the classifier notation if you want to provide details
about
Topicsa include:
use case. Show the use case as a rectangle, with the use case oval in the top-right
corner. Now, place the name of the use case in the top, in bold. You can then divide the
classifier into compartments as needed. Typical
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML


Figure 7-2. Use case with a compartment showing extension points
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize
compartment names yourself with thepoints
are extension system.and included use cases.Figure 7-3 shows the
same use case as in Figure 7-2, but in classifier notation.

Figure 7-3. Use case in classifier notation


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

UML makes a clear distinction that the term use case strictly applies to the UML element and
its
Tablename. Full| documentation
of Contents Index of a use case is considered an instantiation of the use case. This
is a subtle distinction, but it allows you to document a use case whatever way best captures
the use case's functionality. You can document a use case in a text document, state machine,
interaction diagram, have
System developers activity diagram,
used or languages
modeling anything else
for that conveys
decades the details
to specify, of the
visualize,
functionality in a meaningful way to your reader.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
7.2. Actors
...............................................
Publisher:O'Reilly
Pub Date: June 2005
A use case mustISBN:
be initiated by someone or something outside the scope of the use case. This
0-596-00795-7
interested partyPages:
is called
234 an actor . An actor doesn't need to be a human user; any external
system or element outside of the use case may trigger the use case (or be the recipient of use
case results) and should be modeled as an actor. For example, it is very common to model
the
Table system
of Contentsclock as an actor that triggers a use case at a given time or interval.
| Index

An actor can have several different representations in UML. The first is a stick figure with the
name
Systemof the actor written
developers near modeling
have used the icon (usually
languagesrightforbelow it). Figure
decades 7-4 shows
to specify, an actor
visualize,
icon.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
Alternatively,
language thatan actor can
applies to a be shown using
multitude the classifier
of different systems. notation. You represent
Essentially, it enables the
youactor
to with
acommunicate
rectangle, with the keyword actor at the top and the name
solutions in a consistent, tool-supported language. of the actor in bold immediately
below that. Because actors don't typically have compartments, this representation isn't used
very often.
Today, UMLFigure 7-5 shows
has become the an actor in
standard classifier
method for notation.
modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
If it is helpful, you may use custom icons to clearly distinguish different types of actors. For
even though you may not write UML diagrams yourself, you'll still need to interpret
example, you can show an external database system using a database
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Figure
Furthermore, it's 7-4. An actor
been fully revised using
to coverthe stick
version 2.0 figure representation
of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams


Figure 7-5. An actor using classifier notation
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
icon while showing the system administrator as a stick figure. Figure 7-6 shows exactly this
set of actors.
www.it-ebooks.info

Figure 7-6. Actor with a custom icon

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

7.2.1. Actor/Use Case Associations


System developers have used modeling languages for decades to specify, visualize,
construct,
You and
typically document
associate systems.
an actor withThe
oneUnified
or more Modeling Language
use cases. (UML) isbetween
A relationship one of those
an actor
languages.
and UMLindicates
a use case makes itthe
possible for teamthe
actor initiates members
use case,to collaborate
the use casebyprovides
providing
thea actor
commonwith
language
results, or that
both.applies to a an
You show multitude of different
association betweensystems.
an actorEssentially, it enables
and a use case you line.
as a solid to
communicate solutions
Conventionally you read in
usea consistent,
case diagramstool-supported
from left to language.
right, with actors initiating use cases
on the left and actors that receive use case results on the right. However, depending on the
Today,orUML
model has
level of become the it
complexity, standard
may make method
sensefortomodeling software
group actors systems,
differently. which
Figure means
7-7 shows
you're
an actorprobably confronting
communicating withthis rich
a use and expressive language more than ever before. And
case.
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell


Figure 7-7. from O'Reillyassociated
An actor feels your pain.
toIt's
thebeen craftedItem
Order for professionals
use caselike
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

Though notobject-oriented
The part of the official UML specification,
paradigm it istocommon
and its relation the UMLto see directional arrows on
association lines to indicate who initiates communication with whom. Note that the arrows
don't necessarily restrict
An integrated the direction
approach of information flow; they simply point from the initiator
to UML diagrams
to the receiver of the communication. What happens after a use case begins execution is
Class
specified and Object,
elsewhere (seeUse
"Use Case, Sequence,
Cases"). Collaboration,
Figure 7-8 shows two Statechart,
actors and aActivity,
use caseComponent,
with
and Deployment
directional associations.Diagrams

Extension Mechanisms

The 7-8.
Figure ObjectAn
Constraint
example Language (OCL)
of directed associations between actors and
a use case

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

7.2.2. System Boundaries


System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
By definition,UML
languages. usemakes
cases capture thefor
it possible functionality of a particular
team members subject.
to collaborate Anything anot
by providing realized
common
by the subject
language that is considered
applies outside the
to a multitude system boundaries
of different and shoulditbe
systems. Essentially, modeled
enables youastoan
actor. This technique
communicate is very
solutions useful in determining
in a consistent, the scope
tool-supported and assignment of
language.
responsibilities when designing a system, subsystem, or component. For example, if while you
are modeling
Today, UML has an ATM system,
become your design
the standard discussions
method digress
for modeling into discussions
software systems,of the details
which means of
the back-end
you're probablybanking system,
confronting a use
this richcase model with language
and expressive clearly defined system
more than boundaries
ever would
before. And
identify the banking
even though you may system as anUML
not write actor and therefore
diagrams outside
yourself, you'll the
stillscope
need toof the problem.
interpret
diagrams written by others.
You represent system boundaries in a generic sense using a simple rectangle, with the name
of the2.0
UML system at the top.
in a Nutshell fromFigure 7-9 feels
O'Reilly shows the pain.
your systemIt'sboundaries
been crafted for for
theprofessionals
ATM machinelike
mentioned
you who must in the previous
read, create,paragraph.
and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

7.2.3. Using Actors


This comprehensive to Identify
new edition not onlyFunctionality
provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML ordon't
Actors object-oriented
need to haveprogramming
a one-to-oneconcepts.
mapping to physical entities; in fact, they don't need
to be physical entities at all. UML allows for actors to represent roles of potential users of a
Topics include:
system. For example, the system administrator may be the only physical user of a system,
but that administrator may wear many hats. It may be helpful to view the system from the
perspective of a
The role database
and value ofadministrator, backup administrator, deployment administrator,
UML in projects
and so on. By specifically identifying the various roles of actors that may use the system, you
can often
The discover use cases
object-oriented that would
paradigm and have gone unnoticed.
its relation to the UMLFigure 7-10 shows a sample
diagram containing three types of administrators and example use cases.
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
Figure
and7-9. A useDiagrams
Deployment case diagram showing the system boundaries of an
ATM System
Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
Figure 7-10.
diagrams Anothers.
written by example of using specialized versions of an actor to
help find required functionality
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
7.3. Advanced Use Case Modeling
...............................................
Publisher:O'Reilly
As it does for other classifiers,
Pub Date: UML provides mechanisms for reusing and adding on to use
June 2005
cases and actors.ISBN:
You 0-596-00795-7
can expand an actor's capabilities or replace entire use cases using
Pages:
generalization . You can234
factor out common elements of use cases using included use cases, or
add on to base use cases using use caseextension .

Table of Contents | Index

7.3.1. Actor and Use Case Generalization


System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
Though not officially
languages. UML makes mentioned in the
it possible for specification,
team members actors and use cases
to collaborate can be generalized
by providing a common
like many other classifiers. Actor generalization is typically used to
language that applies to a multitude of different systems. Essentially, it enablespull out common you to
requirements
communicatefrom several
solutions in adifferent actors
consistent, to simplify modeling.
tool-supported language.For example, Figure 7-10
shows several administrators and the use cases they need to invoke. You may have a
Database
Today, UMLAdministrator
has become , athe
Backup method for, and
Administrator
standard a Deployment
modeling softwareAdministrator
systems, which , allmeans
with
slightly different needs.
you're probably However,
confronting the and
this rich majority of the language
expressive needs of the
more individual
than ever actors may
before. And
overlap. You can
even though youfactor out write
may not a generic
UML System
diagramsAdministrator
yourself, you'llactor
stilltoneed
capture the common
to interpret
functionality, and then specialize
diagrams written by others. to identify the unique needs of each actor.

You represent actor generalization like any other classifier; draw a solid line, with a closed
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
arrow pointing from the specialized actor to the base actor. Figure 7-11 shows the same
you who must read, create, and understand system artifacts expressed using UML.
information as Figure 7-10 but in a much easier-to-read diagram.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Use cases may be generalized as well. Typically use case generalization is used to express
This comprehensive
some new edition
high-level functional need of not only provides
a system withouta going
quick-reference to all
into specifics. UML 2.0 diagram
Specializations of a
types, it also explains key concepts in a way that appeals to readers already
general use case introduce specific functionality. For example, a generic use case familiar
can with
be
UML or object-oriented programming concepts.
Verify Passenger Identity, and specializations of that use case can be Check Passenger
Fingerprint and Verify Passenger's RFID Tag. It is important to notice that even with use
Topics
case include:
generalization, you should still discuss functionality, not implementation. You should not
have specializations of a use case for different ways to implement the same functionality , only
to represent
The roledifferent functionality
and value of UML in. projects
You represent use case generalization
The object-oriented paradigm and just
itslike you do
relation to actor generalization: using a solid line,
the UML
with a closed arrow pointing from the specialized use case to the base use case. If the general
use caseAn represents abstract functionality
integrated approach (meaning it's a functional concept but doesn't
to UML diagrams
actually explain how a user would do something), you show the name of the use case in
italics.Class
Figureand
7-12 showsUse
Object, theCase,
verification use cases
Sequence, and theirStatechart,
Collaboration, relationships.
Activity, Component,
and Deployment Diagrams

7.3.2.Extension
Use CaseMechanisms
Inclusion
The Object Constraint Language (OCL)
You can factor out common functionality from several use cases by creating a shared,
included use case. Unlike in use case extension (discussed next), the use case that includes
another use case is typically not complete on its own. The included functionality isn't
If you're new
considered to UML,
optional; it a
is tutorial
factoredwith
out realistic
simply toexamples
allow forhas even
reuse in been
other included to help you
use cases.
quickly familiarize yourself with the system.
You show use case inclusion using a dashed line, with an open arrow (dependency) pointing
from the base use case to the included use case. Label the line with the keyword include.
Figure 7-13 shows an example of use case inclusion.
www.it-ebooks.info

Figure 7-11. Actor generalization, in which the System Administrator


is the generic base actor and the lower three are specializations
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML7-12.


Figure in projects
Use case generalization
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

Include or UML
Includes?
2.0 in a Nutshell
ByDan Pilone,Neil Pitman
Often there is disagreement between UML modelers as to whether the proper
...............................................
keywords are include and
Publisher:O'Reilly extend or includes and extends. One would think the
UML specification
Pub would
Date: Juneput this
2005to rest. However, as of the UML 2.0 specification,
the use case section states that the keywords are include and extend, and then
ISBN:0-596-00795-7
proceeds to showPages:examples
234 using includes and extends! We think it's safe to say,
that either is acceptable.

Table of Contents | Index

Figure
System developers have used 7-13.
modeling Use case
languages inclusion
for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

7.3.3. Use Case Extension


The role and value of UML in projects

The object-oriented
UML provides the ability toparadigm and its relation
plug in additional to the to
functionality UML
a base use case if specified
conditions are met. For example, if you are modeling a banking application, you can have a
An named
use case integrated approach to UML diagrams
Open Account that specifies how the user can create a new account with the
bank. You can offer a joint account that allowed a user to add other people to his account.
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
The joint account functionality can be captured with a different, use case named Add Joint
and Deployment Diagrams
Member. In this case the specified condition for the extension is more than one member on the
bank application.
Extension Mechanisms
UML clearly specifies
The Object that a base
Constraint use case
Language should be a complete use case on its own. The
(OCL)
extension use cases are typically smaller in scope and represent additional functionality, so
they may not be useful outside the context of the base use case.

Any use case


If you're newyou wantatotutorial
to UML, extendwith
must have clearly
realistic defined
examples has extension
even beenpoints . Antoextension
included help you
point is afamiliarize
quickly specification of some
yourself withpoint in the use case where an extension use case can plug in
the system.
and add functionality. UML doesn't have a particular syntax for extension points; they are
typically freeform text, or step numbers if the use case functionality is represented as a
numbered list.

You list extension points in a use case oval, or in a separate compartment when using the
classifier notation. Figure 7-14 shows a use case with extension points.
www.it-ebooks.info

Figure UML 2.0 inOval


7-14. a Nutshell
and classifier notation for a use case with
ByDan Pilone,Neil Pitman extension points
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct,
You andadocument
represent systems. The
use case extension Unified Modeling
by showing a dashed Language (UML)
line, with an openis arrow
one of those
languages. UML
(dependency) makesfrom
pointing it possible for teamuse
the extension members
case to to
thecollaborate by providing
base use case. Label thea common
line with
language that applies to a multitude of different systems. Essentially,
the keyword extend.Figure 7-15 shows an example of use case extension. it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
Figure 7-15. Use case extension
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

To provide more detail you can specify where the new functionality plugs into the base use
The
case by role and an
specifying value of UML point
extension in projects
and a note attached to the dependency line. Optionally
you can specify under what condition the extension executes, such as applicants > 1.Figure
The object-oriented paradigm and its relation to the UML
7-16 shows use case extension with a note specifying the extension point and the condition to
execute
Anthe extra functionality.
integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Figure 7-16. Use case extension showing conditions in a note
Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

When the system encounters an extension point in a use case, any conditions associated with
extension use cases are evaluated. If a condition is met, the corresponding extension
functionality is executed. Once all appropriate extension use cases have been executed, the
UML 2.0 in awith
base use case continues Nutshell
the next step in the original flow.
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
7.4. Use Case Scope
...............................................
Publisher:O'Reilly
Pub Date: June 2005
As mentioned previously, a use case is a distinct piece of functionality, meaning it is of
ISBN:0-596-00795-7
sufficient granularity
Pages:that
234 the user has accomplished his desired goal. Proper scoping of use
cases is an art, but UML sets several requirements to make the job a little easier:

Table of Contents | Index


A use case must be initiated by an actor.

When a use case is considered complete, there are no further inputs or outputs; the
System developers have used modeling languages for decades to specify, visualize,
desired functionality has been performed, or an error has occurred.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
After a use case has completed, the system is in a state where the use case can be
language that applies to a multitude of different systems. Essentially, it enables you to
started again, or the system is in an error state.
communicate solutions in a consistent, tool-supported language.
One popular rule of thumb is to ask yourself if the user can "go to lunch" after completing the
Today,
use UML
case, has become
meaning that a the standard
reasonably method
sized goal for
hasmodeling software
been achieved by systems, which
the initiator. Formeans
you're probably
example, Add itemconfronting
to shoppingthiscart
rich is
and expressive
probably language
not the larger more
goal athan
userever before.
intends; And
Purchase
even though you may not write UML diagrams yourself, you'll still need to interpret
item is likely a better scope.Purchase item can consist of adding an item to a shopping cart
diagrams
but written
typically has moreby others.
functionality such as logging on, entering billing and shipping
information, and confirming the order.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who
Above all,must read, are
use cases create, and understand
intended systemfunctionality,
to convey desired artifacts expressed
so the using
exact UML.
scope of a use
Furthermore, it's been fully revised to cover version 2.0 of the
case may vary depending on the intended audience and purpose for modeling. language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Chapter 8. Statechart Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
State machine diagrams capture the behavior of a software system. State machines can be
ISBN:0-596-00795-7
used to model the behavior
Pages:234 of a class, subsystem, or entire application. They also provide an
excellent way of modeling communications that occur with external entities via a protocol or
event-based system.
Table of Contents | Index
UML has two types of state machines:

System developers have used modeling languages for decades to specify, visualize,
construct,state
Behavioral and document
machines systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language
Showthat
theapplies to of
behavior a multitude of different
model elements such systems. Essentially,
as objects. it enables
A behavioral you to
state machine
communicate
representssolutions in aimplementation
a specific consistent, tool-supported language.
of an element.

Today, UML has become the standard method for modeling software systems, which means
Protocol state machines
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
Showwritten
diagrams the behavior of a protocol. Protocol state machines show how participants may
by others.
trigger changes in a protocol's state and the corresponding changes in the system (i.e.,
theinnew
UML 2.0 state of from
a Nutshell the protocol). Protocol
O'Reilly feels yourstate
pain.machines
It's been aren't
craftedtypically tied to a like
for professionals
particular
you who implementation,
must read, create, and and they show
understand the required
system artifacts protocol
expressed behavior.
using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Behavioral and protocol state machines share common elements; however, protocol state
machines are not tiednew
This comprehensive to an implementation
edition and have
not only provides restrictions on their
a quick-reference to all transitions.
UML 2.0 diagram
Because protocol state machines are a specialization of behavioral state
types, it also explains key concepts in a way that appeals to readers already machines, this
familiar with
chapter
UML or first discusses behavioral
object-oriented stateconcepts.
programming machines and other topics common to all state
machine diagrams; then details of protocol state machines are explained.
Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
8.1. Behavioral State Machines
...............................................
Publisher:O'Reilly
Pub Date: June 2005
State machines ISBN:
represent the behavior of a piece of a system using graph notation. A state
0-596-00795-7
machine is shown using
Pages: 234the basic rectangle notation, with the name of the state machine
shown in the top compartment. The outside rectangle is often omitted on state machine
diagrams that show only a single state machine. The metaclass is simply state machine .
Figure 8-1 shows
Table of Contents | Indexa simple state machine modeling a soda machine.

System developers have used modeling languages for decades to specify, visualize,
construct, and document Figure
systems.8-1. A basic
The Unified stateLanguage
Modeling machine (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

A stateThe
machine is often associated
object-oriented paradigm with a classifier
and its in the
relation to the larger
UML UML modelfor example, a
class or subsystem. However, UML doesn't define a specific notation to show this relationship.
One possible notation
An integrated is to usetoa UML
approach note diagrams
labeled with the name of the state machine and linked
to the classifier. Figure 8-2 shows an example that uses a note to link a state machine to a
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
classifier.
and Deployment Diagrams

Extension Mechanisms
Figure 8-2. Example of linking a state machine to a classifier
The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
You can model
construct, and the behavior
document of the classifier
systems. using
The Unified states ,pseudostates
Modeling Language (UML) ,activities
is one, of
andthose
transitions
languages. . If
UMLa state
makesmachine is used
it possible for to model
team the behavior
members of an operation
to collaborate (see a
by providing "Operations"
common
in Chapter 2),
language thatthe stateto
applies machine mustof
a multitude have parameters
different systems.thatEssentially,
match the itoperation's
enables you to
parameters.
communicate These can be
solutions in used in any transition
a consistent, or state
tool-supported as needed.
language.

Transitions
Today, UMLbetween statesthe
has become occur when method
standard events are
for dispatched (see "Dispatch").
modeling software As themeans
systems, which state
machine executes,
you're probably activities are
confronting this run
richbased upon the transition,
and expressive entry than
language more into a state,
ever and so
before. Andon
(see
even"Activities").
though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Each state machine has a set of connection points that define the external interface to the
state machine. These connection points must be either Entry or Exit pseudostates.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
8.2. States
...............................................
Publisher:O'Reilly
Pub Date: June 2005
States model a ISBN:
specific moment in the behavior of a classifier. This moment in time is defined
0-596-00795-7
by some condition being
Pages: 234true in the classifier.

States model a situation in the behavior of a classifier when an invariant condition holds true.
Put
Table more simply,
of Contents | Indexa state is a "condition of being" for the state machine and, by association,
the classifier that's being modeled. For example, a coffee machine could be "Grinding Beans,"
"Brewing," "Warming Coffee," "Dispensing," etc. A state can represent a static situation, such
as "Waiting
System for Username"
developers or a modeling
have used dynamic situation
languages where the state
for decades to is actively
specify, processing data,
visualize,
such as "Encrypting Message."
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
Alanguage
state is shown as a rectangle
that applies with rounded
to a multitude corners.
of different The name
systems. of the itstate
Essentially, is written
enables you toinside
the rectangle. Figure 8-3 shows a simple state.
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not writeFigure 8-3. A yourself,
UML diagrams simpleyou'll
statestill need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:
A state name may be placed outside of the rectangle in a tab notation when showing
composite or submachine states (see "Composite States" and "Submachine States"). You
shouldThe roleuse
either andthe
value
tab of UML inor
notation projects
place the name inside the state; don't do both. Figure 8-
4 shows a state using a tab for the state name.
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams


Figure 8-4. A state with its name in a tab
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

Within the rectangle a state can be divided into compartments as needed. UML defines the
following compartments:
www.it-ebooks.info

Name

Shows the name of the state. This should not be used if the name is placed in a tab.
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
Internal activities...............................................
Publisher:O'Reilly
Shows a list
Pubof internal
Date: June activities
2005 that are performed while in the state. See "Activities"
for the syntax.
ISBN:0-596-00795-7
Pages:234

Internal transitions
Table of Contents | Index
Shows a list of internal transitions (see "Transitions") and the events that trigger them.
Write an internal transition as:
System developers
event have used )modeling
( attributeList [ guardlanguages
conditionfor
]/decades to specify, visualize,
transition
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language
The thatlist,
attribute applies
whichtoisaoptional,
multitude of different
maps systems.
the event's Essentially,
parameters to theit given
enables you to of
attributes
communicate solutions in a consistent, tool-supported language.
the classifier. The guard condition is also optional, but, if present, must be enclosed by square
brackets.
Today, UML has become the standard method for modeling software systems, which means
you're
The sameprobably confronting
event may this
be listed rich and
multiple expressive
times as long language morehas
as each entry than ever before.
a unique guard And
even though you may not
condition for the transition.write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Figure 8-5 shows a state with compartments.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Figure 8-5. A state with compartments
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams


A state can be either active or inactive . A state is considered active as soon as it is entered
because of some
Class transition.
and Object, Use Similarly, a state Collaboration,
Case, Sequence, is considered inactive immediately
Statechart, Activity, after leaving
Component,
the state.
and Deployment Diagrams

UML defines three


Extension types of states:
Mechanisms

The Object Constraint Language (OCL)

Simple states

Simplest
If you're of UML,
new to all states, theywith
a tutorial haverealistic
no substates. All has
examples the example states
even been usedtosohelp
included far in
youthis
section
quickly are simple
familiarize states.
yourself with the system.

Composite states

Have one or more regions for substates. A composite state with two or more regions is
calledorthogonal .
www.it-ebooks.info

Submachine states
UML 2.0 in a Nutshell
Semantically
ByDanequivalent to composite states, submachine states have substates that are
Pilone,Neil Pitman
contained...............................................
within a substate machine . Unlike composite states, submachine states are
intended to group O'Reilly
Publisher: states, so you can reuse them. Composite states are typically specific
to the current stateJune
Pub Date: machine.
2005
ISBN:0-596-00795-7
Composite and submachine
Pages:234 states are explained in more detail in the following subsections.

8.2.1. Composite States


Table of Contents | Index

ASystem developers
composite state is have used
a state modeling
with languages
one or more for Adecades
regions. to simply
region is specify,
a visualize,
container for
construct, Aand
substates. document
composite systems.
state TheorUnified
with two Modeling
more regions is Language (UML) is
called orthogonal . one of those
languages. UML makes it possible for team members to collaborate by providing a common
Alanguage that
composite applies
state mayto a multitude
have of different
an additional systems.
compartment Essentially,
called it enables you to
the decomposition
communicate solutions in a consistent, tool-supported language.
compartment. A decomposition compartment is a detailed view of the composite state where
you can show a composite state's regions, substates, and transitions. Figure 8-6 shows a
Today, UML
composite haswith
state become the standard
a single region. method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Figure 8-6. A composite state with one region
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

You may hide the decomposition compartment to increase the clarity of a diagram. If you hide
the compartment, you can use the composite icon to indicate that the state's decomposition
isn't shown on this diagram. Figure 8-7 shows a composite state with the decomposition
UML 2.0 in a Nutshell
compartment hidden.
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Figure
Pub Date:8-7. Composite
June 2005 state with composite icon
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate
You may place solutions in a a
states within consistent, tool-supported
region of a language.
composite state to represent internal substates. A
substate that isn't contained in another state is called a direct substate , and a substate
Today, UML
contained has other
within become the standard
substates method
(resulting for modeling
in recursive, software
composite systems,
states) which
is called anmeans
indirect
you're probably
substate . confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
Adiagrams
compositewritten
state by others.
is considered active when the state machine is in any of the composite's
substates. When a composite state is active, the tree of active states, starting with the
UML 2.0 instate
composite a Nutshell from
itself and O'Reillydown
working feelsto
your
thepain. It'ssubstate,
current been crafted for professionals
is called the state like
you who must
configuration read,
. For create,aand
example, understand
state system
configuration artifacts
for Figure 8-6expressed
could be using UML.
Dispensing-
Furthermore,
>Releasing it's.been fully revised to cover version 2.0 of the language.
drink

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, itRegions
8.2.1.1. also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:
A region is shown using a dashed line dividing the decomposition compartment. You may
name each region by writing its name within the region's area. Figure 8-8 shows a composite
state with two regions.
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

Figure
An integrated 8-8.toAUML
approach composite
diagrams state with two regions
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate
Each region hassolutions in a consistent,
its own initial pseudostate tool-supported language.and a final state. A transition
(see "Pseudostates")
to a composite state is a transition to the initial pseudostate in each region. Each region
Today,a UML
within has become
composite the standard
state executes methodand
in parallel, foritmodeling software
is perfectly systems,
acceptable which
for one means
region to
you'rebefore
finish probably confronting
another. this rich
A transition andfinal
to the expressive
state oflanguage more than
a region indicates ever before.
completing theAnd
even though
activity you
for that may not
region. Once write UML diagrams
all regions yourself, you'll
have completed, still need state
the composite to interpret
triggers a
diagrams written
completion by others.
event and a completion transition (if one exists) triggers.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
8.2.2. Submachine States
Furthermore, it's been fully revised to cover version 2.0 of the language.

Submachine states are


This comprehensive semantically
new edition notequivalent to composite
only provides states into
a quick-reference that
all they
UML are
2.0 made up
diagram
of internal substates and transitions. UML defines a submachine state as a way to encapsulate
types, it also explains key concepts in a way that appeals to readers already familiar with
states
UML or and transitions soprogramming
object-oriented that they can concepts.
be reused. A submachine state simply means that
another state machine, a submachine state machine, is contained by the state. For example,
the process
Topics of establishing a TCP/IP connection can be encapsulated into its own state
include:
machine, and that state machine can then be embedded as the first submachine state of a
state machine modeling a web page request.
The role and value of UML in projects
A submachine state is shown in the same rounded rectangle as any other state, except you
show the
Thename of the state,
object-oriented followedand
paradigm by its
a colon (:),to
relation followed
the UML by the name of the referenced
submachine.Figure 8-9 shows a submachine state.
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and8-9.
Figure Deployment Diagrams
A submachine state referencing the credit card validation
Extension Mechanisms
state machine

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

Typically when showing a submachine state you show the entry and exit points of the
www.it-ebooks.info

referenced submachine. You show these points as pseudostates on the border of the
submachine state (see "Pseudostates").Figure 8-10 shows a submachine state with an
explicit exit point.
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Figure 8-10. Credit
Publisher: card validation submachine state with explicit
O'Reilly
Pub Date: June 2005 exit point
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
Ifcommunicate solutions
the submachine state in a consistent,
is entered tool-supported
through language.
the default initial pseudostate or exited because of
the completion of the submachine, you don't need to show explicit entry/exit points. The state
Today, UML
machine hasinbecome
shown the standard
Figure 8-10 uses themethod
default for modeling
initial software
pseudostate andsystems, whichexit
two different means
you're A
points. probably confronting
submachine this richmay
state machine and be
expressive language
used multiple timesmore than
within ever before.
a containing And
state
even though you may not write UML diagrams yourself, you'll still need to interpret
machine, and different references to the submachine may show different entry/exit points
diagrams
based written
on what by others.
is relevant to the current submachine state.
UMLclarity
For 2.0 inyou
a Nutshell
may usefrom O'Reilly
the same feels your
composite pain.
icon It's been
to show thatcrafted for professionals
the referenced like is
submachine
you who
defined must read,
elsewhere create,
in the andFigure
model. understand systema artifacts
8-11 shows expressed
submachine using
state with UML.
the composite
Furthermore, it's been fully revised to cover version 2.0 of the language.
icon.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML Figure
or object-oriented
8-11. Aprogramming
submachine concepts.
state showing the composite icon
Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

8.2.3.Extension
Transitions
Mechanisms

The Object Constraint Language (OCL)


A transition shows the relationship, or path, between two states or pseudostates. It
represents the actual change in the configuration of a state machine as it heads from one
state to the next. Each transition can have a guard condition that indicates if the transition
If you're
can new
even be to UML, a(enabled)
considered tutorial with realisticthat
, a trigger examples
causes has
the even beento
transition included
executetoifhelp
it is you
quickly familiarize yourself with the system.
enabled, and any effect the transition may have when it occurs.

Transitions are shown as a line between two states, with an arrowhead pointing to the
destination state. You specify the details of the transition using the following syntax:
www.it-ebooks.info

trigger [guard ] / effect

UML 2.0 in a Nutshell

where: ByDan Pilone,Neil Pitman


...............................................
Publisher:O'Reilly
Pub Date: June 2005
trigger ISBN:0-596-00795-7
Pages:234
Indicates what condition may cause this transition to occur. The trigger is typically the
name of an event, though it may be more complex.
Table of Contents | Index

guard
System developers have used modeling languages for decades to specify, visualize,
Is a constraint
construct, that is
and document evaluated
systems. Thewhen an event
Unified is fired
Modeling by the(UML)
Language state machine
is one of to
those
determine
languages. UML ifmakes
the transition should
it possible be enabled.
for team members Guards should not
to collaborate by have any side
providing effects
a common
and must evaluate to a boolean. Guards will always be evaluated before
language that applies to a multitude of different systems. Essentially, it enables you toa transition is
fired. The order in which multiple guards are evaluated
communicate solutions in a consistent, tool-supported language. isn't defined. A guard can
involve tests of states in the current state machinefor example, not in Dialing or in
WaitingForCall
Today, UML has become. Thethestate namesmethod
standard can be for
fullymodeling
qualifiedsoftware
if necessary.
systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
effect
diagrams written by others.
Specifies an activity that is executed when a transition happens. This activity can be
UML 2.0 in a Nutshell
written from O'Reilly
using operations, feels your
attributes, and pain. It'sthe
links of been crafted
owning for professionals
classifier like
as well as any
you who must read,
parameters create,
of the and understand
triggering event. An system artifactsmay
effect activity expressed using
explicitly UML. events
generate
Furthermore, it's beensignals
such as sending fully revised to cover
or invoking version 2.0 of the language.
operations.
This comprehensive
Figure new edition
8-12 shows several not only
transitions provides
between a quick-reference to all UML 2.0 diagram
states.
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
8.2.3.1. Transition types
Topics include:

UML defines several


The role specific
and value types
of UML in of transitions. These are described in the following list.
projects
There are no special symbols associated with transition types. They are defined only for clarity
The object-oriented
and common vocabulary. paradigm and its relation to the UML

An integrated approach to UML diagrams

Classtransition
Compound and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
A representation of the change from one complete state machine configuration to
ExtensionCompound
another. Mechanisms transitions are a set of transitions, choices, forks, and joins leading
to a set of target states.
The Object Constraint Language (OCL)

High-level transition

If you're new to UML,


A transition fromaatutorial withstate.
composite realistic examples
If the has even
destination of thebeen included
transition to help the
is outside you
quickly familiarize yourself with the system.
composite state, all the substates are exited, and their exit activities are run, followed
by the exit activity of the composite state. If the transition ends with a target inside the
composite state, the exit activity of the composite state isn't run.
www.it-ebooks.info

Figure 8-12. A state machine with several transitions

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
Internal transition
diagrams written by others.
A transition between states within the same composite state. The containing state isn't
UML 2.0 in a or
exited Nutshell from
reentered O'Reilly
during thefeels your pain.
transition. It's been
A transition craftedfrom
directly for professionals
one region of like
a
you who must read,
composite statecreate, and understand
to another region in thesystem artifacts expressed
same composite state isn'tusing UML.
allowed.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive
Completion transition new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented
A transition from aprogramming
state that hasconcepts.
no explicit trigger. When a state finishes its do
activities, a completion event is generated. This event is placed in the event pool and
Topicsdispatched
include: before any other event (see "Event Processing"). If the completion
transition's guard conditions (if there are any) are met, the transition is triggered. You
can have multiple completion transitions, however they must have mutually exclusive
The role
guard and valueAof
conditions. UML in projects
completion transition from an orthogonal composite state will be
taken when all the regions have reached their final state and have completed their do
The object-oriented paradigm and its relation to the UML
activities.
An integrated approach to UML diagrams

8.2.3.2. Signal
Class symbols
and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Transitions may be shown in more detail using explicit icons to show signal sending, signal
Extension
receipt, Mechanisms
and effect activities. These icons are not necessary and are simply used to provide a
more transition-oriented view of a state machine.
The Object Constraint Language (OCL)
You can show a transition that receives a signal by showing an unlabeled transition from the
source state to a rectangle with a triangular notch on one side. The signal's signature is
shown inside
If you're newthe rectangle.
to UML, Complete
a tutorial the diagram
with realistic by showing
examples an been
has even unlabeled transition
included to help you
pointing from the rectangle to the target
quickly familiarize yourself with the system.state. Figure 8-13 shows a detailed view of a
transition receiving a signal.

You can show a transition that sends a signal as part of the transition effect by drawing an
unlabeled transition pointing from the source state to a rectangle with a triangular point on
one side. The signature of the signal (including parameters) is shown inside the rectangle.
Another unlabeled transition links the rectangle to the target state. Figure 8-14 shows a
www.it-ebooks.info

detailed view of a transition sending a signal.

UML 2.0 in a Nutshell


Figure 8-13. A transition-oriented
ByDan Pilone, Neil Pitman view showing a signal being
received
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Figure 8-14. Transition-oriented view of a signal being dispatched
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

You canAnshow
integrated
effectsapproach to as
that occur UML diagrams
a result of a transition using a simple rectangle. The
description of the activity is written inside the rectangle. As with signal icons, you link
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
everything together with an unlabeled transition from the source state to the rectangle, and
and Deployment Diagrams
then from the rectangle to the target state. Figure 8-15 shows details of the effects of a
transition.
Extension Mechanisms

The Object Constraint Language (OCL)


8.2.3.3. Transitions and composite states

AIftransition
you're new to UML,
from a tutorial
an external with
state to realistic
the borderexamples has evenstate
of a composite beenisincluded to help
called default you.
entry
quickly familiarize yourself with the system.
The entry activity of the composite state is executed, and then the default transition to a
substate occurs.

A transition from an external state to a specific substate of a composite state is called explicit
entry . The entry activity for the composite state is executed before the substate becomes
active.
www.it-ebooks.info

Whenever a state machine transitions to an orthogonal composite state (a composite state


with two or more regions), each region is entered either explicitly or by default. If the
composite stateUMLis entered through an explicit entry, any other region is entered using its
2.0 in a Nutshell
default transition.
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Figure
ISBN:8-15.
0-596-00795-7Transition-oriented view with an activity
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
When leaving a composite state the exit activities for the active substates are executed from
the inside out. In other words, the deepest of the active substate's exit activities executes
Topics include:
first, and then its containing substate, and so on.

When exiting an orthogonal composite state, the active substate in each region is exited first;
The role and value of UML in projects
the exit activity for the composite state is then executed.
The object-oriented paradigm and its relation to the UML

8.2.4.AnActivities
integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
An activity represents some functionality that is executed by a system. A state can have
activities that areMechanisms
Extension triggered by transitions to and from the state or by events raised while in
the state. A state's activities execute only if the state is active.
The Object Constraint Language (OCL)
Each activity has a label showing when the activity executes, and an optional activity
expression. An activity is written as:

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize
label yourself
/ activity with the system.
expression

You can write an activity expression using pseudocode:


www.it-ebooks.info

list.append(keystroke) ; print("*")

UML 2.0 in a Nutshell


or natural language:
ByDan Pilone,Neil Pitman
...............................................
record keystroke and show password character
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
You may omit the slash
Pages: 234 when you don't show the activity expression. Activity expressions can
use attributes and operations available to the classifier owning the state machine.

UML
Table ofreserves
Contents | three
Index activity labels:

System developers have used modeling languages for decades to specify, visualize,
Entry
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML
Triggers makes
when it possible
a state for team
is entered. members
The entry to collaborate
activity by providing
executes before anythinga common
else
language that applies to
happens in the state. a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
Exit
you're probably confronting this rich and expressive language more than ever before. And
even Triggers
though you may
when not write
leaving UMLThe
a state. diagrams yourself,
exit activity you'll still
executes as theneed
lasttothing
interpret
in the state
diagrams written
before by others.
a transition occurs.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
Do
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Executes as long as a state is active. The do activity executes after the entry activity
and can run until
This comprehensive newit completes,
edition not or asprovides
only long as the state machine is
a quick-reference to in
allthis
UMLstate.
2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
Each
UML state may have additional
or object-oriented activities
programming associated with it, and specific labels for each. See
concepts.
Figure 8-5 for an example of a state with several activities.
Topics include:
If the do activity completes, it causes a completion event, which can trigger a transition (see
"Dispatch"). If there is a completion transition (a transition with no other event condition), the
exit activity executes,
The role andofthe
and value UMLtransition occurs. If some other event causes the state to
in projects
transition before the do activity completes, the activity is aborted, the exit activity executes,
and the transition
The occurs. paradigm and its relation to the UML
object-oriented

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell

8.3. StateBy Dan Pilone,Neil Pitman


Machine Extension
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Like many otherISBN:
concepts in UML, state machines may be specialized as needed. A specialized
0-596-00795-7
state machine isPages:
an extension
234 of a general state machine. You can specialize a state machine
by adding regions, states, pseudostates, or transitions. In addition to adding features to state
machines you can redefine states, regions, and transitions.
Table of Contents | Index
When drawing a specialized state machine, draw the inherited states with dashed or gray-
toned lines. You may also place the keyword extended in curly braces after the name of the
state machine.
System Figure
developers 8-16
have shows
used a specialized
modeling sodafor
languages dispensing
decades to state machine.
specify, The
visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of. those
Dispensing Drink state is extended to introduce a new substate, Out of selection The states
Releasing UML and
languages.drink Refunding
makes change
it possible retain
for team their other
members transitions, by
to collaborate and a new transition,
providing a common
Time expired
language , isapplies
that addedto toatransition
multitudetoofthe new substate
different systems.if the IR sensor
Essentially, it isn't triggered
enables you to(see
Figure 8-6 for the
communicate original
solutions in composite state).
a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
8.4. Protocol State Machines
...............................................
Publisher:O'Reilly
Protocol state machines
Pub Date: capture the behavior of a protocol, such as HTTP or a challenge-
June 2005
ISBN:0-596-00795-7
response speakeasy door. They aren't tied to a particular implementation of a protocol;
Pages:
rather, they specify 234
the state changes and events associated with a protocol-based
communication.

Unlike in behavioral
Table of Contents | Index state machines, states in protocol state machines represent stable
situations where the classifier isn't processing any operation and the user knows its
configuration.
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that appliesFigure 8-16.ofState
to a multitude machine
different extension
systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects


Protocol state machines differ from behavioral state machines in the following ways:
The object-oriented paradigm and its relation to the UML
entry,exit, and do activities can't be used.
An integrated approach to UML diagrams
States can have invariants. Place invariants in square brackets under the state name.
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
The keyword protocol is placed in curly braces after the state machine name to indicate
the state machine is a protocol state machine.
Extension Mechanisms
Transitions in protocol state machines have a precondition (in place of the guard in
The Object Constraint Language (OCL)
normal transitions), the trigger, and a post condition. The notation for a protocol
transition is as follows:

If you're new to UML,


[precondition a tutorial
]event with realistic examples
/ [postcondition ] has even been included to help you
quickly familiarize yourself with the system.

Each transition is associated with zero or one operation on the owning classifier. The
transition guarantees that the precondition will be true before the operation is invoked,
and that the post condition will be true before entering the target state.
www.it-ebooks.info

The effect activity is never specified for a protocol transition.

Figure 8-17 shows


UMLa2.0 simplified
in a Nutshell version of the Simple Mail Transport Protocol (SMTP) protocol.
Because protocol state machines don't not allow activities, there is little detail about what the
ByDan Pilone,Neil Pitman
SMTP server actually does when receiving a command from the client. By design, the protocol
...............................................
state machine tells you only what state the protocol implementation will be in, not what it
Publisher:O'Reilly
does to get there or how it keeps itself occupied. See "Variations on Statechart Diagrams" for
Pub Date: June 2005
an example of modeling a protocol in more detail.
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
8.5. Pseudostates
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Pseudostates are special
ISBN: types of states that represent specific behavior during transitions
0-596-00795-7
between regularPages:
states.
234Combined with basic transitions, pseudostates can represent complex
state changes within a state machine.

Table of Contents | Index

Figure 8-17. A simplified SMTP protocol state machine


System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
Table 8-1 shows the types of pseudostates and their symbols. Refer to Figure 8-1 for an
UML or object-oriented programming concepts.
example showing how these symbols are used.
Topics include:

The role and value of UML in projects


Table 8-1. Types of pseudostates
The object-oriented paradigm and its relation to the UML
Pseudostate
Symbol
An integrated Description
approach to UML diagrams
name
InitialClass and Object, Use Case, Sequence, Collaboration,
The starting point of a Statechart, Activity,
state machine. Component,
The transition
and Deployment Diagrams
pseudostate from the initial pseudostate to the first full state may
be labeled with the event that instantiates the object
Extension Mechanisms the state machine is modeling.

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

Choice Allows the execution of a state machine to choose


between several different states based on guard
conditions on the transitions (see Figure 8-17).
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Deep history Pages:234 Used inside a state region, a transition to this
pseudostate from outside the region indicates the state
machine should resume the last substate it was in
Table of Contents | Index within the given region, no matter how "deep" the
substate is within the region.

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages.
Entry point UML makes it possible for Represents
team members to collaborate
a possible byaproviding
target for transitionainto
common
a
language that applies to a multitude of different state.
composite systems. Essentially,
An entry it enables
point can you to to
then transition
communicate solutions in a consistent,antool-supported language.
internal substate that may differ from the default
transition. You must label entry points by writing their
Today, UML has become the standardname method fortomodeling
next software systems, which means
the symbol.
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Exit point Represents a possible source for a transition from a
UML 2.0 in a Nutshell from O'Reilly feels your pain.
composite It'sLike
state. been crafted
entry for professionals
points, like
exit points are
you who must read, create, and understand
labeled system artifacts
with their names.expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Fork and
Topics join
include: Represents a split in the execution of the state machine
into orthogonal regions. The join reunites the regions
into a single transition. The state machine won't
transition from the join until all regions have
The role and value of UML in projects
transitioned to the join pseudostate.
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams


Junction Brings several possible transitions together into one
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
pseudostate. One or more transitions may then leave
and Deployment Diagrams
the junction to other states.
Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

Shallow Used inside a state region, a transition to this


history pseudostate from outside the region indicates the state
machine should resume the last substate it was in
UML 2.0 in a Nutshell
within the given region, however the substate must be
ByDan Pilone,Neil Pitman at the same level as the history pseudostate. You may
...............................................
specify a default "previous state" by showing a single
Publisher:O'Reilly transition from the shallow history pseudostate to an
Pub Date: June 2005
internal substate. This is used only if the region has
ISBN:0-596-00795-7
never been entered.
Pages:234
Terminate
node
Table of Contents | Index

Causes the state machine to terminate.

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell

8.6. EventBy Dan Pilone,Neil Pitman


Processing
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Information within a 0-596-00795-7
ISBN: state machine is conveyed via events. Events can be triggered by things
outside of the state
Pages:machine
234 or as part of an activity executing within a state. An event can
have parameters and attributes you can use when processing the event.

Table of Contents | Index

8.6.1. Dispatch
System developers have used modeling languages for decades to specify, visualize,
As events are
construct, andtriggered,
documentthey are added
systems. to an event
The Unified pool.Language
Modeling Once added to the
(UML) event
is one of pool,
those
events are sent
languages. UMLout for processing
makes it possible by
forthe
teamstate machine
members to or are dispatched
collaborate . The order
by providing of event
a common
dispatch and processing isn't specified by UML. This allows state machines to
language that applies to a multitude of different systems. Essentially, it enables you toimpose their
own prioritization
communicate schemes
solutions in aon events if desired.
consistent, tool-supported language.
When dispatching events, a new event is dispatched and processed only after the previous
Today, UML has become the standard method for modeling software systems, which means
event has been fully processed. This doesn't mean that all do activities (see "Activities") are
you're probably confronting this rich and expressive language more than ever before. And
complete, just that the state machine is in a well-defined condition, with entry and exit
even though you may not write UML diagrams yourself, you'll still need to interpret
activities completed. This is called run-to-completion by the UML specification.
diagrams written by others.
After an event is dispatched, if no transitions are enabled and the event isn't deferred (see
UML 2.0 inEvents"),
"Deferred a Nutshellthefrom O'Reilly
event feels your
is discarded, andpain. It's been
the next eventcrafted
can befor professionals like
processed.
you who must read, create, and understand system artifacts expressed using UML.
IfFurthermore, it'strigger
an event does been fully
one revised
or moreto cover version
transitions, such2.0
as of
in the
the language.
case of orthogonal states (see
"Composite States"), the order in which the transitions are fired isn't specified by UML. Once
This
all comprehensive
transitions newfired,
have been edition
thenot onlyisprovides
event a quick-reference
considered complete. to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
IfUML or object-oriented
a synchronous activityprogramming
is triggered byconcepts.
a transition, the event processing isn't complete until
the invoked object has finished its run-to-completion step.
Topics include:
When dispatching events, UML allows for transitions to conflict. However, only one out of a set
of conflicting transitions is allowed to execute. If an event triggers two different transitions
from theThesame
role and value
state, the of UMLmachine
state in projects
must select only one transition to execute. The
following rules determine which transition executes:
The object-oriented paradigm and its relation to the UML

AAn integrated
transition approach
starting fromtoa UML diagrams
substate has higher priority than a transition from any of its
containing states, and therefore is executed.
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment
Transitions from anDiagrams
orthogonal state are considered to have the same priority (assuming
they are at the same level), so the first transition encountered is executed.
Extension Mechanisms

The Object Constraint Language (OCL)


8.6.2. Deferred Events

If you're
You new
can list to UML,
events thatashould
tutorialbe
with realistic
deferred examples
from has even
dispatching whilebeen included
in a given to help
state. You you
show
quickly familiarize yourself with the system.
a deferred event by listing the event, followed by a forward slash and the keyword defer
within the state. Figure 8-18 shows a state that defers the cancel event. If the cancel event
does fire, it is held in the event pool until the state machine leaves this state.
www.it-ebooks.info

Figure 8-18. State with deferred cancel event

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index


If an event is triggered that doesn't cause a transition, and it is on the deferred list, it will be
held in an event pool while nondeferred events are dispatched. The event will be held in the
pool until the state machine enters a state in which the event is no longer deferred, or in
System
which thedevelopers have
event would used
cause a modeling
transition.languages
The eventfor decades
is then to specify, visualize,
dispatched.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages.
To UML makes
clarify, events it possible
that cause for team
a transition members
can't to collaborate
be deferred. bymachine
If the state providingenters
a common
a state
language that applies to a multitude of different systems. Essentially, it enables
that doesn't defer an event, and the event doesn't cause a transition, the event is lost. you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
8.7. Variations on Statechart Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
In addition to modeling behavior and protocols, statecharts have been used to capture real-
ISBN:0-596-00795-7
time system behavior.
Pages:234As they do with many applications of UML diagrams, real-time system
modelers frequently use tagged values and constraints to customize the syntax for their
organization; however, almost all real-time diagrams include some notation to indicate time.
A common
Table notation
of Contents | Index is to use the keyword after to indicate a maximum allowable time for a

transition to occur. Figure 8-19 shows a satellite uplink acquisition statechart that requires a
ground station to respond to satellite commands within a fixed amount of time to prevent the
acquisition sequencehave
System developers fromused
failing and starting
modeling over. for decades to specify, visualize,
languages
construct, and document systems. The Unified Modeling Language (UML) is one of those
Since real-time
languages. UMLsystems
makes itare frequently
possible involved
for team in well-defined
members protocols,
to collaborate the line abetween
by providing common
real-time
languagestate machines
that applies to and protocolofstate
a multitude machines
different can blur.
systems. There isit no
Essentially, real notational
enables you to
difference;
communicate it issolutions
a matterinofawhat the modeler
consistent, is trying to
tool-supported convey. Real-time state machines
language.
often model the internal states of a system, something
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams writtenFigure 8-19. A sample real-time statechart diagram
by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
deliberately avoided by protocol state machines. If the modeler doesn't capture the internal
states Extension Mechanisms
of a system, or if the implementation is simple enough that there are no additional
internal states, the state machine can wind up being a model of the protocol. Figure 8-19 is
closer The
to aObject Constraint
protocol Language
state machine than(OCL)
a detailed implementation model; each state in the
figure can be represented by one or more smaller, internal states in a real implementation.
However, according to the strict definition of protocol state machines, entry activities can't be
used, so Figure 8-19 isn't tagged with the {protocol} tag.
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Chapter 9. Activity Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Activity modeling focuses on the execution and flow of the behavior of a system, rather than
ISBN:0-596-00795-7
how it is assembled.
Pages:Possibly
234 more than any other UML diagram, activity diagrams apply to
much more than just software modeling. They are applicable to just about any type of
behavioral modeling; for example, business processes, software processes, or workflows.
Activity diagrams
Table of Contents | Indexcapture activities that are made up of smaller actions .

When used for software modeling, activities typically represent a behavior invoked as a result
of a method call. When used for business modeling, activities may be triggered by external
System developers have used modeling languages for decades to specify, visualize,
events, such as an order being placed, or internal events, such as a timer to trigger the
construct, and document systems. The Unified Modeling Language (UML) is one of those
payroll process on Friday afternoons. Activity diagrams have undergone significant changes
languages. UML makes it possible for team members to collaborate by providing a common
with UML 2.0; they have been promoted to first-class elements and no longer borrow
language that applies to a multitude of different systems. Essentially, it enables you to
elements from state diagrams.
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
9.1. Activities and Actions
...............................................
Publisher:O'Reilly
Pub Date: June 2005
An activity is a behavior that is factored into one or more actions. An action represents a
ISBN:0-596-00795-7
single step within an activity
Pages: 234 where data manipulation or processing occurs in a modeled
system. "Single step" means you don't break down the action into smaller pieces in the
diagram; it doesn't necessarily mean the action is simple or atomic. For example, actions can
be:
Table of Contents | Index

Mathematical
System developersfunctions
have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
Calls to other behaviors (modeled as activities)
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
Processors of data (attributes of the owning object, local variables, etc.)
communicate solutions in a consistent, tool-supported language.
Translating these into real examples, you can use actions to represent:
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
evenCalculating
though yousales
may tax not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Sending order information to a shipping partner
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
Generating
you who a listcreate,
must read, of items
andthat need to be
understand reordered
system because
artifacts of low using
expressed inventory
UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
When you use an activity diagram to model the behavior of a classifier, the classifier is said to
be thecomprehensive
This context of the new
activity. Thenot
edition activity can access
only provides the attributes and
a quick-reference operations
to all UML 2.0 of the
diagram
classifier, any objects linked to it, and any parameters if the activity is associated
types, it also explains key concepts in a way that appeals to readers already familiar with with a
behavior. When used to programming
UML or object-oriented model business processes, this information is typically called process-
concepts.
relevant data . Activities are intended to be reused within an application, and actions are
typically specific and are used only within a particular activity.
Topics include:
You show an activity as a rectangle with rounded corners. Specify the name of the activity in
the upper
The left. You value
role and can show parameters
of UML involved in the activity below the name.
in projects
Alternatively, you can use parameter nodes , described later in this section. Figure 9-1 shows
a simple
Theactivity.
object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object,


Figure Use9-1.
Case,ASequence, Collaboration,
simple activity withStatechart, Activity, Component,
no details
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

You can show the details for an activity inside of the rectangle, or, to simplify a diagram,
leave off the surrounding rectangle altogether. You show actions using the same symbol as an
activity: a rectangle with rounded corners; place the name of the action in the rectangle.
www.it-ebooks.info

Figure 9-2 shows some actions inside of an activity.

UML 2.0 in a Nutshell


ByDan Figure 9-2.
Pilone,Neil Pitman Activity with simple details
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language
To that applies
make activity to a more
diagrams multitude of different
expressive, systems.
you can write Essentially,
pseudocodeitorenables you to
application-
communicate solutions in a consistent, tool-supported language.
dependent language inside an action. Figure 9-3 shows an example of an action with a
domain-specific block of code.
Today, UML has become the standard method for modeling software systems, which means
you're
Each probably
activity confronting
typically this rich
starts with and expressive
an initial language
node and ends more
with an than final
activity ever node.
before. And an
When
even though
activity reachesyou
anmay not write
activity UML diagrams
final node, yourself,
the activity you'll still
is terminated. You need to an
show interpret
initial node as a
diagrams
black written
dot and by others.
an activity final node as a solid circle

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Figure
Furthermore, it's been 9-3. to
fully revised Ancover
action with
version pseudocode
2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

with aExtension Mechanisms


ring around it. See "Control Nodes" for more information on initial and final nodes.
Figure 9-4 shows an activity with initial and final nodes.
The Object Constraint Language (OCL)

Figure 9-4. An activity diagram with initial and final nodes


If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
Activities
construct,may
andhave pre- and
document postconditions
systems. The Unified thatModeling
apply to Language
the entire (UML)
activity. You of
is one show a
those
precondition by placing
languages. UML makes the keyword
it possible team membersattothe
for«precondition» top centerbyofproviding
collaborate the activity and then
a common
place the constraint
language immediately
that applies afterofit.different
to a multitude You show a post-condition
systems. using
Essentially, the keyword
it enables you to
.Figure 9-5
communicate solutions
«postcondition» in a shows an activity
consistent, with pre- language.
tool-supported and postconditions.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
Figure
even though you9-5. Activity
may not write UMLdiagram
diagrams with pre-
yourself, and
you'll still postconditions
need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The may
An action role and
havevalue
local of UML
pre- in postconditions
and projects that should hold true before the action is
invoked and after it has completed, respectively. However, the UML specification doesn't
dictateThe
howobject-oriented paradigm and
pre- and postconditions mapits
to relation to the UML
implementation; violations of the conditions are
considered implementation-dependent and don't necessarily mean the action can't execute.
An integrated approach to UML diagrams
You show pre- and postconditions using notes attached to the action. You label the note with
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
the keyword «localPrecondition» or «localPostcondition».Figure 9-6 illustrates this.
and Deployment Diagrams

Extension Mechanisms

Figure
The9-6. An
Object activity
Constraint diagram
Language with local pre- and postconditions for
(OCL)
actions

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
9.1.1. Activity Edges
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
In order
even to show
though youflow
maythrough anUML
not write activity, you link
diagrams actionsyou'll
yourself, together usingtoactivity
still need edges .
interpret
Edges specify how control
diagrams written by others.and data flow from one action to the next. Actions that aren't
ordered by edges may execute concurrently; the UML specification leaves it up to the specific
implementation of an activity
UML 2.0 in a Nutshell diagram
from O'Reilly to say
feels yourwhether actions
pain. It's actuallyfor
been crafted execute in parallel
professionals likeor
are
youhandled
who mustsequentially.
read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
You show an activity edge as a line with an arrow pointing to the next action. You can name
edges by placing the name near the arrow, though most edges are unnamed. Figure 9-6 (as
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
well as the earlier figures) shows an activity diagram with several activity edges.
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

9.1.1.1. Control flows


Topics include:

UML offers a specialized activity edge for control-only elements, called a control flow . A
controlThe role
flow and value
explicitly of UML
models in projects
control passing from one action to the next. In practice,
however, few people make the distinction between a generic activity edge and a control flow
The object-oriented paradigm and its relation to the UML
because the same notation is used for both.
An integrated approach to UML diagrams

9.1.1.2. Object
Class flows Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Object,
and Deployment Diagrams

Extension
UML offers Mechanisms
a data-only activity edge, called object flows . Object flows add support for
multicasting data, token selection, and transformation of tokens. The notation for object flows
is the The
sameObject Constraint
as that Language
for a generic (OCL)
activity edge.

You can use an object flow to select certain tokens to flow from one activity to the next by
providing a selection behavior . You indicate a selection behavior by attaching a note to the
If you're new to UML, a tutorial with realistic examples has even been included to help you
object flow with the keyword «selection» and the behavior specified. Figure 9-7 shows
quickly familiarize yourself with the system.
selecting the top candidates from potential new hires. See "Object Nodes" for details on
modeling objects.

Figure 9-7. Activity diagram where objects are selected based on a


www.it-ebooks.info

selection behavior

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
You can assign
construct, and behaviors
document to object flows
systems. that transform
The Unified Modelingdata passed(UML)
Language alongisanone
edge; however,
of those
the behaviorUML
languages. can'tmakes
have any side effects
it possible on the
for team originaltodata.
members You show
collaborate by transformation
providing a common
behaviors
language using a note to
that applies attached to theofobject
a multitude flow.
different Label the
systems. note with itthe
Essentially, keyword
enables you to
communicate solutions
«TRansformation» , and write the behavior
in a consistent, under the label.
tool-supported Figure 9-8 shows an example of a
language.
transformation behavior that extracts student identification from course registrations to verify
that the UML
Today, student's accountthe
has become is fully paid. method for modeling software systems, which means
standard
you're probably confronting this rich and expressive language more than ever before. And
Object flows allow
even though you mayyou to
notspecify
write UMLsending data to
diagrams multipleyou'll
yourself, instances of a to
still need receiver using
interpret
multicasting . For example,
diagrams written by others. if you are modeling a bidding process, you can show a Request for
Proposal (RFP) being sent to multiple vendors and their responses being received by your
activity.
UML 2.0 Youin a show sending
Nutshell fromdata to multiple
O'Reilly receivers
feels your by been
pain. It's labeling an object
crafted flow with the
for professionals like
keyword must read,, create,
you who«multicast» and youand show data being
understand received
system from multiple
artifacts expressed senders by labeling an
using UML.
object flow with
Furthermore, the
it's keyword
been to cover .version
«multireceive»
fully revised Figure 9-9
2.0 shows
of the an activity diagram modeling
language.
an RFP process.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
There
types,are times
it also when an
explains action
key may in
concepts accept
a waymore
that than oneto
appeals type of valid
readers inputfamiliar
already to beginwith
execution. For example, programming
UML or object-oriented a human resources action named Adjust Salary may require an
concepts.
Employee object and either a New Hire Document or Yearly Performance Review Document, but
not both.
Topics You can show groups and alternatives for input pins (see "Pins" under "Object
include:
Nodes") by using parameter sets . A parameter set groups one or more pins and indicates that
they are all that are needed for starting or finishing an action. An action can use input pins
only from
The one
role parameter setUML
and value of for any given execution, and likewise output on only one output
in projects
parameter set. You show a parameter set by drawing a rectangle around
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams


Figure 9-8. Activity diagram with a transformation behavior to
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
traverse an object and extract the needed information
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
Figure
you're probably confronting 9-9.
this rich Multicast
and expressive object
language flows
more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML


the pins included in the set. Figure 9-10 shows the Adjust Salary action with parameter sets.
An integrated approach to UML diagrams

9.1.1.3. Connectors
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension
To simplify largeMechanisms
activity diagrams you can split edges using connectors . Each connector is
given a name and is purely a notational tool. You place the name of a connector in a circle
The Object Constraint Language (OCL)
and then show the first half of an edge pointing to the connector and the second half coming
out of the connector. Figure 9-11 shows two equivalent activity diagrams; one with a
connector and one without.
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

Figure 9-10. Action with parameter sets


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in9-11.


Figure a Nutshell from O'Reilly
Equivalent feels your
activity pain. It's been
diagrams, onecrafted
with foraprofessionals
connectorlikeand
you who must read, create, and understand system artifacts expressed using UML.
one without
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
9.2. Tokens
...............................................
Publisher:O'Reilly
Conceptually, UML
Pub models information
Date: June 2005 moving along an edge as a token. A token may
ISBN:an
represent real data, 0-596-00795-7
object, or the focus of control. An action typically has a set of required
Pages:
inputs and doesn't 234 executing until the inputs are met. Likewise, when an action
begin
completes, it typically generates outputs that may trigger other actions to start. The inputs
and outputs of an action are represented as tokens.
Table of Contents | Index

Each edge may have a weight associated with it that indicates how many tokens must be
available before the tokens are presented to the target action. You show a weight by placing
the keyword
System weight in
developers curly
have brackets
used ({})languages
modeling equal to the
for desired
decadesnumber of tokens.
to specify, A weight of
visualize,
indicates
construct,
null andall tokens should
document be made
systems. available
The Unified to the Language
Modeling target action as soon
(UML) asofthey
is one arrive.
those
For example,UML
languages. Figure 9-12it shows
makes that
possible fornine
team players
membersare needed before by
to collaborate youproviding
can make a baseball
a common
team.
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
Figure
you're probably 9-12.
confronting thisActivity diagramlanguage
rich and expressive with edge weights
more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:
In addition to weights, each edge may have a guard condition that is tested against all
tokens. If the
The roleguard condition
and value of UMLfails, the token is destroyed. If the condition passes, the token
in projects
is available to be consumed by the next action. If a weight is associated with the edge, the
tokensThe
aren't tested against
object-oriented the guard
paradigm condition
and untiltoenough
its relation tokens are available to satisfy
the UML
the weight. Each token is tested individually, and if one fails, it is removed from the pool of
An integrated
available approach
tokens. If this reducesto the
UMLnumber
diagramsof tokens available to less than the weight for the
edge, all the tokens are held until enough are available. You show a guard condition by
puttingClass and Object,
a boolean Use Case,
expression Sequence,
in brackets Collaboration,
([]) near Statechart,
the activity Activity,
edge. Guard Component,
conditions are
andused
typically Deployment Diagrams
with decision nodes to control the flow of an activity (see "Decision and merge
nodes").
Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
9.3. Activity Nodes
...............................................
Publisher:O'Reilly
Pub Date: June 2005
UML 2.0 definesISBN:
several types of activity nodes to model different types of information flow.
0-596-00795-7
There are parameter
Pages:nodes
234 to represent data being passed to an activity, object nodes to
represent complex data, and control nodes to direct the flow through an activity diagram.

Table of Contents | Index

9.3.1. Parameter Nodes


System developers have used modeling languages for decades to specify, visualize,
You can represent
construct, parameters
and document to anThe
systems. activity or output
Unified from
Modeling an executed
Language (UML)activity
is one as
of parameter
those
nodes . You show
languages. a parameter
UML makes nodefor
it possible as team
a rectangle on the
members boundary of
to collaborate byan activity, awith
providing the
common
name
language that applies to a multitude of different systems. Essentially, it enables you to edges
or description of the parameter inside the rectangle. Input parameter nodes have
to the first action,
communicate and output
solutions parametertool-supported
in a consistent, nodes have edges coming from the final action to the
language.
parameter node. Figure 9-13 shows an example of wood being fed into a paper production
activity, and paper
Today, UML being produced
has become at the
the standard end. for modeling software systems, which means
method
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Figure 9-13. Activity diagram with incoming and outgoing
parameters
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

9.3.2.AnObject
integrated approach to UML diagrams
Nodes
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
To represent complex data passing through your activity diagram, you can use object nodes .
An object node represents
Extension Mechanisms an instance of a particular classifier in a certain state. Show an
object node as a rectangle, with the name of the node written inside. The name of the node is
Thethe
typically Object
type Constraint
of data theLanguage (OCL) Figure 9-14 is an activity diagram showing a
node represents.
factory producing parts for shipping.

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize
Figureyourself
9-14.withObject
the system.
nodes in an activity diagram
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index


If the type of data the node represents is a signal, draw the node as a concave pentagon. See
Figure 9-37 in "Interruptible Activity Regions" for an example of a signal in an activity
diagram.
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
9.3.3.
languagePins
that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today,
UML UML ahas
defines become
special the standard
notation method
for object nodes,for modeling
called software
pins, to providesystems, which
a shorthand means
notation
you're
for inputprobably confronting
to or output from anthis rich and
action. expressive
For example, language
because themore
action than
Shipever before.
Parts And 9-
in Figure
even
14 though
requires a you
Partmay
, younotcanwrite
defineUMLan diagrams
input pin yourself, you'll labeled
on Ship Parts still need to.interpret
Part You show a pin
diagrams
using written
the same by others.
rectangle as for object nodes, except the rectangle is small and attached to
the side of its action. If it is an input pin, any edges leading into the action should point to the
UML 2.0
input pin;inifaitNutshell frompin,
is an output O'Reilly feels your
any edges pain.
leaving theIt's beenshould
action craftedleavefor professionals
from the pin.like
Figure
you who
9-15 shows mustthe read,
Create create,
Partsand understand
diagram system
rewritten usingartifacts
pins. expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
Figurekey
types, it also explains 9-15. Actions
concepts with
in a way that input
appealsand output
to readers pins
already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

If the Extension
output fromMechanisms
an action is related to an exception (error condition), you indicate that the
pin is an exception pin by inserting a small arrow near the pin. Figure 9-16 shows the Create
Parts The Object
action with Constraint Language (OCL)
error handling.

If you're new to UML, a tutorial with realistic examples has even been included to help you
Figure
quickly familiarize 9-16.with
yourself Activity diagram with an exception pin
the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index


If you don't have edges leading into or out of an action, you can show whether a pin is an
input pin or an output pin by placing small arrows inside the pin rectangle. The arrow should
point toward the action if you are showing an input pin and away from the action if you are
System an
showing developers have
output pin. used9-17
Figure modeling
showslanguages
an action for decades
with to specify,
input and visualize,
output pins.
construct, and document systems. The Unified Modeling Language (UML) is one of those
Iflanguages. UML makes
an action takes it possible
a constant value for team members
as input, to collaborate
you can model the inputby providing
data using aavalue
common
pin . A
language that applies to a multitude of different systems. Essentially, it enables
value pin is shown as a normal input pin, except the value of the object is written near you tothe
communicate
rectangle. solutions
Figure in a consistent,
9-18 shows tool-supported
an activity diagram with a language.
value pin.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not
Figure write UML
9-17. diagrams
Action withyourself,
input you'll
and still need to
output interpret
pins
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

Figure
The role and value of UML 9-18. Action
in projects with a value pin
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

9.3.4. Control Nodes


If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
In addition to actions, activities may include other nodes to represent decision making,
concurrency, or synchronization. These specialized nodes are called control nodes and are
described in detail in this section.
www.it-ebooks.info

9.3.4.1. Initial nodes

Aninitial node isUML


the2.0 starting point for an activity; an initial node can have no incoming edges.
in a Nutshell
You can have multiple initial nodes for a single activity to indicate that the activity starts with
ByDan Pilone,Neil Pitman
multiple flows of execution. You show an initial node as a solid black dot, as shown in Figure
...............................................
9-4.
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
9.3.4.2. Decision and
Pages: 234merge nodes

A decision
Table node
of Contents is a control node that chooses different output flows based on boolean
| Index

expressions. Each decision node has one input edge and multiple outgoing edges. When data
arrives at the decision node, a single outgoing edge is selected, and the data is sent along
that
Systemedge. A decisionhave
developers nodeusedusually selectslanguages
modeling an edge byforevaluating
decades toeach outgoing
specify, edge's guard
visualize,
condition
construct, . Aand
guard condition
document is a boolean
systems. expression
The Unified that Language
Modeling tests some(UML)valueisvisible
one oftothose
the
activity,
languages. typically an attribute
UML makes of thefor
it possible owning
team classifier
membersor tothe data token
collaborate by itself.
providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
You show a decision
communicate node
solutions in as a diamond tool-supported
a consistent, with the flows coming
language.into or out of the sides. You
show guard conditions by putting a boolean expression in brackets ([]) near the activity edge.
Figure
Today,9-19UMLishas an become
activity diagram showing
the standard a decision
method made while
for modeling wrapping
software presents.
systems, which means
you're probably confronting this rich and expressive language more than ever before. And
Guard conditions
even though youaren't
may notguaranteed
write UML todiagrams
be evaluated in any
yourself, particular
you'll order,
still need and a decision
to interpret
node allows only one
diagrams written by others. outgoing edge to be selected. You should take care to design your
models so that only one guard condition ever evaluates to true for a given set of data, to
prevent
UML 2.0race conditions.
in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
You can specify functionality that executes whenever data arrives at the decision node. Called
Furthermore, it's been fully revised to cover version 2.0 of the language.
decision input behavior , this functionality is allowed to evaluate the data arriving at the node
and offers output for the guard conditions to evaluate. The behavior is not allowed to have
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
any side effects when executing, since it can
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:
Figure 9-19. Activity diagram with a decision node

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

be executed
If you're multiple
new to UML,times for the
a tutorial same
with data examples
realistic input (once foreven
has eachbeen
edgeincluded
that needs to be
to help you
tested). You show decision
quickly familiarize yourself input behavior
with the system.in a note labeled with the keyword
«decisionInput».Figure 9-20 shows an activity diagram that checks to see if a newly
authenticated user is the 100th user and should therefore be prompted to take a survey.
www.it-ebooks.info

Figure 9-20. Decision node with an input behavior

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

AToday,
merge node is effectively
UML has become the thestandard
oppositemethod
of a decision node; itsoftware
for modeling brings together
systems,alternate flows
which means
into a single
you're output
probably flow. It doesn't
confronting synchronize
this rich multiple
and expressive concurrent
language more flows; see "Fork
than ever and
before. Andjoin
nodes" for concurrency
even though you may not support.
write A
UMLmerge node has
diagrams multiple
yourself, incoming
you'll edges
still need and a single
to interpret
outgoing
diagramsedge.
writtenA merge node simply takes any tokens offered on any of the incoming edges
by others.
and makes them available on the outgoing edge.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
You
youshow a merge
who must node
read, usingand
create, theunderstand
same diamond youartifacts
system use in aexpressed
decision node,
usingexcept
UML. with
multiple incoming
Furthermore, edgesfully
it's been and revised
a singletooutgoing edge. 2.0
cover version Figure 9-21
of the shows how a potential new
language.
hire's information may be submitted to Human Resources for processing.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Figure 9-21. Activity diagram with a merge node
Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
9.3.4.3. Fork and join nodes

Afork node splits the current flow through an activity into multiple concurrent flows. It has
one incoming edge and several outgoing edges. When data arrives at a fork node, it is
www.it-ebooks.info

duplicated for each outgoing edge. For example, you can use a fork node to indicate that
when a new person is hired, actions are initiated by Human Resources, the IT Department,
and Facilities Management. All these actions execute concurrently and terminate
independently. UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
You show a fork...............................................
node as a vertical line, with one incoming edge and several outgoing edges.
Figure 9-22 is an activityO'Reilly
Publisher: diagram that models hiring a new employee.
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
Figure 9-22. Example activity diagram with a fork node
Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

AThis
join comprehensive newthe
node is effectively edition not only
opposite provides
of a fork node;a it
quick-reference to all UML
synchronizes multiple 2.0ofdiagram
flows an
types, it also explains key concepts in a way that appeals to readers already familiar
activity back to a single flow of execution. A join node has multiple incoming edges and with
one
UML or object-oriented programming concepts.
outgoing edge. Once all the incoming edges have tokens, the tokens are sent over the
outgoing edge.
Topics include:
You show a join node as a vertical line, with multiple incoming edges and one outgoing edge.
Figure 9-23 is an activity diagram that models serving a meal.
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

Figure 9-23.
An integrated Example
approach activity
to UML diagrams diagram with a join node

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
It is worth noting that activity diagrams don't have the advanced time-modeling notations
even though you may not write UML diagrams yourself, you'll still need to interpret
that interaction diagrams have. So, while it's possible to show how to prepare a meal and
diagrams written by others.
serve everything at the same time with an activity diagram, you can't capture the time
needed to cook each part of the meal. However, you can capture this information with a
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
timing interaction diagram. See Chapter 10 for more information on interaction diagrams.
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
You can specify a boolean condition to indicate under what conditions the join node will emit a
token allowing the flow to continue along its single output edge. This expression is called a
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
join specification and can use the names of incoming edges and tokens arriving over those
types, it also explains key concepts in a way that appeals to readers already familiar with
edges in the condition. You write a join specification near the join node inside of braces ({}).
UML or object-oriented programming concepts.
Figure 9-24 adds greeting guests to the steps involved in preparing a meal and ensures that
you don't serve the meal until all the guests have arrived.
Topics include:

9.3.4.4.
TheFinal nodes
role and value of UML in projects

The object-oriented paradigm and its relation to the UML


Two types of final nodes are used in activity diagrams: activity final and flow final . Activity
An integrated
final nodes terminateapproach to activity.
the entire UML diagrams
Any tokens that arrive at the activity final node are
destroyed, and any execution in any other node is terminated, without results. You can have
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
multiple activity final nodes in a single activity diagram, but a token hitting any of them
and Deployment Diagrams
terminates the whole activity. You show an activity final node as a black dot with a circle
around it, as shown in Figure 9-4.
Extension Mechanisms
Flow final nodes terminate a path through an activity diagram, but not the entire activity.
The Object Constraint Language (OCL)
Flow final nodes are used when the flow of an activity forks, and one

If you're new to UML, a tutorial with realistic examples has even been included to help you
Figure
quickly familiarize 9-24.
yourself with Join node with a join specification
the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
branch of the fork should be stopped but the others may continue. Show a flow final node as
aUML
circle
2.0with
in aan X in it, from
Nutshell as shown in Figure
O'Reilly 9-22.
feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
9.4. Advanced Activity Modeling
...............................................
Publisher:O'Reilly
Pub Date: June 2005
UML 2.0 introduces
ISBN:several powerful modeling notations for activity diagrams that allow you
0-596-00795-7
to capture complicated
Pages:234behaviors. Much of this new notation is clearly targeted at moving
closer to executable models, with things such as executable regions and exception handling.
While not all the notations described in this section are used in every model, these constructs
are
Table invaluable when applied correctly.
of Contents | Index

SystemActivity
9.4.1. developersPartitions
have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
There are times when it is helpful to indicate who (or what) is responsible for a set of actions
communicate solutions in a consistent, tool-supported language.
in an activity diagram. For example, if you are modeling a business process, you can divide an
activity diagram by the office or employee responsible for a set of actions. If you are modeling
Today, UML has become the standard method for modeling software systems, which means
an application, you may want to split an activity diagram based on which tier handles which
you're probably confronting this rich and expressive language more than ever before. And
action. You split an activity diagram using an activity partition . Show an activity partition with
even though you may not write UML diagrams yourself, you'll still need to interpret
two parallel lines, either horizontal or vertical, called swimlanes , with the name of the
diagrams written by others.
partition in a box at one end. Place all nodes that execute within the partition between the
two lines. Figure 9-25 shows an activity diagram partitioned by business unit.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who
There are must
timesread,
whencreate, and
trying to understand
draw system
a straight artifacts
line through expressed
your activity using UML.
diagram may not be
Furthermore, it's been fully revised to cover version 2.0 of the language.
possible. You can show that a node is part of a partition by writing the partition name in
parentheses above the name of the node. If the activities within
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Figure 9-25. Activity diagram divided into partitions
Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

a partition occur outside the scope of your model, you can label a partition with the keyword
«external». This is frequently used when performing business modeling using activity
www.it-ebooks.info

diagrams. If the behavior being modeled is handled by someone external to your business
process, you can mark the functionality with an external partition. Figure 9-26 shows
examples of naming partitions directly on the node and using external partitions.
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Figure 9-26. Activity
Publisher: diagram with external partitions labeled on the
O'Reilly
Pub Date: June 2005 actions
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

AUML
partition
2.0 in has no effect
a Nutshell on the
from data feels
O'Reilly flow in an pain.
your activity,
It's however depending
been crafted on the entity
for professionals like
represented
you who must by read,
the partition,
create, andthere are implications
understand systemon how actions
artifacts are handled.
expressed using UML.If a partition
represents
Furthermore, a UML
it's classifier,
been fully any method
revised invocation
to cover versionwithin
2.0 ofthat
thepartition
language. must be handled by
an instance of that classifier. If the partition represents an instance, the same restrictions
apply, except that behaviors
This comprehensive new editionmustnot
be only
handled by the
provides specific instancetoreferenced
a quick-reference all UML 2.0bydiagram
the
partition. For example,
types, it also explains keyif you are modeling
concepts in a waya system that has
that appeals a partition
to readers named
already familiar with
LoginService ,
all
UMLactions performed within
or object-oriented that partition
programming should be handled by an instance of your
concepts.
LoginService. However, if you have a partition that represents an instance of a User class
named
TopicsCurrentUser
include: , all actions in that partition must be handled by the CurrentUser instance.
To indicate that a partition represents a class, you use the keyword «class» before the type
name. Though the UML doesn't explicitly state it, it is customary to show that a partition
The role
represents and value
an instance byofunderlining
UML in projects
the type name. Figure 9-27 shows an example of a
partition representing a classifier and a partition representing an instance.
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams


Figure
Class 9-27. Activity
and Object, diagram
Use Case, with
Sequence, partitions
Collaboration, representing
Statechart, classes
Activity, Component,
and Deployment Diagrams and instances

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages.
Partitions canUMLalsomakes it possible
represent for team
attributes members
with specific to collaborate
values. For example,by providing
you can ahave
common
an
activity diagram, which shows that at a certain point in its execution, an attribute hasto
language that applies to a multitude of different systems. Essentially, it enables you a
communicate
specific solutions
value. You can use in aa consistent,
partition totool-supported language.
indicate the attribute and value available to actions
executing within that partition. Indicate that a partition represents an attribute by placing the
Today, UML
keyword has become
«attribute» the standard
, followed by the namemethod for attribute
of the modelinginsoftware systems,
a box above whichboxes.
the value means
you're9-28
Figure probably
is anconfronting
example of this rich anddiagram
an activity expressive language
in which more than
the UserRole ever before.
attribute And to
is specified
even though you may not write UML diagrams yourself,
indicate what level of access a user needs to perform the given actions.you'll still need to interpret
diagrams written by others.
You can combine partitions to show arbitrarily complex constraints on an activity diagram. For
UML 2.0 in
example, youa Nutshell
can havefrom two O'Reilly
partitionsfeels
thatyour pain.the
indicate It'sbusiness
been crafted for professionals
department like
responsible for
you who must
particular read, create,
functionality and two andpartitions
understand systemthe
indicating artifacts expressed
geographic using
location of UML.
the
Furthermore, These
departments. it's been
arefully revised
called to cover version
multidimensional 2.0 ofand
partitions theare
language.
new to UML 2.0. You can
show a multidimensional partition by using both horizontal and vertical intersecting partitions,
This
as comprehensive
shown in Figure 9-29. new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
9.4.2. Exception Handling
Topics include:

UML 2.0
Theactivity diagrams
role and value ofprovide
UML in support
projectsfor modeling exception handling. An exception is
an error condition that occurs during the execution of an activity. An exception is said to be
thrownThe
by object-oriented
the source of the error and
paradigm caught
and when it
its relation toisthe
handled.
UML You can specify that an
action can catch an exception by defining an exception handler . The exception handler defines
An of
the type integrated approach
exception, to UML diagrams
and a behavior to execute when that particular exception is caught.

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Figure 9-28. Simple attribute partition example
Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
Figure 9-29. Activity diagram with multidimensional partitions
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects


You show an exception handler as a regular node with a small square on its boundary. Draw a
lightning-bolt-style edge from
The object-oriented the protected
paradigm node toto
and its relation the small
the UMLsquare. Finally, label the edge
with the type of the exception caught by this handler. Figure 9-30 shows an example
exception handler. approach to UML diagrams
An integrated

If an exception
Class andoccurs
Object,while
Use an action
Case, is executing,
Sequence, the execution
Collaboration, is abandoned
Statechart, Activity,and there is
Component,
no output
and from the action.
Deployment If the action has an exception handler , the handler is executed with
Diagrams
the exception information. When the exception handler executes, its output is available to the
Extension
next action afterMechanisms
the protected node, as though the protected node had finished execution.

If the The Object


action Constraint
doesn't have anLanguage
exception(OCL)
handler, the exception propagates to outer nodes until
it encounters an exception handler. As the exception leaves a node (an action, structured
activity node, or activity) all processing in the node is terminated. It is unspecified what
happens if the exception makes it to the top level of a system without being caught; UML 2.0
If you're
profiles new
can to UML,
define a tutorial
specific withtorealistic
behavior handle examples
this. has even been included to help you
quickly familiarize yourself with the system.

Figure 9-30. Activity diagram with an exception handler


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
9.4.3.
languages.Expansion
UML makesRegions
it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
You can show that an action, or set of actions, executes over a collection of input data by
Today, the
placing UMLactions
has become the standard
in an expansion method
region . For for modeling
example, software
if you had ansystems, which Check
action named means
you're
Out probably
Books confronting
that checked each this rich
of the and expressive
provided books out language moreyou
of a library, than ever
can before.
model the And
even though
checkout bookyou mayusing
action not write UML diagrams
an expansion region,yourself, you'll stillof
with a collection need
booksto interpret
as input.
diagrams written by others.
You show an expansion region using a dashed rectangle, with rounded corners surrounding
the
UMLactions
2.0 in athat shouldfrom
Nutshell execute for each
O'Reilly feelspiece
your of input
pain. It'sdata.
beenPlace a row
crafted for of four input pins
professionals like on
the
youdashed
who mustboundary to represent
read, create, a collectionsystem
and understand of dataartifacts
coming expressed
into the region.
using You
UML.show a line
with an arrow to
Furthermore, it'sthe rowfully
been of input pins,
revised to and
coverthen from2.0
version theof input
the pins to the input pin of the
language.
first internal action. Likewise, you show a row of four output pins on the dashed boundary,
with
This edges coming from
comprehensive newthe last action's
edition not onlyoutput pin atoquick-reference
provides the row of fourto output pins
all UML ondiagram
2.0 the
region.
types, Figure
it also 9-31 shows
explains keytheconcepts
Check Outin a Book expansion
way that appeals region.
to readers already familiar with
UML or object-oriented programming concepts.

Topics include:
Figure 9-31. Activity diagram with an expansion region
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

The use of four input pins simply represents a collection of input data; it doesn't specify how
much data is actually presented to the expansion region. The region executes for each piece
If you're new to UML, a tutorial with realistic examples has even been included to help you
of data in the collection and, assuming there are no errors, offers one piece of output data
quickly familiarize yourself with the system.
from each execution.

You can use the keywords «parallel»,«iterative», or «stream» to indicate if the executions
of the expansion region can occur concurrently (parallel), sequentially (iterative), or
continuously (stream). Place the keyword in the upper left of the expansion region. Figure 9-
32 shows a video encoder that streams the frames through the various stages of encoding as
www.it-ebooks.info

soon as they are available.

UML 2.0 in a Nutshell


Figure 9-32.
ByDan Pilone, Neil Activity
Pitman dialog with a streaming region
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
9.4.4. Looping
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even2.0
UML though youa may
defines not write
construct UML diagrams
to model looping inyourself, you'll still A
activity diagrams. need
looptonode
interpret
has three
diagrams written
subregions: setup,by others.
body, and test. The test subregion may be evaluated before or after the
body subregion. The setup subregion executes only once, when first entering the loop; the
UMLand
test 2.0 body
in a Nutshell
sections from O'Reilly
execute eachfeels
time your pain.
through It's
the been
loop crafted
until for subregion
the test professionals like
evaluates
you
to who
false . must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
The specification gives no suggested notation for loop nodes, however you can improvise one
using activity regions.new
This comprehensive Conceptually,
edition not aonly
loopprovides
node looks like Figure 9-33.
a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include: Figure 9-33. Conceptual view of a loop node

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)


Using activity partitions, you can express this as a single node, as shown in Figure 9-34.

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
Figure 9-34. A sample looping node notation
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
9.4.5. Streaming
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even
An though
action youtomay
is said not write UML
be streaming diagrams
if it can yourself,
produce output you'll
while still
it is need to interpret
processing input. For
diagramsan
example, written
actionby others.
representing a compression algorithm can take audio input data from a
streamed input and send compressed audio along a streamed output.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
youindicate
You who must thatread, create,is and
an action understand
streaming system
its input and artifacts
output by expressed
placing theusing UML. stream in
keyword
Furthermore,
braces ({}) nearit'sthe
been fullycoming
edges revisedintoandcover
outversion 2.0 of Figure
of an action. the language.
9-35 shows an example
audio encoding that is streaming data.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Figure 9-35. Activity diagram with streaming actions
Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly
UML familiarize
provides yourselfnotation
a shorthand with thefor
system.
streaming edges, and input and output pins: use a
solid arrowhead or rectangle. Figure 9-36 shows the same audio encoder, but is drawn using
the streaming shorthand notation.
www.it-ebooks.info

Figure 9-36. Activity diagram with streaming actions using


shorthand notation
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate
The solutions
UML specification in a consistent,
expects tool-supported
that vendors will provide language.
base classes for domain-specific
activities users can employ to model an application-specific problem. You may also mark a set
Today,
of UML
actions as has become
streaming the standard
using method
an expansion for modeling
region. software
See "Expansion systems,
Regions" forwhich
more means
you're probably confronting this rich and expressive language more than ever before. And
information.
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
9.4.6. Interruptible Activity Regions
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
You can mark that a region of your activity diagram can support termination of the tokens
and
Thisprocessing by marking
comprehensive it as an
new edition notinterruptible activity
only provides region . For example,
a quick-reference to all UMLyou
2.0may want
diagram
to make a potentially long-running database query as interruptible so that the user
types, it also explains key concepts in a way that appeals to readers already familiar with can
terminate things if he doesn't
UML or object-oriented want to wait
programming for the results.
concepts.
You indicate a region is interruptible by surrounding the relevant nodes with a dashed
Topics include:
rectangle that has rounded corners. You indicate how the region can be interrupted by
drawing a lightning-bolt-style edge leaving the region and connecting to the node that
assumes
Theexecution. If a token
role and value of UMLleaves the region over this edge, all other processing and
in projects
tokens inside the region are terminated. The token leaving the region is unaffected.
The object-oriented paradigm and its relation to the UML
Typically the source of an interruption is the receipt of a signal from an external entity. You
show receipt of a signal
An integrated as a concave
approach pentagon, with the name of the signal inside. Figure 9-
to UML diagrams
37 shows an example of a long-running database query being interrupted by user input.
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
9.4.7.Extension
Central Buffer Nodes
Mechanisms

UML 2.0Theintroduced a new type


Object Constraint of activity
Language node, called the central buffer node , that provides a
(OCL)
place to specify queuing functionality for data passing between object nodes. A central buffer
node takes inputs from several object node sources and offers them along several object node
outputs. For example, there may be two car-manufacturing plants feeding a car dealer supply
If you're
line. new buffer
A central to UML, a tutorial
node can bewith realistic
placed examples
between has even been
the manufacturing included
plants and to
thehelp you to
dealers
quickly familiarize yourself with the system.
specify prioritization of deliveries or sorting of the manufactured cars. You show a central
buffer node as a rectangle with the keyword «centralBuffer» at the top and the

Figure 9-37. Activity diagram with an interruptible region


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
type of object
construct, andwritten
documentin the center. The
systems. Figure 9-38 Modeling
Unified shows anLanguage
example central
(UML) isbuffer
one ofnode feeding
those
car dealer supply
languages. lines. it possible for team members to collaborate by providing a common
UML makes
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Figure
Today, UML 9-38.the
has become Activity
standarddiagram
method forwith a central
modeling software buffer
systems,node
which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
9.4.8.and
Data Store Diagrams
Deployment Nodes
Extension Mechanisms
Adata store node is a special type of central buffer node that copies all data that passes
The Object Constraint Language (OCL)
through it. For example, you can insert a data store node in your activity diagram to indicate
that all interactions are logged to an external database, or that when an article is submitted
for review, it is automatically stored in a searchable archive.
If you're new to UML, a tutorial with realistic examples has even been included to help you
You show a data store node as a stereotyped version of an object node. Show the node as a
quickly familiarize yourself with the system.
rectangle, and place the keyword «datastore» above the name of the node. Figure 9-39 shows
a data store node.

If the same object passes through a data store node, the specification states that the previous
version of the object will be overwritten.
www.it-ebooks.info

Figure 9-39. Activity diagram with a data store node


UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
You can show transitions from a data store node that have additional information to select a
subset of the data stored in a data store node, similar to a database query. The specification
Today, UML has become the standard method for modeling software systems, which means
doesn't require any particular syntax and suggests showing the selection criteria in a note
you're probably confronting this rich and expressive language more than ever before. And
labeled with the keyword «selection».Figure 9-40 shows an activity diagram that uses a data
even though you may not write UML diagrams yourself, you'll still need to interpret
store node to send welcome packets to new customers.
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Figure 9-40. Activity diagram with a data store selection
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Chapter 10. Interaction Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
A fundamental goal of UML 2.0 is to allow users to capture more than just structural
ISBN:0-596-00795-7
relationships. UML 2.0
Pages:234 is intended to capture processes and flows of events. Interaction
diagrams draw from nearly every other facet of the language to put together a set of
diagrams that capture communications between objects. UML 2.0 has greatly expanded UML
1.x's
Table ofability
Contentsto describe complex flow of control; one of the largest sections of the UML 2.0
| Index
specification is the interaction diagrams section. Because of the expanded functionality, quite
a bit of new terminology has been introduced. We'll cover all the terms in this chapter and try
to give you a feel for what terms are really critical and which are there to formalize the
System developers have used modeling languages for decades to specify, visualize,
specification.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.1. What Are Interactions?
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Interaction diagrams are defined by UML to emphasize the communication between objects,
ISBN:0-596-00795-7
not the data manipulation
Pages:234 associated with that communication. Interaction diagrams focus on
specific messages between objects and how these messages come together to realize
functionality. While composite structures show what objects fit together to fulfill a particular
requirement,
Table of Contents |interaction
Index diagrams show exactly how those objects will realize it.

Interaction diagrams are typically owned by elements in the system. For example, you may
have an interaction
System developers diagram
have used associated
modelingwith a subsystem
languages that shows
for decades how the
to specify, subsystem
visualize,
realizes a service it offers on its public interface. The most common
construct, and document systems. The Unified Modeling Language (UML) is one of those way of associating an
interaction
languages.diagram
UML makeswith itan element
possible foris team
to reference
members thetointeraction
collaboratediagram in a note
by providing attached
a common
to the element.
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
You can show the details of an interaction using several different notations; however
sequence
Today, UMLdiagrams are bythe
has become farstandard
the mostmethod
common. forOther notations
modeling softwareinclude interaction
systems, which means
overviews, communication
you're probably confronting diagrams, timing
this rich and diagrams,
expressive and interaction
language more than tables.
everBecause
before. And
sequence diagrams
even though you mayare not
used most
write UMLfrequently,
diagramseach concept
yourself, is introduced
you'll still need tousing that notation.
interpret
The other notations are
diagrams written by others.described in detail later in the chapter. The basic symbol for an
interaction diagram is a rectangle with the keyword sd and the name of the interaction in a
pentagon
UML 2.0 ininathe upper-left
Nutshell fromcorner.
O'ReillyFigure 10-1 pain.
feels your showsIt'sanbeen
example
craftedsequence diagram. The
for professionals like
various
you who parts
mustofread,
this diagram are understand
create, and explained throughout the chapter.
system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
Figure
types, it also explains 10-1. in
key concepts A asample
way that sequence diagram
appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.2. Interaction Participants
...............................................
Publisher:O'Reilly
Pub Date: June 2005
You show participants in an interaction using a rectangle called a lifeline . The term lifeline
ISBN:0-596-00795-7
illustrates UML'sPages:
bias 234
toward representing interaction diagrams using the sequence diagram
notation. When shown in sequence diagrams, participants have a dashed line dropping down
from a rectangle that shows how long the object is actually in existence. When used in other
interaction diagram
Table of Contents | Index notations, such as communication diagrams, a lifeline is simply a

rectangle. You show the name of the participant in the rectangle using the following notation:

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
object_name [ selector ] : class_name ref decomposition
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
where:
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
object_name
diagrams written by others.
Specifies the name of the instance involved in the interaction.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
selector

Is an optional part
This comprehensive newof the name
edition that provides
not only can identify which particular
a quick-reference toinstance in adiagram
all UML 2.0
types,multivalued element
it also explains key is to be used
concepts in a (for
wayexample, which
that appeals to EventHandler
readers alreadyin an array with
familiar of
UML or ). programming concepts.
object-oriented
EventHandlers

Topics include:
class_name

Is
Thethe name
role and of the of
value type of in
UML this participant.
projects

The object-oriented paradigm and its relation to the UML


decomposition
An integrated approach to UML diagrams
Is an optional part of the name that can point to another interaction diagram that
Class and
shows Object,
details Usethis
of how Case, Sequence,
participant Collaboration,
processes Statechart,
the messages Activity,
it receives Component,
(see
and Deployment Diagrams
"Decomposition").

Extension
UML defines Mechanisms
a reserved participant name, self, that indicates the participant is the classifier
that owns this interaction diagram.
The Object Constraint Language (OCL)
Figure 10-2 shows a trivial interaction diagram with two participants and a message between
them.

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
Figure 10-2. A trivial sequence diagram with two participants
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

You can show the destruction of a participant during an interaction using a stop symbol.
Typically this is preceded by a «destroy» message to the object, though that isn't strictly
System developers
necessary. Place an Xhave used
at the modeling
bottom of thelanguages for decades
lifeline where to specify,
the object ceases visualize,
to exist. Figure 10-
3construct, and document
shows destroying systems.
a helper The itUnified
class after Modeling
has finished its Language
work. (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Figure 10-3. The destruction of a participant
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
To help make your sequence diagram accurately capture the behavior you are trying to
model,Extension Mechanisms
you can introduce local variables. Local variables can hold return values, loop
information, or just data you need for later processing. You show the values of local attributes
ThetoObject
relevant Constraint
the interaction Language
using (OCL)
the same attribute syntax used inside of classifiers (see
Chapter 2). Place their name and values in the upper left of the diagram, or in a note
attached to the diagram. Figure 10-4 shows a more detailed version of the HashMap interaction
using local variables.
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

Figure 10-4. A more complete HashMap interaction using local


variables
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
In addition to
languages. local
UML variables,
makes sequence
it possible diagrams
for team can access
members data in the
to collaborate participants.
by providing See
a common
"Messages" for applies
language that examples.
to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.3. Messages
...............................................
Publisher:O'Reilly
Pub Date: June 2005
The focus of interaction diagrams is on the communication between lifelines. This
ISBN:0-596-00795-7
communication Pages:
can take
234many different forms: method calls, sending a signal, creating an
instance, destroying an object, etc., all of which are collectively called messages . A message
specifies the kind of communication, its sender, and its receiver. For example, a
class instantiating a SpeedingTicket class is represented as a message from an
Table of Contents | Index
PoliceOfficer
instance of PoliceOfficer to the newly created instance of SpeedingTicket.

The mostdevelopers
System common use of used
have messages is to languages
modeling represent method callsto
for decades between
specify,two objects. When
visualize,
messages are used to indicate a method call, you can show the parameters
construct, and document systems. The Unified Modeling Language (UML) is one of thosepassed to the
method in the
languages. message
UML makes syntax. Thefor
it possible parameters shouldtobe
team members one of theby
collaborate following:
providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Attributes of the sending object
Today, UML has become the standard method for modeling software systems, which means
Constants
you're probably confronting this rich and expressive language more than ever before. And
evenSymbolic
though you may(expressions
values not write UML diagrams
showing yourself,
what the legalyou'll stillcan
values need to interpret
be)
diagrams written by others.
Explicit parameters of the enclosing interaction
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read,
Attributes of thecreate, and understand
class owning system
the enclosing artifacts expressed using UML.
interaction
Furthermore, it's been fully revised to cover version 2.0 of the language.
The syntax for a message is:
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
attribute = signal_or_operation_name (arguments ) : return_value
Topics include:
where:
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML


attribute
An integrated approach to UML diagrams
Is an optional part of the syntax that provides a shorthand way of showing that the
return value
Class and from Use
Object, this Case,
message is storedCollaboration,
Sequence, in the specified attribute.Activity,
Statechart, The attribute must
Component,
be
andan attribute ofDiagrams
Deployment the lifeline sending the message, a global attribute of the interaction,
or an attribute of the class owning the interaction.
Extension Mechanisms

The Object Constraint Language (OCL)


signal_or_operation_name

Specifies the name of the operation to invoke or the signal being emitted.

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
arguments

A comma-separated list of arguments to pass to the operation or signal. The arguments


may be values or parameter names. If only argument values are used, arguments are
matched against the operation or signal signature, in order. If you want to skip an
argument, place a dash (-) where the argument would be. Skipped arguments have
www.it-ebooks.info

unknown values. You can explicitly identify a parameter name by following the text
name with a colon (:) and then the value. If you use parameter names, you can omit
arguments not relevant to the interaction. As with a dash, skipped arguments have
unknown UML 2.0 in a Nutshell
values.
ByDan Pilone,Neil Pitman
You can prefix an argument with the keyword out or inout to indicate the argument is
...............................................
used to return a value.
Publisher: O'Reilly If the argument is used as an out argument, a value after the
colon in the
Pubargument
Date: Junespecification
2005 is interpreted to be the return value.
ISBN:0-596-00795-7
Pages:234
return_value

Explicitly
Table of Contents states
| Index what the return value from this message will be.

Message notation varies based on the specific notation you use to show the details of the
interaction. Because have
System developers the most
usedcommon
modelingrepresentation
languages for of interactions
decades is with
to specify, sequence
visualize,
diagrams, you use the notation that's common with such diagrams. See the specifics
construct, and document systems. The Unified Modeling Language (UML) is one of those about
other notations
languages. UMLinmakes
"Alternate Interaction
it possible Notations."
for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
When using sequence diagram notation, you show a message as a solid line pointing from the
communicate solutions in a consistent, tool-supported language.
sender's lifeline to the receiver's lifeline. If the message is an asynchronous message
(meaning the caller doesn't block waiting for the receiver to process the message), you place
Today, UML has become the standard method for modeling software systems, which means
an open arrowhead on the receiver's end of the line. Figure 10-5 shows an example of an
you're probably confronting this rich and expressive language more than ever before. And
asynchronous message.
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
Figure 10-5. An asynchronous message between objects
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
When returning a book to the library, you typically don't wait around for the librarian to return
the book to the shelves.
Extension Instead, you drop the book off at the Circulation Desk and continue
Mechanisms
on your way. The open arrowhead indicates that the caller (AverageJoe) doesn't wait for any
response
Thefrom theConstraint
Object . (OCL)
Language
CirculationDesk

Because asynchronous messages don't require the sender to wait for a message to be
delivered, depending on the transport mechanism, asynchronous messages can arrive out of
If you're
order. Fornew to UML,
example, a network
two tutorial with realistic
packets can examples has routes
take different even been included
to the to help you
same destination,
quickly
with the familiarize yourself
second arriving withthe
before thefirst.
system.
You can show out-of-order reception by having the
first message point to a spot below the reception point of the second message, as shown in
Figure 10-6.
www.it-ebooks.info

Figure 10-6. Asynchronous messages received out of order

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
In this example HostMachine sends two ping packets to DestinationMachine. Because of
UML 2.0 differences
network in a Nutshellin from O'Reilly
the routes feelsthe
taken, your pain. It's
response to been craftedping
the second for professionals
arrives beforelike
the
you who to
response must
theread, create, and understand system artifacts expressed using UML.
first ping.
Furthermore, it's been fully revised to cover version 2.0 of the language.
If a message represents synchronous communication (typically a method call), you place a
filled
This arrow head on the
comprehensive newreceiver's end.
edition not You
only can show
provides return values from
a quick-reference a UML
to all method
2.0 using a
diagram
dashed line
types, it with
also an open
explains keyarrowhead
concepts inpointing
a way back to the caller.
that appeals Figurealready
to readers 10-7 shows a method
familiar with
call
UMLtoororder an item andprogramming
object-oriented a confirmation number sent back as a return value.
concepts.

IfTopics
a message represents object creation, you show a dashed line, with an open arrow pointing
include:
to the newly created object's lifeline. By convention, the message is typically labeled with
some variation of create. If there are no arguments to the message, you can simply label the
messageThewith
role the
andkeyword
value of «create»
UML in projects
, as in Figure 10-3. If there are arguments, you show
them as parameters to a create( ) message. If there is a particular reason to show the
The
creation object-oriented
message paradigmlabel
using a different and (such
its relation to the UML
as a factory method), you should use that.
Figure 10-8 shows an example that creates an instance of the class UserAccount.
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Figure 10-7. A method call and the resulting return value
Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Figure 10-8. Showing object instantiation
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams


Although this technique isn't mentioned in the specification, some modelers prefer to lower
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
the rectangle representing the object to the end of the message line to clearly indicate the
and Deployment Diagrams
object didn't exist before this creation event. The advantage of this notation is that it clearly
showsExtension
when the Mechanisms
object comes into existence; the disadvantage is that you can't skim the top
row and view the participants. Figure 10-9 shows the same diagram but lowers the newly
created object.
The Object Constraint Language (OCL)

UML defines two special types of messages: lost messages and found messages . Lost
messages are messages that are sent but never reach their destination. Found messages are
messages that to
If you're new are received
UML, by an
a tutorial object
with but the
realistic sender has
examples is unknown. For
even been example,
included if youyou
to help want
to modelfamiliarize
quickly an exception-handling
yourself with mechanism,
the system. the sending of the exception is really irrelevant
to the mechanism itself, so you can model that as a found message. Understand that
unknown senders and receivers are relative concepts. The sender or receiver of a message
may be unknown as far as a
www.it-ebooks.info

Figure 10-9. Object instantiation with the object lined up with the
creation message
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though
particular you may
interaction not write UML
is concerned diagrams
, meaning it'syourself, you'll the
really outside stillscope
need to
of interpret
what you are
diagrams written by others.
trying to show, not that the message necessarily vanishes from existence (though that's
permissible too).
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
youshow
You who must
a foundread, create,by
message and understand
starting system from
the message artifacts expressed
a black using than
circle rather UML.the
Furthermore, it's been fully revised to cover version 2.0 of the language.
sender's lifeline. Figure 10-10 shows an example of a found message. The CircuitBreaker
doesn't care where the power surge came from; it must terminate the power in all conditions.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Figure 10-10. An example of a found message
Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new
Similarly, to UML,
you show a tutorial
a lost messagewith
byrealistic examples
terminating has evenarrow
the message been at
included
a blacktocircle
help rather
you
quickly familiarize yourself with the system.
than a receiver's lifeline. Figure 10-11 shows a Workstation sending out a ping message that
for some reason, (network failure) isn't received.

Figure 10-11. An example message being lost


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.4. Execution Occurrences
...............................................
Publisher:O'Reilly
Pub Date: June 2005
You can show an object
ISBN: is involved in executing some type of action (typically a method call)
0-596-00795-7
for a measurable amount
Pages: 234 of time using an execution occurrence . Execution occurrences are
shown as gray or white rectangles on a lifeline. In practice, it is common to hear execution
occurrences called "focus of control," because they indicate that an object is busy (has the
focus
Table of of the system)
Contents | Index for some period of time. Figure 10-12 shows several execution
occurrences in response to messages.

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages.Figure 10-12.
UML makes Several
it possible example
for team membersexecution
to collaborateoccurrences
by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects


While not officially part of the specification, it was a common practice in UML 1.x to show
messages starting from anparadigm
The object-oriented executionand
occurrence on to
its relation a lifeline
the UML to indicate that an object will
send messages to other objects as part of processing a received message. With UML 2.0, it
may be Anmore appropriate
integrated to show
approach a set
to UML of messages as an interaction fragment. Using
diagrams
interaction fragments, an appropriate interaction operator, and a reasonable name, you have
much Class
greater flexibility
and Object, in expressing
Use exactly how
Case, Sequence, a piece of Statechart,
Collaboration, the system Activity,
executesComponent,
and how it
fits into theDeployment
and bigger picture. See "Combined Fragments" for more information on interaction
Diagrams
fragments and the various ways you can organize messages to increase your diagram's
Extension Mechanisms
readability.

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.5. State Invariants
...............................................
Publisher:O'Reilly
Pub Date: June 2005
UML allows you ISBN:
to place labels along a lifeline to convey conditions that must be true for the
0-596-00795-7
remainder of the interaction
Pages: 234 to be valid. These conditions are called state invariants . State
invariants are typically boolean expressions, though they may be full UML states (see Chapter
8). For example, you may have a series of messages that initialize a participant. After the
messages have
Table of Contents completed, the participant must be in a well-known state for the remainder of
| Index

the interaction to complete successfully. You can enforce that by placing a state invariant on
your diagram after the initialization messages.
System developers have used modeling languages for decades to specify, visualize,
You show aand
construct, boolean state invariant
document systems. byThesimply placing
Unified the Language
Modeling conditional(UML)
insideiscurly braces
one of those({})
on the lifeline
languages. UMLof the object
makes you want
it possible fortoteam
check. The invariant
members will be evaluated
to collaborate after
by providing any
a common
messages
language that that come
appliesabove it on the diagram.
to a multitude Figure
of different 10-13Essentially,
systems. shows a basic boolean
it enables youinvariant
to
checking
communicate that an Accountinhas
solutions been authenticated
a consistent, successfully.
tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
Figure
even though10-13.
you mayAnotstate
writeinvariant
UML diagrams ensuring thatstill
yourself, you'll the account
need is in the
to interpret
proper state before continuing
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms
You show an invariant as a UML state by simply drawing the state symbol (rectangle with
Thesides)
rounded Object Constraint
over Language
the appropriate (OCL)
part of the lifeline of the object you want to check. The
actual information that is validated by the state can be expressed using the normal UML state
diagram notation. Figure 10-14 shows the same Account authentication using a UML state.
If you're
UML allowsnew
youtotoUML,
placea the
tutorial
statewith realistic
invariant examples inside
information has even been
a note included
and to help
link it back you
to the
quickly familiarize yourself with the system.
lifeline, though this doesn't tend to be as obvious to the reader as seeing a constraint directly
on the lifeline in the proper sequence. Figure 10-15 shows a state invariant using a note.

Figure 10-14. A state invariant using a real UML state


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
Figure 10-15. A state invariant using a note; authenticated must be
languages. UML makes it possible for team members to collaborate by providing a common
language that appliestrue when setPhoneNumber
to a multitude is called
of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.6. Event Occurrences
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Event occurrences are
ISBN: the smallest building blocks of interaction diagrams; they represent
0-596-00795-7
moments in time when
Pages: 234something happens. Sending and receiving a message are the most
common types of event occurrences, though technically they can be any action associated
with an object. For example, if object1 sends a message to object2, there are two event
occurrences,
Table of Contents |aIndex
message send and a message receive . UML carefully defines interaction
fragments as a set of event occurrences where ordering is significant because they represent
events over time.
System developers have used modeling languages for decades to specify, visualize,
Each type of
construct, interaction
and document diagram notation
systems. (sequence,
The Unified communication,
Modeling Language (UML) etc.)ishas
oneaof
way of
those
expressing
languages.the UML time-sensitive nature
makes it possible forofteam
the event
members occurrences. In a sequence
to collaborate diagram
by providing the
a common
event
languageoccurrences are ordered
that applies along the
to a multitude lifelines systems.
of different and are read from topitto
Essentially, bottom.
enables youFigure
to 10-
16 shows a sequence
communicate diagram
solutions with threetool-supported
in a consistent, of the event occurrences
language. labeled (as mentioned
earlier, any action associated with an object is an event occurrence, but to keep the diagram
from
Today, getting
UML outhas of controlthe
become only three are
standard labeled
method forinmodeling
the figure).
software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Figure 10-16. A sequence diagram with three event occurrences
labeled
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.7. Traces
...............................................
Publisher:O'Reilly
Pub Date: June 2005
UML defines a trace
ISBN:as a sequence of event occurrences. The term trace is used when
0-596-00795-7
discussing sets of event
Pages: 234occurrences and how they may be combined. Interaction diagrams
allow you to combine fragments in such a way that the event occurrences are interleaved.
This combined set of event occurrences is considered a new trace.
Table of Contents | Index
Throughout this chapter we will refer to a sequence of event occurrences as event
occurrences rather than as a trace to try and reduce the number of keywords.
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.8. Combined Fragments
...............................................
Publisher:O'Reilly
Often there are Pub
times when
Date: a 2005
June particular sequence of event occurrences has special constraints
ISBN:
or properties. For 0-596-00795-7
example, you may have a critical region within your interaction where a set
of method calls Pages:
must 234
execute atomically, or a loop that iterates over a collection. UML calls
these smaller pieces interaction fragments .

Interaction
Table of Contentsfragments
| Index by themselves aren't terribly interesting, however UML allows you to
place them in a container called a combined fragment (it's called a combined fragment even if
you have only one interaction fragment in there). Once they are placed in such a container,
UML
Systemallows you to specify
developers additional
have used detail
modeling for each fragment,
languages for decades ortohow several
specify, fragments relate
visualize,
to each other.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
Each combined
language fragment
that applies to is made up of
a multitude of an interaction
different operator
systems. and oneitor
Essentially, more interaction
enables you to
fragments,
communicate which are theininteraction
solutions operands
a consistent, . An interaction
tool-supported operator specifies how the
language.
interaction operands should be interpreted. The various interaction operators are described in
detail
Today, later
UML inhas
thisbecome
chapter.the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
As youthough
even do withyou fullmay
interactions,
not write you
UMLshow a combined
diagrams yourself,fragment as need
you'll still a rectangle, with the
to interpret
interaction operator
diagrams written by others. in a pentagon in the upper left and the interaction operands inside the
rectangle.Figure 10-17 shows a combined fragment representing a critical section of code.
The
UMLcode2.0 inmust be executed
a Nutshell atomically
from O'Reilly because
feels of the
your pain. interaction
It's been craftedoperand critical. This
for professionals likeand
other
you who interaction
must read, operators
create,are described
and understandin "Interaction
system artifactsOperators."
expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
Figure
types, it also explains 10-17.
key An
concepts in aexample combined
way that appeals fragment
to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

Depending on the interaction operator you choose for a combined fragment, you may need to
specify multiple operands. You separate operands using a horizontal dashed line across the
rectangle. Messages aren't permitted to cross between interaction fragments. The order of the
operands is significant for some of the operators, so always read a combined fragment from
www.it-ebooks.info

top to bottom. See Figure 10-18 for an example of multiple operands.

UML 2.0 in a Nutshell


10.8.1. Guard Conditions
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
An interaction fragment
Pub Date: may June have
2005 a guard condition that states when the fragment is valid
(can be executed);
ISBN:0-596-00795-7 condition. The syntax for a guard condition is simply:
as in an "if-then"
Pages:234
[ boolean_expression ]
Table of Contents | Index

You show a guard condition directly above the first event occurrence in the relevant
interaction fragment and on top of the associated lifeline. A guard condition can refer to any
System
local datadevelopers
available to have
thatused modeling
lifeline, languages
or to any for decades
global data availabletoto
specify, visualize,
the overall interaction; it
construct,
can't and
refer to thedocument
local datasystems.
of some The Unified
other Modeling
lifeline. Language
Figure 10-18 shows(UML) is one ofof
an example those
an
languages.interaction
alternative UML makes it possible
operator thatfor team members
models an if-elsetocondition.
collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate
See solutions
the description in a consistent,
for each tool-supported
interaction operator to see language.
when guard conditions are necessary
and how they are used. If you don't place a guard condition before an interaction fragment, it
isToday, UML has
interpreted as abecome the standard
guard condition that method for modeling
always evaluates software
to true . systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
10.8.2. Interaction Operators
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Each interaction
Furthermore, it'soperator defined
been fully in the
revised UML 2.0
to cover specification
version 2.0 of theis language.
explained in detail in the
following sections. Each operator has an associated number of operands and a keyword that is
placed in the pentagon
This comprehensive of edition
new a combined fragment.
not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
10.8.2.1. Alternatives
Topics include:
Alternates are a choice of the behavior that executes based on guard conditions placed before
each operand. The interaction operator is alt. You may include an else guard condition that
The role and value of UML in projects
executes the associated operand when the other conditions are false.Figure 10-18 shows
this. The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Figure
Class and Object, Use10-18. Example
Case, Sequence, alternative
Collaboration, operator
Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though
10.8.2.2. you may not write UML diagrams yourself, you'll still need to interpret
Option
diagrams written by others.

Options
UML 2.0are
in ainteraction fragments
Nutshell from that
O'Reilly executes
feels onlyIt's
your pain. if the guard
been condition
crafted is TRue. Thelike
for professionals
interaction
you who mustoperator
read,iscreate,
opt. Conceptually,
and understandoptions are artifacts
system similar toexpressed
an alt operator with only one
using UML.
operand. Figure 10-19 shows an option operator.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
10.8.2.3. Break
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Abreak indicates that the associated interaction fragment operand should execute and then
Topics include:
terminate the enclosing interaction. The interaction operator is break. A break is similar to the
following code block:
The role and value of UML in projects
if (guardCondition) { ... ; return; }
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams


Figure
Class and Object, 10-19.
Use Case, Example
Sequence, optionStatechart,
Collaboration, operator Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate
Figure solutions
10-20 shows in a operator.
a break consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write
Figure UML diagrams
10-20. Exampleyourself,
breakyou'lloperator
still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms
10.8.2.4. Parallel
The Object Constraint Language (OCL)

Parallel indicates that the associated interaction fragments may be merged and executed in
parallel. The interaction operator is par. UML specifies that the actual interleaving of the event
If you're new to UML, a tutorial with realistic examples has even been included to help you
occurrences of the operands must be done in such a way that the ordering in the original
quickly familiarize yourself with the system.
operand is maintained. For example, if the first operand consists of:

Step1
Step2
Step3
www.it-ebooks.info

and the second consists of:


UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
StepA
...............................................
StepB
Publisher:O'Reilly
StepC Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
they can be merged into:

Table of Contents | Index


Step1
StepA
StepB
System developers have used modeling languages for decades to specify, visualize,
Step2
construct,
StepC and document systems. The Unified Modeling Language (UML) is one of those
languages.
Step3 UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
but not into:
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
evenStep1
though you may not write UML diagrams yourself, you'll still need to interpret
StepBwritten by others.
diagrams
Step2
UMLStepA
2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you Step3
who must read, create, and understand system artifacts expressed using UML.
StepC
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
because also and
types, itstepA explains would
stepBkey be executed
concepts in a wayout of appeals
that order. Figure 10-21already
to readers shows an example
familiar withof
the
UMLparallel operator to model
or object-oriented a desktop
programming login sequence.
concepts.

Topics include:

Figure 10-21. Example parallel operator


The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
Ifeven
you though
need toyou maythat
convey not write UML diagrams
a particular yourself, you'll
event occurrence still need
must come to interpret
before another event
diagrams written by others.
occurrence, UML has an explicit notation called a general ordering. You can show a general
ordering anywhere in an interaction diagram, but it must connect two event occurrences. You
UML 2.0
simply in aaNutshell
draw from
dotted line O'Reillythe
between feels
twoyour pain.
event It's been crafted
occurrences, with a for professionals
solid arrow in thelike
middle
you
of thewho
linemust read,
pointing create,
toward and
the understand
occurrence thatsystem artifactssecond.
must happen expressed For using UML.if you don't
example,
Furthermore,
want the login it's been
splash fully revised
screen to10-21
in Figure cover toversion 2.0 ofuntil
be hidden the all
language.
the applications are started,
you can indicate that the startUserLoginApps( ) call must occur before the
This comprehensive new)edition
hideLoginSplashScreen( not only
call. Figure 10-22provides
showsahow
quick-reference to allordering
to use a general UML 2.0todiagram
indicate
types,
that theitapplication
also explains key concepts
startup in a way
must complete that appeals to readers already familiar with
first.
UML or object-oriented programming concepts.

Topics include:
Figure 10-22. Example general ordering
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams Weak
10.8.2.5. writtensequencing
by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who
Weak must read,
sequencing create,that
indicates andthe
understand system artifacts
event occurrences in eachexpressed using
operand can be UML.
interleaved
Furthermore, it's been fully revised
according to the following rules: to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented
1. The ordering of theprogramming concepts.
event occurrences within each operand is maintained. For example,
if the first operand has <step1, step2, step3> and the second operand is <stepA,
Topics include:
stepB, stepC>, they may be interleaved to <step1, stepA, step2, stepB, step3, stepC>
because the order is maintained, but not to <step1, step3, stepA, step2, stepB,
stepC> because the ordering of the event occurrences in the first operand is changed.
The role and value of UML in projects
2. If event occurrences in different operands occur on different lifelines, they can be
The object-oriented
interleaved paradigm and its relation to the UML
in any order.

3. IfAn integrated
event approach
occurrences to UML diagrams
in different operands occur on the same lifeline, they can be
interleaved only in such a way that the event occurrences of the first operand execute
Class and
before Object, Use Case,
the occurrences of the Sequence, Collaboration, Statechart, Activity, Component,
second operand.
and Deployment Diagrams
The interaction operator is seq. For Figure 10-22, a weak sequencing wouldn't change the way
Extension
the calls Mechanisms
are interleaved because the first operand has calls only to DesktopService and the
second operand has calls only to the ApplicationService. However, if the sequence is
The Object Constraint Language (OCL)
changed so that the second operand includes a call to the DesktopService, it isn't allowed to
execute until all the calls to DesktopService in the first operand are complete (Rule #3).
Figure 10-23 shows this new sequence diagram.
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

Figure 10-23. Example of a weak sequencing operator


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams Strict
10.8.2.6. writtensequencing
by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who
Strict must read,
sequencing create,
indicates andthe
that understand system
ordering of artifacts
the event expressed
occurrences using UML.across
is significant
Furthermore, it's been fully revised to cover version 2.0 of the language.
lifelines, not just within the same lifeline (as with weak sequencing). The operands of a strict
sequence must be executed in order, from top to bottom. The interaction operator is strict.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
10.8.2.7. Negative
Topics include:
Negative indicates a set of event occurrences that are considered invalid, meaning the
interaction can never execute this particular path. The interaction operator is neg. This
The operator
particular role and value of UML
is rarely usedin projects
but can convey that the particular sequence isn't permitted.
Figure 10-24 shows an example of an invalid call to a Graphics2D object. In this diagram, a
The indicates
UML note object-oriented paradigm
to the reader whyand
theits relation sequence
particular to the UMLis invalid.

An integrated approach to UML diagrams


10.8.2.8.
ClassCritical region
and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Acritical region indicates that the given event occurrences must be treated as an atomic
block. Extension Mechanisms
The interaction operator is critical. Critical regions are typically used inside other
interaction fragments (such as a parallel fragment) to ensure that a group of event
The Object
occurrences can't Constraint Language (OCL)
be separated.

Figure 10-25 shows an example rendering engine loop that checks to see if map data is
available for drawing. Because loading map data may be an expensive operation, we'll allow
If you're
the loadingnew to UML,
to be a tutorial
executed with realistic
in parallel with theexamples
rendering.has even been
However, included to
compressed maphelp you
data
quickly familiarize yourself with the system.
can't be rendered, so the loading and decompression must occur as an atomic operation.

Figure 10-24. Example of a negative operator


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Figure 10-25. Example of a critical region operator
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
BecauseFigure 10-25 needs to represent a continuously running process (the rendering
loop), Extension
it's better Mechanisms
to model the looping conditions with the loop operator shown later in this
chapter (see "Loop").
The Object Constraint Language (OCL)

10.8.2.9. Ignore/consider
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
Ignore specifies a set of messages that aren't shown on the interaction fragment and can be
safely ignored. This typically implies that the ignored messages are irrelevant for the purpose
of the diagram; however, they may still occur during actual execution. The interaction
operator is ignore, and the syntax is:
www.it-ebooks.info

ignore { messagename ,messagename ,... }

UML 2.0 in a Nutshell


Figure 10-26 shows an example of the ignore operator that models a simple mail
ByDan Pilone,
transmission protocol. Neil Pitman
In this sequence, ping and status messages are explicitly ignored. This
means they can...............................................
occur anywhere during this sequence and should be handled by the system,
Publisher:
but are irrelevant to theO'Reilly
flow of execution we're trying to model.
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Figure 10-26. Example of an ignore operator


Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented
Consider programming
specifies a set of concepts.
messages that are explicitly relevant to the diagram, so you can
safely ignore any other message. The interaction operator is consider, and the syntax is:
Topics include:

consider { messagename ,messagename ,... }


The role and value of UML in projects

FigureThe object-oriented
10-27 paradigm
shows the same and its relation
mail transmission to the as
sequence UMLthat shown in Figure 10-26 but
explicitly considers authenticateUser,sendEnvelope,sendBody,disconnect,shutdown, and
An integrated approach to UML diagrams
reset. Because shutdown and reset aren't shown on the sequence diagram, it's invalid for
either message to occur during execution.
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

10.8.2.10. Assertion
Extension Mechanisms

The Object Constraint Language (OCL)


Anassertion indicates that the contained event occurrences are the only valid execution path.
The interaction operator is assert. Assertions are typically combined with some kind of state
invariant to enforce a state of a system.
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly10-28
Figure familiarize
showsyourself with diagram
a sequence the system.
in which the user requests that maps be redrawn.
TheRenderingEngine instructs the DrawingSurface to remove all the existing textures, and the
assertion guarantees there are no textures left.

10.8.2.11. Loop
www.it-ebooks.info

Aloop indicates that the contained event occurrences are to be executed some number of
UML 2.0 in
times. The interaction a Nutshellis loop. The notation for a loop includes a minimum and
operator
maximum number ByDan
of Pilone,
timesNeil
a Pitman
loop should execute. You
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:
Figure 0-596-00795-7
10-27. Example of a consider operator
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:
Figure 10-28. Example of an assertion operator
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
may also use a guard condition that is evaluated each time through the loop to terminate
execution. The syntax for the operator is:

loop (min,max)
www.it-ebooks.info

where both min and max are optional. If max is excluded, max equals min.max may be an
UML 2.0 inan
asterisk (*) to indicate a Nutshell
infinite loop (or at least while the guard condition evaluates to
ByDan
true). If both min andPilone,
max Neil
arePitman
excluded, min equals 0, and max equals infinity; in this case
you likely want ...............................................
to have a guard condition to prevent the loop from executing indefinitely.
Publisher:O'Reilly
Figure 10-29 shows the rendering
Pub Date: June 2005 loop modeled in Figure 10-25. In this sequence diagram,
ISBN:0-596-00795-7
the looping is explicitly shown with a guard condition that will terminate the loop when the
user has set thePages:
quit 234
flag to be TRue. There is also an inner loop that instructs the MapLoader
to execute while there are maps to load.

Table of Contents | Index

Figure 10-29. Example of a loop operator


System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.9. Interaction Occurrences
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Aninteraction occurrence is shorthand for copying one interaction into another, larger interaction. For
ISBN:0-596-00795-7
example, you can create
Pages: 234 an interaction that simply shows user authentication and then reference it (create
an interaction occurrence) in larger, more complete interaction diagrams.

The syntax
Table of Contentsfor an interaction occurrence is a combined fragment rectangle with the interaction operator ref
| Index
Place the name of the referenced interaction in the rectangle. UML allows parameters to be passed to
referenced interactions using the following syntax:
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes
attribute_name = itcollaboration_occurrence
possible for team members.interaction_name
to collaborate by providing a common
( arguments ) : return_value
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
where:
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
attribute_name

UML 2.0 in aoptional


Is an Nutshellpart
from O'Reilly
of the feels
syntax thatyour pain. It's
specifies what been crafted
attribute forreturn
the professionals like be applied to.
value should
you who
The must read,
attribute create,
must and
be an understand
attribute of a system artifacts
lifeline in expressed
the larger using UML.
interaction.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
collaboration_occurrence
types, it also explains key concepts in a way that appeals to readers already familiar with
Is object-oriented
UML or an optional scoping of the referenced
programming interaction if it is part of a larger collaboration.
concepts.

Topics include:
interaction_name

Is
Thethe name
role and of the of
value interaction to copy.
UML in projects

The object-oriented paradigm and its relation to the UML


arguments
An integrated approach to UML diagrams
Is a comma-separated list of arguments to pass to the referenced interaction. The arguments may be
values or parameter
Class and Object, Usenames. If only argument
Case, Sequence, values are
Collaboration, used, arguments
Statechart, Activity, are matched against the
Component,
interaction parameters,
and Deployment Diagramsin order. If you want to skip an argument, you place a dash (-) where the
argument would be. Skipped arguments have unknown values. You may explicitly identify a paramete
Extension
name Mechanisms
by following its text name with a colon (:) and then the value. If you use parameter names, you
may omit arguments not relevant to the interaction. As with a dash, skipped arguments have unknow
The Object Constraint Language (OCL)
values.

You may prefix an argument with the keyword out or inout to indicate that the argument is used to
return a value. If the argument is used as an out argument, a value after the colon in the argument
If you're new to UML,
specification a tutorial with
is interpreted to berealistic examples
the return value. has even been included to help you
quickly familiarize yourself with the system.

return_value

Is an optional part of the reference that, if present, indicates the value returned by the copied
interaction.
www.it-ebooks.info

Figure 10-30 shows a simple mail transmission sequence diagram that uses an interaction occurrence to
refer to another sequence diagram that illustrates user authentication. In this example, the return value
from the interaction occurrence is ignored, so it isn't assigned to any variable.
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Figure 10-30. Example
Pub Date: June 2005
of an interaction occurrence
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.10. Decomposition
...............................................
Publisher:O'Reilly
Pub Date: June 2005
A participant in ISBN:
an interaction diagram may be a complex element in and of itself. UML allows
0-596-00795-7
you to link interaction diagrams by creating a part decomposition reference from a participant
Pages:234
to a separate diagram. For example, you may have a Purchase Item interaction diagram that
has a participant execute a credit card authorization. The actual details of the authorization
process are probably
Table of Contents | Index not of interest to the readers of your Purchase Item diagram; however,
they are vitally important to the developers responsible for the authorization subsystem. To
help reduce clutter on your diagrams, you can create a separate diagram showing how the
authorization
System developers subsystem havevalidates credit cards
used modeling and place
languages a decomposition
for decades to specify,reference
visualize,to that on
the
construct,
Purchaseand Item diagram.systems. The Unified Modeling Language (UML) is one of those
document
languages. UML makes it possible for team members to collaborate by providing a common
To create athat
language partapplies
decomposition reference,
to a multitude simply systems.
of different place refEssentially, it enables you toafter
interaction_diagram_name
the instance name
communicate in theinhead
solutions of your lifeline.
a consistent, Figure 10-31
tool-supported shows how the Purchase Item and
language.
authorization diagrams can be modeled.
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written Figure 10-31. Example of a decomposition diagram
by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

Messages that come into or out of the decomposed lifeline are treated as gates that must be
matched by corresponding gates on the decomposition. A gate represents a point where a
message crosses the boundary between the immediate interaction fragment and the outside
UML 2.0 in a Nutshell
environment. A gate has no symbol of its own; you simply show a message pointing to the
ByDan Pilone,Neil Pitman
edge of the frame of an interaction fragment. The entire purpose of a gate is to show an
object that sent...............................................
a message connecting to the object that received the message.
Publisher:O'Reilly
Pub Date:
By default, a gate's nameJune 2005 on the direction (in or out) and the message in question.
is based
ISBN:0-596-00795-7
For example, a gate showing a message named verifyPayment leaving an interaction
Pages:234
fragment is named out_verifyPayment. However, you may explicitly name gates if that adds
readability to your diagram.
Table of Contents | Index
If the messages shown in the decomposition are part of a combined fragment in the larger
interaction diagram, the decomposition must inherit the same interaction operand. UML
defines this as extra-global . For example, if the larger interaction is part of an assert
System developers
interaction operand, have used
and the modeling
state invariantlanguages for decades
is declared to specify,
on the lifeline visualize,
you want to decompose,
construct,
that and document
state invariant (and itssystems. Themust
assertion) Unified Modeling
apply to yourLanguage (UML) You
decomposition. is one ofshow
can those
languages. UML
extra-global makesfragments
combined it possibleby fordrawing
team members to collaborate
the combined fragmentby onproviding a common
your decomposition,
language
but makingthat theapplies
combinedto afragment
multituderectangle
of different systems.
larger Essentially,
than your it enables
decomposition you to
rectangle.
communicate solutions in a consistent, tool-supported language.
Figure 10-32 shows an assertion decomposition of the rendering engine example used earlier
in this chapter.
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagramsFigurewritten by others.
10-32. Example of a decomposition with extra-global
fragments
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects


The UML specification recommends that you name your decomposition diagrams using an
The object-oriented
abbreviation for the objectparadigm and its relation
being decomposed, to the
followed by UML
an underscore (_), followed by the
name of the interaction. For example, if you are modeling a credit card authorization system
An integrated approach to UML diagrams
and want to show how a card is validated, you can name your decomposition
CCAS_Validation .
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
You can also show decompositions inline by showing parts of the decomposed element
attached as smaller
Extension rectangles to the bottom of the head of the lifeline. Each part gets its own
Mechanisms
lifeline. This can be useful to show inner classes receiving or sending messages. For example,
it is common practice
The Object in JavaLanguage
Constraint to declare(OCL)
an inner anonymous class to handle GUI events. If
you felt this was relevant to your interaction you can show this level of detail on the main
interaction diagram. However, inline notation is relatively uncommon because decompositions
are typically used to show a complex, subinteraction that would clutter the top-level diagram.
If you're new to UML, a tutorial with realistic examples has even been included to help you
Figure
quickly10-33 showsyourself
familiarize an example
with inline part decomposition where MainWindow has two inner
the system.
classes: an anonymous WindowListener and an instance of an EventHandler named
mEventHldr.
www.it-ebooks.info

Figure 10-33. Example of an inline decomposition

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.11. Continuations
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Typically used with
ISBN:interaction references, continuations allow you to define different
0-596-00795-7
branches of an alternative
Pages:234 interaction outside of the alternative itself. Continuations are
conceptually similar to named blocks of functionality.

The notation
Table of Contents |for continuations can be particularly confusing. You show a continuation using
Index
the symbol for states, a rectangle with rounded sides; however, the position of the rectangle
changes the meaning of the diagram. You place a continuation at the beginning of an
interaction to define have
System developers the behavior for thatlanguages
used modeling continuation. You use to
for decades a continuation by showing the
specify, visualize,
rectangle at the end of an interaction. Finally, continuations with
construct, and document systems. The Unified Modeling Language (UML) is one of the same name must cover
those
the same lifelines
languages. (and only
UML makes those lifelines).
it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
Figure 10-34 shows
communicate the in
solutions first of three sequence
a consistent, diagrams
tool-supported demonstrating a continuation; this
language.
one displays the details of a Login sequence. After the password is retrieved from the
database,
Today, UML an has
alternative
becomeinteraction
the standard is entered.
method forIf the passwords
modeling match,
software variouswhich
systems, flags are set
means
on the UserCredentials
you're probably confronting . Afterthis
setting the flags,
rich and there language
expressive is a continuation
more thannamed
everLogin
before. And ,
success
in which
even usersyou
though of this
maysequence
not writediagram can plug
UML diagrams in theiryou'll
yourself, own functionality. If the passwords
still need to interpret
don't match, the else
diagrams written by others. part of the alternative interaction executes, which leads to the Login
failed continuation. Notice the continuation symbols are at the end of each interaction
operand,
UML 2.0 in indicating
a Nutshell thisfrom
diagram uses
O'Reilly an externally
feels your pain. defined
It's beencontinuation.
crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

Figure 10-34.
This comprehensive Using
new edition a only
not continuation in a sequence
provides a quick-reference diagram
to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:
Figure 10-35 shows the second diagram, a sequence diagram that makes use of the Login
sequence and defines continuations for Login success and Login failed. If the correct
The role and value of UML in projects
password was entered, the Login success continuation is executed; otherwise, the Login
failed continuation is run. Notice in this diagram that the continuation symbols are at the top
The object-oriented paradigm and its relation to the UML
of the interaction, indicating that this diagram defines the behavior to execute.
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
Figure
and 10-35.
Deployment Defining continuations in a sequence diagram
Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who
Taken must read,
together, thesecreate, and understand
two diagrams systemtoartifacts
are equivalent expressed using UML.
Figure 10-36.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.12. Sequence Timing
...............................................
Publisher:O'Reilly
Pub Date: June 2005
UML provides a ISBN:
notation to capture a specific time associated with an event occurrence. You
0-596-00795-7
simply place a small
Pages:horizontal
234 line next to an event occurrence to capture the time of the
occurrence, or place a timing constraint on it. Typically, you use a variable to capture a
specific instance in time and then represent constraints as offsets from that time. Constraints
are
Table expressed like state invariants and placed next to the event occurrence.
of Contents | Index

For example, if you want to express that a credit card authorization system must return
approval or denial within
System developers have three seconds oflanguages
used modeling placing the
forrequest,
decadesyou can place
to specify, time constraints
visualize,
on the event occurrence, as shown in Figure 10-37.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
10.13. Alternate Interaction Notations
...............................................
Publisher:O'Reilly
UML provides several notations
Pub Date: for capturing interactions. The first part of this chapter used
June 2005
ISBN:0-596-00795-7
the sequence diagram notation. The remainder of this chapter describes the other notations
Pages:
available and when 234may be more appropriate than sequence notation.
they

Table of Contents | Index

Figure 10-36. The final sequence, with all continuations expanded


System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

10.13.1. Communication
If you're new Diagrams
to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

Communication diagrams allow you to focus on the elements involved in interactions rather
than the detailed sequencing and flow control allowed in sequence diagrams. Most UML tools
can automatically convert from a sequence diagram to a communication diagram; however,
because communication diagrams aren't as expressive,.some information may be lost.
www.it-ebooks.info

When you're modeling with communication diagrams, objects are represented by a rectangle,
and connections between objects are shown as a solid line. Each message has a sequence
number and a small arrow
UML 2.0 indicating the direction of the message along a given connection.
in a Nutshell
Communication By diagrams can't show message overtaking (see Figure 10-6 earlier in the
Dan Pilone,Neil Pitman
chapter) or interaction fragments.
...............................................
Publisher:O'Reilly
Figure 10-38 shows a simple sequence diagram and the equivalent communication diagram.
Pub Date: June 2005
ISBN:0-596-00795-7
The syntax for a message name is:
Pages:234

Table of Contents | Index


sequence_number: name [ recurrence_or_guard ]

System developers have used modeling languages for decades to specify, visualize,
construct,
Figure and document
10-37. systems. The
A sequence Unified Modeling
diagram Language
with hard (UML)requirements
timing is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

Figure 10-38.
An integrated Example
approach of diagrams
to UML a sequence diagram and its equivalent
communication diagram
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

where:
www.it-ebooks.info

sequence_number

Is the index
UMLof2.0thein amessage
Nutshell with 1 being the index of the first message in the diagram.
You show Bynested message
Dan Pilone, Neil Pitman calls by appending the original message number with a
decimal and then starting a new sequence. For example, if the listen( ) call in Figure
...............................................
10-38 makes a nested
Publisher: O'Reillycall to startTimer( ), number startTimer( ) as 3.1.
Pub Date: June 2005
You can show
ISBN:concurrent messages using letters in the sequencing. For example, if the
0-596-00795-7
ListentingPort instance
Pages:234 can support multiple parallel listening calls, the MainWindow
instance can call the listen( ) call twice, labeling the first call as 3a and the second as
3b. Both calls can execute concurrently.
Table of Contents | Index

name
System developers have used modeling languages for decades to specify, visualize,
Is the name of the message being sent (or method call).
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
recurrence_or_guard
communicate solutions in a consistent, tool-supported language.
Is an optional part of the syntax that allows you to specify a boolean condition that
Today, UMLbe
must has become
true for thethe standard
message to method
occur, orfor
a modeling software
range of integer systems,
values which means
for looping. Guard
you'reconditions
probably are
confronting this rich
represented and expressive
as normal language more
boolean expressions; for than ever before. And
example,
even [password.Valid
though you may not write .UML
== true] UMLdiagrams yourself,
doesn't provide you'll still
a syntax for need to interpret
specifying looping
diagrams written by others.
constraints but does say they must begin with an asterisk (*). For example, you can
represent a loop that executes from 0 to 10 as *[i = 0 .. 10].
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
10.13.2. Interaction Overview Diagrams
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
Interaction overview diagrams
UML or object-oriented represent
programming interactions using a simplification of the activity
concepts.
diagram notation (see Chapter 9). Interaction overview diagrams can help you visualize the
overall
Topics flow of control through a diagram; however, they don't show detailed message
include:
information.

You can embed


The interactions
role and or interaction
value of UML in projectsoccurrences inside an interaction overview diagram
if it is helpful to see message details for a subset of the overall interaction.
The object-oriented paradigm and its relation to the UML
Several sequence diagram concepts are supported in interaction overview diagrams:
An integrated approach to UML diagrams

Show
Class combined
and Object,fragments using
Use Case, a decision
Sequence, node and merge
Collaboration, node . Activity, Component,
Statechart,
and Deployment Diagrams
Show parallel interactions by using a fork node and join node .
Extension Mechanisms
Show loops as cycles in the activity diagram.
The Object Constraint Language (OCL)
Show names of the lifelines involved in an interaction using the keyword lifelines after
the name of the interaction overview diagram, followed by a comma-delimited list of
each lifeline's name (including any colon separators that may or may not be part of the
If you're new to UML, a tutorial with realistic examples has even been included to help you
name).
quickly familiarize yourself with the system.
Figure 10-39 is an interaction overview diagram showing a subset of the interaction shown in
Figure 10-36.

10.13.3. Timing Diagrams


www.it-ebooks.info

Timing diagrams are a special representation of interactions that focus on the specific timings
UML
of messages sent 2.0 in a Nutshell
between objects. You can use timing diagrams to show detailed time
constraints on messages
ByDan Pilone, or toPitman
Neil show when changes occur within lifelines with respect to time.
Timing diagrams...............................................
are most often used with real-time or embedded systems.
Publisher:O'Reilly
Unlike sequencePubdiagrams, timing
Date: June 2005 diagrams are read left to right rather than top to bottom.
You show a lifeline name
ISBN: along the left edge of the diagram. The various states of the lifeline
0-596-00795-7
are then listed, Pages:
followed
234by a graphical representation of the transitions between these states.
Figure 10-40 shows an example of a timing diagram in which the MailServer object
progresses through several states.
Table of Contents | Index
InFigure 10-40, the MailServer starts in the Idle state until the Login event occurs. The
Login event causes the MailServer to transition to Authenticated. When the sendMail event
occurs,
Systemthe MailServer
developers transitions
have to transmitting
used modeling languagesand remains there
for decades until disconnected.
to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
Figure
communicate 10-39.
solutions in Example
a consistent,of an interaction
tool-supported overview diagram
language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

Figure 10-40. Simple timing diagram


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

When
Systemreading the diagram
developers left to
have used right, you
modeling can usefor
languages thedecades
length of
tothe timeline
specify, to indicate how
visualize,
long
construct, and document systems. The Unified Modeling Language (UML) is oneyou
the object remains in a particular state. To associate time measurements, show tick
of those
marks alongUML
languages. the bottom
makes itpart of thefor
possible frame,
teamas shown intoFigure
members 10-41.by providing a common
collaborate
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML hasFigure


become 10-41. Timing
the standard methoddiagram with
for modeling tick systems,
software marks which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

FigureClass
10-41and
shows thatUse
Object, the Case, event is received
Login Sequence, three time
Collaboration, units after
Statechart, the start
Activity, of the
Component,
sequence. To show relative
and Deployment times, you can mark a specific instance in time using a variable
Diagrams
name.Figure 10-41 marks the time the sendMail event is received as time t. You can use
Extension
relative Mechanisms
time marks in constraints to indicate that a message must be received within a
specified amount of time. Figure 10-42 shows the Disconnect message must be received
within The Object
10 time Constraint
units Language
of the sendMail (OCL)
event.

You can show multiple objects involved in a timing diagram by stacking the lifelines. You show
messages between objects using an arrow from one timeline to another. The start and end of
If you're
the arrow new to UML,to
correspond a when
tutorial with
the realistic
message is examples has even This
sent and received. beennotation
includedshows
to help you
the
quickly familiarize yourself with the system.
triggers that cause a transition; however it

Figure 10-42. Timing diagram with time constraints


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate
very solutions
quickly becomes in a consistent,
unreadable if a lottool-supported language.
of messages are exchanged. Figure 10-43 shows the
MailServer talking with a client, Desktop.
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams
Figure written
10-43. by Timing
others. diagram with multiple lifelines and messages

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

UML provides a variation on the timeline notation that simplifies diagrams by showing state
names between two horizontal lines that cross when the state changes. This notation makes it
www.it-ebooks.info

much easier to show multiple objects along a single timeline, but it doesn't show the
messages that trigger transitions. Figure 10-44 shows the MailServer and Client lifelines
progressing through state transitions.
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Figure 10-44.
Publisher:Timing
O'Reilly diagram using a simpler timeline notation
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Chapter 11. Tagged Values, Stereotypes,
...............................................
Publisher:O'Reilly

and UML Profiles Pub Date: June 2005


ISBN:0-596-00795-7
Pages:234
The UML described in the previous chapters allows you to understand any UML model. You
can understand the analysis of a billing system, the implementation model of a CORBA
system, a gaming
Table of Contents | Index system in C++, or an EJB e-commerce system.

Practitioners rarely work on such diverse systems at one time, however, and no UML model
will represent
System more than
developers haveoneusedtype of application.
modeling languagesMore
for commonly,
decades to a practitioner
specify, (that's you)
visualize,
works with colleagues on one system or a series of closely related systems
construct, and document systems. The Unified Modeling Language (UML) is one of those exclusively. For
example,
languages.you might
UML design
makes a seriesfor
it possible of team
gaming systems,
members toor a series ofby.Net
collaborate systems.
providing And, as
a common
you might that
language expect, the specific
applies concerns
to a multitude of of a gaming
different systemEssentially,
systems. differ profoundly from
it enables those
you to of a
.Net system. solutions in a consistent, tool-supported language.
communicate

UML allows
Today, UMLtoolmakers
has become to the
create a dialect
standard calledfor
method a profile , tailored
modeling softwareto asystems,
specific niche.
which Within
means a
niche,
you'reaprobably
stereotype gives specific
confronting rolesand
this rich to elements,
expressiveand records
language additional
more context-specific
than ever before. And
information
even though inyou
tagged
mayvalues . Profiles
not write also include
UML diagrams constraints
yourself, you'llthat
still ensure
need tointegrity
interpretof use.
diagrams written by others.
A practitioner familiar with a profile will immediately grasp the meaning of a model developed
using that profile, because of the unique stereotypes. Moreover, the model contains deeper
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
meaning, because of the tagged values, and the model has a higher degree of integrity,
you who must read, create, and understand system artifacts expressed using UML.
because of the constraints. This gives a distinct advantage to practitioners and tools working
Furthermore, it's been fully revised to cover version 2.0 of the language.
in the niche. People and tools unfamiliar with the profile will process it only at a formal level,
without any special understanding.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
Profiles are the standard mechanism to extend UML. The profile mechanism exists within UML
UML or object-oriented programming concepts.
so models applying a profile are fully UML compatible. This contrasts sharply with
implementors' extensions in loosely specified languages such as C++, in which the
Topics include:
specification allows inline assembler and #pragma statements, making it virtually impossible
to port C++ programs between processors or between different compilers. A UML model
applying
Thea role
profile
andisvalue
UML,of
and any
UML in UML tool can process it.
projects
Although
Theaobject-oriented
plethora of dialects can fragment
paradigm the universality
and its relation of UML, a dialect makes UML
to the UML
more useful. And isn't that what it's all about?
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
11.1. Modeling and UML in Context
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Throughout the ISBN:
evolution of modeling, practitioners, implementors, academics, and other
0-596-00795-7
interested parties have
Pages: 234found new and innovative ways to model, and new disciplines to
model. It soon became apparent that the generality of the canonical UML was not concise
enough for practitioners working full time in a particular language, technology, or platform,
such
Table ofas ANSII| Index
Contents C++, Struts, or .Net. Moreover, practitioners in similar disciplines, such as
process engineering, with different fundamental structures and constraints found UML
interesting but not quite appropriate. They can better benefit from a UML-like language other
than
System UMLdevelopers
itself. Figure
have11-1 illustrates
used modelingthis situation,for
languages where the Meta-Object
decades Facility (MOF),
to specify, visualize,
explained
construct,more fully later in
and document the chapter,
systems. comprises
The Unified all UML
Modeling models (UML)
Language as wellisas UML-like
one of those
models.
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Figure
Today, UML 11-1.the
has become The universe
standard methodoffor
valid models
modeling in systems,
software UML familywhich means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms
The authors of UML could have specialized UML for common programming languages (such as
The Object Constraint Language (OCL)
C++, C#, Java, and Visual Basic) and platforms (such as embedded systems, real-time
operating systems (RTOS), EJB, and .NET). This would have created an unworkable modeling
language, as each programming language or dialect polluted the specification with conflicting
definitions. It would
If you're new still
to UML, a require
tutorial an extension
with mechanism
realistic examples because
has someincluded
even been "uncommon"
to help you
language (such as Smalltalk)
quickly familiarize or new
yourself with platform/technique or version (like EJB 3.0) would
the system.
always be missing from the formal specification.

On the other hand, the authors could have stretched UML to greater abstraction to embrace
uses other than software development, such as business modeling, modeling the process of
software development itself, or modeling systems engineering. This would have made
www.it-ebooks.info

everything even more abstract. Because designers work in only one specific domain,
abstraction impedes concise expression, moving the models further from their domains.

UML 2.0UML
Instead of burdening in a Nutshell
with complexity, or overwhelming it with abstraction, UML's authors
factored out everything
ByDan Pilone, specific to domains and platforms. They created the profile extension
Neil Pitman
mechanism to address the specific needs of specific application domains. CORBA models, for
...............................................
example, wouldPublisher:
be concise and precise, but would not influence a .Net model.
O'Reilly
Pub Date: June 2005
Although UML cousins, such as the Object Management Group's Software Process Engineering
ISBN:0-596-00795-7
Metamodel (SPEM) and
Pages: 234SysML.org's Systems Modeling Language (SysML), borrow much
structure from UML, they also discard parts that bring no value to their disciplines. SPEM, best
known as the basis for the Rational Unified Process (RUP), describes the process of software
development
Table of Contents |in terms of process roles, work products, and activities. Between a software
Index
application and the process of software development, the fundamental structure and
relationships between the parts change. Although much is similar in the statechart, class,
sequence, package, have
System developers use case,
usedand activitylanguages
modeling diagrams,for fordecades
example, to there is no
specify, implementation
visualize,
or component diagram, or interface. A profile specializing a few
construct, and document systems. The Unified Modeling Language (UML) is one of elements works, butthose
it must
exclude
languages. or constrain
UML makes many basic concepts.
it possible for teamMOF factorstoout
members the structure
collaborate of UML itself
by providing for
a common
reuse
languagein other
that disciplines.
applies to aUsing MOF, of
multitude SPEM and SysML
different systems.become metamodels
Essentially, at the
it enables yousame
to level
as UML. UML remained
communicate solutionsclose to the disciplines
in a consistent, of general
tool-supported software development, and business
language.
and data modeling. In other disciplines, a new metamodel can be created from adding,
dropping,
Today, UML andhas reorganizing
become the UML packages
standard to allow
method for a concise
for modeling modeling
software of thewhich
systems, discipline.
means
you're probably confronting this rich and expressive language more than ever before. And
More
evenformally,
though you as seen in Figure
may not write 11-2, UML builds
UML diagrams on its core
yourself, you'llinfrastructure, MOF. MOF can be
still need to interpret
used by other
diagrams modeling
written languages for other uses. The core UML can be used as is for building
by others.
models directly, or it can be constrained by one or more profiles.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
Each levelmust
you who is a level
read,ofcreate,
abstraction. The levels system
and understand are named M0, M1,
artifacts M2, and
expressed M3, UML.
using as they
become more abstract. M0 is the concrete systemthe code. M1 is
Furthermore, it's been fully revised to cover version 2.0 of the language. the model of the system (of
which M0 is just one realization)the model where designers work. M2 is the language used to
describe the model, innew
This comprehensive thisedition
case UMLnot and, optionally,
only provides the profiles. M3,to
a quick-reference MOF, is the
all UML 2.0language
diagram
used to describe UML and any similar modeling languages. MOF is far beyond
types, it also explains key concepts in a way that appeals to readers already familiar the scope of this
with
book.
UML orSuffice it to say, though,
object-oriented that MOF
programming provides a formal infrastructure to UML, which
concepts.
explains why stereotypes resemble classes and components, and why tagged values resemble
enumerations
Topics include: and attributes.

The M1 model, specifying your application, may have profiles associated with it. The architect
determines theand
The role profiles
valuetoofuse
UMLaccording to the platform, language, and tools available.
in projects
Deciding the profile effectively freezes the M2 layer. As an application modeler, you model
classes,
Theattributes, states, paradigm
object-oriented and all the other
and UML elements.
its relation You don't define new stereotypes
to the UML
or tagged values. You assign existing stereotypes. You fill in the values appropriate to the
tags. An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Figure 11-2. Layers of abstraction in UML
Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though
Unless you areyoualsomay not write
building yourUML
owndiagrams
tooling foryourself, you'll still reporting,
code generation, need to interpret
and/or tracking,
diagrams
you written
will employ byprofile(s)
the others. as is. As a «singleton», for example, the class needs certain
supplementary information. The code generator needs the same questions answered for every
UML 2.0 in a; Nutshell
«singleton» no more, from O'Reilly
no fewer. feels your
It makes pain. to
no sense It'shave
beena crafted for professionals like
{multithread-safe=true}
you who
tagged must
value forread, create, and understand
one «singleton» system artifacts
if the code generator doesn'texpressed
recognizeusing
it. If UML.
it does
Furthermore,
recognize it's been
it, every fully revised
«singleton» should to have
coverit.
version 2.0depends
It really of the language.
on the tool.

Some teams do build new


This comprehensive theiredition
own tooling. Even
not only then, a
provides only the toolsmithto
quick-reference works in the
all UML 2.0M2 layer,
diagram
and theitmodelers
types, work key
also explains in the M1 layer.
concepts in aChanges
way thatinappeals
the M2 to
layer mustalready
readers be conservative
familiar with
because one new taggedprogramming
UML or object-oriented value in a stereotype
concepts.can imply revisiting tens or hundreds of
elements in the model. Changes in the M2 layer literally change the fundamental meaning of
an M1 model.
Topics You've been warned.
include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
11.2. Stereotypes
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Stereotypes modify
ISBN:the intent of the elements to which they apply. They allow the
0-596-00795-7
differentiation ofPages:
roles234
of an element within the model. For example, you can quickly
differentiate classes stereotyped as Controller as having a different role in the system than
those stereotyped as View .
Table of Contents | Index
Visually, UML allows graphical and textual representation of a stereotype. Graphics and text
can be combined in various ways for node-type elements, as shown in Figure 11-3. The four
elements that you see
System developers going
have usedacross the top
modeling of the figure
languages all represent
for decades the same
to specify, combination
visualize,
of
construct, and document systems. The Unified Modeling Language (UML) is one aoftextual
Form and key stereotypes but in different ways. Edge-type elements have only those
representation,
languages. UMLand thusityou
makes see «depends»
possible for team on the dependency
members between
to collaborate Billing and
by providing a common
language .that applies to a multitude of different systems. Essentially, it enables you to
Inventory
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
Figure
you're probably 11-3. this
confronting Various
rich andrepresentations
expressive language of
more stereotypes
than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

When displayed as text, a stereotype is enclosed in guillemots («»), as in «MyStereotype».


Thethe
Because role and valuerequire
guillemots of UMLan
in extended
projects character set to display correctly, you may also
use double angle brackets to show a stereotype in 7-bit ASCII, as in <<MyStereotype>>.
The object-oriented paradigm and its relation to the UML
Graphical icons are neither defined nor standardized by UML. You can expect toolmakers to
An integrated approach to UML diagrams
extend the graphics differently, including coloring or shading, at their discretion. Avoid
graphical symbols for interchange of models between different tools. However, within the
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
controlled environment of a compatible set of tools, specialized graphics and/or colors will
and Deployment Diagrams
likely have more visual impact.
Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

While stereotypes have been around since the initial beta versions of
UML, UML 2.0 has introduced significant changes to the 1.x versions:
UML 2.0 in a Nutshell
ByDanElements
Pilone,Neil Pitman
may have zero, one, or more than one stereotype. The
...............................................
use and usefulness of stereotypes have become more and more
Publisher: O'Reilly
evident. More toolmakers have incorporated them into their
Pub Date: June 2005
products. Modelers found it impossible to use otherwise
ISBN:0-596-00795-7
complimentary tools because an element can have only one
Pages:234
stereotype.

Stereotypes may be nested. A specialized stereotype can build on


Table of Contents | Index
the structure of a general stereotype. In the example provided later
in this chapter, the EJBPrimaryKey stereotype extends the
EJBCmpField stereotype, because all primary keys are ordinary
System developers have
fields used modeling languages for decades to specify, visualize,
as well.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible
Tagged values for
areteam members
related throughtoa collaborate
stereotype by providing
rather a common
than directly
language that applies
to to
thea element.
multitudeThis
of different systems.
avoids the Essentially,
possibility of nameitclashes
enableswith
youthe
to
communicate solutions in a consistent,
introduction tool-supported
of multiple stereotypeslanguage.
per element.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
You can tag an item in a UML model with more than one stereotype. Figure 11-4 shows
even though you may not write UML diagrams yourself, you'll still need to interpret
multiple stereotypes as a list, with each stereotype enclosed in «guillemots».
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Figure 11-4.
Furthermore, A class
it's been and to
fully revised ancover
attribute, with
version 2.0 two
of the stereotypes each
language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
11.3. Tagged Values
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Having established
ISBN:an element's role within a system with a stereotype, the element likely
0-596-00795-7
needs information not234
Pages: available from the core UML, to fulfill its role. The stereotype defines a
number of tagged values. Each tagged value is typed with a datatypenumber, string, boolean,
or user-defined enumeration. The upcoming section "UML Profiles" shows one way in which
you might
Table of record,
Contents | Index or define, the tagged values that you wish to include in a stereotype.

When you show them in a diagram, place the tagged values in a note element that is
connected to the declaring
System developers element
have used with alanguages
modeling dashed line. Figure 11-5
for decades shows the
to specify, case of multiple
visualize,
stereotypes on one element. To keep the stereotypes and the corresponding tagged
construct, and document systems. The Unified Modeling Language (UML) is one of those values
clear, each stereotype
languages. UML makesisitmentioned,
possible forand themembers
team tagged are
to values listedby
collaborate separately.
providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Figure
Today, UML has11-5.
becomeTagged values
the standard shown
method classified
for modeling bysystems,
software their owning
which means
stereotype
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

At first, you may confuse tagged values with attributes, but they exist at a different level of
The role
abstraction. and valuedefined
Attributes, of UMLininthe
projects
design model (M1), exist in the runtime system (M0).
Tagged values, defined in the profile (M2), exist only in the design model (M1). The tagged
valuesThe
mayobject-oriented paradigm
provide hints to help theand its relation
generation to theeither
of code, UML by human or machine. A
tagged value of {optimize=space} will probably affect the code ultimately, although the actual
An integrated
value itself approach
never appears to code.
in the UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
11.4. Constraints
...............................................
Publisher:O'Reilly
Stereotypes give roles
Pub Date:toJune
elements.
2005 Tagged values provide role-specific information enriching
the element in its ISBN: 0-596-00795-7
role. While atomically the element knows its role and has all the information
Pages:234
to fulfill it, the element must still interact with its neighbors. The element and their roles must
be in harmony with the architectural vision. The element must also be internally consistent.
Constraints (see "Constraints" in Chapter 2) provide the mechanism to specify rules for
Table of Contents
correct usage| of
Index
the stereotyped elements.

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell

11.5. UMLBy Dan Pilone,Neil Pitman


Profiles
...............................................
Publisher:O'Reilly
Pub Date: June 2005
UML profiles combine the concepts of stereotypes, tagged values, and constraints to provide a
ISBN:0-596-00795-7
coherent and concise dialect of UML for a specific family of applications. To make much use of
Pages:234
a profile, some tooling must be provided. The application model drives code or application
generation, so you have little or no control over the stereotypes, tagged values, or constraints
comprising
Table of Contentsthe profile. This section discusses the use of existing profiles (as opposed to
| Index

defining your own).

Figure
System 11-6 depicts ahave
developers partial
usedUML profile defining
modeling languages a stereotype
for decadeswith its associated
to specify, tagged
visualize,
values and a couple of constraints, as you might receive in a vendor's
construct, and document systems. The Unified Modeling Language (UML) is one of those documentation. The
profile extends
languages. UML classes
makeswith a stereotyped
it possible for team class, «EJBEntityBean»
members . It by
to collaborate extends attributes
providing with
a common
two stereotyped
language attributes:
that applies «EJBPrimaryKey»
to a multitude and «EJBCmpField»
of different . It declares
systems. Essentially, the respective
it enables you to
tagged values for
communicate the stereotyped
solutions classes
in a consistent, and attributes,
tool-supported and it declares the enumeration,
language.
transactionIsolationLevel, to define the allowable values for the TRansactionAttribute
tagged
Today, value.
UML hasThebecome
profile also adds the method
the standard constraints that «EJBEntityBean»
for modeling software systems, classeswhich
must means
have
attributes of typeconfronting
you're probably «EJBCmpField» this and
rich «EJBPrimaryKey» . Furthermore,
and expressive language more attributes having these
than ever before. And
stereotypes
even thoughcan youexist
mayonly
not in an «EJBEntityBean»
write class. From
UML diagrams yourself, you'llyour
still point
need of to view, the profile,
interpret
along with written
diagrams its constituent
by others.stereotypes and tagged values, is read-only because it tells what
the third-party tool expects in order to do its job.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
Figure 11-6. A partial specification UML profile
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

FigureExtension
11-7 showsMechanisms
a portion of a model using the profile declared in Figure 11-6.Figure 11-8
indicates how the tagged value structures in the model relate back to the profile declaration.
The Object
The notes Constraint
containing Language
the tagged values(OCL)
make the notation bulky if you need to show a set of
tagged values for every class, attribute, operation, and relationship.

When aiming to expose the structure and relationships of a system, class diagrams rarely
If you're
show newvalues.
tagged to UML, a tutorialagain
Referring with to
realistic
Figureexamples
11-7, onehas
tinyeven
classbeen included
having to help you
two attributes
quickly familiarize yourself with the system.
becomes a constellation of four diagram elements. A modest class diagram of 10 classes can
easily require 100 extra notes to show the tagged values, hopelessly confusing the diagram
and destroying its impact. Instead, modelers often maintain the tagged values invisibly in the
model, where tools can extract them as needed.
www.it-ebooks.info

Figure 11-7. A stereotyped class and its stereotyped attributes, with


their respective tagged values
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
Figurewritten
diagrams 11-8.byThe partial specification UML profile, showing model
others.
elements applying it
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms
The UML from the profile and the model is shown in Figure 11-8. This illustrates the
relationships between
The Object the declarations
Constraint of the profile and a conforming model. The stereotypes
Language (OCL)
in the profile extend the concept of an element. In this case, the stereotype «EJBEntityBean»
extends ordinary classes, as shown (1) by the implication of the same element type
(metaclass),Class. In the models applying this profile, only classes may have that
stereotype, as to
If you're new shown
UML,by the relationship
a tutorial (2). Having
with realistic examplesestablished
has even that
beenthe
included to help is
BillCurrency youan
, it yourself
quickly familiarize
«EJBEntityBean» now haswith
all the
the«EJBEntityBean»
system. tagged values, as shown by the
relationship (3). Stereotypes that extend other stereotypes, as «EJBPrimaryKey» extends
«EJBCmpField», have all the parent's tagged values. Ideally, tooling will aid, enforce, and
validate by making available the correct tagged values and defaults according to the
stereotype's definition. If not, the modeler must rely on discipline.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
11.6. Tools and How They Use Profiles
...............................................
Publisher:O'Reilly
Pub Date: June 2005
UML tools use profiles to provide a spectrum of solutions. Tools providing Model-Driven
ISBN:0-596-00795-7
Architecture (MDA) solutions
Pages: 234 have transformations from the Platform-Independent Model
(PIM) to Platform-Specific Model (PSM) and from the PSM to the application. See Appendix A
for a fuller discussion of MDA.
Table of Contents | Index
The OMG conceived the MDA as a vision rather than a specified method. Each vendor has a
different, sometimes radically different, approach to MDA. Consequently, although the
concepts of the PIM and
System developers havethe PSM
used vary greatly
modeling from one
languages vendor to
for decades to another, any one vendor's
specify, visualize,
concept of the PIM and the PSM is strict and concrete. The extra
construct, and document systems. The Unified Modeling Language (UML) is one of thoseroles and information,
introduced
languages.as themakes
UML PIM is itrefined to the
possible PSM and
for team the PSM
members to to code, must
collaborate by be well defined
providing and
a common
well controlled.
language Profilesto
that applies provide the definition
a multitude of the
of different information
systems. to be captured
Essentially, it enablesand
youthe
to
constraints
communicate on solutions
a valid model. Each tool validates
in a consistent, conformity
tool-supported to a profile in its own way. The
language.
PIM needs only one profile because it can be used and reused for different platforms. Each
PSM, on UML
Today, the other hand, potentially
has become the standardneeds a different
method profile software
for modeling because each specific
systems, platform
which means
has different
you're probablyissues and transformations
confronting this rich andtoexpressive
arrive at optimal
language code.
more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
Tools previous
diagrams writtento MDA still use profiles. In general, they provide a model-to-code code
by others.
generation feature and often a code-to-model reverse engineering feature. To faithfully
generate
UML 2.0 inrunnable
a Nutshellcode,
frommany details
O'Reilly must
feels be pain.
your stored in been
It's the model.
craftedMany language- like
for professionals
dependent
you who must features
read,can't be recorded
create, in core system
and understand UML. For example,
artifacts UML doesn't
expressed usingrecognize
UML. the
Java keyword strictfp
Furthermore, it's been,fully
which indicates
revised floating-point
to cover version 2.0 processing. Without tagged values, a
of the language.
reverse-engineered system would not faithfully reproduce the same code when forward
engineered.
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Chapter 12. Effective Diagramming
...............................................
Publisher:O'Reilly
Pub Date: June 2005
This chapter illustrates how you can create effective class diagrams. The diagrams presented
ISBN:0-596-00795-7
in the referencePages:
section 234of this book have few elements. Those diagrams illustrate individual
diagram elements, clear of any clutter; they aren't meant to illustrate diagram types. The
diagrams in the reference section don't represent systems that you will encounter in real life.
This final
Table of chapter
Contents | Indexillustrates some techniques you can use to make real-life diagrams convey
your thoughts more effectively.

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
12.1. Wallpaper Diagrams
...............................................
Publisher:O'Reilly
Pub Date: June 2005
The classic novice class
ISBN: diagram displays all classes, attributes, operations, relationships, and
0-596-00795-7
dependencies for a system.
Pages: 234 As the number of classes grows, the diagram becomes huge and
unmanageable. Imprudent reverse engineering drags in clutter. Figure 12-1 diagrams just a
very small part of the Java Abstract Windowing Toolkit (AWT). You will not be able to read the
diagram because
Table of Contents | Indexit normally prints as an unwieldy nine pages. You're paying for the paper, so

the diagram is shown here in a greatly condensed form.

Effective writers convey


System developers haveideas
usedthrough
modelinglanguage
languagesconstructs: sentences
for decades and visualize,
to specify, paragraphs
organize
construct, and document systems. The Unified Modeling Language (UML) is oneModelers
text, details reinforce ideas, and true but irrelevant facts are omitted. of those
desiring to convey
languages. an ideabe
UML makes it a structural
it possible for teamoverview,
members atopattern implementation,
collaborate by providingaadetailed
common
subsystem,
language thator the detailed
applies to a context
multitudeof of
one classmust
different also use
systems. economy itand
Essentially, focus.you
enables Figure
to 12-1
has neither economy
communicate norinfocus.
solutions The diagram
a consistent, throws a mass
tool-supported of insignificant detail at readers,
language.
leaving the burden of understanding on them. It is a false economy to think that one diagram
can present
Today, UMLallhasthe information
become of a multidimensional
the standard model. software systems, which means
method for modeling
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Figure 12-1. An overloaded and ineffective class diagram
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension
12.1.1. Mechanisms
Modeling Versus Diagramming
The Object Constraint Language (OCL)

Before making Figure 12-1 more effective, let's distinguish modeling from diagramming. The
act of modeling furthers your understanding of the system under study. You use diagrams to
elaborate the model.
If you're new to UML,You confirmwith
a tutorial the realistic
model integrity with
examples hasnew views.
even beenYou organize
included youryou
to help
understanding. Youyourself
quickly familiarize extend your
with knowledge.
the system. You challenge your understanding. By seeing the
known, you can infer, dictate, or investigate the yet to be known. Figure 12-1 might be seen
during modeling, but only as an intermediate step; such diagrams don't demonstrate UML's
true power to communicate.

Diagramming, on the other hand, expresses understanding for the benefit of others. You may
www.it-ebooks.info

be a domain expert by background, or you may have recently synthesized expertise from
modeling with domain experts. You have worked hard to understand, and to put your
understanding into a model, perhaps over weeks or months; now you must make that
UML 2.0 in a Nutshell
understanding immediately accessible to your readers. Your model should be concise so that
they understand. If there
ByDan Pilone,is
NeiltoPitman
be contention, let it be about real ideas, not ambiguity.
Diagramming reveals to others what you discover through modeling
............................................... .
Publisher:O'Reilly
It doesn't matter whether
Pub you2005
Date: June formally create a model in a modeling tool, whether the model
is implicitly in your head,
ISBN: or whether the model resides in another form: each diagram drawn
0-596-00795-7
from that modelPages: should234
express one or a very limited number of related concepts. You choose
the idea to express, and you express it from the elements in the model. Presenting your ideas
in UML requires multiple diagrams, just as writing a section in this chapter requires multiple
paragraphs.
Table of Contents | Index

Implicitly, you may think that discussions of layout and effective diagrams relate only to
human-drawn
System developersdiagrams.
haveAutomated
used modeling utilities create one-way
languages for decades transformations to UML of
to specify, visualize,
complex text or XML-based configuration files or even nontext systems.
construct, and document systems. The Unified Modeling Language (UML) is one of those This visual UML
presents
languages.an UML
alternative
makesand complementary
it possible for team view membersto thetodifficult-to-understand
collaborate by providing source text,
a common
especially
language when used as
that applies tooverviews
a multitude and of sanity
differentchecks. MostEssentially,
systems. such utilities automatically
it enables you tolay out
the resulting diagrams
communicate solutionswithout allowing the
in a consistent, user to arrange
tool-supported the diagrams. (Manual
language.
arrangement would impose undue work on the user.) The need for clarity and focus applies
equally
Today, to
UML UMLhasproduced
become by thetools because
standard methodthe reader is still the
for modeling same.systems, which means
software
you're probably confronting this rich and expressive language more than ever before. And
Though UML provides
even though you mayan not excellent
write UMLvehicle for both
diagrams modeling
yourself, you'llandstilldiagramming, the resultant
need to interpret
diagrams
diagramsaren't
written necessarily
by others.the same. Modeling tolerates larger diagrams with a muddled
focus. A large diagram makes a better playground because the cost of refactoring many small
diagrams
UML 2.0 in outweighs
a Nutshellthefrombenefits of the
O'Reilly feelsclarity
your those diagrams
pain. It's provide,
been crafted foratprofessionals
least in the early
like
stages
you whoof design.
must read,Once you understand
create, and understand the modelsystemandartifacts
are comfortable
expressedwith it, UML.
using you can fission
the resultant model
Furthermore, more
it's been easily
fully into to
revised packages and concise
cover version 2.0 of diagrams.
the language. Ease during this phase
validates the model's completeness; pain in diagramming indicates incompleteness in
modeling. Details forgotten
This comprehensive against
new edition notthe
onlyvastness
provides of athe model stand out
quick-reference when
to all UMLthe2.0focus
diagram
narrows to a very small context.
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
Your documentation, UML and otherwise, must answer when you are absent. When you're
publishing a guide to a toolkit, framework, or system, your audience will fail to exploit your
Topics include:
offering without clear and focused diagrams. At the same time, once the model is clearly
understood and concisely presented, discard the playground diagrams to avoid confusion.
The role and value of UML in projects
As with any other endeavor, shortcuts can be appropriate. If only you or an application
generator
The access a model, paradigm
object-oriented you don't and
needitstorelation
publishto
it the
for others.
UML If the model is implicitly
valid or you have better validation mechanisms, such as model checkers, you need not bother
An concise
creating integrated approach
diagrams. to UML
A code diagrams
generator, for example, doesn't care about understandable
diagrams.
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
No oneand Deployment
diagram Diagrams
is definitive in all aspects. To be effective, a diagram must have unity of
purpose. As a 2D view of the model, a diagram necessarily leaves out details in order to
Extension
emphasize Mechanisms
important features. The more economic the details, the more salient the features
appear in relief. Several diagrams, each with a different purpose, provide a clearer
The Object
understanding Constraint
than Language
one diagram (OCL)
that has all the details.

When diagramming, consider the purpose. The following sections detail several errors that
compromise the effectiveness of UML.
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

12.1.2. Structure and Interrelationships Among Classes

Figure 12-1 shows a class diagram cluttered by details. It gives no insight. Figure 12-2 shows
www.it-ebooks.info

the same classes without attributes and operations. More than half the diagram is an
understandable inheritance tree. Rid now of clutter, what's left becomes readable. The
converging lines draw the eye to Component at the center. You can clearly see the relationships
UML 2.0classes
between the abstract in a Nutshell
and various interfaces. The subclasses clearly add individual
behavior withoutByadding
Dan Pilone, any
Neilstructure.
Pitman The diagram works. Once you understand the
structure, you can find the details of operations and attributes elsewhere, in such places as
...............................................
source commentPublisher:
extraction tools such as Javadoc (supplied with the standard Java SDK from
O'Reilly
Sun)or CppDoc Pub
(checkDate:for June it2005
athttp://www.cppdoc.com/).
ISBN:0-596-00795-7
Pages:234

Figure 12-2. The structure of commonly used components within the


Table of Contents | Index
Java AWT

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics12-2
Figure include:
illustrates that good diagramming doesn't need to show everything. Effective
diagramming communicates one aspect of a system well. The less cluttered a diagram, the
better. We chose to communicate the class structure of the Java AWT system. To that end,
The role
the diagram and value
focuses of UMLand
on classes in projects
their relationships, and leaves off details, such as
attributes, which have no bearing on the knowledge we are trying to share.
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams


12.1.3. Separate Inheritance and Class Interrelationships
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
Our subset of the AWT doesn't contain enough complexity to require more simplification.
Figure 12-2 mixes the abstract class relationships and the concrete classes using them. For
Extension Mechanisms
even more clarity, together Figures 12-3 and 12-4 illustrate the same model as do Figures 12-
1 and The
12-2, but they
Object separate
Constraint the two (OCL)
Language concerns of abstraction and inheritance. Figure 12-3
focuses on the abstraction common to all the Components. With just two interesting classes
and four supporting classes, Figure 12-3 is simple enough to memorize. That learned, the
inheritance hierarchy of concrete classes in Figure 12-4 becomes easy to classify and to
manipulate.
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

Figure 12-3. Structure of Components and Containers in the AWT


www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
Figure 12-4. Inheritance tree of Component in the AWT
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
12.2. Sprawling Scope
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Figure 12-5 shows an0-596-00795-7
ISBN: example of a poorly focused sequence diagram. Sequence diagrams risk
taking on too many
Pages:interactions
234 at once. This one shows the Struts interactions, the
application interactions, and then the detailed workings of the Java libraries.

Table of Contents | Index

Figure 12-5. Sequence diagram of HTTP form processing, spanning


System developers haveStruts, application,
used modeling languages and java.lang
for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The at
Elements Object Constraint
the high and lowLanguage (OCL)
end of this diagram are clearly out of scope of the application.
One rarely cares how Struts, as an off-the-shelf framework, works. It calls the application
logic at the appropriate time. Similarly, just how the internals of the standard libraries carry
out their obligations normally doesn't matter in terms of understanding the application. Both
If you're
the newoftoHTTP
structure UML,request
a tutorial with realistic
processing examples
and the hasof
workings even been included to help you
Strings are God-given as far as
quickly familiarize yourself with the system.
the application developer is concerned. However, by showing a few elements that are out of
scope, the diagram allows you to see the context of the application within the greater
framework, and that's often useful when selecting an architecture. Similarly, drilling down into
the base libraries exposes thread or performance issues. These are exceptional needs; there
is no call to complicate the description of an application with these exploratory needs. From
the readers' point of view, nonapplication elements just cloud understanding of the business
www.it-ebooks.info

logic, the only thing over which the developer exerts control.

Figure 12-6 shows the processing for another HTML form. It gets to the point. It is concise
enough for one UML
page.2.0And
in a Nutshell
it focuses on interactions between the application classes; the
interactions are By
under control
Dan Pilone, of the development team.
Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Figure
ISBN:12-6. Sequence diagram with scope
0-596-00795-7 restricted to
Pages:234 programmer-defined classes

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell

12.3. OneBy Dan Pilone,Neil Pitman


Diagram/One Abstraction
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Earlier, in Figures 12-2
ISBN: and 12-3, we separated structure from inheritance. Each diagram
0-596-00795-7
contains fewer elements
Pages:234than the all-encompassing diagram shown in Figure 12-1, or even
the more modest one shown in Figure 12-2, so they are easier to understand. Figure 12-7
shows package dependencies. The diagram records both the import graph and code
generation directives.
Table of Contents | Index The superimposition of these two roles results in a diagram with pairs
of opposing dependencies between elements. Don't worry if you don't quite understand its
meaning; we'll clean it up in a moment.
System developers have used modeling languages for decades to specify, visualize,
Figure 12-7and
construct, failsdocument
as a diagram for several
systems. reasons.
The Unified Most strikingly,
Modeling Languageyou(UML)don't know
is one ofwhere
those to
start: the diagram
languages. UML makeshas no it center offor
possible gravity.
team This leads to
members to collaborate
a lack of flow
by or direction;
providing do you
a common
read the diagram
language left totoright,
that applies top to bottom,
a multitude or inside
of different out?Essentially,
systems. The apparently cyclic you to
it enables
dependencies
communicate confound solutions anyin a sense of direction.
consistent, Althoughlanguage.
tool-supported opaque to the initiated, the problem
withFigure 12-7 stems from trying to use one diagram for two related but different ends:
controlling
Today, UML imports and directing
has become code generation.
the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Figure 12-7. Package diagram controlling imports and code
generation
UML 2.0 in a Nutshell from O'Reilly directives
feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

Figure 12-8 addresses the issue of imports only. Elements higher in the diagram depend on
elements below. No cycles exist. You can absorb the meaning of the diagram quickly.
www.it-ebooks.info

Removing the imports from Figure 12-7 simplifies it more than you might imagine. Instead of
forming a graph like the imports, the directives, as shown in Figure 12-9, just link separate
elements with target packages. The noise of the import graph complicated a simple picture.
UML
The complicated, 2.0 indiagram
large a Nutshellbecomes a small diagram of four separate sections.
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
12.4. Besides UML
...............................................
Publisher:O'Reilly
Pub Date: June 2005
UML provides description that's difficult to match with plain text. Its formalism allows a few
ISBN:0-596-00795-7
lines and boxes Pages:
to unequivocally
234 and immediately convey what would require time to
assimilate from text. The text replaced by diagrams would be, at best, dull and legalistic, and
at worst, vague, ambiguous, and open to interpretation. Either way, well-written UML is more
effective.
Table of Contents | Index

While it may be true that a picture is worth a thousand words, a picture with words is worth
much
Systemmore than justhave
developers a picture. Perhaps in
used modeling the context
languages for of MDA and
decades executable
to specify, models, UML
visualize,
can provide a minimum specification for an application generator. In
construct, and document systems. The Unified Modeling Language (UML) is one ofmost cases, complete
those
system specification
languages. UML makes or system documentation
it possible requirestocommentary
for team members to explain,
collaborate by providingemphasize,
a common
and give nuance
language to theto
that applies diagrams. Diagrams
a multitude alonesystems.
of different risk burying or glossing
Essentially, over details
it enables you toas
much as text alone.
communicate Diagrams
solutions and text reinforce
in a consistent, each other.
tool-supported You can describe the context and
language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not Figure
write UML12-8. Package
diagrams yourself, imports
you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

major points with text, then drive home those points with a good diagram and the formalism
of UML.
www.it-ebooks.info

As seen throughout this chapter, you can't effectively document classes with large APIs on a
single, class diagram. Hundreds of attributes and operations become insignificant on a
diagram. The operation and attribute sections of a class box don't allow for descriptions. Tools
such as Doxygen UML 2.0 in a Nutshell
(http://www.doxygen.org) or Javadoc extract the most current source
comments into searchable
ByDan Pilone,Neil web pages. Though the details they present are likely to change
Pitman
and therefore will make diagrams obsolete, when they are made part of the software build
...............................................
process, they remain
Publisher:upO'Reilly
to date with the latest software changes.
Pub Date: June 2005
Remember that ISBN: diagramming requires neither model nor modeling tool. UML practitioners
0-596-00795-7
often simply draw Pages: 234
diagrams by hand or with simple drawing tools. Modeling tools are
expensive acquisitions, in terms of time and distraction, if not in money: open source or
proprietary, UML tools take time to master. Whiteboards, notepads, and simple drawing tools
deliver much |project
Table of Contents Index value with no learning curve. Use them until you are comfortable with
UML and its place in the project. With a firm understanding of UML and your process,
choosing a dedicated UML tool and changing your process to incorporate it becomes less
System developers have used modeling languages for decades to specify, visualize,
risky.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions Figure 12-9. Code
in a consistent, generation
tool-supported directives
language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Appendix A. MDA: Model-Driven
...............................................
Publisher:O'Reilly

Architecture Pub Date: June 2005


ISBN:0-596-00795-7
Pages:234
This appendix summarizes Model Driven Architecture (MDA). Several authors dedicate whole
books to MDA; seek out those books. The treatment here aims simply to demystify MDA
enough so that
Table of Contents you can talk sensibly about it. Better yet, investigate the vendor offerings.
| Index

Abstract descriptions don't deliver value: tools do.

System developers have used modeling languages for decades to specify, visualize,
construct, and Both
document
Modelsystems. The Unifiedand
Driven Architecture Modeling
MDA, Language (UML)Modeling
like the Unified is one of those
languages. UML makes itand
Language possible
UML, for
areteam members
trademarks to collaborate
of the by providing
Object Management a common
Group.
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell

A.1. WhatBy Dan Pilone,Neil Pitman


Is MDA?
...............................................
Publisher:O'Reilly
Pub Date: June 2005
MDA is the natural evolution
ISBN: of UML, Object Oriented Analysis and Design (OOAD), code
0-596-00795-7
generators, andPages:
third 234
millennium computing power. At the highest level, MDA envisions the
day that UML models become the standard way to design and build software. Business
software developers will build their systems through MDA tools. Development in 3GL
languages such
Table of Contents as Java or .Net will remain a toilsome necessity for the system level. For
| Index

business applications, current languages will be too inefficient to be viable, used only by the
most backward-looking organizations. As an analogy, consider the place of assembler and C
(or even developers
System C++) in main-line
have used business applications
modeling languages today.
for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
MDA uses models
languages. UML makesto get itthe highestfor
possible leverage out of software
team members development.
to collaborate MDA isn't
by providing a
a common
development
language thatprocess.applies Ittoisn't a specification.
a multitude It isn't
of different an implementation.
systems. Essentially, it It isn't a you
enables conformance
to
suite. It doesn'tsolutions
communicate have a reference implementation.
in a consistent, The OMG,
tool-supported wisely, has avoided specifying
language.
how you go about leveraging software models. MDA has not matured, so each of the nearly
50 companies
Today, UML has committed
become the to MDA promote
standard vastly
method fordiffering
modeling visions. If you
software find this
systems, confusing,
which means
you aren't
you're alone. confronting this rich and expressive language more than ever before. And
probably
even though you may not write UML diagrams yourself, you'll still need to interpret
MDA defines
diagrams a framework
written by others. for processing and relating models. MDA tools transform pure
business models into complete, deployable, running applications with a minimum of
technological decisions.from
UML 2.0 in a Nutshell Modifying the
O'Reilly pure
feels business
your model
pain. It's behind
been an for
crafted application require
professionals likeonly
updates
you whoinmust the dependent
read, create, technological area(s).
and understand Technology
system artifactsdecisions
expressed unrelated to the change
using UML.
remain, so the it's
Furthermore, application
been fully can be regenerated
revised in a matter
to cover version 2.0 ofofthe
a few minutes.
language.
An application has many concerns; some related to the business itself, some related to a
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
particular implementation tier, some related to a particular implementation technology. MDA
types, it also explains key concepts in a way that appeals to readers already familiar with
further separates the technological concerns of an application from the business; it separates
UML or object-oriented programming concepts.
high-level technical decisions from their technological implementation; it separates one
technology from another. Web forms or database tactics don't complicate the business
Topics include:
concepts of, say, Account and Customer. Transaction management decisions don't affect
persistence. Messaging doesn't interfere with property management or security. Each
technology canand
The role be replaced without
value of UML recoding. In the extreme case, the business application
in projects
can be redeployed on a completely different technology platform.
The object-oriented paradigm and its relation to the UML
MDA keeps these separate concerns in different models, while at the same time keeping the
system Anconsistent
integratedand coherent
approach to as
UMLa whole. The concept of account , for example, permeates
diagrams
most or all of the models: business, web, database, persistence, business logic, business
Class
delegate, and
and Object,
code. Not Use
onlyCase,
is anySequence,
one modelCollaboration, Statechart,
consistent within Activity,
itself, but Component,
also the concepts
andmodel
from one Deployment Diagrams
relate to the corresponding concepts in other models. Changes in the concept
ofaccount must affect all related models. This notion moves significantly ahead of current
non-MDAExtension Mechanisms
modeling tools that either model everything in one model or require manual
synchronization of separate models.
The Object Constraint Language (OCL)
Although ultimately hoping to eliminate all programming languages, current MDA tools can't
provide enough finesse to deliver varied and high quality systems without a hybrid approach
of UML and 3GL. MDA allows handcoded extensions and other tweaking throughout the
If you're new to UML, a tutorial with realistic examples has even been included to help you
abstraction layers. It remembers the origins of these changes so that subsequent generations
quickly familiarize yourself with the system.
of the system respect them.

MDA tools are sophisticated systems. No offering has established itself as a leader. Most of
the MDA offerings cater to niche markets. Most predate MDA, so they drag along baggage of a
less well-defined approach, or of a well-defined but narrow proprietary approach. None
manages highly abstract models and generates crack code and generates a variety of
www.it-ebooks.info

implementations, at least not yet. Though a one-size-fits-all offering doesn't exist, many
offerings are very productive. The goal of MDA, while simple to voice, has yet to be fully
implemented.
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
A.2. The Models of MDA
...............................................
Publisher:O'Reilly
Pub Date: June 2005
Models play a big role
ISBN: in MDA. As a framework for building systems, MDA abstracts systems
0-596-00795-7
into abstraction Pages:
layers.
234Traditionally OOAD had analysis, detailed design and code roughly
representing a system's business perspective, the architectural/technological perspective, and
the implementation perspective. MDA adds one abstraction on top, representing the business
context of the| Index
Table of Contents system. Figure A-1 shows the different abstraction layers and their associated
MDA models. Abstraction increases toward the left and concreteness increases toward the
right. Concrete models outnumber abstract models. In general, the abstract begets the
concrete; as each model
System developers havebecomes more concrete,
used modeling languagesit for
realizes the to
decades abstractions with respect to
specify, visualize,
one technology
construct, or platform.
and document The inverse,
systems. makingModeling
The Unified abstractLanguage
models from theisconcrete,
(UML) also
one of those
known as reverse
languages. engineering,
UML makes rarely
it possible forhappens, except to
team members when the starting
collaborate point is code.
by providing Even
a common
then because
language thatthe system
applies to amust support
multitude of adifferent
business, startingEssentially,
systems. from the business needs
it enables you is
to
generally
communicate moresolutions
appropriate.
in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
evenFigure A-1.
though you mayAnnotexample of MDAyourself,
write UML diagrams models and
you'll stilltheir relationship
need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The abstraction models match well with the conceptual layers of a system:
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML


Computational-independent model (CIM)
An integrated approach to UML diagrams
The CIM represents the highest-level business model. The CIM uses a specialized
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
business process language and not UML, although its language could well be derived
and Deployment Diagrams
from the meta-object facility (MOF).
Extension Mechanisms
The CIM transcends computer systems. Each process interacts with human workers
and/or machine
The Object components.
Constraint LanguageThe(OCL)
CIM describes these interactions between these
processes and the responsibilities of each worker, be it human or otherwise.

Anyone understanding business and business processes can understand a CIM. It avoids
specialized
If you're knowledge
new to UML, of procedures
a tutorial internal
with realistic to a worker
examples computer
has even system,
been included to such
help as
you
accounting
quickly procedures
familiarize or sales
yourself with commissions.
the system.

Platform-independent model (PIM)

A PIM represents the business model to be implemented by an information system.


Commonly, UML or some UML derivative describes the PIM.
www.it-ebooks.info

The PIM describes the processes and structure of the system, without reference to the
delivery platforms. The PIM ignores operating systems, programming languages,
hardware,UML
and2.0networking.
in a Nutshell
ByDan Pilone,Neil Pitman
Anyone understanding the specialized domain of the computer system under study can
...............................................
understand the PIM.
Publisher:O'Reilly Although destined to be an information system, the PIM requires
no information
Pub Date: system
June background.
2005
ISBN:0-596-00795-7
The PIM isPages:
the starting
234 point for MDA discussions in this appendix.

Platform-specific model (PSM)


Table of Contents | Index

The PSM projects the PIM onto a specific platform. Because one PIM begets multiple
PSMs, the PSMs must collaborate to deliver a consistent and complete solution.
System developers
Commonly, thehave used modeling
implementer defineslanguages forUML
a different decades toto
profile specify,
define visualize,
the PSM for each
construct, and document
target platform. systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies
The PSM realizesto
thea multitude of different
PIM as it applies to onesystems.
specific Essentially,
platform. Theit enables youexplicitly
PSM deals to
communicate solutions in a consistent, tool-supported language.
with the operating system, programming language, technology platform (e.g., CORBA,
.Net, J2EE, or PHP), remote distribution or local collocation. Although porting from one
Today, UML has
platform or become
languagethe standard
probably method
means for modeling
discarding software
the PSM, systems,
sibling PSMs andwhich
the means
PIM
you'reremain
probably confronting this rich and expressive language more than ever before. And
unchanged.
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written
Despite by others.
the need for an understanding of the underlying technology to understand the
PSM, the understanding need not be profound. Modelers must know the difference
UML 2.0 in a Nutshell
between fromremotely
locally and O'Reilly located
feels your pain. It's been
components; theycrafted for professionals
don't need to know how like
to
you who must read,
implement create,
or debug and understand system artifacts expressed using UML.
them.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This model
Code comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML orThe code model represents
object-oriented the deployable
programming concepts. code, usually in a high-level language such
as XML, Java, C#, C++, VB, HTML, JSP, or ASP. It may or may not be readable. It may
Topicsorinclude:
may not be extendable, although often it has extension points in the form of
protected code blocks.

The rolethe
Ideally, andcode
value of UML
model in projects
is compile-ready. It doesn't require any further human
intervention. Deployment should be automated. In a mature MDA environment, you can
The object-oriented
think paradigm
of the code model as youand its relation
would think of to the UML
object files or class filesthey're just
machine files, opaque to mere mortals.
An integrated approach to UML diagrams
In reality, MDA tools aren't mature. Developers need to understand the technology so
Classthey
that and can
Object,
debugUse Case,
the Sequence,
application Collaboration,
or the deployment.Statechart,
DevelopersActivity,
need toComponent,
load the
and Deployment
source Diagrams
into IDEs and debug and deploy as normal. Because little code is actually
handwritten, the dilemma is more to deploy correctly than to debug infrastructure.
Extension Mechanisms
These models can continue on to the right. We can have a bytecode or link object model, and
The
beyond Object
that Constraint
a machine code Language (OCL) has matured so much that the vast majority of
model. Software
workers take those models for granted. They just work. If they don't, we just replace them.

Figure A-1 shows a one-tier PSM. MDA doesn't restrict PSMs to one tier. Each PSM addresses
If you're new to UML, a tutorial with realistic examples has even been included to help you
a different technological layer of a system. If a particular technology lends itself to multiple
quickly familiarize yourself with the system.
layers of abstraction, the PSM allows for that too. The specific technologies, and hence, PSMs,
are defined by the MDA tool and the architecture it proposes. As a business application
developer, you will have to work with that particular framework.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
A.3. Design Decisions
...............................................
Publisher:O'Reilly
As you've seen in PubFigure A-1, 2005
Date: June the number of models increases as you go from the abstract to
the concrete. How ISBN: 0-596-00795-7
abstract models become transformed into more concrete models will be
discussed a littlePages: 234
later. For now, suffice it to say that some function transforms them. Several
concrete models can come from a single abstract model. At any one level of abstraction, the
model presents the system, without the messiness of implementation details found in the
Table of concrete,
more Contents | Index
downstream models.

Effective model transformation demands precise implementation details. Decisions at one


layer imply
System gross differences
developers have used atmodeling
the next, languages
more concrete layer. Consider
for decades thevisualize,
to specify, following business
rules:
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
There aresolutions
communicate only a few
in (50) states, and
a consistent, they don't change.
tool-supported language.
Account transactions can be added, but never changed or deleted, and there can be
Today, UML has become the standard method for modeling software systems, which means
hundreds of thousands of transactions for one account.
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
Account balances are updated very often, but account contact information is updated
diagrams written by others.
relatively rarely compared to the number of times it's read. Changes must be audited.

IfUML 2.0 in
similar a Nutshell
code were to from O'Reilly feels
be generated your pain.
to manage theseIt's been
data craftedyou
entities, for would
professionals like
have a very
you who
poor must
system. Toread, create,
live up to itsand understand
moniker, system
MDA must artifacts
provide some expressed using
clue in the UML. model to
business
Furthermore,
differentiate it's been
between fully cases.
these revisedThe
to cover version
business layer2.0 of the
doesn't language.
involve itself with design issues
such as data access patterns, but it must provide hints. These hints are design decisions .
This comprehensive
Models provide implicit new edition
hints not only
through provides (a
the structure a quick-reference to all UML
one-to-one association 2.0 diagram
versus a many-
types, it also explains key concepts in a way that appeals to readers already
to-one association), and they can be elaborated with explicit hints (such as differentiatingfamiliar with the
UML or
three object-oriented
earlier cases). programming concepts.

Topics
At include:
the level of code generation, 3GLs have hints, although they work at a much lower level of
abstraction. Programmers switch on code optimization or debugging information. As a result,
the bytecode/object code becomes vastly different, with different performance characteristics.
The role and value of UML in projects
Figure A-2 shows how MDA records design decisions as marks . A transformation function uses
The object-oriented paradigm and its relation to the UML
related marks, held in a subordinate marking model , along with the principle model, either
PIM or PSM as the case may be, to create the next, more concrete model. Partitioning the
An integrated approach to UML diagrams
marks into separate marking models keeps the principle model pure, and the marks related to
different concerns
Class separate
and Object, Usefrom
Case,each other. Were
Sequence, the downstream
Collaboration, technology
Statechart, Activity,toComponent,
change, the
relatedand
marks could be Diagrams
Deployment dropped without disturbing the principle model.

Extension Mechanisms

Figure A-2.
The Object Tightly
Constraint coupled
Language marking models keep technology
(OCL)
decisions out of the principal models

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System
Model developers
elaboration is have used modeling
the intentional languages
enrichment of a for decadesmodel.
generated to specify, visualize,
Generated models
construct, and document systems. The Unified Modeling Language (UML)
likely have need tailoring or optimization (otherwise, why have them?). Modelers is one of thoseor
assign
languages.
update UML makes
the marks it possible
to control for team members
the transformation to collaborate
function. Programmers by will
providing a common
add custom code
language
in protectedthat applies
areas. to arecord
Marks multitude
bothof different
the updatessystems. Essentially,
and whether it enables
the marks youfrom
originate to
communicate solutions in a consistent, tool-supported language.
humans.
Today,
The UML has
unpolluted become
model, be the standard
it PIM or PSM,method
remainsforthe
modeling
same no software
matter systems,
how manywhich means
downstream
you're probably
technologies there confronting this rich model
are. The principle and expressive language more
remains unchanged, than ever
regardless before. And
of whether a
even though
dependent you appears
model may not orwrite UML diagrams yourself, you'll still need to interpret
disappears.
diagrams written by others.
With the technology concerns partitioned from the principle model and each other, the
UML 2.0 models
marking in a Nutshell from independently
can evolve O'Reilly feels your pain.
of each It's been
other. crafted for professionals
The technology functions can like
create
you who
default mustfor
marks read, create,Technical
elements. and understand system
modelers, who artifacts expressed
are experts usingfields,
in different UML. elaborate
Furthermore,
their it's been fully revised to cover version 2.0 of the language.
models separately.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
A.4. Sewing the Models Together
...............................................
Publisher:O'Reilly
Pub Date: June 2005
At any one time, the 0-596-00795-7
ISBN: many models are implicitly related. For example, a transformation
function transforms
Pages:the
234PIM and related marks from a marking model to create a PSM. An
MDA system of models probably has several PSMs, each with its own marking model and at
least one code model, and likely its own marking model or handcoded extensions.
Table of Contents | Index
Over time, the PIM will change, as will the marks on it and on the PSM. If the transformation
function summarily overwrites existing marks explicitly updated by a modeler, the effect of
the marks
System disappears;
developers theused
have modeler must languages
modeling reenter all for
again. Clearly,
decades this is untenable.
to specify, visualize, On the
other hand, deletions from the PIM will remove the justification of derived
construct, and document systems. The Unified Modeling Language (UML) is one of those elements in the
PSM. The transformation
languages. UML makes itfunction
possiblemust havemembers
for team a way to to detect and merge
collaborate collisions,a and
by providing to
common
remove
languagedeadwood. Traceability
that applies of ownership
to a multitude and systems.
of different generation becomes ait serious
Essentially, enablesissue.
you to
communicate solutions in a consistent, tool-supported language.
MDA stores the relationships between source models, marks, and target models in a mapping
model . The
Today, UMLexample in Figure
has become A-3 shows
the standard how each
method element in
for modeling the target
software modelwhich
systems, has a means
mapping to the source
you're probably modelthis
confronting andrich
the and
appropriate marks
expressive (and, more
language optionally, to the
than ever marking
before. And
models).
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
Figure A-3.read,
you who must Mapping
create, models ensure
and understand traceability
system between
artifacts expressed using the
UML. models
and
Furthermore, it's been fully revised to the
cover marks
version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

The mappings provide the traceability necessary for subtle evolution of the whole system. The
transformation process follows the links when updating a target model from new versions of
If you're new to UML, a tutorial with realistic examples has even been included to help you
the source model or source mark model. The transformation function detects conflicts
quickly familiarize yourself with the system.
between the generated elements and the existing element added or modified by modelers. It
identifies deadwood in the new target model that exists only because of now-deleted
elements in the source model.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
A.5. Transforming Models
...............................................
Publisher:O'Reilly
Pub Date: June 2005
The models up to now
ISBN: provide multiple abstractions of the system. They separate the
0-596-00795-7
platform concerns. They
Pages: 234trace the origin of each element. These models are static.
Transformation functions apply a transformation to a source model to produce a target model.
Figure A-4 shows the general case of the transformation function creating or updating target
models from |the
Table of Contents source model and marks. The transformation function, along with the marks
Index

and the mappings, are called the bridge between the two principle models.

The mapping
System model have
developers acts in twomodeling
used roles. Before the transformation,
languages for decades toit specify,
relates the elements of the
visualize,
source models, together with previous versions of the target models. After
construct, and document systems. The Unified Modeling Language (UML) is one of those the
transformation,
languages. UMLthe mapping
makes modelfor
it possible traces
teamthe source of
members to every targetby
collaborate model element
providing created
a common
or updated.
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
During model evolution, transformations at the PIM can cause turmoil in the PSM and code
models. Because
Today, UML of the leverage
has become MDA gives,
the standard methodslight refactoring
for modeling can render
software the mapping
systems, model
which means
incapable of reconciling
you're probably changes.
confronting If mappings
this rich are recorded
and expressive by element
language more thanID,ever
deleting an And
before.
element and recreating
even though you may notit risks
writeorphaning it from
UML diagrams its marks
yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you Figure
who mustA-4.
read,Custom
create, andmodel transformations
understand automate
system artifacts expressed usingchanging
UML.
Furthermore, it's been fully revisedabstraction levels
to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

and derivative elements


The Object in the
Constraint target models.
Language (OCL) If the PSM or code model has a great deal of
elaboration, MDA doesn't proscribe a solution to this.

Figure A-4 shows a transformer acting through a transformation definition. The transformer
If you're
can new to UML,
be implemented a tutorial
equally wellwith
as a realistic
script orexamples has even
a procedural been In
language. included to help
any case, eachyou
quickly familiarize
transformation yourself
requires withdefinition;
its own the system. the transformer from PIM to presentation PSM
can't be reused for the database PSM to SQL code model.

The concept of reverse engineering, or round-trip engineering, received a great deal of


interest a few years ago. MDA doesn't address it specifically. Each transformation function can
have an inverse function to create the abstract from the concrete, but nothing requires an
www.it-ebooks.info

MDA solution to provide it.

Reverse engineering generally creates more problems than it solves. You reverse-engineer
UML 2.0 in models.
only elaborate concrete a Nutshell Concrete models may not respect the naming conventions, or
they may have slight or gross
ByDan Pilone, variants of expected patterns. The resultant abstract model will
Neil Pitman
have no insight ...............................................
into the structures found. Furthermore, it becomes unclear where ultimate
truth lies. Remember,
Publisher: MDA doesn't stand for program-driven modeling.
O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
A.6. Languages to Formally Describe MDA
...............................................
Publisher:O'Reilly
Pub Date: June 2005
The transformations describe in the preceding section can't work without strict inputs. Each
ISBN:0-596-00795-7
model must respect
Pages:a234
structure that constrains its expressiveness formally; automated
transformations can't understand just any model. Each model requires a specialized model, as
shown in Figure A-5. UML profiles provide one vehicle to constrain each model; alternative
MOF-based
Table of Contentsmetamodels
| Index provide another.

Explicit UML profiles enforce constraints so that only models considered valid by the
transformers can be have
System developers processed. Considering
used modeling the leverage
languages of expression
for decades between
to specify, the PIM and
visualize,
each PSM, and again between each PSM and its derivative
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
Figure A-5. Each model and transformation definition conforms to a
language
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

code models, slightly invalid source models would produce rubbish. UML profiles provide the
discipline needed to keep such a complex system running.
www.it-ebooks.info

MDA systems need not have such a formal definition as the one we described. Certainly
architects who extend the transformations with custom scripting will not back it with a formal
transformation language. The languages act much as DTDs or schemas do for an XML
UML 2.0 assure
document: languages in a Nutshell
that the consumers will understand the model.
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
Appendix B. The Object Constraint
...............................................
Publisher:O'Reilly

Language Pub Date: June 2005


ISBN:0-596-00795-7
Pages:234
The Object Constraint Language 2.0 (OCL) is an addition to the UML 2.0 specification that
provides you with a way to express constraints and logic on your models. For example, you
can
Table use OCL to
of Contents convey that a person's age must always be greater than 0 or that a branch
| Index

office must always have one secretary for every 10 employees.

OCL isn'tdevelopers
System new to UMLhave
2.0;used
it was first introduced
modeling languagesin UML 1.4. However,
for decades as ofvisualize,
to specify, UML 2.0, it was
formalized using the Meta-Object Facility and UML 2.0. From a user's
construct, and document systems. The Unified Modeling Language (UML) is one ofperspective the
those
language
languages.hasUML
been updated
makes and refined
it possible but the
for team fundamentals
members remainby
to collaborate the same. This
providing appendix
a common
introduces the basic
language that concepts
applies of OCL. of
to a multitude For more detailed
different systems.information,
Essentially,consult the OCL
it enables you to
specification
communicate available from
solutions in athe Object Management
consistent, tool-supportedGroup's web site (http://www.omg.org/).
language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell

B.1. OCL By Dan Pilone,Neil Pitman


Basics
...............................................
Publisher:O'Reilly
Pub Date: June 2005
The Object Constraint Language is just that: a language. It obeys a syntax and has keywords.
ISBN:0-596-00795-7
However, unlikePages:
other234
languages, it can't be used to express program logic or flow control. By
design, OCL is a query-only language; it can't modify the model (or executing system) in any
way. It can be used to express preconditions, postconditions, invariants (things that must
always be TRue
Table of Contents ), guard conditions, and results of method calls.
| Index

OCL can be used virtually anywhere in UML and is typically associated with a classifier using a
note. When
System an OCL expression
developers is evaluated,
have used modeling it is considered
languages to be
for decades to instantaneous, meaning the
specify, visualize,
associated classifier can't change state during the evaluation of an expression.
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate
B.1.1. Basic solutions
Typesin a consistent, tool-supported language.
Today, UML has become the standard method for modeling software systems, which means
OCL has several built-in types that can be used in OCL expressions:
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Boolean
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who
Mustmust read, true
be either create, and understand
or false . Supports system artifacts
the logical expressed
operators and,or,using UML.
xor,not ,implies,
Furthermore, it's been
andif-then-else. fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
Integer
UML or object-oriented programming concepts.
Any integer value (e.g., 100, -12345, 5211976, etc.). Supports the operators *,+,-,/,
Topicsand abs( ).
include:

Real The role and value of UML in projects

The object-oriented
Any paradigm
decimal value (e.g., and its
2.222003, relation
-67.76, to the
etc.). UML the operators *,+,-,/, and
Supports
floor( ).
An integrated approach to UML diagrams

String Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
A series of letters, numbers, or symbols interpreted as a string (e.g., "All writing and no
Extension
play make Mechanisms
Dan..."). Supports the operators concat( ),size( ), and substring( ).

The Object
In addition to the Constraint Language
built-in types, (OCL) used in your UML model is recognized as a type
any classifier
by OCL. Because OCL is a strongly typed language, you can't compare values of one type
directly with values of another type.
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
B.1.2. Casting

OCL does support casting objects from one type to another as long as they are related
through a generalization relationship. To cast from one type to another use the operation
www.it-ebooks.info

oldType. oclAsType(newType) . For example, to cast a Java List to an ArrayList to call the
size( ) operation, use the expression:

UML 2.0 in a Nutshell


List.oclAsType(ArrayList).size( )
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
If the actual object isn't an
Pub Date: June instance
2005 of the new type, the expression is considered undefined.
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell

B.2. OCL By Dan Pilone,Neil Pitman


Syntax
...............................................
Publisher:O'Reilly
The remainder of
Pubthis chapter
Date: uses examples from the class diagram shown in Figure B-1.
June 2005
ISBN:0-596-00795-7
Pages:234

B.2.1. Constraints on Classifiers


Table of Contents | Index

Each OCL expression must have some sense of context that an expression relates to. Often
the context
System can be determined
developers by where languages
have used modeling the expression is written.
for decades For example,
to specify, you can link
visualize,
aconstruct,
constraintand
to an element using a note. You can refer to an instance of the
document systems. The Unified Modeling Language (UML) is one of those context classifier
using the keyword
languages. self. itFor
UML makes example,
possible for if you members
team had a constraint on Student
to collaborate that theira GPA
by providing must
common
always be higher than 2.0, you can attach an OCL expression to Student using
language that applies to a multitude of different systems. Essentially, it enables you toa note and
refer to the GPA
communicate as follows:
solutions in a consistent, tool-supported language.

Today, UML has


self.GPA > become
2.0 the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
Figure B-1. Example class diagram used in this chapter
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)


It's important to realize that this OCL expression is an invariant, meaning the system would
be in an invalid state if a student's GPA dropped to less than 2.0. If you want to allow a GPA
of less than 2.0 and send out a letter to the student's parents in the event such a low GPA is
If you're new
achieved, to UML,
you would a tutorial
model such with realistic
behavior examples
using has evensuch
a UML diagram beenasincluded to help
an activity or you
quickly familiarize
interaction diagram.yourself with the system.

You can follow associations between classifiers using the association end names as though
they were attributes of the originating classifier. The following invariant on Course ensures
that the instructor is being paid:
www.it-ebooks.info

self.instructor.salary > 0.00

If an associationUML
has2.0a inmultiplicity
a Nutshell of 0..1, you can treat the association end as a Set and
ByDan
check to see if the Pilone,
value isNeil
setPitman
by using the built-in notEmpty( ) operation. To call the
notEmpty( ) operation on a set you must use an arrow (->) rather than a dot (.). See
...............................................
"Collections" forPublisher: O'Reilly
more information on sets. The following invariant on Course enforces that a
Pub Date: June 2005
course has an instructor:
ISBN:0-596-00795-7
Pages:234
self.instructor->notEmpty( )

Table of Contents | Index


If an association role name isn't specified, you can use the classifier name. The following
invariant on School checks that each course has a room assignment:
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified<>
self.Course->forAll(roomAssignment Modeling Language (UML) is one of those
'No room!')
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate
Comments cansolutions in ainto
be inserted consistent, tool-supported
an expression language.
by prefixing each comment with two dashes (),
like this:
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even--though
make you
suremay
this
notstudent could
write UML graduate
diagrams yourself, you'll still need to interpret
self.GPA
diagrams > 2.0
written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
Ifyou
youwho
can't determine
must the context
read, create, of an expression
and understand systemby lookingexpressed
artifacts at the UMLusingmodel, or if you
UML.
want to be explicit
Furthermore, with fully
it's been the context, usecover
revised to the OCL keyword
version 2.0 ofcontext , followed by the classifier
the language.
name. If you use this notation, you should say what the expression represents. In the
following case, we're new
This comprehensive showing an invariant,
edition so we use
not only provides the keyword invto
a quick-reference . Other types
all UML of
2.0 diagram
expressions are
types, it also explained
explains keyinconcepts
later sections.
in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
context Student
Topics include:
inv: self.GPA > 2.0

The role and value of UML in projects


Instead of using the keyword self, you can assign a name to a classifier that you can use in
the expression. Write the name
The object-oriented you and
paradigm wantits
torelation
use, followed
to the by
UMLa colon (:) and then the
classifier name. For example, you can name the instance of Student as s:
An integrated approach to UML diagrams
context s : Student
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
inv: s.GPA > 2.0
and Deployment Diagrams

Extension Mechanisms
Finally, you can name an expression by placing a label after the expression type but before
the colon
The (Object
:). TheConstraint
label is purely decorative;
Language (OCL) it serves no OCL function.

context s : Student
inv minimumGPARule: s.GPA > 2.0
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

B.2.2. Constraints on Operations

Beyond basic classifiers, OCL expressions can be associated with operations to capture
www.it-ebooks.info

preconditions and postconditions. Place the signature of the target operation (classifier,
operation name, parameters, etc.) after the context keyword. Instead of the invariant
keyword, use either pre or post for preconditions and postconditions, respectively.
UML 2.0 in a Nutshell
The following expression
ByDan Pilone, ensures
Neil Pitman that any student who will be registered for a course has paid
their tuition: ...............................................
Publisher:O'Reilly
Pub Date: June 2005
context Course::registerStudent(s : Student) : boolean
ISBN:0-596-00795-7
pre: s.tuitionPaid = true
Pages:234

When writing| postconditions,


Table of Contents Index you can use the keyword result to refer to the value returned
by an operation. The following expressions verify that a student's tuition was paid before
registering for a course and that the operation registerStudent returned true:
System developers have used modeling languages for decades to specify, visualize,
construct,
contextandCourse::registerStudent(s
document systems. The Unified Modeling Language
: Student) : boolean (UML) is one of those
languages. UML makes it possible
pre: s.tuitionPaid = true for team members to collaborate by providing a common
language
post:that applies
result to a multitude of different systems. Essentially, it enables you to
= true
communicate solutions in a consistent, tool-supported language.

Today,
As UMLwith
you can hasinvariants,
become the standard
you can namemethod for modeling
preconditions and software systems,
postconditions which means
by placing a label
you're
after theprobably confronting
pre or post this rich and expressive language more than ever before. And
keywords:
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
context Course::registerStudent(s : Student) : boolean
pre hasPaidTuition: s.tuitionPaid = true
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
post studentWasRegistered: result = true
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

Postconditions can use


This comprehensive theedition
new @pre keyword
not onlyto refer toathe
provides value of sometoelement
quick-reference all UMLbefore an
2.0 diagram
operation executes. The following expression ensures that a student was registered and
types, it also explains key concepts in a way that appeals to readers already familiar with that
the
UMLnumber of students in
or object-oriented the course has
programming increased by 1. This expression uses the self
concepts.
keyword to reference the object that owns the registerStudent operation.
Topics include:
context Course::registerStudent(s : Student) : boolean
pre: s.tuitionPaid = true
The role
post: and value
result of UML
= true AND in projects
self.students = self.students@pre + 1
The object-oriented paradigm and its relation to the UML

You mayAn specify the approach


integrated results of to
a query operation using the keyword body. Because OCL
UML diagrams
doesn't have syntax for program flow, you are limited to relatively simple expressions. The
following expression
Class indicates
and Object, that Sequence,
Use Case, honors students are students
Collaboration, with GPAs
Statechart, higherComponent,
Activity, than 3.5.
The collection syntax used
and Deployment in this example is described in the "Collections" section.
Diagrams

Extension Mechanisms
context Course::getHonorsStudents( ) : Student
body: self.students->select(GPA > 3.5)
The Object Constraint Language (OCL)

B.2.3.
If you'reConstraints on Attributes
new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

OCL expressions can specify the initial and subsequent values for attributes of classifiers.
When using OCL expressions with attributes, you state the context of an expression using the
classifier name, two colons (::), the attribute name, another colon (:), and then the type of
the attribute. You specify the initial value of an attribute using the keyword init:
www.it-ebooks.info

context School::tuition : float


init: 2500.00
UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
You can specify ...............................................
the value of attributes after their initial value using the derive keyword. The
following example increases
Publisher: the tuition value by 10% every time you query it:
O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7: float
context: School::tuition
Pages:234
derive: tution * 10%

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
B.3. Advanced OCL Modeling
...............................................
Publisher:O'Reilly
Like any other language, OCL2005
Pub Date: June has an order of precedence for operators, variable declarations, and
ISBN:
logical constructs 0-596-00795-7
(only for evaluating your expressions, not for program flow). The following
Pages:
sections describe 234
constructs that you can use in any OCL expression.

Table of Contents | Index


B.3.1. Conditionals
OCL supports
System basic boolean
developers expression
have used modelingevaluation
languagesusing the if-then-else-endif
for decades keywords. The
to specify, visualize,
conditions
construct, and document systems. The Unified Modeling Language (UML) is one of used
are used only to determine which expression is evaluated; they can't be thoseto
influence theUML
languages. underlying system
makes it or for
possible to affect
team program
membersflow. The following
to collaborate invariant aenforces
by providing commonthat a
student's
languageyear
that of graduation
applies is valid only
to a multitude if she has
of different paid herEssentially,
systems. tuition: it enables you to
communicate solutions in a consistent, tool-supported language.
context Student inv:
Today,
if UML has become
tuitionPaid the standard
= true then method for modeling software systems, which means
you're yearOfGraduation
probably confronting= this
2005rich and expressive language more than ever before. And
evenelse
though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.
yearOfGraduation = 0000
endif
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore,
OCL's it'sare
logic rules been fully revised
slightly differenttofrom
cover version
typical 2.0 of the language.
programming language logic rules. The boolean
evaluation rules are:
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
1. TrueOR-ed with anything is true.
Topics include:
2. FalseAND-ed with anything is false.

3. False
The role andanything
IMPLIES value of is
UML in. projects
TRue

Theimplies keyword evaluate


The object-oriented the first
paradigm andhalf
itsof an expression,
relation to the UMLand, if that first half is true, the result
is taken from the second half. For example, the following expression enforces that if a student's
GPA isAn integrated
less than 1.0,approach
their yeartoofUML diagrams
graduation is set to 0. If the GPA is higher than 1.0, Rule #3
applies, and the entire expression is evaluated as true (meaning the invariant is valid).
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams
context Student inv:
self.GPA
Extension<Mechanisms
1.0 IMPLIES self.yearOfGraduation = 0000

The Object Constraint Language (OCL)


OCL's boolean expressions are valid regardless of the order of the arguments . Specifically, if the
first argument of an AND operator is undefined, but the second operator is false, the entire
expression is false. Likewise, even if one of the arguments to an OR operator is undefined, if the
If you're
other new
is true to UML,
, the a tutorial
expression with.If-then-else-endif
is true realistic examples has even been
constructs areincluded to similarly;
evaluated help you if the
quickly familiarize yourself with the system.
chosen branch can be evaluated to TRue or false, the nonchosen branch is completely disregarded
(even if it would be undefined).

B.3.2. Variable Declaration


www.it-ebooks.info

OCL supports several complex constructs you can use to make your constraints more expressive
and easier to write. You can break complex expressions into reusable pieces (within the same
UML 2.0 in a Nutshell
expression) by using the let and in keywords to declare a variable. You declare a variable by
Byfollowed
giving it a name, Dan Pilone,Neilby a Pitman
colon (:), its type, an expression for its value, and the in keyword.
...............................................
The following example declares an expression that ensures a teacher of a high-level course has an
Publisher:O'Reilly
appropriate salary:
Pub Date: June 2005
ISBN:0-596-00795-7
context Course inv:
Pages:234
let salary : float = self.instructor.salary in
if self.courseLevel > 4000 then
salary
Table of Contents > 80000.00
| Index
else
salary < 80000.00
endif
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
You can define
language variables
that applies to that can be used
a multitude in multiple
of different expressions
systems. on a it
Essentially, classifier-by-classifier
enables you to basis
using the def keyword.
communicate solutions For
in aexample,
consistent,instead of declaring
tool-supported salary as a variable using the let
language.
keyword, you can define it using the def keyword for the Course context. Once you define a
variable
Today, UML usinghas thebecome
def keyword, you may
the standard use that
method for variable
modelinginsoftware
any expression
systems,that is inmeans
which the same
context. The syntax
you're probably for the def
confronting thiskeyword
rich andisexpressive
the same as that formore
language the let
thankeyword:
ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams
context written
Courseby others.
def: salary : float = self.instructor.salary
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
So, now you can write the previous invariant as:
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
context
types, Course inv:
it also explains key concepts in a way that appeals to readers already familiar with
UMLifor self.courseLevel > 4000 then
object-oriented programming concepts.
salary > 80000.00
getHonorsStudentselse
Topics include:
salary < 80000.00
endif
The role and value of UML in projects

The object-oriented paradigm and its relation to the UML


B.3.3. Operator Precedence
An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
OCL operators have the following order of precedence (from highest to lowest):
and Deployment Diagrams

Extension Mechanisms
@pre

The(.Object
dot Constraint
) and arrow Language (OCL)
(->) operations

not and unary minus (-)

If you're
* andnew
/ to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
+ and -

if-then-else-endif

<,>,<=, and >=


www.it-ebooks.info

= and <>

and,or, and xor


UML 2.0 in a Nutshell
implies ByDan Pilone,Neil Pitman
...............................................
You can use parentheses to group expressions, which will be evaluated from the innermost set of
Publisher:O'Reilly
parentheses to the outermost.
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

B.3.4. Built-in Object Properties


Table of Contents | Index
OCL provides a set of properties on all objects in a system. You can invoke these properties in your
expressions as you do any other properties. The built-in properties are:
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML
oclIsTypeOf (t :makes
Type ):itBoolean
possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions
Returnstrue if the in a consistent,
tested object is tool-supported language.
exactly the same type as t.

Today, UML has become the standard method for modeling software systems, which means
t : confronting
you're probably
oclIsKindOf( Type ): Boolean
this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
Returns
diagrams TRue by
written if the tested object is the same type or a subtype of t.
others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must :read,
oclInState(s ): Boolean
Statecreate, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
ReturnsTRue if the tested object is in state s. The states you can test must be part of a state
machine attached
This comprehensive newtoedition
the classifier
not onlybeing tested.
provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
oclIsNew( ) : Boolean
TopicsDesigned
include: to be used in a postcondition for an operation, it returns true if the object being
tested was created as a result of executing the operation.
The role and value of UML in projects
oclAsType (t : Type ): Type
The object-oriented paradigm and its relation to the UML
Returns the owning object casted to Type . If the object isn't a descendant of t, the operation
An integrated approach to UML diagrams
is undefined.
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
Here are
andsome examples
Deployment of the built-in properties:
Diagrams

Extension
-- Mechanisms
test that the instructor is an instance of Teacher
context Course
The Object
inv: Constraint Language (OCL)
self.instructor.oclIsTypeOf(Teacher)
-- cast a Date class to a java.sql.Date to verify the minutes
-- (it's very unlikely the foundationDate would be a java.sql.Date
If you're
-- sonewthis
to UML, a tutorialwould
invariant with realistic examplesbut
be undefined, hasthis
even is
been
anincluded
exampleto help you
quickly familiarize yourself with
-- of using oclAsType( )) the system.
context School
inv: self.foundationDate.oclAsType(java.sql.Date).getMinutes( ) = 0
www.it-ebooks.info

B.3.5. Collections
UML 2.0 in a Nutshell
OCL defines several types of collections that represent several instances of a classifier. The basic
ByDan Pilone,Neil Pitman
type is Collection, which is the base class for the other OCL collection classes. Quite a few
...............................................
operations are defined for Collection; see the OCL specification for the complete list.
Publisher:O'Reilly
Pub Date: June 2005
All collections support a way to select or reject elements using the operations select( ) and
ISBN:0-596-00795-7
reject( ), respectively.
Pages:234
To invoke an operation on a collection, you use an arrow (->) rather than a
dot (.) (a dot accesses a property). The result of select or reject is another collection containing
the appropriate elements. Remember that since OCL can't modify a system in any way, the original
collection is unchanged. The notation for a select is:
Table of Contents | Index

collection->select(boolean expression)
System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages.
So, to selectUML makes
students it possible
with for team
GPAs higher thanmembers to collaborate
3.0, you can by providing a common
use the expression:
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.
context Course::getHonorsStudents( ) : Student
body: self.students->select(GPA > 3.0)
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
Or, to eliminate
diagrams honor
written students that haven't paid their tuition:
by others.

UML context
2.0 in a Nutshell from O'Reilly feels your pain.
Course::getHonorsStudents( ) : It's been crafted for professionals like
Student
you body:
who must read, create, and understand
self.students->select(GPA system artifacts expressed using
> 3.0)->reject(tuitionPaid UML.
= false)
Furthermore, it's been fully revised to cover version 2.0 of the language.

This
In thecomprehensive new edition
previous examples, not only
the context provides
for the selecta and
quick-reference to all UML
reject statements was2.0 diagram
implied. You can
types, it name
explicitly also explains key concepts
the element you wantintoa use
wayinthat
theappeals
booleantoexpression
readers already familiar
by prefixing with
the expression
UMLaorlabel
with object-oriented programming
and a pipe symbol (|). So,concepts.
a rewrite of the GPA example using a label to identify each
student looks like this:
Topics include:

context Course::getHonorsStudents( ) : Student


body: self.students->select(curStudent
The role and value of UML in projects | curStudent.GPA > 3.0)

The object-oriented paradigm and its relation to the UML


Finally, you can specify the type of the element you want to evaluate. You indicate the type by
placingAna integrated approach
colon (:) and to UMLtype
the classifier diagrams
after the label. Each element of the collection you are
evaluating must be of the specified type, or else the expression is undefined. You can rewrite the
Class and
GPA example to Object,
be evenUse Case,
more Sequence,
specific Collaboration,
and require Statechart,
that it evaluate Activity,s:Component,
only Student
and Deployment Diagrams

Extension
context Mechanisms
Course::getHonorsStudents( ) : Student
body: self.students->select(curStudent : Student | curStudent.GPA > 3.0)
The Object Constraint Language (OCL)

Often you will need to express a constraint across an entire collection of objects, so OCL provides
theforAll operation that returns true if a given Boolean expression evaluates to true for all of the
If you're new to UML, a tutorial with realistic examples has even been included to help you
elements in a collection. The syntax for forAll is the same as that for select and reject. So, you
quickly familiarize yourself with the system.
can write a constraint that enforces that all students in a Course have paid their tuition:

context Course
inv: self.students->forAll(tuitionPaid = true)
www.it-ebooks.info

As you can with select, you can name and type the variable used in the expression:

UML 2.0 in a Nutshell


context Course
inv: self.students->forAll(curStudent
ByDan Pilone,Neil Pitman : Student | curStudent.tuitionPaid = true)
...............................................
Publisher:O'Reilly
If you need to check
Pub Date:to seeJune if 2005
there is at least one element in a collection that satisfies a boolean
expression, youISBN:
can use0-596-00795-7
the operation exists. The syntax is the same as that for select. The
Pages:ensures
following expression 234 that at least one of the students has paid their tuition:

context Course
Table of Contents | Index
inv: self.students->exists(tuitionPaid = true)

System developers have used modeling languages for decades to specify, visualize,
Like select, and
construct, you document
can name systems.
and type The
the variables used in Language
Unified Modeling the expression:
(UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language thatCourse
context applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported
inv: self.students->exists(curStudent language.
: Student | curStudent.tuitionPaid = true)

Today, UML has become the standard method for modeling software systems, which means
you're
You canprobably
check to confronting this rich
see if a collection is and expressive
empty using thelanguage more
operations than or
isEmpty ever before.. And
notEmpty The
even though you may not write UML diagrams yourself, you'll still need
following expression ensures that the school has at least one course offering: to interpret
diagrams written by others.

UMLcontext School from O'Reilly feels your pain. It's been crafted for professionals like
2.0 in a Nutshell
you inv: self.Course->notEmpty(
who must )
read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

Colophon UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
About the ...............................................
Author
Publisher:O'Reilly
Colophon Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell

About theBy Dan Pilone,Neil Pitman


Author
...............................................
Publisher:O'Reilly
Dan Pilone is aPub software architect
Date: June 2005 with Blueprint Technologies, Inc., cofounder and president
of Zizworks, Inc., ISBN:
and0-596-00795-7
a terrible rock climber. He has designed and implemented systems for
Hughes, ARINC,Pages: UPS,234and the Naval Research Laboratory. When not writing for O'Reilly, he
teaches software design and software engineering at the Catholic University in Washington,
D.C. He is the author of the UML Pocket Reference and has had several articles published
Table of Contents
covering | Index process, consulting in the software industry, and 3D graphics in Java.
software

Neil Pitman is chief technical officer of Mahjong Mania, codeveloper of LamMDA from Mindset
Corporation, and formerly
System developers vice president
have used of researchfor
modeling languages and development
decades at Codagen
to specify, visualize,
Technologies.
construct, andNeil has 20 years
document of experience
systems. The UnifiedinModeling
softwareLanguage
development ranging
(UML) is onefrom medical
of those
systems to Smalltalk
languages. UML makes development
it possible platforms, gaming software
for team members to code
to collaborate by generation.
providing a When
commonhe
does real work,
language it's in J2EE
that applies and XSLT as
to a multitude well as UML.
of different Look Essentially,
systems. for him at it enables you to
http://www.architecturerules.com.
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell

ColophonBy Dan Pilone,Neil Pitman


...............................................
Publisher:O'Reilly
Our look is the result of reader
Pub Date: comments, our own experimentation, and feedback from
June 2005
ISBN:0-596-00795-7
distribution channels. Distinctive covers complement our distinctive approach to technical
Pages:
topics, breathing 234
personality and life into potentially dry subjects.

The animal on the cover of UML 2.0 in a Nutshell is a chimpanzee (Pan troglodytes ).
Chimpanzees
Table of Contents | use
Indexa vast array of facial expressions, postures, and gestures to communicate

with each other, in addition to at least 32 different sounds. There is some evidence to suggest
that chimpanzees can learn symbolic languages.
System developers have used modeling languages for decades to specify, visualize,
The naturaland
construct, habitat of the systems.
document chimpanzee TheisUnified
western Africa, from
Modeling Sierra(UML)
Language LeoneistoonetheofGreat
thoseLakes
east of the Congo.
languages. UML makes Livingitprimarily in forested
possible for areas, chimpanzees
team members to collaborate spend 50 to 70apercent
by providing common of
their time in
language trees.
that They
applies toare omnivores,
a multitude eating primarily
of different systems.fruits and vegetables,
Essentially, it enables but they
you to will
also hunt and eat
communicate small animals.
solutions They live
in a consistent, in family groups
tool-supported that consist of about twice as
language.
many females as males. While adult chimpanzees aren't monogamous, there's a close bond
between
Today, UML a young chimp and
has become theits parents,
standard and this
method forbond remains
modeling unbroken
software for life.
systems, which means
Chimpanzees
you're probably areconfronting
very sociable thisand affectionate
rich and expressiveanimals, and frequently
language more thanhug, everkiss, stroke
before. each
And
other, or hold you
even though hands. mayViolent fights
not write UML often break out
diagrams withinyou'll
yourself, a social
stillgroup.
need to The loser of the fight
interpret
makes
diagrams up to the winner
written by displaying submissive behavior and conciliatory gestures. In this
by others.
way they maintain the social harmony.
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
Though
you who able
mustto,read,
the chimpanzee
create, andrarely walks system
understand erect onartifacts
both feet. Short arm
expressed muscles
using UML. prevent
simultaneous
Furthermore,extension of the
it's been fully wriststo
revised and fingers.
cover Because
version 2.0 ofofthethis, chimpanzees can't walk
language.
with their hands flat; when walking on all fours, only the knuckles of their hands touch the
ground. Unlike humannew
This comprehensive feet, chimpanzee
edition not onlyfeet also have
provides an opposing toe,
a quick-reference butUML
to all it's 2.0
useddiagram
mainly
for climbing and for walking on precarious footing. The foot is rarely
types, it also explains key concepts in a way that appeals to readers already familiar withused for picking up
objects.
UML or object-oriented programming concepts.
Mary Anne Weeks Mayo was the production editor and proofreader, and Audrey Doyle was the
Topics include:
copyeditor for UML 2.0 in a Nutshell . Phil Dangler and Colleen Gorman provided quality
control. Peter Ryan provided production assistance. Lucie Haskins wrote the index.
The role and value of UML in projects
Ellie Volckhausen designed the cover of this book, based on a series design by Edie
Freedman. The cover image
The object-oriented is a 19th-century
paradigm engraving
and its relation to thefrom
UMLthe Dover Pictorial Archive.
Karen Montgomery produced the cover layout with Adobe InDesign CS using Adobe's ITC
Garamond font.
An integrated approach to UML diagrams

David Class
Futatoand
designed
Object,the interior
Use Case, layout. ThisCollaboration,
Sequence, book was converted by Keith
Statechart, Fahlgren
Activity, to
Component,
FrameMaker 5.5.6 with Diagrams
and Deployment a format conversion tool created by Erik Ray, Jason McIntosh, Neil
Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Linotype Birka;
Extension
the heading font Mechanisms
is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono
Condensed. The illustrations that appear in the book were produced by Robert Romano,
The Read,
Jessamyn Objectand
Constraint Language
Lesley Borash (OCL)
using Macromedia FreeHand MX and Adobe Photoshop CS.
The tip and warning icons were drawn by Christopher Bing. This colophon was written by
Clairemarie Fisher O'Leary.
If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

# (pound sign) 2nd


Table of Contents | Index
( ) parentheses 2nd
* (asterisk)
loop operator
System developers have used modeling languages for decades to specify, visualize,
looping constraints
construct, and document systems. The Unified Modeling Language (UML) is one of those
multiplicity value
languages. UML makes it possible for team members to collaborate by providing a common
OCL operator 2nd
language that applies to a multitude of different systems. Essentially, it enables you to
+ (plus sign)
communicate solutions in a consistent, tool-supported language.
OCL operator 2nd
visibility 2nd
Today, UML has become the standard method for modeling software systems, which means
, (comma) 2nd
you're probably confronting this rich and expressive language more than ever before. And
- (dash)
even though you may not write UML diagrams yourself, you'll still need to interpret
arguments and
diagrams written by others.
comments and
messages
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
visibility 2nd
you who must read, create, and understand system artifacts expressed using UML.
- (minus sign) 2nd
Furthermore, it's been fully revised to cover version 2.0 of the language.
. (dot) 2nd 3rd
/ (forward slash)
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
deferred events
types, it also explains key concepts in a way that appeals to readers already familiar with
derived notation
UML or object-oriented programming concepts.
OCL operator 2nd
property instances and
Topics include:
4+1 views
: (colon)
constraints
The roleand and value of UML in projects
interaction overview diagram
objectThenames and
object-oriented paradigm and its relation to the UML
OCL and 2nd 3rd 4th
An integrated
parameter approach to UML diagrams
name and 2nd
port typing
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
< (less than)
<<access>>andkeyword
Deployment Diagrams
<<artifacts>> keyword
Extension
<<attribute>> keywordMechanisms
<<bind>> keyword
The Object Constraint Language (OCL)
<<centralBuffer>> keyword
<<class>> keyword
<<component>> keyword
<<create>> keyword 2nd
If you're new to UML, a tutorial with realistic examples has even been included to help you
<<database system>> stereotype
quickly familiarize yourself with the system.
<<datastore>> keyword
<<decisionInput>> keyword
<<depends>> keyword
<<deploy>> keyword
<<deployment spec>> stereotype
www.it-ebooks.info

<<destroy>> message
<<device>> stereotype
<<exception>> keyword
<<external>> keywordUML 2.0 in a Nutshell
<<import>> keyword ByDan Pilone,Neil Pitman
<<interface>> keyword
...............................................
Publisher:O'Reilly
<<iterative>> keyword
<<J2EE Containers>>Pub Date: June 2005
stereotype
ISBN:
<<localPostcondition>> 0-596-00795-7
keyword
Pages:
<<localPrecondition>> 234
keyword
<<merge>> keyword
<<multicast>> keyword
Table of Contents |keyword
<<multireceive>> Index

<<OS>> stereotype
<<parallel>> keyword
System developers
<<postcondition>> keywordhave used modeling languages for decades to specify, visualize,
construct, and
<<precondition>> document systems. The Unified Modeling Language (UML) is one of those
keyword
languages.
<<provided UML makes
interfaces>> keywordit possible for team members to collaborate by providing a common
language that
<<realizations>> applies to a multitude of different systems. Essentially, it enables you to
keyword
communicate
<<required solutions
interfaces>> keywordin a consistent, tool-supported language.
<<selection>> keyword 2nd
Today, UML has become the standard method for modeling software systems, which means
<<singleton>>
you're probably
<<transformation>> confronting this rich and expressive language more than ever before. And
keyword
=even
(equalsthough
sign) 2ndyou may not write UML diagrams yourself, you'll still need to interpret
>diagrams
(angle brackets)written by others.
> (greater than)
UMLkeyword
@pre 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you operator
@pre who must read, create, and understand system artifacts expressed using UML.
[]Furthermore,
(brackets) 2nd it's been fully revised to cover version 2.0 of the language.
_ (underscore)
This comprehensive
{protocol} tag new edition not only provides a quick-reference to all UML 2.0 diagram
| types,
(pipe) it also explains key concepts in a way that appeals to readers already familiar with
~UML
(tilde) or
2ndobject-oriented programming concepts.
«» (guillemots)
Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

abs( ) operation
Table of Contents | Index
abstract classes
interfaces as
naming conventions
System developers have used modeling languages for decades to specify, visualize,
overview
construct, and document systems. The Unified Modeling Language (UML) is one of those
Abstract Windowing Toolkit (AWT)
languages. UML makes it possible for team members to collaborate by providing a common
abstraction
language that applies to a multitude of different systems. Essentially, it enables you to
depicting
communicate solutions in a consistent, tool-supported language.
diagrams and 2nd
account, concept of
Today, UML has become the standard method for modeling software systems, which means
actions
you're probably confronting this rich and expressive language more than ever before. And
activity partitions
even though you may not write UML diagrams yourself, you'll still need to interpret
defined
diagrams written by others.
event occurrences
exception handlers
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
active state 2nd
you who must read, create, and understand system artifacts expressed using UML.
activities
Furthermore, it's been fully revised to cover version 2.0 of the language.
defined 2nd
overview 2nd 3rd
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
protocol state machines and
types, it also explains key concepts in a way that appeals to readers already familiar with
representation
UML or object-oriented programming concepts.
state machines and
transitions and
Topics include:
activity diagrams
actions
activities
The role and value of UML in projects
activity nodes
definedThe object-oriented paradigm and its relation to the UML
design view and
exampleAn integrated approach to UML diagrams
interaction overview diagrams
Class
modeling and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
notations
processand Deployment
view and Diagrams
SPEM and
tokens Extension Mechanisms
use cases and
The Object Constraint Language (OCL)
activity edges
activity final nodes
activity nodes
activity partitions 2nd
If you're new to UML, a tutorial with realistic examples has even been included to help you
actor generalization
quickly familiarize yourself with the system.
actors
generalization and
overview
use case diagrams and
use cases and
www.it-ebooks.info

acyclic graphs 2nd


adornments
after keyword
aggregation UML 2.0 in a Nutshell
aliases, attributes andByDan Pilone,Neil Pitman
alt interaction operator
...............................................
alternatives Publisher:O'Reilly
Pub3rd
and logical operator 2nd Date: June 2005
angle brackets (>) ISBN:0-596-00795-7
Application Server Pages:234
arguments
boolean expressions and
Table of Contents
interaction | Index
occurrences
messages
arrows 2nd 3rd
System developers have used modeling languages for decades to specify, visualize,
artifacts
construct,
defined and document systems. The Unified Modeling Language (UML) is one of those
languages.
deployed UML makes it possible for team members to collaborate by providing a common
language
deploymentthat appliesand
specifications to a multitude of different systems. Essentially, it enables you to
communicate
nodes and 2nd solutions in a consistent, tool-supported language.
overview
Today, UML has
representation 2nd become the standard method for modeling software systems, which means
you're connectors
assembly probably 2nd confronting this rich and expressive language more than ever before. And
eveninteraction
assert though operand
you may not write UML diagrams yourself, you'll still need to interpret
diagrams
assert written
interaction operatorby others.
assertions 2nd
UML 2.0 classes
association in a Nutshell
2nd from O'Reilly feels your pain. It's been crafted for professionals like
you whoqualifiers
association must read,2nd create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.
associations
actors and use cases 2nd
This comprehensive
classifiers and 2nd new edition not only provides a quick-reference to all UML 2.0 diagram
types,
instancesit also
of explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.
overview
representation 2nd 3rd
Topics include:
states and 2nd
transitions and operations
asterisk (*)
The role and value of UML in projects
loop operator
looping constraints
The object-oriented paradigm and its relation to the UML
multiplicity value 2nd
OCL operator 2nd
An integrated approach to UML diagrams
asynchronous messages 2nd
attributeClass
notationand Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
attributesand Deployment Diagrams
activities and
association classesMechanisms
Extension and
class diagram and
The and
classifiers Object Constraint Language (OCL)
compartments and
constraints on 2nd
defined
Ifderived
you're2nd new to UML, a tutorial with realistic examples has even been included to help you
quickly
events andfamiliarize yourself with the system.
extending
inlined
mapping
mapping table rows to
multiplicity of
www.it-ebooks.info

parameters and
partitions and
postconditions of
preconditions of UML 2.0 in a Nutshell
properties of 2nd ByDan Pilone,Neil Pitman
return values and ...............................................
static Publisher:O'Reilly
tagged values andPub Date: June 2005
ISBN:0-596-00795-7
attributes by relationship
Pages:234
inlined attributes and
overview 2nd
AWT (Abstract Windowing Toolkit)
Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

ball-and-socket (lollipop) notation


Table of Contents | Index
assembly connectors 2nd
interfaces 2nd
port typing
System developers have used modeling languages for decades to specify, visualize,
behavior
construct, and document systems. The Unified Modeling Language (UML) is one of those
decision input
languages. UML makes it possible for team members to collaborate by providing a common
object flows and
language that applies to a multitude of different systems. Essentially, it enables you to
of activities
communicate solutions in a consistent, tool-supported language.
of classifiers 2nd
pseudostates and
Today, UML has become the standard method for modeling software systems, which means
real-time
you're probably confronting this rich and expressive language more than ever before. And
selection
even though you may not write UML diagrams yourself, you'll still need to interpret
transformation
diagrams written by others.
behavioral diagrams 2nd
behavioral modeling
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
behavioral ports
you who must read, create, and understand system artifacts expressed using UML.
behavioral state machines 2nd
Furthermore, it's been fully revised to cover version 2.0 of the language.
bidirectional ports
binding
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
black-box view (components)
types, it also explains key concepts in a way that appeals to readers already familiar with
body conditions
UML or object-oriented programming concepts.
body keyword
body subregion
Topics include:
boolean datatype 2nd
boolean expressions
constraints and and value of UML in projects
The role
exists operation
forAllThe
operation
object-oriented paradigm and its relation to the UML
naming elements in
state An integrated approach to UML diagrams
invariants
brackets [] 2nd
Class and
break interaction Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
operator
breaks and Deployment Diagrams
bridges
Extension Mechanisms
build scripts

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

C++ language
Table of Contents | Index
cancel event
casting 2nd
central buffer nodes
System developers have used modeling languages for decades to specify, visualize,
choice pseudostate
construct, and document systems. The Unified Modeling Language (UML) is one of those
CIM (computational-independent model)
languages. UML makes it possible for team members to collaborate by providing a common
class diagrams
language that applies to a multitude of different systems. Essentially, it enables you to
attributes
communicate solutions in a consistent, tool-supported language.
classes
considerations
Today, UML has become the standard method for modeling software systems, which means
database schemas
you're probably confronting this rich and expressive language more than ever before. And
defined
even though you may not write UML diagrams yourself, you'll still need to interpret
design view and
diagrams written by others.
interfaces
methods
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
operations
you who must read, create, and understand system artifacts expressed using UML.
purpose
Furthermore, it's been fully revised to cover version 2.0 of the language.
relationships
SPEM and
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
tagged values and
types, it also explains key concepts in a way that appeals to readers already familiar with
templates
UML or object-oriented programming concepts.
wallpaper diagrams
white-box view and
Topics include:
XML schemas
classes
abstract
The2nd 3rd and value of UML in projects
role
association 2nd
attributes
The object-oriented paradigm and its relation to the UML
class diagram and
An integrated
compartments and approach to UML diagrams
connectors and
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
defined
and Deployment
exceptions and Diagrams
extending 2nd
Extension Mechanisms
instances
mapping tables to
The Object Constraint Language (OCL)
methods and
objects and
operations and
Ifoverview
you're new to UML, a tutorial with realistic examples has even been included to help you
package merging and 2nd
quickly familiarize yourself with the system.
parameterized
partitions and
relationships
structure and interrelationships
structured
www.it-ebooks.info

templates
white-box view and
classifier notation
actors UML 2.0 in a Nutshell
extension points ByDan Pilone,Neil Pitman
use cases 2nd ...............................................
classifiers Publisher:O'Reilly
behavior of Pub Date: June 2005
classes as ISBN:0-596-00795-7
Pages:234
collaboration occurrence
collections and
compartments
Table of Contents
constraints on | Index
dependencies
expression context and
System
interfacesdevelopers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
mapping attributes
languages.
modeling andUML makes it possible for team members to collaborate by providing a common
language
OCL and that applies to a multitude of different systems. Essentially, it enables you to
communicate
partitions and solutions in a consistent, tool-supported language.
ports and
Today,
states andUML 2ndhas
3rd become the standard method for modeling software systems, which means
you're
CMS probably
(content managementconfronting
system) this rich and expressive language more than ever before. And
even
code though you may not write UML diagrams yourself, you'll still need to interpret
generators
diagrams
code written by others.
model (MDA)
collaboration diagram
UML 2.0 inoccurrences
collaboration a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
collaborations
Furthermore,
composite structuresit's and
been fully revised to cover version 2.0 of the language.
interactions and
This comprehensive
Collection class new edition not only provides a quick-reference to all UML 2.0 diagram
types, types
collection it also explains key concepts in a way that appeals to readers already familiar with
UML or 2nd
collections object-oriented programming concepts.
colon (:)
Topics include:
constraints and
interaction overview diagram
object names and
OCL The role
and 2nd 3rdand
4th value of UML in projects
parameter name and 2nd
The object-oriented paradigm and its relation to the UML
port typing
submachine states
An integrated approach to UML diagrams
templated classes and
combined fragments
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
extra-global
and Deployment Diagrams
interaction overview diagrams
overview
Extension Mechanisms
comma (,) 2nd
comments, The Object Constraint
expressions and Language (OCL)
communication diagrams
defined
interactions and 2nd
Ifoverview
you're new to UML, a tutorial with realistic examples has even been included to help you
quickly
communication familiarize
paths yourself with the system.
nodes and
overview 2nd
compartments
artifacts in
classes and
www.it-ebooks.info

classifiers and
components and 2nd
decomposition
operations and UML 2.0 in a Nutshell
states and ByDan Pilone,Neil Pitman
completion event ...............................................
completion transition Publisher:
2nd O'Reilly
component diagramsPub Date: June 2005
component views ISBN:0-596-00795-7
components Pages:234
defined
deployment view and
Table of Contents | Index
linking
SPEM and
components
System developers have used modeling languages for decades to specify, visualize,
artifacts and
construct,
black-box view and document systems. The Unified Modeling Language (UML) is one of those
languages.
defined UML makes it possible for team members to collaborate by providing a common
language
overview that applies to a multitude of different systems. Essentially, it enables you to
communicate
stereotypes solutions in a consistent, tool-supported language.
white-box view
Today, icon
composite UML has become the standard method for modeling software systems, which means
you're probably
composite confronting this rich and expressive language more than ever before. And
property (attributes)
even though
composite states you may not write UML diagrams yourself, you'll still need to interpret
diagrams
defined written by others.
overview
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
transitions
you who
composite must diagrams
structure read, create, and understand system artifacts expressed using UML.
Furthermore,
defined it's been fully revised to cover version 2.0 of the language.
design view and
This comprehensive
implementation view and new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also
relationships explains
between key concepts in a way that appeals to readers already familiar with
properties
UML or structures
composite object-oriented programming concepts.
collaboration occurrences
Topics include:
collaborations
connectors
ports and
The role and value of UML in projects
properties
structured classes
The object-oriented paradigm and its relation to the UML
composition relationship 2nd
compound transition
An integrated approach to UML diagrams
computational-independent model (CIM)
concat( )Class
operation
and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
conditionals,
andOCL 2nd
Deployment Diagrams
conditions
extension points and
Extension Mechanisms
invariant
labelsThe
and Object Constraint Language (OCL)
transitions and
configuration
deployment diagrams and
Ifexecution
you're new to UML, a tutorial with realistic examples has even been included to help you
environments
quickly
implementation view yourself with the system.
familiarize
state
transitions and
connection points 2nd
connector ends
connectors
www.it-ebooks.info

assembly
composite structures and
defined 2nd
multiple UML 2.0 in a Nutshell
ports and 2nd ByDan Pilone,Neil Pitman
consider interaction operator
...............................................
constants Publisher:O'Reilly
parameters and Pub Date: June 2005
readOnly attributeISBN: 0-596-00795-7
property and
value pin Pages:234
constraints
attributes and 2nd 3rd 4th
Table of Contents
collections and| Index
looping
on classifiers
System
operationdevelopers
2nd 3rd 4th have used modeling languages for decades to specify, visualize,
construct,
overview and document systems. The Unified Modeling Language (UML) is one of those
languages.
partitions andUML makes it possible for team members to collaborate by providing a common
language
profiles andthat
2nd applies to a multitude of different systems. Essentially, it enables you to
communicate
sequence timing solutions
and in a consistent, tool-supported language.
time
Today, UML has become the standard method for modeling software systems, which means
transitions
you'remanagement
content probablysystem confronting
(CMS) this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
context
diagrams
activities andwritten by others.
of expressions 2nd 3rd
UML 2.0
context in a(OCL)
keyword Nutshell2nd from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
continuations
Furthermore,
control flow it's been fully revised to cover version 2.0 of the language.
control nodes
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
CppDoc
types,
critical it alsooperand
interaction explains key concepts in a way that appeals to readers already familiar with
UML interaction
critical or object-oriented
operator 2nd programming concepts.
critical regions 2nd
Topics
curly bracesinclude:
{}
constraints and
extended keyword
The role and value of UML in projects
properties
property strings
The object-oriented paradigm and its relation to the UML
protocol keyword
state invariants
An integrated approach to UML diagrams
stream keyword
weightsClass and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

dash (-)
Table of Contents | Index
arguments and
comments and
messages
System developers have used modeling languages for decades to specify, visualize,
visibility 2nd
construct, and document systems. The Unified Modeling Language (UML) is one of those
data store nodes
languages. UML makes it possible for team members to collaborate by providing a common
database modeling
language that applies to a multitude of different systems. Essentially, it enables you to
database schemas
communicate solutions in a consistent, tool-supported language.
database testing
decision input behavior
Today, UML has become the standard method for modeling software systems, which means
decision nodes 2nd
you're probably confronting this rich and expressive language more than ever before. And
decomposition
even though you may not write UML diagrams yourself, you'll still need to interpret
decomposition compartment
diagrams written by others.
deep history pseudostate
def keyword
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
default entry
you who must read, create, and understand system artifacts expressed using UML.
default_value element (operations)
Furthermore, it's been fully revised to cover version 2.0 of the language.
defer keyword
deferred events 2nd
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
dependency relationship
types, it also explains key concepts in a way that appeals to readers already familiar with
classifiers
UML or object-oriented programming concepts.
components 2nd
defined
Topics include:
interfaces
representation 2nd
stereotypes
The role and and value of UML in projects
dependency relationships
classThediagram and
object-oriented paradigm and its relation to the UML
depicting
An integrated approach to UML diagrams
depicting
multiple
deployedClass
artifactand Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
deploymentand Deployment Diagrams
code model and
Extension Mechanisms
deployment
deployment view and
The Object Constraint Language (OCL)
nodes and
overview
variations on 2nd
deployment diagrams
If you're new to UML, a tutorial with realistic examples has even been included to help you
artifacts and
quickly familiarize yourself with the system.
defined
deployment specifications 2nd 3rd
deployment target
deployment view
derive keyword
www.it-ebooks.info

derived attributes 2nd


derived property (attributes)
design decisions
design view UML 2.0 in a Nutshell
devices, nodes and 2ndByDan Pilone,Neil Pitman
Diagram Interchange...............................................
Specification
diagrams Publisher:O'Reilly
abstraction and 2ndPub Date: June 2005
as building blocks ISBN:0-596-00795-7
defined Pages:234
diagrams
exception handling
Table of Contents
missing | Index and
compartments
modeling and
models versus
System
notes developers have used modeling languages for decades to specify, visualize,
construct,
notes and and document systems. The Unified Modeling Language (UML) is one of those
languages.
overview 2ndUML makes it possible for team members to collaborate by providing a common
language
sprawling scopethat applies to a multitude of different systems. Essentially, it enables you to
communicate
static solutions in a consistent, tool-supported language.
UML and
Today,
use cases UML has become the standard method for modeling software systems, which means
you're
views 2ndprobably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
wallpaper
diagrams
direct substates written by others.
directed dependency graphs
UML 2.0
direction in a (operations)
element Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you whoevents
dispatching must2nd read, create, and understand system artifacts expressed using UML.
Furthermore,
do activity 2nd it's been fully revised to cover version 2.0 of the language.
documentation
This comprehensive
diagrams and new edition not only provides a quick-reference to all UML 2.0 diagram
types,
use cases it also explains key concepts in a way that appeals to readers already familiar with
UML
dot or 3rd
(.) 2nd object-oriented programming concepts.
Doxygen tool
Topics include:
DTDs

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

EAI (Enterprise Application Integration)


Table of Contents | Index
edges, activity
effect activity (transition) 2nd
elements
System developers have used modeling languages for decades to specify, visualize,
collections and
construct, and document systems. The Unified Modeling Language (UML) is one of those
interaction diagrams and
languages. UML makes it possible for team members to collaborate by providing a common
naming
language that applies to a multitude of different systems. Essentially, it enables you to
overview
communicate solutions in a consistent, tool-supported language.
profiles and
stereotypes and 2nd 3rd
Today, UML has become the standard method for modeling software systems, which means
encapsulation
you're probably confronting this rich and expressive language more than ever before. And
Enterprise Application Integration (EAI)
even though you may not write UML diagrams yourself, you'll still need to interpret
entity component
diagrams written by others.
Entity Relation Diagrams (ERDs)
entry activity
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
protocol state machines and 2nd
you who must read, create, and understand system artifacts expressed using UML.
transitions and
Furthermore, it's been fully revised to cover version 2.0 of the language.
triggers for
Entry pseudostate 2nd
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
equals sign (=) 2nd
types, it also explains key concepts in a way that appeals to readers already familiar with
ERDs (Entity Relation Diagrams)
UML or object-oriented programming concepts.
event occurrences
assertions and
Topics include:
critical regions 2nd
general ordering
looping
The2ndrole and value of UML in projects
negative
overview
The object-oriented paradigm and its relation to the UML
parallel execution
An integrated
sequence timing approach to UML diagrams
strict sequencing
tracesClass and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
weakand Deployment Diagrams
sequencing
events
Extension
as triggers 2nd Mechanisms
completion
The Object Constraint Language (OCL)
mapping parameters
processing
transitions and
exception handlers
If you're new to UML, a tutorial with realistic examples has even been included to help you
activity diagrams and
quickly familiarize yourself with the system.
modeling mechanism
exception pins
exceptions, operations and
execution environment 2nd
execution occurrences
www.it-ebooks.info

execution occurrences
expansion regions and
overview
streaming UML 2.0 in a Nutshell
exists operation ByDan Pilone,Neil Pitman
exit activity ...............................................
Publisher:
protocol state machines and O'Reilly
Pub Date: June 2005
transitions and 2nd
triggers for ISBN:0-596-00795-7
Exit pseudostate 2ndPages:234
expansion regions 2nd
explicit binding
Table ofentry
explicit Contents | Index

expressions
as invariants
System
attributesdevelopers
and have used modeling languages for decades to specify, visualize,
construct,
comments inand document systems. The Unified Modeling Language (UML) is one of those
languages.
context of 2ndUML3rd makes it possible for team members to collaborate by providing a common
language
declaring that applies to a multitude of different systems. Essentially, it enables you to
communicate
evaluating 2nd solutions in a consistent, tool-supported language.
grouping
Today,
naming UML has become the standard method for modeling software systems, which means
you're
namingprobably
elements confronting this rich and expressive language more than ever before. And
even
OCL andthough you may not write UML diagrams yourself, you'll still need to interpret
2nd 3rd
diagrams
operations andwritten by others.
undefined
UML 2.0 in
variables in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who
extend keywordmust read, create, and understand system artifacts expressed using UML.
Furthermore,
extended keyword it's been fully revised to cover version 2.0 of the language.
extends keyword
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
extension
types, it also explains key concepts in a way that appeals to readers already familiar with
state machines
UML or object-oriented
use case 2nd programming concepts.
extension points 2nd
Topicsstate
external include:
extra-global combined fragments

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

final state 2nd


Table of Contents | Index
floor( ) operation
flow final nodes
focus of control 2nd 3rd
System developers have used modeling languages for decades to specify, visualize,
forAll operation
construct, and document systems. The Unified Modeling Language (UML) is one of those
foreign keys
languages. UML makes it possible for team members to collaborate by providing a common
fork and join pseudostate
language that applies to a multitude of different systems. Essentially, it enables you to
fork nodes 2nd
communicate solutions in a consistent, tool-supported language.
forward slash (/)
deferred events
Today, UML has become the standard method for modeling software systems, which means
derived notation
you're probably confronting this rich and expressive language more than ever before. And
OCL operator 2nd
even though you may not write UML diagrams yourself, you'll still need to interpret
property instances and
diagrams written by others.
found messages 2nd
functions
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

gates
Table of Contents | Index
general ordering
generalization relationship
casting and
System developers have used modeling languages for decades to specify, visualize,
defined
construct, and document systems. The Unified Modeling Language (UML) is one of those
package merging and
languages. UML makes it possible for team members to collaborate by providing a common
representation
language that applies to a multitude of different systems. Essentially, it enables you to
generalization, use case and actor
communicate solutions in a consistent, tool-supported language.
graphical representation
greater than (>)
Today, UML has become the standard method for modeling software systems, which means
guard condition
you're probably confronting this rich and expressive language more than ever before. And
brackets and
even though you may not write UML diagrams yourself, you'll still need to interpret
communication diagrams
diagrams written by others.
decision nodes and
edges and
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
interaction fragments and
you who must read, create, and understand system artifacts expressed using UML.
interaction operators and
Furthermore, it's been fully revised to cover version 2.0 of the language.
ordering
syntax
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
transitions 2nd
types, it also explains key concepts in a way that appeals to readers already familiar with
guillemots«»
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

high-level transition
Table of Contents | Index
HyperModel
hyphen (-)
arguments and
System developers have used modeling languages for decades to specify, visualize,
messages
construct, and document systems. The Unified Modeling Language (UML) is one of those
visibility 2nd
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

if-then-else logical operator


Table of Contents | Index
if-then-else-endif keywords
if-then-else-endif operator
ignore interaction operator 2nd
System developers have used modeling languages for decades to specify, visualize,
implementation
construct, and document systems. The Unified Modeling Language (UML) is one of those
defined
languages. UML makes it possible for team members to collaborate by providing a common
functionality and
language that applies to a multitude of different systems. Essentially, it enables you to
state machines and
communicate solutions in a consistent, tool-supported language.
implementation diagrams
implementation view
Today, UML has become the standard method for modeling software systems, which means
implicit binding
you're probably confronting this rich and expressive language more than ever before. And
implies keyword
even though you may not write UML diagrams yourself, you'll still need to interpret
implies logical operator 2nd 3rd
diagrams written by others.
importing packages 2nd
in keyword
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
inactive state
you who must read, create, and understand system artifacts expressed using UML.
include keyword
Furthermore, it's been fully revised to cover version 2.0 of the language.
includes keyword
inclusion, use case
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
indirect substates
types, it also explains key concepts in a way that appeals to readers already familiar with
inheritance
UML or object-oriented programming concepts.
classes and
decomposition and
Topics include:
init keyword
initial nodes
initial pseudostate
The role2nd and value of UML in projects
inlined attributes
inout keyword 2nd
The object-oriented paradigm and its relation to the UML
input pins
An integrated
expansion regions approach to UML diagrams
object nodes and
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
representation
and Deployment Diagrams
streaming
instances
artifactExtension Mechanisms
collaboration
The Object Constraint Language (OCL)
collaboration occurrences as
collections and
composite structures and
Ifconnectors
you're new and
to UML, a tutorial with realistic examples has even been included to help you
defined 2nd
quickly familiarize yourself with the system.
interactions and
lifelines and
multiple
operations and
relative times
www.it-ebooks.info

representation
XML documents as
instantiation
integer datatype UML 2.0 in a Nutshell
interaction diagrams ByDan Pilone,Neil Pitman
alternate notations...............................................
combined fragments Publisher:O'Reilly
continuations Pub Date: June 2005
decomposition ISBN:0-596-00795-7
deployment view andPages:234
event occurrences
example
Table of Contents
execution | Index
occurrences
implementation view and
interaction occurrences 2nd
System
interactionsdevelopers
2nd have used modeling languages for decades to specify, visualize,
construct,
messages and document systems. The Unified Modeling Language (UML) is one of those
languages.
participants UML makes it possible for team members to collaborate by providing a common
language
process view that
andapplies to a multitude of different systems. Essentially, it enables you to
communicate
sequence timing solutions in a consistent, tool-supported language.
state invariants
Today,
traces UML has become the standard method for modeling software systems, which means
you're
use case probably
view and confronting this rich and expressive language more than ever before. And
even though
use cases and you may not write UML diagrams yourself, you'll still need to interpret
diagrams
interaction written by others.
fragments
communication diagrams and
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
defined
youeventwho must read,
occurrences and create, and understand system artifacts expressed using UML.
Furthermore,
gates and it's been fully revised to cover version 2.0 of the language.
guard conditions and 2nd
This comprehensive
messages and 2nd 3rd 4th new edition not only provides a quick-reference to all UML 2.0 diagram
types,
optionsitand also explains key concepts in a way that appeals to readers already familiar with
UML or execution
parallel object-oriented programming concepts.
interaction occurrences 2nd
Topics include:
interaction operands
breaks
critical
definedThe role and value of UML in projects
parallel execution
The object-oriented paradigm and its relation to the UML
weak sequencing
interaction operators
An integrated approach to UML diagrams
defined
guardClass
conditions
and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
messages
and andDeployment Diagrams
interaction overview diagrams 2nd 3rd
interaction points 2nd Mechanisms
Extension
interactions
Thenotations
alternate Object Constraint Language (OCL)
copying
overview 2nd
participants
Ifsequence
you're new diagramsto UML,
and a tutorial with realistic examples has even been included to help you
quickly
interfaces familiarize yourself with the system.
as classifiers
black-box view
collaborations and
connection points and
dependencies
www.it-ebooks.info

ports and 2nd


representation
SPEM and
white-box view UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
internal activities compartment
internal transitions 2nd...............................................
Publisher:O'Reilly
interruptible activity regions
inv keyword (OCL) Pub Date: June 2005
invariant condition ISBN:0-596-00795-7
invariants Pages:234
assertions and
constraints as
Table of Contentsas| Index
expressions
overview
states and
System
isEmpty( developers have used modeling languages for decades to specify, visualize,
) operation
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

J2EE (Java 2 Enterprise Edition)


Table of Contents | Index
J2EE Container
java.util package
Javadoc tool
System developers have used modeling languages for decades to specify, visualize,
join nodes 2nd
construct, and document systems. The Unified Modeling Language (UML) is one of those
join specification
languages. UML makes it possible for team members to collaborate by providing a common
junction pseudostate
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

keys 2nd
Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

labels 2nd 3rd


Table of Contents | Index
language constructs 2nd
less than (<)
let keyword
System developers have used modeling languages for decades to specify, visualize,
lifelines
construct, and document systems. The Unified Modeling Language (UML) is one of those
communication between
languages. UML makes it possible for team members to collaborate by providing a common
decomposed
language that applies to a multitude of different systems. Essentially, it enables you to
defined
communicate solutions in a consistent, tool-supported language.
guard conditions
interaction overview diagram
Today, UML has become the standard method for modeling software systems, which means
labels and
you're probably confronting this rich and expressive language more than ever before. And
representation
even though you may not write UML diagrams yourself, you'll still need to interpret
stacking
diagrams written by others.
state invariants and
state variants and
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
strict sequencing and
you who must read, create, and understand system artifacts expressed using UML.
timing diagrams and
Furthermore, it's been fully revised to cover version 2.0 of the language.
lifelines keyword
local variables
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
logical operators
types, it also explains key concepts in a way that appeals to readers already familiar with
loop interaction operator 2nd 3rd
UML or object-oriented programming concepts.
loop nodes
looping
Topics include:
activity diagrams
constraints and
eventThe occurrences
role and2ndvalue of UML in projects
interaction overview diagram
lost messages 2nd
The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

M0 model 2nd
Table of Contents | Index
M1 model 2nd 3rd
M2 model 2nd 3rd
M3 model
System developers have used modeling languages for decades to specify, visualize,
manifest keyword
construct, and document systems. The Unified Modeling Language (UML) is one of those
manifestation
languages. UML makes it possible for team members to collaborate by providing a common
mapping model
language that applies to a multitude of different systems. Essentially, it enables you to
marking model
communicate solutions in a consistent, tool-supported language.
marks 2nd
MDA (Model-Driven Architecture)
Today, UML has become the standard method for modeling software systems, which means
design decisions
you're probably confronting this rich and expressive language more than ever before. And
formal transformation language
even though you may not write UML diagrams yourself, you'll still need to interpret
functionality
diagrams written by others.
models
overview 2nd
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
UML and
you who must read, create, and understand system artifacts expressed using UML.
merge nodes 2nd
Furthermore, it's been fully revised to cover version 2.0 of the language.
merging packages 2nd
messages
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
as gates
types, it also explains key concepts in a way that appeals to readers already familiar with
considering
UML or object-oriented programming concepts.
destroy
event occurrences
Topics include:
execution occurrences
ignoring 2nd
interaction
The rolediagrams
andand
value of UML in projects
interaction fragments
nestedThecallsobject-oriented paradigm and its relation to the UML
overview
timingAnof integrated approach to UML diagrams
metamodels 2nd
Class
method calls 2ndand Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
methodsand2nd Deployment Diagrams
minus sign (-) 2nd
Extension Mechanisms
model elaboration
modeling
The Object Constraint Language (OCL)
activity 2nd
adornments
behavioral
Ifclassifiers
you're new to UML, a tutorial with realistic examples has even been included to help you
defined
quickly familiarize yourself with the system.
Diagram Interchange Specification
models
connecting
diagrams versus
MDA
www.it-ebooks.info

OCL 2nd
transforming
MOF (Meta-Object Facility)
CIM and UML 2.0 in a Nutshell
example ByDan Pilone,Neil Pitman
functionality ...............................................
OCL and Publisher:O'Reilly
multicasting Pub Date: June 2005
ISBN:0-596-00795-7
multidimensional partitions
multiplicity Pages:234
aggregation and
associations and 2nd 3rd
Table of Contents and
compositions | Index

connector ends
generalization relationships and
System developers have used modeling languages for decades to specify, visualize,
of attributes
construct,
port and document systems. The Unified Modeling Language (UML) is one of those
languages.
properties UML makes it possible for team members to collaborate by providing a common
language that2nd
representation applies
3rd to a multitude of different systems. Essentially, it enables you to
communicate
XML elements and solutions in a consistent, tool-supported language.
multiplicity element (operations)
Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

name compartment
Table of Contents | Index
name element (operations)
names
association classes and
System developers have used modeling languages for decades to specify, visualize,
attribute syntax element 2nd
construct, and document systems. The Unified Modeling Language (UML) is one of those
connectors and
languages. UML makes it possible for team members to collaborate by providing a common
elements
language that applies to a multitude of different systems. Essentially, it enables you to
postcondition
communicate solutions in a consistent, tool-supported language.
precondition
qualifying
Today, UML has become the standard method for modeling software systems, which means
state
you're probably confronting this rich and expressive language more than ever before. And
use cases and 2nd
even though you may not write UML diagrams yourself, you'll still need to interpret
variable 2nd
diagrams written by others.
naming conventions
abstract classes 2nd
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
associations
you who must read, create, and understand system artifacts expressed using UML.
concrete models and
Furthermore, it's been fully revised to cover version 2.0 of the language.
naming conventions
operation syntax elements
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
operations
types, it also explains key concepts in a way that appeals to readers already familiar with
parameters
UML or object-oriented programming concepts.
preconditions of
representation
Topics include:
state machines
navigability
aggregation
The roleand and value of UML in projects
associations and
compositions and
The object-oriented paradigm and its relation to the UML
neg interaction operator
nesting An integrated approach to UML diagrams
devices
Class
message and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
calls
and Deployment Diagrams
stereotypes
nodes
Extension Mechanisms
activity
artifacts and
The Object Constraint Language (OCL)
central buffer
data store
defined
Ifexception
you're newhandling
to UML, a tutorial with realistic examples has even been included to help you
overview
quickly familiarize yourself with the system.
representation 2nd
not logical operator
not operator
notEmpty( ) operation 2nd
notes
www.it-ebooks.info

modeling and
specifying constraints in
state invariants and
number datatype UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

object diagrams
Table of Contents | Index
defined
design view and
unnamed objects in
System developers have used modeling languages for decades to specify, visualize,
object flows
construct, and document systems. The Unified Modeling Language (UML) is one of those
object nodes
languages. UML makes it possible for team members to collaborate by providing a common
Object Oriented Analysis and Design (OOAD) 2nd
language that applies to a multitude of different systems. Essentially, it enables you to
objects
communicate solutions in a consistent, tool-supported language.
abstract classes and
actions and
Today, UML has become the standard method for modeling software systems, which means
built-in properties
you're probably confronting this rich and expressive language more than ever before. And
casting
even though you may not write UML diagrams yourself, you'll still need to interpret
constraints and
diagrams written by others.
defined 2nd
displaying multiple
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
execution occurrences
you who must read, create, and understand system artifacts expressed using UML.
gates and
Furthermore, it's been fully revised to cover version 2.0 of the language.
lifelines and
method calls between
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
representation 2nd 3rd
types, it also explains key concepts in a way that appeals to readers already familiar with
tokens
UML or object-oriented programming concepts.
OCL (Object Constraint Language)
advanced modeling
Topics include:
as UML specification 2nd
basic types
definedThe role and value of UML in projects
overview
syntax The object-oriented paradigm and its relation to the UML
oclAsType property (OCL)
oclInStateAnproperty
integrated
(OCL) approach to UML diagrams
oclIsKindOf property (OCL)
oclIsNewClass and
property Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
(OCL)
andproperty
oclIsTypeOf Deployment
(OCL) Diagrams
OMG (Object Management Group)
MDA Extension
and 2nd Mechanisms
OCL and
The Object Constraint Language (OCL)
SPEM and
UML and 2nd
OOAD (Object Oriented Analysis and Design) 2nd
operations
If you're new to UML, a tutorial with realistic examples has even been included to help you
activities and
quickly familiarize yourself with the system.
class diagram and
collaboration occurrence
Collection class
compartments and
constraints on 2nd 3rd 4th
www.it-ebooks.info

methods and
OCL properties and
static
syntax elements UML 2.0 in a Nutshell
transitions and ByDan Pilone,Neil Pitman
opt interaction operator
...............................................
options Publisher:O'Reilly
or logical operator Pub Date: June 2005
logic rules ISBN:0-596-00795-7
OCL and 2nd Pages:234
order of precedence
ordered property
Table of Contents
attributes 2nd | Index
operations
ordering
System developers
asynchronous messageshave
and used modeling languages for decades to specify, visualize,
construct,
general and document systems. The Unified Modeling Language (UML) is one of those
languages.
guard conditionsUML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
representation
communicate
orthogonal compositesolutions
state in a consistent, tool-supported language.
conflicting transitions and
Today,
defined UML
2nd has become the standard method for modeling software systems, which means
you're probably
transitions 2nd confronting this rich and expressive language more than ever before. And
even
out though
keyword 2nd you may not write UML diagrams yourself, you'll still need to interpret
diagrams
output pins written by others.
expansion regions
UML
object2.0 in aand
nodes Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
representation
Furthermore,
streaming it's been fully revised to cover version 2.0 of the language.
ownership 2nd
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

package diagrams
Table of Contents | Index
defined
directed dependency graphs
functionality
System developers have used modeling languages for decades to specify, visualize,
importing and accessing 2nd
construct, and document systems. The Unified Modeling Language (UML) is one of those
merging 2nd
languages. UML makes it possible for team members to collaborate by providing a common
representation 2nd
language that applies to a multitude of different systems. Essentially, it enables you to
SPEM and
communicate solutions in a consistent, tool-supported language.
structuring projects with
use case packages
Today, UML has become the standard method for modeling software systems, which means
visibility 2nd
you're probably confronting this rich and expressive language more than ever before. And
packages
even though you may not write UML diagrams yourself, you'll still need to interpret
defined
diagrams written by others.
directed dependency graphs
importing and accessing 2nd
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
merging 2nd
you who must read, create, and understand system artifacts expressed using UML.
representation 2nd
Furthermore, it's been fully revised to cover version 2.0 of the language.
structuring projects with
use case
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
visibility 2nd
types, it also explains key concepts in a way that appeals to readers already familiar with
packages visibility 2nd
UML or object-oriented programming concepts.
par interaction operator
parallel execution
Topics include:
parameter nodes 2nd
parameter sets
parameter_name
The roleelement (operations)
and value of UML in projects
parameterized classes
parameters
The object-oriented paradigm and its relation to the UML
activities and
eventsAnand integrated approach to UML diagrams
interaction occurrences
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
mapping
methodand Deployment
calls and Diagrams
parentheses ( ) 2nd
Extension Mechanisms
part decomposition
participants
The Object Constraint Language (OCL)
partitions, activity
PIM (Platform-Independent Model) 2nd
pins
pipe (|)
If you're new to UML, a tutorial with realistic examples has even been included to help you
Platform-Independent Model (PIM) 2nd
quickly familiarize yourself with the system.
Platform-Specific Model (PSM) 2nd
plus sign (+)
OCL operator 2nd
visibility 2nd
ports
www.it-ebooks.info

bidirectional
composite structures and
connectors and
defined UML 2.0 in a Nutshell
post keyword ByDan Pilone,Neil Pitman
postconditions ...............................................
actions and Publisher:O'Reilly
activities and Pub Date: June 2005
naming ISBN:0-596-00795-7
OCL expressions and Pages:234
OCL properties and
operation constraints
Table of Contents
protocol | Index
state machines
pound sign (#) 2nd
pre keyword
System developers have used modeling languages for decades to specify, visualize,
preconditions
construct,
actions and and document systems. The Unified Modeling Language (UML) is one of those
languages.
activities and UML makes it possible for team members to collaborate by providing a common
language
naming that applies to a multitude of different systems. Essentially, it enables you to
communicate
OCL expressionssolutions
and in a consistent, tool-supported language.
operation constraints
Today,
protocolUML has become the standard method for modeling software systems, which means
state machines
you'rekeys
primary probably
2nd confronting this rich and expressive language more than ever before. And
evenvisibility
private though 2ndyou
3rd may not write UML diagrams yourself, you'll still need to interpret
diagrams
process written by others.
component
process view
UML 2.0 in a data
process-relevant Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
profiles
Furthermore,
constraints and it's been fully revised to cover version 2.0 of the language.
defined 2nd
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
overview
types,
tools andit also explains key concepts in a way that appeals to readers already familiar with
UML
usesor for object-oriented programming concepts.
programming languages
Topics include:
code model
efficiency of
importing packages
Thesupport
interface role and value of UML in projects
multiple inheritance support
The object-oriented paradigm and its relation to the UML
OCL logic rules
PIM and
An integrated approach to UML diagrams
query-only
UML Class
and and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
projects,andstructuring
Deployment Diagrams
properties
artifacts
Extension Mechanisms
associations and
The2nd
attribute Object Constraint Language (OCL)
composite structures and
dots and
interfaces and 2nd
IfOCL
you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize
properties element yourself with the system.
(operations)
property strings element
protected visibility 2nd
protocol keyword
protocol state machines
defined
www.it-ebooks.info

overview 2nd
real-time systems and
provided interfaces
UML
assembly connector and2.0 in a Nutshell
compartments ByDan Pilone,Neil Pitman
components and ...............................................
ports and 2nd Publisher:O'Reilly
pseudostates Pub Date: June 2005
connection points ISBN: 0-596-00795-7
and 2nd
initial Pages:234
overview
state machine extensions
Table of Contents
state machines| andIndex

transitions
PSM (Platform-Specific Model) 2nd
System
public developers
visibility 2nd 3rd have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

qualifiers, association 2nd


Table of Contents | Index
query constraint
query method
query operations 2nd
System developers have used modeling languages for decades to specify, visualize,
query-only languages
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

Rational Unified Process (RUP)


Table of Contents | Index
readOnly property 2nd 3rd
real datatype
real-time behavior
System developers have used modeling languages for decades to specify, visualize,
realization compartment
construct, and document systems. The Unified Modeling Language (UML) is one of those
realization component
languages. UML makes it possible for team members to collaborate by providing a common
redefines property (attributes)
language that applies to a multitude of different systems. Essentially, it enables you to
ref interaction_diagram_name
communicate solutions in a consistent, tool-supported language.
regions
composite states and
Today, UML has become the standard method for modeling software systems, which means
critical 2nd
you're probably confronting this rich and expressive language more than ever before. And
expansion 2nd
even though you may not write UML diagrams yourself, you'll still need to interpret
final state
diagrams written by others.
interruptible activity
representation 2nd
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
state machine extensions
you who must read, create, and understand system artifacts expressed using UML.
reject( ) operation
Furthermore, it's been fully revised to cover version 2.0 of the language.
relationship notation 2nd
relationships
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
actors and use cases
types, it also explains key concepts in a way that appeals to readers already familiar with
aggregation
UML or object-oriented programming concepts.
artifacts and nodes
association 2nd
Topics include:
association classes 2nd
association qualifiers 2nd
attributes
Thebyrole
2nd and
3rd value of UML in projects
class diagram and
classes
The andobject-oriented paradigm and its relation to the UML
composition 2nd
An integrated approach to UML diagrams
dependency
generalization
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
properties
and Deployment Diagrams
pseudostates
state machines
UML Extension
modeling Mechanisms
required hardware node
The Object Constraint Language (OCL)
required interfaces
assembly connector and
compartments
Ifcomponents
you're new and
to UML, a tutorial with realistic examples has even been included to help you
ports and 2nd
quickly familiarize yourself with the system.
required software node
result keyword (OCL)
return values
interactions and 2nd
local variables
www.it-ebooks.info

messages
of operations
representation
UML 2.0 in a Nutshell
return-type element (operations)
reverse engineering ByDan Pilone,Neil Pitman
clutter and ...............................................
MDA and 2nd Publisher:O'Reilly
tagged values andPub Date: June 2005
round-trip engineeringISBN:0-596-00795-7
run-to-completion Pages:234
RUP (Rational Unified Process)

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

Scalable Vector Graphics (SVG)


Table of Contents | Index
schemas 2nd
scope
diagramming
System developers have used modeling languages for decades to specify, visualize,
system boundaries
construct, and document systems. The Unified Modeling Language (UML) is one of those
use cases
languages. UML makes it possible for team members to collaborate by providing a common
select( ) operation 2nd
language that applies to a multitude of different systems. Essentially, it enables you to
selection behavior
communicate solutions in a consistent, tool-supported language.
self keyword
seq interaction operator
Today, UML has become the standard method for modeling software systems, which means
sequence diagrams
you're probably confronting this rich and expressive language more than ever before. And
communication diagrams and
even though you may not write UML diagrams yourself, you'll still need to interpret
defined
diagrams written by others.
design view and
interaction overview diagrams
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
interactions and 2nd
you who must read, create, and understand system artifacts expressed using UML.
local variables
Furthermore, it's been fully revised to cover version 2.0 of the language.
messages and
SPEM and
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
sprawling scope
types, it also explains key concepts in a way that appeals to readers already familiar with
sequence timing
UML or object-oriented programming concepts.
service component
sets, associations as
Topics include:
setup subregion
shallow history pseudostate
signal symbols
The role 2nd and value of UML in projects
signals, lifelines and
Simple Mail
TheTransport Protocol (SMTP)
object-oriented paradigm and its relation to the UML
simple states
An integrated approach to UML diagrams
size( ) operation
SMTP (Simple Mail Transport Protocol)
SoftwareClass
Process and Object,Metamodel
Engineering Use Case, Sequence, Collaboration, Statechart, Activity, Component,
(SPEM)
and component
specification Deployment Diagrams
specifications
Extension
deployment 2nd 3rdMechanisms
join
The Object Constraint Language (OCL)
UML 2nd 3rd 4th
SPEM (Software Process Engineering Metamodel)
state configuration
state machine diagrams 2nd 3rd
If you're new to UML, a tutorial with realistic examples has even been included to help you
state machines
quickly familiarize yourself with the system.
behavioral 2nd
connection points
extension
protocol 2nd 3rd
representation
www.it-ebooks.info

use cases and


statechart diagrams
behavioral state machines
event processing UML 2.0 in a Nutshell
ByDan
implementation view and Pilone,Neil Pitman
protocol state machines 2nd
...............................................
pseudostates Publisher:O'Reilly
SPEM and Pub Date: June 2005
ISBN:0-596-00795-7
state machine extension
states and Pages:234
variations on 2nd
states
Table of Contents
classifiers and | Index
final
invariants and
System developers
OCL properties and have used modeling languages for decades to specify, visualize,
construct,
overview and document systems. The Unified Modeling Language (UML) is one of those
languages.
protocol stateUMLmachinemakes
and it possible for team members to collaborate by providing a common
language
pseudostates that applies to a multitude of different systems. Essentially, it enables you to
communicate
state invariants as solutions in a consistent, tool-supported language.
state machines and 2nd
Today,
submachine UML has become the standard method for modeling software systems, which means
you're probably
timing diagrams andconfronting this rich and expressive language more than ever before. And
even though
transitioning 2ndyou may not write UML diagrams yourself, you'll still need to interpret
diagrams
static attributeswritten by others.
static modeling
UMLoperations
static 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
stereotypes
Furthermore,
<<realizations>>it's been fully revised to cover version 2.0 of the language.
Application Server
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
component
types,
database it also
schemasexplains
and key concepts in a way that appeals to readers already familiar with
UML or 2nd
defined object-oriented programming concepts.
execution environment
Topics
extending include:
overview
tagged values and
stop symbolThe role and value of UML in projects
stream keyword 2nd
The object-oriented paradigm and its relation to the UML
strict interaction operator
strict sequencing
An integrated approach to UML diagrams
strictfp keyword (Java)
string datatype
Class 2ndand Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
structuralanddiagrams 2nd
Deployment Diagrams
structured classes
structures Extension Mechanisms
classes and
definedThe Object Constraint Language (OCL)
diagramming
PIM and
subjects
If you're states
submachine new 2nd to UML, a tutorial with realistic examples has even been included to help you
quickly
subroutines familiarize yourself with the system.
subsets property (attributes)
substate machines
substates 2nd
substring( ) operation
subsystem component
www.it-ebooks.info

SVG (Scalable Vector Graphics)


swimlanes
SysML (Systems Modeling Language)
SysML.org UML 2.0 in a Nutshell
system boundaries ByDan Pilone,Neil Pitman
Systems Modeling Language (SysML)
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

tagged values
Table of Contents | Index
defined
overview
stereotypes and
System developers have used modeling languages for decades to specify, visualize,
templates
construct, and document systems. The Unified Modeling Language (UML) is one of those
terminate node pseudostate
languages. UML makes it possible for team members to collaborate by providing a common
test subregion
language that applies to a multitude of different systems. Essentially, it enables you to
testing 2nd
communicate solutions in a consistent, tool-supported language.
textual representation
thrown exceptions
Today, UML has become the standard method for modeling software systems, which means
tilde (~) 2nd
you're probably confronting this rich and expressive language more than ever before. And
timing
even though you may not write UML diagrams yourself, you'll still need to interpret
sensitivity of
diagrams written by others.
sequence
timing diagrams and
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
timing diagrams
you who must read, create, and understand system artifacts expressed using UML.
defined
Furthermore, it's been fully revised to cover version 2.0 of the language.
interactions and
overview
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
tokens
types, it also explains key concepts in a way that appeals to readers already familiar with
join nodes
UML or object-oriented programming concepts.
merge nodes and
object flows and
Topics include:
overview
tools, profiles and 2nd
traces The role and value of UML in projects
transformation behaviors
transformation functions 2nd 3rd paradigm and its relation to the UML
The object-oriented
transformation language
An integrated approach to UML diagrams
transitions
allowable time for
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
completion
and Deployment Diagrams
conflicting
data store nodes and
Extension
dispatched Mechanisms
events and
events and
The Object Constraint Language (OCL)
internal
overview
pseudostates and
Ifrepresentation
you're new to UML, a tutorial with realistic examples has even been included to help you
state machines and 2nd 3rd
quickly familiarize yourself with the system.
timing diagrams and
types of 2nd
trigger (transition) 2nd 3rd
type element (operations)
types
www.it-ebooks.info

artifacts
attribute syntax element
transition 2nd
typing, port UML 2.0 in a Nutshell
ByDan Pilone,Neil Pitman
...............................................
Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234

Table of Contents | Index

System developers have used modeling languages for decades to specify, visualize,
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

UML (Unified Modeling Language)


Table of Contents | Index
business process modeling
common uses
designing software 2nd
System developers have used modeling languages for decades to specify, visualize,
extending
construct, and document systems. The Unified Modeling Language (UML) is one of those
rules of thumb 2nd
languages. UML makes it possible for team members to collaborate by providing a common
specifications 2nd 3rd 4th
language that applies to a multitude of different systems. Essentially, it enables you to
UML Infrastructure 2nd
communicate solutions in a consistent, tool-supported language.
UML Superstructure 2nd
underscore (_)
Today, UML has become the standard method for modeling software systems, which means
union property (attributes)
you're probably confronting this rich and expressive language more than ever before. And
unique property
even though you may not write UML diagrams yourself, you'll still need to interpret
uniqueness property 2nd
diagrams written by others.
attributes
use case diagrams
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
actors and
you who must read, create, and understand system artifacts expressed using UML.
advanced modeling
Furthermore, it's been fully revised to cover version 2.0 of the language.
components
defined
This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
interfaces and
types, it also explains key concepts in a way that appeals to readers already familiar with
SPEM and
UML or object-oriented programming concepts.
use case scope
use case view and
Topics include:
use cases and 2nd
use case extension 2nd
use caseThegeneralization
role and value of UML in projects
use case inclusion
use caseThepackages
object-oriented paradigm and its relation to the UML
use case view
use casesAn integrated approach to UML diagrams
advanced modeling
Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
generalization
and2nd
overview Deployment Diagrams
representation
scopeExtension Mechanisms
use case diagrams and
The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

value pins
Table of Contents | Index
variables
capturing time
declaring
System developers have used modeling languages for decades to specify, visualize,
defining
construct, and document systems. The Unified Modeling Language (UML) is one of those
local
languages. UML makes it possible for team members to collaborate by providing a common
naming
language that applies to a multitude of different systems. Essentially, it enables you to
OCL and
communicate solutions in a consistent, tool-supported language.
relative times
Vector class (Java)
Today, UML has become the standard method for modeling software systems, which means
views, modeling and 2nd
you're probably confronting this rich and expressive language more than ever before. And
visibility
even though you may not write UML diagrams yourself, you'll still need to interpret
attribute syntax element 2nd
diagrams written by others.
package diagrams 2nd
visibility element (operations)
UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

wallpaper diagrams
Table of Contents | Index
weak sequencing
weights, edges and
white-box view (components) 2nd
System developers have used modeling languages for decades to specify, visualize,
whole-part relationships 2nd 3rd
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.
www.it-ebooks.info

UML 2.0 in a Nutshell


ByDan Pilone,Neil Pitman
...............................................
Index Publisher:O'Reilly
Pub Date: June 2005
ISBN:0-596-00795-7
Pages:234
[SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X]

XML documents 2nd


Table of Contents | Index
XML Structure Definition Language (XSDL)
xor constraint
xor logical operator 2nd
System developers have used modeling languages for decades to specify, visualize,
XSDL (XML Structure Definition Language)
construct, and document systems. The Unified Modeling Language (UML) is one of those
languages. UML makes it possible for team members to collaborate by providing a common
language that applies to a multitude of different systems. Essentially, it enables you to
communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means
you're probably confronting this rich and expressive language more than ever before. And
even though you may not write UML diagrams yourself, you'll still need to interpret
diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like
you who must read, create, and understand system artifacts expressed using UML.
Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram
types, it also explains key concepts in a way that appeals to readers already familiar with
UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,
and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)

If you're new to UML, a tutorial with realistic examples has even been included to help you
quickly familiarize yourself with the system.

You might also like