Post on 03-Apr-2018
UML Diagrams
Stephan Onggo (Lancaster University)
Peer Olaf-Siebers (University of Nottingham)
Bayreuth Summer School
22 – 26 August 2013
UML 2.x – 14 Diagrams
2
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
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
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
Activity Diagram: Notations
6
Notations
• Initial node
– A starting point
• Final node
– Stops a flow
• Activity final node
– Stop all flows
7
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
Notations
• Object node
– Represent storage of tokens
• Executable node
– Represent a task
9
Example 1: Order fulfilment
10
Source: OMG
Example 2: Helpdesk system
11
Source: OMG
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
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
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
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
Example 1: Seminar
16
Source: Agile
Modelling
Example 2: Washing machine
17
Source: Zicomi
systems
Class Diagram
18
Example
19