Thursday, June 10, 2010

Working with sequence diagrams in UML, How to Create Sequence Diagram? About Sequence Diagram

The sequence diagram consists of objects represented in the usual way- as named rectangles (with the name underlined), messages represented as solid line arrow, and time represented as a vertical progression.
The following figure depicts the arrangement of objects and messages in a sequence diagrams.
• Header Elements of sequence diagrams.
Actor: -indicate an external person or entity that negotiate with the system .

Object: -Represents an instance in the system or one of its components.

Unit:-Represents a subsystem, component, unit, or other logical entity in the system (may or may not be implemented by objects)

Separator: - Represents an interface or boundary between subsystems, components or units (e.g., air interface, Internet, network)
Group: -Groups related header elements into subsystems or components.
Body Elements in Sequence Diagram.

Action: -Represents an action taken by an actor, object or unit.
Asynchronous: - An asynchronous message between header elements.
Block: -A block represents a loop or conditional for a particular header element.
Call message:-A call (procedure) message between header elements.
Create message: - A "create" message that creates a header element (represented by lifeline going from dashed to solid pattern).

Destroy Element: - Represents the destruction of a header element.
Destroy Message: -Represents the destruction of a header element as a result of a call from another element.
Diagram Link: - Represents a portion of a diagram being treated as a functional block Similar to a procedure or function call that abstracts functionality or details not shown at this level can optionally be linked to another diagram for elaboration.
Else Block: - Represents an "else" block portion of a diagram block.

Message return: - A return message between header elements.

What is recursion?
Sometimes an object has an operation that invokes itself. This is called recursion.

Following figure show the recursion in sequence diagrams.

No comments:

Recent Posts