Skip to main content

Sequence Diagram

Sequence diagram

sequence diagram is an interaction diagram that shows how objects operate with one another and in what order. It is a construct of a message sequence chart.
A sequence diagram shows object interactions arranged in time sequence. It depicts the objects and classes involved in the scenario and the sequence of messages exchanged between the objects needed to carry out the functionality of the scenario. Sequence diagrams are typically associated with use case realizations in the Logical View of the system under development. Sequence diagrams are sometimes called event diagrams or event scenarios.
A sequence diagram shows, as parallel vertical lines (lifelines), different processes or objects that live simultaneously, and, as horizontal arrows, the messages exchanged between them, in the order in which they occur. This allows the specification of simple runtime scenarios in a graphical manner.

Diagram building blocks

If the lifeline is that of an object, it demonstrates a role. Leaving the instance name blank can represent anonymous and unnamed instances.
Messages, written with horizontal arrows with the message name written above them, display interaction. Solid arrow heads represent synchronous calls, open arrow heads represent asynchronous messages, and dashed lines represent reply messages. 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. Asynchronous calls are present in multithreaded applications and in message-oriented middleware. 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. If an object is destroyed (removed from memory), an X is drawn on bottom of the lifeline, and the dashed line ceases to be drawn below it. 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 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.

Comments

Popular posts from this blog

Activity Diagram

What is an Activity Diagram? An activity diagram visually presents a series of actions or flow of control in a system similar to a  flowchart  or a  data flow diagram . Activity diagrams are often used in business process modeling. They can also describe the steps in a  use case diagram . Activities modeled can be sequential and concurrent. In both cases an activity diagram will have a beginning and an Basic Activity Diagram Notations and Symbols Initial State or Start Point A small filled circle followed by an arrow represents the initial action state or the start point for any activity diagram. For activity diagram using swimlanes, make sure the start point is placed in the top left corner of the first column. Activity or Action State An action state represents the non-interruptible action of objects. You can draw an action state in SmartDraw using a rectangle with rounded corners. Action Flow Action flows, also called edges and paths, illustrat...

UML Communication Diagrams Overview

Communication diagram  (called  collaboration diagram  in UML 1.x) is a kind of UML  interaction diagram  which shows interactions between objects and/or  parts  (represented as  lifelines ) using sequenced messages in a free-form arrangement. Communication diagram  corresponds (i.e. could be converted to/from or replaced by) to a simple  sequence diagram  without structuring mechanisms such as interaction uses and combined fragments. It is also assumed that  message overtaking  (i.e., the order of the receptions are different from the order of sending of a given set of messages) will not take place or is irrelevant. The following nodes and edges are drawn in a UML communication diagrams:  frame ,  lifeline ,  message . These major elements of the communication diagram are shown on the picture below. The major elements of UML communication diagram. Frame Communication diagrams could be shown wit...

Use Case

Dalam rekayasa perangkat lunak dan sistem, use case adalah daftar tindakan atau langkah-langkah acara yang biasanya mendefinisikan interaksi antara peran (dikenal dengan Unified Modeling Language sebagai aktor) dan sebuah sistem untuk mencapai suatu tujuan. Aktor tersebut bisa menjadi manusia atau sistem eksternal lainnya. Dalam kasus penggunaan teknik sistem digunakan pada tingkat yang lebih tinggi daripada rekayasa perangkat lunak yang sering mewakili misi atau tujuan pemangku kepentingan. Persyaratan rinci kemudian dapat ditangkap dalam Sistem Pemodelan Bahasa (SysML) atau sebagai laporan kontraktual. Analisis kasus penggunaan merupakan teknik analisis persyaratan penting dan berharga yang telah banyak digunakan dalam rekayasa perangkat lunak modern sejak diperkenalkan secara formal oleh Ivar Jacobson pada tahun 1992. Pengembangan use case driven adalah karakteristik utama dari banyak model dan kerangka proses seperti ICONIX, Unified Proses (UP), IBM Rational Unifi...