Behavior : Sequence Diagrams - Time & Occurences

22 important questions on Behavior : Sequence Diagrams - Time & Occurences

While time passes as you move down the lifelines, the time scale is not uniformly spaced on a lifeline, and ....?

time may move at different speeds on each lifeline

Messages may be downward sloping. You can use the slope to...

To indicate time is involved in the transfer of the message from one lifeline to another.

Consider that the lifelines may represent widely dispersed participants, e.g., satellites, networked computers, or hailed cars.

The things (usually arrows) that impinge upon each lifeline represent an ...?

An ordered set of OCCURRENCES from top-to-bottom being earlier-to-later.
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

What are the ordering rules?

The ordering rules are:


1.  A message end must occur after the message start. This rule is basic CAUSALITY.




2.  Occurrences on a single lifeline are time-ordered from top-to-bottom. This rule is the definition of the lifeline. This rule enforces a strict ordering of occurrences on the lifeline.




3. The return, if any, from a message, can only occur after the original message is received. This rule is a consequence of rule 1 and rule 2

These rules allow for multiple paths through a sequence diagram. On the diagram taken as a whole, the occurrences form a...?

PARTIAL ORDERING.

We call each valid order of occurrences a..?

TRACE.

When messages cross each other, it causes an opportunity for  ...?

When messages cross each other, it causes an opportunity for multiple traces; see Fig. 14.4. Traces are often displayed in angle brackets .

Explanation 1:    In Fig. 14.4, we follow the common convention to label the sending of a message with an “!” and the receiving of a message with a “?”

Read the diagram

In Fig. 14.4, we follow the common convention to label the sending of a message with an “!” and the receiving of a message with a “?”


There are two messages: m1 and m2.




Following the rule 1, we know that m1! must occur before m1? and m2! must occur before m2?.

In
addition, m1! must occur before m2? and m2! must occur before m1? based on rule 2.




Rule 1: A message end must occur after the message start. This rule is basic CAUSALITY.

Explanation 2: Ordering rules

However, there are no rules ordering m1! and m2!.

So there are two possible orders
m1!,m2!
or
m2!,m1! .


Similarly, there are no rules governing the order of m2? and m1?.

So there are two possible orders m2?,m1? and m1?,m2? .

Together we now have four possible traces for this sequence diagram.

Without message crossing, there is ........  trace when there are only two lifelines.

Without message crossing, there is only one possible trace when there are only two lifelines.

However, when there are more than two lifelines, you can also get multiple traces.

Though UML does allow CROSSED ....... , it does not allow crossing or bending .......

Though UML does allow CROSSED MESSAGES, it does not allow crossing or bending lifelines.

In Fig. 14.5, we have three lifelines and multiple traces.

Consider that there are no rules governing the order of m1! and m2!.

2 traces?

The solid arrow with a filled-in (solid) arrowhead is the .....

The solid arrow with a filled-in (solid) arrowhead is the sending of a synchronous message.

  • If this is a notional sequence diagram, then it just means that the sender is ensured that the recipient gets the message.
  • Otherwise, it means that the sender is invoking an operation (aanroepen) on the recipient and that the sender will wait for a response.

Diagraming the response is optional.
          

Where is the message name placed at an synchronous message?

The message name is placed above the arrow and follows the syntax of an operation as defined earlier.

The called operation must be a member of the recipient’s OPERATIONS or
inherited from a superclass of the recipient. The parameters of the operation may be given values appropriate to the scenario.

The solid arrow with a V-shaped arrowhead is the ..... ?

The solid arrow with a V-shaped arrowhead is the sending of an asynchronous message.

If this is a notional sequence diagram, then it just means that the sender is not waiting for a response.

The recipient class must be an active class, though that fact is not always modeled in any way.

These asynchronous messages are usually ..... , and they must be a member of the recipient’s ......  or inherited from a superclass of the recipient.

These asynchronous messages are usually SIGNALS, and they must be a member of the recipient’s RECEPTIONS or inherited from a superclass of the recipient.



These asynchronous messages can also be operations that are called asynchronously.

Receiving a V-shaped arrowhead indicate a ...?

Receiving a V-shaped arrowhead indicate a signal has been asynchronously received by the recipient participant.

If a reception by that name is not defined on the participant, the superclasses are searched up the inheritance chain for a definition.

If no definition if found, then the behavior is undefined.

The recipient must be of an ACTIVE type and may not issue a return.

A dashed arrow indicates a.... ?

A dashed arrow indicates a return from an operation call.


  • In informal modeling, this can be a notional return, but when formal modeling,

  • it must match the return type of the operation call.

  • It may also use a more complicated format that indicates the operation call.

An arrow with an open V-shaped arrowhead arriving at the header box indicates ...?

An arrow with an open V-shaped arrowhead arriving at the header box indicates the participant is created, as depicted in Fig. 14.7.

This name of the message may be the name of the constructor with parameters filled in, or it can just be notional.

If it is not an explicit call to the constructor, the constructor is called.

After OBJECT CREATION, the participant can ...?

After OBJECT CREATION, the participant can now participate equally with the preexistent lifelines.

All lifelines that are not at the very top of the diagram must be created before they can participate.  

A large  X  at the bottom of a lifeline indicates that.....?

A large  X  at the bottom of a lifeline indicates that the lifeline is destroyed and cannot continue to participate in more behavior.

The lifeline should not extend lower than the X .

A lifeline can be killed in response to an incoming message, or it can decide to self-destruct.

What is the Opaque box?

An opaque box placed over a lifeline indicates an EXECUTION SPECIFICATION, that is, the lifeline is executing some behavior or waiting for a lower-level behavior to finish.


As a lifeline can contain multiple threads of execution, a lifeline can still send or receive additional messages while being covered by an execution specification.


In addition, there can be multiple overlapping execution specifications.

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo