![Page 1: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/1.jpg)
UML Diagrams
Stephan Onggo (Lancaster University)
Peer Olaf-Siebers (University of Nottingham)
Bayreuth Summer School
22 – 26 August 2013
![Page 2: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/2.jpg)
UML 2.x – 14 Diagrams
2
![Page 3: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/3.jpg)
Structure Diagrams
• Show the static structure of the objects in a system
• Depict those objects in a specification that are irrespective of time
• Example:
– Structure of an organisation
– In simulation: structure of a model (related to model boundary)
3
![Page 4: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/4.jpg)
Behaviour Diagrams
• Show the dynamic behaviour of the objects in a system
– collaborations, activities and state transitions
• The dynamic behaviour of a system can be described as a series of changes to the system over time
• Example:
– Flow of documents/information
– In simulation: sequence of events/activities
4
![Page 5: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/5.jpg)
Activity Diagram
• Describe the sequence of tasks using:
– Control node: sequencing decision
– Control flow: route / path
• Tokens
– Flow from one point to another
– Used to describe the execution of an activity
– Are not explicitly modelled
5
![Page 6: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/6.jpg)
Activity Diagram: Notations
6
![Page 7: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/7.jpg)
Notations
• Initial node
– A starting point
• Final node
– Stops a flow
• Activity final node
– Stop all flows
7
![Page 8: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/8.jpg)
Notations
• Fork node
– Splits a flow into multiple concurrent flows
• Decision node
– Choose between outgoing flows
• Join node
– Synchronise multiple flows
• Merge node
– Merge multiple flows without synchronization
8
![Page 9: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/9.jpg)
Notations
• Object node
– Represent storage of tokens
• Executable node
– Represent a task
9
![Page 10: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/10.jpg)
Example 1: Order fulfilment
10
Source: OMG
![Page 11: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/11.jpg)
Example 2: Helpdesk system
11
Source: OMG
![Page 12: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/12.jpg)
State Machine Diagram
• Represent discrete event-driven behaviours
• Due to its event-driven nature, a State Machine execution is either in transit or in state, alternating between the two
• May execute an action when in transit
12
![Page 13: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/13.jpg)
Notations
• State
– Represent a condition
• Entry point
– Entry point to a state machine or composite state
• Exit point • Exit point of a state machine or composite state
• Terminate
– Terminate the execution of a state machine
13
![Page 14: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/14.jpg)
Notations
• Initial state
– Represent a starting state for a region
• Final state
– Represent the final state for a region
• Deep history
– Represent the most recent active state configuration
• Shallow history
– Represents the most recent active sub-state
14
![Page 15: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/15.jpg)
Notations
• Join
– Synchronise multiple flows
• Fork
– Splits a flow into multiple concurrent flows
• Choice
– Choose between outgoing flows
• Junction
– As in choice but choose two or more outgoing flows
15
![Page 16: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/16.jpg)
Example 1: Seminar
16
Source: Agile
Modelling
![Page 17: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/17.jpg)
Example 2: Washing machine
17
Source: Zicomi
systems
![Page 18: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/18.jpg)
Class Diagram
18
![Page 19: UML Diagrams - cs.nott.ac.ukpszps/biss2013/resources/BISS_Lec07.pdf · UML Diagrams Stephan Onggo ... Bayreuth Summer School 22 – 26 August 2013 . UML 2.x – 14 Diagrams 2](https://reader031.vdocuments.us/reader031/viewer/2022022006/5ac279d87f8b9ac6688e9a67/html5/thumbnails/19.jpg)
Example
19