Wissen macht ambitionierte
                                        Geschäftsziele erreichbar.
                                        Wir liefern Wissen und schaffen Werte.



UML 2.x
                                        Weltweit.

                                        Knowledge enables your business
                                        ambitions.
                                        We deliver knowledge and create value.
                                        Worldwide.



Part 2
Einführung Fort. / Introduction cont.

J. Anton Illik




                            Ambit                            1.     1
UML intro & overview                                 www.ambit.de




                                                        Content
                                                      • 5. Component Diagram                 • 10. Sequence Diagram
Attention: Sequence can change! The arrangement




                                                        (Komponentendiagramm)                     (Sequenzdiagramm)

                                                      • 6. Deployment Diagram                • 11. Communication Diagram
                                                        (Verteilungsdiagramm)                     (Kommuniaktionsdiagramm)

                                                      • 7. Use Case Diagram                  • 12. Timing Diagram
                                                        (Use-Case-Diagramm)                       (Timingdiagramm)

                                                      • 8. Activity Diagram                  • 13. Interaction Overview
                                                                                               Diagram
of the chapters as well!




                                                        (Aktivitätsdiagramm)
                                                                                                  (Interaktionsübersichtsdia-gramm)
                                                      • 9. State Machine
                                                        (Zustandsautomat)




                                                  2                                www.ambit.de
www.ambit.de
Chapter 3

                5. Component Diagram
                (Komponentendiagramm)

                • Component diagrams are similar to Class
                  diagrams.
                • Focused on higher level abstraction of subsystems
                  (Components, Interfaces and their relations).
                • The component diagram gives the possibility to show
                  the structure of a system at runtime. The
                  representation refers and depends on component
                  structure.




            3                        www.ambit.de
www.ambit.de
Chapter 3

                5. Component Diagram
                (Komponentendiagramm)
                • Notation elements
                  – Component (physical part of the System; different
                    types; see next page)
                  – Artefacts
                     •   E.g. a compiled object file
                     •   A piece of source code
                     •   Shared Library
                     •   Enterprise JavaBean (EJB),
                     •   Et cetera;
                     • „Entity of the world of application“ as well)




            4                             www.ambit.de
www.ambit.de
Chapter 3

                5. Component Diagram
                (Komponentendiagramm)
                • UML-Standard-Stereotypes offer the following
                  Types of Components
                   –   document
                   –   entity
                   –   executable
                   –   file
                   –   library
                   –   process
                   –   service
                   –   specification
                   –   subsystem
                   –   table

            5                          www.ambit.de
www.ambit.de
Chapter 3

                    5. Component Diagram
                    (Komponentendiagramm)
                  Komplexer Port              Implementierte Schnittstelle

                                   <<component>>
                                                                                        <<component>>
                                    Komponente1                                         Komponente2

                                                                                         Bestandteil3

Allgemeine                                              Kompositionskonektor                                Klasse
Abhängigkeitsbeziehung                                                                   Bestandteil4


                                                                                                         Realisierungsbeziehung
                          Bestandteil1          Bestandteil2
                                                                                     <<spezifcation>>
Bestandteil einer Komponente                                       Komponente           specDoc

                   <<artifact>>
                                                         <<subsystem>>               <<compontent>>
                    Artefakt1                                                                               Port
                                                         Komponente3                  Komponente4
                                  Verwendungs-
                <<use>>
                                  Beziehung

                  <<artifact>>
                 Komponente6             <<manifest>>
                                                                                                        Delegationskonnektor

                                  Implementierungsbeziehung                  Benötigte Schnittstelle

            6                                                      www.ambit.de
www.ambit.de
Chapter 3


                6. Deployment Diagram (Verteilungsdiagramm)

                • Deployment Diagrams show classification of
                  artefacts on Hardware components, named nodes.
                • In other words: Deployment Diagrams show the
                  nodes, on which the System is running. Nodes are
                  physical Entities ( = Hardware)
                • Besides that, Deployment Diagrams form
                  communicaiton relations and dependencies
                  between nodes.




            7                       www.ambit.de
www.ambit.de
Chapter 3

            6. Deployment Diagram (Verteilungsdiagramm)
            • Artefacts
               – Artefacts model physical information about a System
                  •   besides Hardware,
                  •   User guides
                  •   Training material
                  •   Password files and
                  •   jar-Archive
                  •   Can be modeled as an Artefact.
               – Artefacts express the terms/ideas/concepts of a
                 modeled System



        8                            www.ambit.de
www.ambit.de
Chapter 3

                6. Deployment Diagram (Verteilungsdiagramm)
                • Artefacts
                   – An Example Artefact: a Java-jar-Archive


                                         MessageFramework.jar




                   – Artefacts can have attributes (like other UML-Classifiers)

                        MessageFramework.jar

                        Reentrant: boolean
                        numLoggers: int = 1

            9                                 www.ambit.de
www.ambit.de
Chapter 3


             6. Depolyment Diagram (Verteilungsdiagramm)
             • Notation elements
               – nodes
                  • Conventional Node-Stereotypes:
                     – client
                     – server
                     – database
                     – backup server
               – communication path
               – distribution relationship
               – application specification




        10                          www.ambit.de
www.ambit.de
Chapter 3

             6. Depolyment Diagram (Verteilungsdiagramm)
                                                                            node 2
                                                                            <<device>>
                                           communication path
                    node 1
                    <<device>>                                             node 3
                                                                           <<execution
                                                                           environment>>




                Deployment spezifikation

              execution: thread                                             Deployment relationship
              Transaction: false


                                                                Artefact




        11                                      www.ambit.de
www.ambit.de
Chapter 3

            6. Deployment Diagram                      (Verteilungsdiagramm)




             One Node
                                     Server




             A Node with a couple of compartments


                                  Server
                                  <<components>>
                                  Buchungssystem.jar
                                  Comon.jar




       12                             www.ambit.de
www.ambit.de
Chapter 3

            6. Deployment Diagram                          (Verteilungsdiagramm)




             A Node with distributed Components


                                      Server




                        <<deploy>>                  <<deploy>>



             Buchungssytem.jar                            Common.jar




     13                              www.ambit.de
www.ambit.de
Chapter 3

            6. Deployment Diagram                    (Verteilungsdiagramm)




             Several Nodes and their Connection



                                                       Client




                                                            <<Internet>>

                                     <<LAN>>
                   Datenbankserver                   Buchungsserver




     14                               www.ambit.de
www.ambit.de
Chapter 3

            Deployment Diagram (Verteilungsdiagramm)


            •CaseStudy
            Deployment Diagram:
             Deployment of a windscreen
             wiper service unit


       15                    www.ambit.de
www.ambit.de
Chapter 3


             Fourth Diagram Type


             Behaviour Modelling
             [Verhaltensmodellierung]




        16                  www.ambit.de   [Rupp et.a] S. 225-236
www.ambit.de
Chapter 3


             7. Use-Case-Diagram (Use Case Diagramm)

              • Use-Case-Diagrams give an overview of all the
                requirements on a system from the users point of
                view
              • Use-Cases often have the following Connections
                 – Generalization (        )
                 – Extension (<<extends>>) and
                 – Inclusion (<<include>>)
                to other Use-Cases of the System




        17                       www.ambit.de
www.ambit.de
Chapter 3


             7. Use-Case-Diagram (Use Case Diagramm)
             • Notation elements
               –   use case
               –   system (subject)
               –   actor (Part of the User)
               –   <<include>> - relationship
                    • Use-Case can include behaviour of another Use-Case.
                      The included Use-Case is not used autonomous, but
                      part of a bigger Use-Case.
               – <<extend>> - relationship
                    • Not part of the normal, fundamental development.
                    • Generalization relation



        18                           www.ambit.de
www.ambit.de
Chapter 3


                7. Use-Case-Diagram                                                (Use Case Diagramm)




                               Datenkopplung

                                                                     Daten
                                                                 synchronisieren



                                      Drahtlos
                                      synchronisieren
                                                                    Seriell
                                                                synchronisieren




            Use Case Generalization



        19                                       www.ambit.de
www.ambit.de
Chapter 3


                7. Use-Case-Diagram (Use Case Diagramm)


                                 Systemname
                                                                                        Akteur 2
                                                                Mitverwendeter
                                                                Anwendungsfall   Bankkunde
                  Akteur 1                             <<include>>

                                      Anwendungsfall
                                                                Debug-Info               Akteur 3
                                                <<extend>>      aufzeichnen
                                                                                 Rechnungswesen



            Additionally, there must be a Use Case document, describing the functionality.
            Maybe prosa, Word-File. -> technically seen, not a part of UML.
            Typical Content: short description (WHAT?),precondition, basic function


        20                                       www.ambit.de
www.ambit.de
Chapter 3


             Use-Case-Diagram


             •CaseStudy
             Use-Case-Diagram:
             Modelling an
             Online-Banking-System
        21             www.ambit.de
www.ambit.de
Chapter 3


             8. Activity Diagram (Aktivitätsdiagramm)

             • Using Activity Diagrams,
                – complex processes, as well as
                – parallel processes and
                – alternative processes
                can be modeled and described.
             • Aktivity Diagrams give – like State machines do – an
               Impression of the Behaviour development,
                – However they are concentrated on Transitions
                  (separate Steps)
                – They are not concentrated on their Activator

        22                        www.ambit.de
www.ambit.de
Chapter 3


             8. Activity Diagram (Aktivitätsdiagramm)
             • Notation elements
               –   action                      – interuption area
               –   activity                    – exeption handler
               –   objectnodes                 – activity area
               –   links                       – structured nodes
               –   Controll elements           – quantity processing area
               –   start nodes                 – loop node
               –   end nodes                   – decision node
               –   branch connection node
               –   synchronization – and parallelization knode
               –   control data



        23                          www.ambit.de
www.ambit.de
Chapter 3


                       8. Activity Diagram (Aktivitätsdiagramm)
                  Activity name                                                                             activity
             Start node                        get invitation                         possible order


                                  Invitation            Check date



            object node
                                                                                       Check interest
                                                                  [time available]      in invitation
              action
                                                      [no time]



                link                                                  [no interest]

                                                                                               [interest]

                 condition                                                                Announce
                                                      Cancel invitation
                                                                                         participation
                 control node /
                 decision node


                       end node



        24                                                        www.ambit.de
www.ambit.de
Chapter 3


                8. Activity Diagram                                               (Aktivitätsdiagramm)



              Wrapping a gift
                                                     [Recipient lives far away]

                                                                                      Adress the Label




                Christmas
                present                    Wrap the gift




                                                                                      Put it under a tree
                                                     [Recipient lives near by]




             A branch node / Decision in the Activity Diagram

        25                                           www.ambit.de
www.ambit.de
Chapter 3


                8. Activity Diagram (Aktivitätsdiagramm)
             Parallelize something and bring it back together




                                                  …….

                                                  …….


                                                  …….




        26                                          www.ambit.de
www.ambit.de
Chapter 3

             9. Finite State Machine
             (Zustandsautomat)
             Using state machines you get the possibility to model
             the behavior of any classifier.
             - State machines specify the behaviour of a classifier,
                using states,
             - transitions between states,
             - transitions between states are initiated by inner or
                external events.
             State Machines show different states, an entity can
             pass.


        27                         www.ambit.de
www.ambit.de
Chapter 3

             9. Finite State Machine
             (Zustandsautomat)
             • Notation elements
               –   simple state                   –   entrance/ exit point
               –   transition                     –   region
               –   start state                    –   history
               –   end state                      –   specialization
               –   pseudo states                  –   protocol state machine
               –   crossing
               –   decision
               –   terminator
               –   assembled state
               –   substatemachine states



        28                         www.ambit.de
www.ambit.de
Chapter 3


                    9. State Machine (Zustandsautomat)
                  State machine name
                                                                        Trigger                                      Guard

                                     ticket machine

            Start state
                                                                                                                                     Action Labels:
                                                          value heighten                          [value<price]
                                         waiting                              Geldaufnahme                                           entry
                                                          [enter coins]
                                                                             Do                                                      exit
                state                                                        [enter coins]/                                          do
                                                                             value heighten                                          include
                                                                    Cancel voted          ticket
                                              stopp                                       selectively
                                              pressed
              Transition                                       cancel
                                                                                                  Berechnung
                                                             Entry / value
                                                               expend         After                     do / price
                                                                              (Timeout)                 calculate
                Crossing point


                                                                        [value = price]                              [value>price]
                                          Output ricket

                entrance behaviour       Entry / ticket
                                                                                                        output
                                           expend
                                                                                                        change

                                                                                                   do / change
                                                                                                     expend                           State behavior
                 TimeTrigger


        29                                                              www.ambit.de
www.ambit.de
Chapter 3


             10. Sequence Diagram (Sequenzdiagramm)

             • Sequence Diagrams are the most used Interaction
               Diagrams.
             • They show a chronological view of the message
               exchange between Elements/Entities
             • Sequence diagrams show the dynamic flow
               between objects in dependence of chronology.




        30                       www.ambit.de
www.ambit.de
Chapter 3


             10. Sequence Diagram (Sequenzdiagramm)
             • Notation elements
               –   interaction / interaction frame
               –   life line
               –   news
               –   state invariant
               –   combined fragment
               –   key relation
               –   interaction reference
               –   link point
               –   defragmentation of life lines



        31                            www.ambit.de
www.ambit.de
Chapter 3


                        10. Sequence Diagram (Sequenzdiagramm)
                         object1            object2                          object1                  object2

                               message()
(a-b<2 sec.)            a

                                                                                   [x>0] message1()
                        b
                                   answer             Aktionssequenz /
Zusicherung /                                         Action sequence
assertion                                                                         [x<=0] message2()




                                              Rekursion /
                                              recursion                                answer1
 Steuerungs-                                                                           answer2
     Fokus /
Control focus


            life line




        32                                                    www.ambit.de
www.ambit.de
Chapter 3


             10. Sequence Diagram (Sequenzdiagramm)
              object1                                                   object1                object2


                        new()        object2
                                                                                   Iteration
                         message()

                                                                                  *message()
                                               Objektkonstruktion and
                                               -dekonstruktion
                         answer


                        destroy()

                                                                                    answer




        33                                        www.ambit.de
www.ambit.de
Chapter 3


             Activitydiagram


             •CaseStudy
             Aktivitätsdiagramme:
              Modelling a party


        34              www.ambit.de
www.ambit.de
Chapter 3

             11. Communication Diagram
             (Kommunikationsdiagramm)

             • Closely related to the Sequence Diagram /
               Alternative to the Sequence Diagram.
             • More important who is communicating with each
               other. Chronology is less important.
             • Communication diagrams show the dynamic flow
               and ist logic process in the collaboration of objects.
               (Interaction to realize a use case.)




        35                         www.ambit.de
www.ambit.de
Chapter 3

             11. Communication Diagramm
             (Communication Diagram)
             • Notation elements:
               – interaction / interaction frame
               – Life line
               – message




        36                          www.ambit.de
www.ambit.de
Chapter 3

                11. Communication Diagram
                (Kommunikationsdiagramm)



                                                                                            sequential

                                                           Object:class                      synchronize
             [Condition] 1.2:answer:=message(arg.)

                                                                                           restricted

            Start
                        Object:class                                        Object:class
                                                 1.1.*.message(arguments)                  Time-dependend
            message()

                                                                                            asyncron


                                                Sequence




                   Messages are displayed with lines between communication partners.


        37                                                 www.ambit.de
www.ambit.de
Chapter 3


             12. Timing Diagram (Timingdiagramm)

              •   Timing Diagrams show the chronology of
                  Classifiers in a System
              •   Most important is the real chronology of
                  messages.




        38                        www.ambit.de
www.ambit.de
Chapter 3


             12. Timing Diagram (Timingdiagramm)
             • Notation elements:
               –   interaction / interaction frame
               –   live line
               –   time line
               –   message
               –   branch mark
               –   value line
               –   key relation




        39                            www.ambit.de
www.ambit.de
Chapter 3


                  12. Timing Diagram (Timingdiagramm)
                diagram name                                                                     Duration condition

                               Traffic light                                         {d…6*d}


                                   :hanging lamp    green


                                                      red
                                                                               go
                                                   operable                                            stop

            Life lines
                                                                   activate
                                                     active
                                   :predestrian




                                                                                                     message

                                                                                     Time line
                                                      waiting
                                                                    d
                                                                                                                      Sek.
                                                                   0 1 2 3
                                condition
                                                                        time scale

        40                                                      www.ambit.de
www.ambit.de
Chapter 3

             13. Interaction Overview Diagram
             (Interaktionsübersichtsdiagramm)

             • Interaction Overview Diagrams show the cooperation
               of different actions by displaying flows/ processes of
               interactions with a variant/ alternative of the activity
               diagram.

             • Refined by
                – Sequence Diagrams
                – Communication Diagrams
                – Timing Diagrams




        41                         www.ambit.de
www.ambit.de
Chapter 3

             13. Interaction Overview Diagram
             (Interaktionsübersichtsdiagramm)
             • Notation elements
                – interaction / interaction reference
                – control elements




        42                           www.ambit.de
www.ambit.de
Chapter 3

              13. Interaction Overview Diagram
              (Interaktionsübersichtsdiagramm)
                           Geldautomat
                                                                           ref
                                             ref                                              {0..10}            Zeiteinheit
                                                                            PIN Eingabe                          Minuten
                                            Karteneinschub

                                                                                           [Dauer > 10]                        Interaktionsreferenz
             Startknoten
                                                                          [else]
                            Paralellisierungsknoten                                                        ref
                                                           [PIN Eingabe                   [PIN Eingabe
                                                           == fehlgeschlagen]             == 0]           Geldtransaktion
                                                                                                            abwickeln


                               sd
                                                                                   ref
                                   :Authentifizierungs-                                                                             Verzweigungsknoten
                                                               :Display
                                         system                                     Karteneinzug           ref
                                           Anzeigen („Karte
                                           wird eingezogen“)                                               Kartenauswurf

                                                                                                                                   Verbindungsknoten




                           Kante                          Synchronisationsknoten          Endknoten

        43                                                        www.ambit.de
www.ambit.de
Chapter 3


             State Machine   (Zustandsautomat)




             •CaseStudy
             State Machines:
             Modelling a ticket machine


        44               www.ambit.de
www.ambit.de
Chapter 4


             4 UML Model Development


                     Chapter 4




        45             www.ambit.de
www.ambit.de
Chapter 4


             UML Exercise

               How would you manage
               model development?
               Simple chronology of
               modelling process?


        46             www.ambit.de
www.ambit.de
Chapter 4


             Literature


                      Literature




        47                www.ambit.de
www.ambit.de
Chapter 4

             UML used and continuing
             Literature
             •   Wolfgang Zuser, Thomas Greching, Monika Köhle:
                 „Software Engineering mit UML und Unified
                 Process“; Pearson Studium, München, 2004
             •   Chris Rupp, Jürgen Hahn, Stefan Queins, Mario Jeckle,
                 Barbara Zengler: „UML 2 glasklar“; Hanser, München,
                 2005
             •   Heide Balzert: „UML 2 kompakt“; Spektrum,
                 Heidelberg, 2005




        48                        www.ambit.de

05 ai uml_illik_students_part_2_eng

  • 1.
    Wissen macht ambitionierte Geschäftsziele erreichbar. Wir liefern Wissen und schaffen Werte. UML 2.x Weltweit. Knowledge enables your business ambitions. We deliver knowledge and create value. Worldwide. Part 2 Einführung Fort. / Introduction cont. J. Anton Illik Ambit 1. 1
  • 2.
    UML intro &overview www.ambit.de Content • 5. Component Diagram • 10. Sequence Diagram Attention: Sequence can change! The arrangement (Komponentendiagramm) (Sequenzdiagramm) • 6. Deployment Diagram • 11. Communication Diagram (Verteilungsdiagramm) (Kommuniaktionsdiagramm) • 7. Use Case Diagram • 12. Timing Diagram (Use-Case-Diagramm) (Timingdiagramm) • 8. Activity Diagram • 13. Interaction Overview Diagram of the chapters as well! (Aktivitätsdiagramm) (Interaktionsübersichtsdia-gramm) • 9. State Machine (Zustandsautomat) 2 www.ambit.de
  • 3.
    www.ambit.de Chapter 3 5. Component Diagram (Komponentendiagramm) • Component diagrams are similar to Class diagrams. • Focused on higher level abstraction of subsystems (Components, Interfaces and their relations). • The component diagram gives the possibility to show the structure of a system at runtime. The representation refers and depends on component structure. 3 www.ambit.de
  • 4.
    www.ambit.de Chapter 3 5. Component Diagram (Komponentendiagramm) • Notation elements – Component (physical part of the System; different types; see next page) – Artefacts • E.g. a compiled object file • A piece of source code • Shared Library • Enterprise JavaBean (EJB), • Et cetera; • „Entity of the world of application“ as well) 4 www.ambit.de
  • 5.
    www.ambit.de Chapter 3 5. Component Diagram (Komponentendiagramm) • UML-Standard-Stereotypes offer the following Types of Components – document – entity – executable – file – library – process – service – specification – subsystem – table 5 www.ambit.de
  • 6.
    www.ambit.de Chapter 3 5. Component Diagram (Komponentendiagramm) Komplexer Port Implementierte Schnittstelle <<component>> <<component>> Komponente1 Komponente2 Bestandteil3 Allgemeine Kompositionskonektor Klasse Abhängigkeitsbeziehung Bestandteil4 Realisierungsbeziehung Bestandteil1 Bestandteil2 <<spezifcation>> Bestandteil einer Komponente Komponente specDoc <<artifact>> <<subsystem>> <<compontent>> Artefakt1 Port Komponente3 Komponente4 Verwendungs- <<use>> Beziehung <<artifact>> Komponente6 <<manifest>> Delegationskonnektor Implementierungsbeziehung Benötigte Schnittstelle 6 www.ambit.de
  • 7.
    www.ambit.de Chapter 3 6. Deployment Diagram (Verteilungsdiagramm) • Deployment Diagrams show classification of artefacts on Hardware components, named nodes. • In other words: Deployment Diagrams show the nodes, on which the System is running. Nodes are physical Entities ( = Hardware) • Besides that, Deployment Diagrams form communicaiton relations and dependencies between nodes. 7 www.ambit.de
  • 8.
    www.ambit.de Chapter 3 6. Deployment Diagram (Verteilungsdiagramm) • Artefacts – Artefacts model physical information about a System • besides Hardware, • User guides • Training material • Password files and • jar-Archive • Can be modeled as an Artefact. – Artefacts express the terms/ideas/concepts of a modeled System 8 www.ambit.de
  • 9.
    www.ambit.de Chapter 3 6. Deployment Diagram (Verteilungsdiagramm) • Artefacts – An Example Artefact: a Java-jar-Archive MessageFramework.jar – Artefacts can have attributes (like other UML-Classifiers) MessageFramework.jar Reentrant: boolean numLoggers: int = 1 9 www.ambit.de
  • 10.
    www.ambit.de Chapter 3 6. Depolyment Diagram (Verteilungsdiagramm) • Notation elements – nodes • Conventional Node-Stereotypes: – client – server – database – backup server – communication path – distribution relationship – application specification 10 www.ambit.de
  • 11.
    www.ambit.de Chapter 3 6. Depolyment Diagram (Verteilungsdiagramm) node 2 <<device>> communication path node 1 <<device>> node 3 <<execution environment>> Deployment spezifikation execution: thread Deployment relationship Transaction: false Artefact 11 www.ambit.de
  • 12.
    www.ambit.de Chapter 3 6. Deployment Diagram (Verteilungsdiagramm) One Node Server A Node with a couple of compartments Server <<components>> Buchungssystem.jar Comon.jar 12 www.ambit.de
  • 13.
    www.ambit.de Chapter 3 6. Deployment Diagram (Verteilungsdiagramm) A Node with distributed Components Server <<deploy>> <<deploy>> Buchungssytem.jar Common.jar 13 www.ambit.de
  • 14.
    www.ambit.de Chapter 3 6. Deployment Diagram (Verteilungsdiagramm) Several Nodes and their Connection Client <<Internet>> <<LAN>> Datenbankserver Buchungsserver 14 www.ambit.de
  • 15.
    www.ambit.de Chapter 3 Deployment Diagram (Verteilungsdiagramm) •CaseStudy Deployment Diagram: Deployment of a windscreen wiper service unit 15 www.ambit.de
  • 16.
    www.ambit.de Chapter 3 Fourth Diagram Type Behaviour Modelling [Verhaltensmodellierung] 16 www.ambit.de [Rupp et.a] S. 225-236
  • 17.
    www.ambit.de Chapter 3 7. Use-Case-Diagram (Use Case Diagramm) • Use-Case-Diagrams give an overview of all the requirements on a system from the users point of view • Use-Cases often have the following Connections – Generalization ( ) – Extension (<<extends>>) and – Inclusion (<<include>>) to other Use-Cases of the System 17 www.ambit.de
  • 18.
    www.ambit.de Chapter 3 7. Use-Case-Diagram (Use Case Diagramm) • Notation elements – use case – system (subject) – actor (Part of the User) – <<include>> - relationship • Use-Case can include behaviour of another Use-Case. The included Use-Case is not used autonomous, but part of a bigger Use-Case. – <<extend>> - relationship • Not part of the normal, fundamental development. • Generalization relation 18 www.ambit.de
  • 19.
    www.ambit.de Chapter 3 7. Use-Case-Diagram (Use Case Diagramm) Datenkopplung Daten synchronisieren Drahtlos synchronisieren Seriell synchronisieren Use Case Generalization 19 www.ambit.de
  • 20.
    www.ambit.de Chapter 3 7. Use-Case-Diagram (Use Case Diagramm) Systemname Akteur 2 Mitverwendeter Anwendungsfall Bankkunde Akteur 1 <<include>> Anwendungsfall Debug-Info Akteur 3 <<extend>> aufzeichnen Rechnungswesen Additionally, there must be a Use Case document, describing the functionality. Maybe prosa, Word-File. -> technically seen, not a part of UML. Typical Content: short description (WHAT?),precondition, basic function 20 www.ambit.de
  • 21.
    www.ambit.de Chapter 3 Use-Case-Diagram •CaseStudy Use-Case-Diagram: Modelling an Online-Banking-System 21 www.ambit.de
  • 22.
    www.ambit.de Chapter 3 8. Activity Diagram (Aktivitätsdiagramm) • Using Activity Diagrams, – complex processes, as well as – parallel processes and – alternative processes can be modeled and described. • Aktivity Diagrams give – like State machines do – an Impression of the Behaviour development, – However they are concentrated on Transitions (separate Steps) – They are not concentrated on their Activator 22 www.ambit.de
  • 23.
    www.ambit.de Chapter 3 8. Activity Diagram (Aktivitätsdiagramm) • Notation elements – action – interuption area – activity – exeption handler – objectnodes – activity area – links – structured nodes – Controll elements – quantity processing area – start nodes – loop node – end nodes – decision node – branch connection node – synchronization – and parallelization knode – control data 23 www.ambit.de
  • 24.
    www.ambit.de Chapter 3 8. Activity Diagram (Aktivitätsdiagramm) Activity name activity Start node get invitation possible order Invitation Check date object node Check interest [time available] in invitation action [no time] link [no interest] [interest] condition Announce Cancel invitation participation control node / decision node end node 24 www.ambit.de
  • 25.
    www.ambit.de Chapter 3 8. Activity Diagram (Aktivitätsdiagramm) Wrapping a gift [Recipient lives far away] Adress the Label Christmas present Wrap the gift Put it under a tree [Recipient lives near by] A branch node / Decision in the Activity Diagram 25 www.ambit.de
  • 26.
    www.ambit.de Chapter 3 8. Activity Diagram (Aktivitätsdiagramm) Parallelize something and bring it back together ……. ……. ……. 26 www.ambit.de
  • 27.
    www.ambit.de Chapter 3 9. Finite State Machine (Zustandsautomat) Using state machines you get the possibility to model the behavior of any classifier. - State machines specify the behaviour of a classifier, using states, - transitions between states, - transitions between states are initiated by inner or external events. State Machines show different states, an entity can pass. 27 www.ambit.de
  • 28.
    www.ambit.de Chapter 3 9. Finite State Machine (Zustandsautomat) • Notation elements – simple state – entrance/ exit point – transition – region – start state – history – end state – specialization – pseudo states – protocol state machine – crossing – decision – terminator – assembled state – substatemachine states 28 www.ambit.de
  • 29.
    www.ambit.de Chapter 3 9. State Machine (Zustandsautomat) State machine name Trigger Guard ticket machine Start state Action Labels: value heighten [value<price] waiting Geldaufnahme entry [enter coins] Do exit state [enter coins]/ do value heighten include Cancel voted ticket stopp selectively pressed Transition cancel Berechnung Entry / value expend After do / price (Timeout) calculate Crossing point [value = price] [value>price] Output ricket entrance behaviour Entry / ticket output expend change do / change expend State behavior TimeTrigger 29 www.ambit.de
  • 30.
    www.ambit.de Chapter 3 10. Sequence Diagram (Sequenzdiagramm) • Sequence Diagrams are the most used Interaction Diagrams. • They show a chronological view of the message exchange between Elements/Entities • Sequence diagrams show the dynamic flow between objects in dependence of chronology. 30 www.ambit.de
  • 31.
    www.ambit.de Chapter 3 10. Sequence Diagram (Sequenzdiagramm) • Notation elements – interaction / interaction frame – life line – news – state invariant – combined fragment – key relation – interaction reference – link point – defragmentation of life lines 31 www.ambit.de
  • 32.
    www.ambit.de Chapter 3 10. Sequence Diagram (Sequenzdiagramm) object1 object2 object1 object2 message() (a-b<2 sec.) a [x>0] message1() b answer Aktionssequenz / Zusicherung / Action sequence assertion [x<=0] message2() Rekursion / recursion answer1 Steuerungs- answer2 Fokus / Control focus life line 32 www.ambit.de
  • 33.
    www.ambit.de Chapter 3 10. Sequence Diagram (Sequenzdiagramm) object1 object1 object2 new() object2 Iteration message() *message() Objektkonstruktion and -dekonstruktion answer destroy() answer 33 www.ambit.de
  • 34.
    www.ambit.de Chapter 3 Activitydiagram •CaseStudy Aktivitätsdiagramme: Modelling a party 34 www.ambit.de
  • 35.
    www.ambit.de Chapter 3 11. Communication Diagram (Kommunikationsdiagramm) • Closely related to the Sequence Diagram / Alternative to the Sequence Diagram. • More important who is communicating with each other. Chronology is less important. • Communication diagrams show the dynamic flow and ist logic process in the collaboration of objects. (Interaction to realize a use case.) 35 www.ambit.de
  • 36.
    www.ambit.de Chapter 3 11. Communication Diagramm (Communication Diagram) • Notation elements: – interaction / interaction frame – Life line – message 36 www.ambit.de
  • 37.
    www.ambit.de Chapter 3 11. Communication Diagram (Kommunikationsdiagramm) sequential Object:class synchronize [Condition] 1.2:answer:=message(arg.) restricted Start Object:class Object:class 1.1.*.message(arguments) Time-dependend message() asyncron Sequence Messages are displayed with lines between communication partners. 37 www.ambit.de
  • 38.
    www.ambit.de Chapter 3 12. Timing Diagram (Timingdiagramm) • Timing Diagrams show the chronology of Classifiers in a System • Most important is the real chronology of messages. 38 www.ambit.de
  • 39.
    www.ambit.de Chapter 3 12. Timing Diagram (Timingdiagramm) • Notation elements: – interaction / interaction frame – live line – time line – message – branch mark – value line – key relation 39 www.ambit.de
  • 40.
    www.ambit.de Chapter 3 12. Timing Diagram (Timingdiagramm) diagram name Duration condition Traffic light {d…6*d} :hanging lamp green red go operable stop Life lines activate active :predestrian message Time line waiting d Sek. 0 1 2 3 condition time scale 40 www.ambit.de
  • 41.
    www.ambit.de Chapter 3 13. Interaction Overview Diagram (Interaktionsübersichtsdiagramm) • Interaction Overview Diagrams show the cooperation of different actions by displaying flows/ processes of interactions with a variant/ alternative of the activity diagram. • Refined by – Sequence Diagrams – Communication Diagrams – Timing Diagrams 41 www.ambit.de
  • 42.
    www.ambit.de Chapter 3 13. Interaction Overview Diagram (Interaktionsübersichtsdiagramm) • Notation elements – interaction / interaction reference – control elements 42 www.ambit.de
  • 43.
    www.ambit.de Chapter 3 13. Interaction Overview Diagram (Interaktionsübersichtsdiagramm) Geldautomat ref ref {0..10} Zeiteinheit PIN Eingabe Minuten Karteneinschub [Dauer > 10] Interaktionsreferenz Startknoten [else] Paralellisierungsknoten ref [PIN Eingabe [PIN Eingabe == fehlgeschlagen] == 0] Geldtransaktion abwickeln sd ref :Authentifizierungs- Verzweigungsknoten :Display system Karteneinzug ref Anzeigen („Karte wird eingezogen“) Kartenauswurf Verbindungsknoten Kante Synchronisationsknoten Endknoten 43 www.ambit.de
  • 44.
    www.ambit.de Chapter 3 State Machine (Zustandsautomat) •CaseStudy State Machines: Modelling a ticket machine 44 www.ambit.de
  • 45.
    www.ambit.de Chapter 4 4 UML Model Development Chapter 4 45 www.ambit.de
  • 46.
    www.ambit.de Chapter 4 UML Exercise How would you manage model development? Simple chronology of modelling process? 46 www.ambit.de
  • 47.
    www.ambit.de Chapter 4 Literature Literature 47 www.ambit.de
  • 48.
    www.ambit.de Chapter 4 UML used and continuing Literature • Wolfgang Zuser, Thomas Greching, Monika Köhle: „Software Engineering mit UML und Unified Process“; Pearson Studium, München, 2004 • Chris Rupp, Jürgen Hahn, Stefan Queins, Mario Jeckle, Barbara Zengler: „UML 2 glasklar“; Hanser, München, 2005 • Heide Balzert: „UML 2 kompakt“; Spektrum, Heidelberg, 2005 48 www.ambit.de