Sequencediagram
Sequencediagram
Web Client searches Online Bookshop and waits for results to be returned.
Messages by Presence of Events
Depending on whether message send event and receive events are present, message
could be one of:
complete message
lost message
found message
unknown message (default)
The semantics of a complete message is the trace <sendEvent, receiveEvent>. Both
sendEvent and receiveEvent are present.
Unknown message - both sendEvent and receiveEvent are absent (should not
appear).
Lost Message
Lost Message is a message where the sending event is known, but there is no
receiving event. It is interpreted as if the message never reached its destination. The
semantics is the trace <sendEvent>, receiveEvent is absent. Lost messages are
denoted with as a small black circle at the arrow end of the message.
Search Google possibly parallel with Bing and Yahoo, but search Bing before Yahoo.
Critical Region
The interaction operator critical defines that the combined fragment represents
a critical region. A critical region is a region with traces that cannot be interleaved by
other occurrence specifications (on the lifelines covered by the region). This means
that the region is treated atomically by the enclosing fragment and can't be
interleaved, e.g. by parallel operator.
Add() or remove() could be called in parallel,
but each one should run as a critical region.
Ignore
Semantics and the purpose of the interaction operator ignore is obscure. UML 2.3
defines its meaning as "there are some message types that are not shown within this
combined fragment. These message types can be considered insignificant and are
implicitly ignored if they appear in a corresponding execution. Alternatively, one can
understand ignore to mean that the message types that are ignored can appear
anywhere in the traces."
On the other hand, explanations to the Figure 14.25 on p. 530 [UML 2.3 -
Superstructure] are that this kind of interaction could be used to specify a test of an
existing system. At the runtime the messages ignored in tests "will of course be
handled in some manner by the running system".
The list of ignored messages follows the operand enclosed in a pair of curly braces "{"
and "}". Ignore operation is typically combined with other operations such as "assert
ignore {m, s}."
Lifeline
Lifeline is a named element which represents an individual participant in the
interaction. While parts and structural features may have multiplicity greater than 1,
lifelines represent only one interacting entity.
If the referenced connectable element is multivalued (i.e, has a multiplicity > 1), then
the lifeline may have an expression (selector) that specifies which particular part is
represented by this lifeline. If the selector is omitted, this means that an arbitrary
representative of the multivalued connectable element is chosen.
A lifeline is shown using a symbol that consists of a rectangle forming its "head"
followed by a vertical line (which may be dashed) that represents the lifetime of the
participant.
Information identifying the lifeline is displayed inside the rectangle in the following
format (slightly modified from what's in UML 2.4 standard):
lifeline-ident ::= [ connectable-element-name [ '[' selector ']' ]] [ ':' class-
name ] [ decomposition ] | 'self'
selector ::= expression
decomposition ::= 'ref' interaction-ident [ 'strict' ]
where class-name is the type referenced by the represented connectable element.
Note that although the syntax allows it, lifeline-ident cannot be empty.
The lifeline head has a shape that is based on the classifier for the part that this
lifeline represents. Usually the head is a white rectangle containing name of class.
Use Login interaction to authenticate user and assign result back to the user attribute
of Site Controller.
One constraint imposed by UML specification that is sometimes difficult to follow is
that the interaction use must cover all involved lifelines represented on the enclosing
interaction. This means that all those lifelines should be somehow located near each
other. If we have another interaction use on the same diagram it could be very tricky
to rearrange all involved lifelines as required by UML.
UML Sequence Diagrams Examples
Here we provide some examples of UML sequence diagrams: