UML Notation Summary

Embed Size (px)

Citation preview

  • 8/12/2019 UML Notation Summary

    1/18

    519

    Appendix B

    Notation Summary

    This chapter contains a brief visual summary of notation. The major notationalelements are included, but not every variation or option is shown. For full details,see the encyclopedia entry for each element.

  • 8/12/2019 UML Notation Summary

    2/18

    520 Appendix B

    Figure B-1. Icons on class, component, deployment, and collaboration diagrams

    Cname

    attr: Atype

    op (par: Type): Rtype

    oname: ClassIname

    Cname

    Cname

    Cname

    Nname

    text

    Pname

    kind

    Aname

    oname: Class[Role]

    name: Class

    Tname

    p:Type

    { expression }

    class

    active class

    role

    note

    object

    multiobject

    association

    generalization

    realization

    dependency

    component

    node

    constraint

    template

    collaboration

    interface

    package

    templateparameter

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/12/2019 UML Notation Summary

    3/18

    Notation Summary 521

    Figure B-2. Class contents

    Figure B-3. Association adornments within a class diagram

    stereotypeNameCname

    {tag = value}

    + attrName: Cname = expression# attrName: Cname attrName[*]: Cname

    + opName (p:C1,q:C2):C3

    Responsibilities

    text description

    constructoropName (v:Cname=default)

    visibility

    stereotypeicon

    class

    class name(italics for abstract)tagged values

    stereotypename

    public attributewith initial value

    optional namedcompartment

    publicattributewith initial value

    protectedattribute

    privateattributewith multiplicitymany

    publicabstractoperationwith return type

    stereotypeon subsequent operations

    concreteoperationwith default value

    compartmentname

    compartmentlistelement

    qname:Cname0.1 name{ordered} oname

    Aname

    name

    direction

    1

    ACname

    class

    ordering multiplicity rolename

    qualifieraggregation

    associationname

    composition

    association path

    association class(all one element)

    class

    association

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/12/2019 UML Notation Summary

    4/18

    522 Appendix B

    Figure B-4.

    Generalization

    Figure B-5.

    Realization of an interface

    direct style tree style

    parentsuperclass

    childsubclass

    generalizations

    callinterface

    Iname

    Iname

    call

    explicitstyle

    implicit

    style

    usagesupplier realization interface client

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/12/2019 UML Notation Summary

    5/18

    Notation Summary 523

    Figure B-6.

    Template

    Figure B-7.

    Package notation

    FArray

    FArray

    T,k:Integer

    bind (Address,24)

    Tk..k

    AddressList

    T has type Classifier by default.

    This class hasits own name.This class has an

    anonymous name.

    The parameters are usedin the template body.

    In this template, themultiplicity of the arrayis fixed by the binding.

    template

    explicit binding

    templateparameters

    implicit binding

    +AB

    +C +D

    +C

    import

    access

    Y Z

    U

    G

    +E

    +F

    X

    packageY can see publiccontents of packageZ

    packageZ adds publiccontents of packageX to Zs namespace

    classG is privateand accessible only inside package X

    packagewith nested subpackage and class

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/12/2019 UML Notation Summary

    6/18

    524 Appendix B

    Figure B-8.

    Component and node notation

    nodeName1:NodeType

    nodeName2:NodeType

    c1:CompType interfaceName

    c2:CompType

    connectionType

    interface

    nodeinstance

    usagedependencyon interface

    nodeinstancerealizationof interface

    componentinstance

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/12/2019 UML Notation Summary

    7/18

    Notation Summary 525

    Figure B-9.

    Icons on use case diagrams

    Figure B-10.

    Use case diagram notation

    include

    extend

    systemboundary

    communicationassociation

    generalization

    extend

    include

    use case

    actor

    extend(ep1)

    include

    ActorA

    SystemB

    UCBase UCExt

    UCVar1 UCVar2

    UCIncl

    system boundary

    ActorB

    abstractparentuse case abstractextension use case

    extension pointgeneralization

    concreteinclusion use case

    actors

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/12/2019 UML Notation Summary

    8/18

    526 Appendix B

    Figure B-11.

    Icons on statechart and activity diagrams

    Ename

    Ename

    name: Type

    Sname

    Sname

    forkorjoin

    branchor merge

    output event

    input event

    transition

    history state

    final state

    initial state

    concurrent composite state

    state

    object flow state

    activity state

    H*

    deep history state

    H

    junction state

    include / submachinename

    S1

    submachine reference state

    stub state

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/12/2019 UML Notation Summary

    9/18

    Notation Summary 527

    Figure B-12.

    Statechart notation

    StateA StateB

    StateC

    e1 (p:C) [cond] / action1; action2

    entry / action3exit / action4e1 / action5e2

    StateA

    e3

    guardcondition

    transition

    eventparameters

    eventname actions

    internal transition

    exit action

    entry action

    completion transitionlacks a trigger eventfires on completion of activity

    final stateinitial state substate

    concurrent composite state

    explicit transition(aborts nested activity)

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/12/2019 UML Notation Summary

    10/18

    528 Appendix B

    Figure B-13.

    Activity diagram notation

    activity

    [choice1]

    [choice2]

    Cname::Operationname

    start of overall activity

    join(unbranch)

    mergeof control(unfork)

    forkof control

    activityguard condition

    branch

    end of overall activity

    activity

    activity

    activityactivity

    activity

    activity

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/12/2019 UML Notation Summary

    11/18

    Notation Summary 529

    Figure B-14.

    Sequence diagram notation

    [x>0] create(x)

    [x

  • 8/12/2019 UML Notation Summary

    12/18

    530 Appendix B

    Figure B-15.

    Collaboration diagram notation

    Figure B-16.

    Message notation

    :Controller

    wire: Wire

    1: displayPositions(window)

    left: Bead

    wire

    redisplay():Window

    i-1 i

    right: Bead

    1.1.1b: r1:=position()1.1.1a: r0 := position()

    1.1.2: create(r0,r1)

    window

    parameterwindow

    1.1*[i:=1..n]: drawSegment(i) :Line {new}localline

    1.1.3: display(window)

    1.1.3.1: link(self)

    contents {new}

    self

    invoker of operation

    self-link for self-calls

    local variable

    object

    created

    duringoperation

    return

    value

    operation

    association

    sequence number

    iteration expression

    link

    creation

    operationbeing described

    concurrent threadname

    messageflow

    sequential message

    asynchronous message

    call

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/12/2019 UML Notation Summary

    13/18

    Chapter38

    MORE UMLNOTATION

    8.1 General Notation

    Stereotypes and Property Specifications with TagsStereotypes are used in the UML to classify an element (see Figure 38.1).

    Figure 38.1 Stereotypes and properties.

    603

  • 8/12/2019 UML Notation Summary

    14/18

    Figure 38.2 Interface of a package.

    Dependency

    Dependencies can exist between any elements, but they are probably most oftenused in UML package diagrams to illustrate package dependencies (see Figure38.3)

    Figure 38.3 Dependencies.

    38.2 Implementation DiagramsThe UML defines several diagrams that can be used to illustrate implementa-tion details. The most commonly used is a deployment diagram, to illustrate thedeployment of components and processes to processing nodes.

    604

    38 - MOKEUMLNOTATION

    Package InterfacesA package can he illustrated as implementing an interface (see Figure 38.2).

  • 8/12/2019 UML Notation Summary

    15/18

    IMPLEMENTATION DIAGRAMS

    Component DiagramsTo quote: A component represents a modular, deployable, and replaceable partof a system that encapsulates implementation and exposes a set of interfaces

    [OMG01]. It may, for example, be source code, binary, or executable. Examplesinclude executables such as a browser or HTTP server, a database, a DLL, or aJAR file (such as for an Enterprise Java Bean). UML components are usuallyshown within deployment diagrams, rather than on their own. Figure 38.4 illus-trates some common notation.

    Figure 38.4 UML components.Deployment Diagrams

    A deployment diagram shows how instances of components and processes areconfigured for run-time execution on instances of processing nodes (somethingwith memory and processing services; see Figure 38.5).

    605

  • 8/12/2019 UML Notation Summary

    16/18

    Figure 38.5 A deployment diagram.

    38.3 Template (Parameterized, Generic) ClassTemplate classes and their instantation are shown in Figure 38.6.

    38 - MORE UML NOTATION

    606

    Figure 38.6 Template classes.

  • 8/12/2019 UML Notation Summary

    17/18

    ACTIVITY DIAGRAMS

    Some languages, such as C++, support templatized, generic, or parameterizedclasses. In addition, this feature will be added to the Java language. For exam-

    ple, in C++, map declares the instantiation of a template classwith keys of typestring, and values of typePerson.

    8.4 Activity DiagramsA UML activity diagram offers rich notation to show a sequence of activities.

    It may be applied to any purpose (such as visualizing the steps of a computer

    algorithm), but is considered especially useful for visualizing business work-

    flows and processes, or use cases. One of the UP workflows (disciplines) is Busi-

    ness Modeling; its purpose is to understand and communicate "the structure

    and the dynamics of the organization in which a system is to be deployed"

    [RUP]. A key artifact of the Business Modeling discipline is the BusinessObject Model (a superset of the UP Domain Model), which essentially visual-

    izes how a business works, using UML class, sequence, and activity diagrams.

    Thus, activity diagrams are especially applicable within the Business Modeling

    discipline of the UP.Some of the outstanding notation includes parallel activities, swimlanes, and

    action-object flow relationships, as illustrated in Figure 38.7 (adapted from

    [OMGOl, FS00]). Formally, an activity diagram is considered a special kind of

    UML statechart diagram in which the states are actions, and event transition is

    automatically triggered by action completion.

    607

  • 8/12/2019 UML Notation Summary

    18/18

    38 - MORE UML NOTATION

    Order product

    Customer Order Processing Fulfillment

    Validate order

    :Order

    [placed]

    :Order

    [prepaid]Get product

    Collect

    payment

    Pay

    Deliver rush Deliver regular

    [rush] [else]

    :Order

    [fulfilled]

    Swimlanes. Optional. An

    area of responsibility. Often

    an organizational unit.activity, and transition

    on its completion

    Start. Optional; identifying a

    single start (or stop) point may

    not be important.

    Fork. One incoming

    transition, and multiple

    outgoing parallel transitions

    and/or object flows.

    Object in state. Input or

    output with respect to an

    activity.

    Object flow.

    Branch and merge.

    Join. Multiple incoming

    transitions and/or object

    flows; one outgoing

    transition.

    End state. Optional;

    identifying a single stop

    point may not be important.

    Send receiptAdd customer

    to Satisfied list

    Give beer to

    shippers

    Figure 38.7 Activity diagram.

    608