UML Behavioural Models Flashcards

1
Q

Mention the three UML behavioural models discussed in class

A

UML Activity Diagrams
UML State Machine Diagrams
UML Sequence Diagrams

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the UML Activity diagram a model of and what is its purpose

A

Modelling of step-wise activities and actions.

Purpose is to describe the behaviour in terms of processes and workflows.

An UML Activity Diagram is principally expressive enough to specify the system behaviour for a certain process completely.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Activity diagram
Initial node

A

Start of execution
Exactly one
Filled out circle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Activity diagram
Action

A

Active step
By system or actor

Round rectangle, description of action inside i.e. boil water

High level description of an active step that can be executed by an actor or by the system.

Not specified specifically, but can be by swim lanes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Activity diagram
Transition

A

Connects actions
An arrow from which to which action the transition leads.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Activity diagram
Final node

A

End of execution
Circle filled in the middle.

Potentially many. But does not have different semantics, cannot be a distinction where one final node means ‘success’ and another ‘failure’.
Also possible to have no final node.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Activity diagram
Decision

A

Empty diamond.
Control flow branch.
Similar to Java’s if or switch statements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Activity diagram
Guard

A

By the decision in [ ]
Boolean expression, must be true to execute.
For decisions, must not overlap.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Activity diagram
Fork

A

Start of parallelism
Start of all outgoing transitions in parallel.
A fat vertical line, arrows going in and out of it.

Once the fork is hit by the execution of the activity diagram because of the incoming transition was completed, all outgoing transitions are executed in parallel, i.e., (conceptually) at the same time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Activity diagram
Join

A

End of parallelism
A fat vertical line, arrows going in and out of it.

Continue when all incoming transitions were completed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Activity diagram
Swim lanes

A

Attribute actions to actors.
Rectangle around activity diagram with name on top.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the UML State Machine diagram model and what is the purpose?

A

Models protocols based on discrete system states.

The purpose is to describe reaction of system to triggers for current state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

When should one use State Machine Diagrams over Activity diagrams? And the other way around

A

A UML state machine diagram is used when a system has many discrete states the system stays in for a relevant time.

Whereas UML activity diagram is used when states are perceived as almost transient and focus should be put on the actions leading to the change of states.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

State Machine Diagram
State

A

Current ‘mode’ of system
i.e. waiting, order approved, etc.

Rounded rectangle, with two sections. First sections is description of state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

State Machine Diagram
Transition

A

Connects states.
Direction of arrow shows from which to which.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

State Machine Diagram
Initial state

A

Filled out circle.
Marks the start of execution.
exactly one.
Only outgoing transitions.

17
Q

State Machine Diagram
Final state

A

Marks the end of execution for the described state machine

Circle with filled out circle in the centre.

Possible to have multiple final states, but no different semantic.
Also possible to have no final state.

18
Q

State Machine Diagram
Trigger

A

Event that occurs to cause transition to fire.

text by transition arrow

i.e. endOfDay, so transition to final state.

A transition will only fire id the annotated trigger event occurs. If no trigger is annotated, the transition can principally fire immediately (but guards have to be true).

19
Q

State Machine Diagram
Guard

A

Condition under which transition can fire.

A guard is a boolean condition that has to be satisfied for the transition to be able to fire (once trigger occurs).

condition in square brackets

example [time < 22:45]

20
Q

State Machine Diagram
Action

A

Performed when transition fires.

has a leading / to mark action and not trigger

This may e.g. be a method that is called to set some internal variables.

21
Q

State Machine Diagram
Decision

A

hollow diamond with outgoing guards.

Selection of one of the outgoing
transitions via their guards.

22
Q

What is the UML sequence diagram modelling and what is the purpose?

A

Models calls in example scenarios.
Purpose is to describe detailed calls and their order on an example scenario.

23
Q

Sequence diagram
Lifeline

A

From top to bottom.
How long an entity (object) exists.
Box with :class
and then from that a Dotted line + activation box.

24
Q

Sequence diagram
Activation box

A

Active part of lifeline.
Can be nested.
Hollow rectangle.

Is the part of the lifeline where an entity is actively participating in the depicted scenario.

25
Q

Sequence diagram
Message

A

Active communication with other entity.

arrow to other entity with method called on top.

in Object oriented design usually means that the sending entity is calling a method on the receiving entity.
Possible to pass arguments (values for parameters)

26
Q

Sequence diagram
Return

A

Response to received message. Optional.
May contain descriptive text, e.g. the result of a calculation.
Dotted line back to the entity that sent a message in the first place, with text on top.

27
Q

Sequence diagram
Start node

A

Needed.
filled out circle, indicating start

28
Q

Sequence diagram
Termination

A

End of an entity’s lifeline.
Explicit signal that the entity is no longer used.

Cross on top of lifeline.

May be used to actively end the lifeline of an entity because it is no longer relevant to the scenario of the sequence diagram but also the system altogether.

29
Q

Sequence diagram
Synchronous message

A

Is depicted by a solid line with a solid tip. It means that, after sending the message, the sender is blocked until the operation completes at the receiver, i.e., the sender cannot do anything else on that thread.

30
Q

Sequence diagram
Nested activation box

A

An activation box may be nested, e.g. when an entity is still waiting for the return of a previous synchronous message while it receives another message.

31
Q

Sequence diagram
An asynchronous message

A

Is depicted by a solid line arrow with a pointed tip. It means, that after sending the message, the sender is not blocked until the operation completes the receiver.

32
Q
A