Sequence Diagram - Diagram Building Blocks

Diagram Building Blocks

If the lifeline is that of an object, it demonstrates a role. Note that leaving the instance name blank can represent anonymous and unnamed instances.

In order to display interaction, messages are used. These are horizontal arrows with the message name written above them. Solid arrows with full heads are synchronous calls, solid arrows with stick heads are asynchronous calls and dashed arrows with stick heads are return messages. This definition is true as of UML 2, considerably different from UML 1.x. If a caller sends a synchronous message, it must wait until the message is done, such as invoking a subroutine. If a caller sends an asynchronous message, it can continue processing and doesn’t have to wait for a response. You see asynchronous calls in multithreaded applications and in message-oriented middleware. Asynchrony gives better responsiveness and reduces the temporal coupling but is harder to debug. Activation boxes, or method-call boxes, are opaque rectangles drawn on top of lifelines to represent that processes are being performed in response to the message (ExecutionSpecifications in UML).

Objects calling methods on themselves use messages and add new activation boxes on top of any others to indicate a further level of processing.

When an object is destroyed (removed from memory), an X is drawn on top of the lifeline, and the dashed line ceases to be drawn below it (this is not the case in the first example though). It should be the result of a message, either from the object itself, or another.

A message sent from outside the diagram can be represented by a message originating from a filled-in circle (found message in UML) or from a border of the sequence diagram (gate in UML).

UML 2 has introduced significant improvements to the capabilities of sequence diagrams. Most of these improvements are based on the idea of interaction fragments which represent smaller pieces of an enclosing interaction. Multiple interaction fragments are combined to create a variety of combined fragments, which are then used to model interactions that include parallelism, conditional branches, optional interactions.

Read more about this topic:  Sequence Diagram

Famous quotes containing the words diagram, building and/or blocks:

    “God’s fire upon the wane,
    A diagram hung there instead,
    More women born than men.”
    William Butler Yeats (1865–1939)

    The rage for road building is beneficent for America, where vast distance is so main a consideration in our domestic politics and trade, inasmuch as the great political promise of the invention is to hold the Union staunch, whose days already seem numbered by the mere inconvenience of transporting representatives, judges and officers across such tedious distances of land and water.
    Ralph Waldo Emerson (1803–1882)

    He has given me six hundred street signs.
    The time I was dancing he built a museum.
    He built ten blocks when I moved on the bed.
    He constructed an overpass when I left.
    Anne Sexton (1928–1974)