Sequence Diagram

About

A Sequence Diagram in UML represents how objects interact in a particular sequence over time. It is primarily used to illustrate the flow of messages between different components in a system. This diagram is essential for understanding dynamic behavior and how different parts of a system communicate.

Key Elements

  1. Actors & Objects

    • Represented as stick figures (Actors) or rectangles (Objects).

    • Actors interact with the system (e.g., User, External System).

  2. Lifelines

    • Dashed vertical lines indicating the object's existence over time.

    • Shows how long an object is active in the sequence.

  3. Messages

    • Arrows representing method calls, responses, and interactions.

    • Types:

      • Synchronous (-->) – Caller waits for a response.

      • Asynchronous (->) – Caller continues execution without waiting.

  4. Activation Bars

    • Vertical rectangles on lifelines showing when an object is active/executing.

    • Indicate processing time for a message.

  5. Return Messages

    • Dashed arrows (-->>) representing responses or results sent back.

  6. Loops & Conditions

    • Used to model iterations or conditional logic (e.g., alt, loop).

  7. Destroying Objects

    • Represented by ‘X’ at the bottom of a lifeline when an object is deleted.

1. Fund Transfer

This sequence diagram represents a user performing a fund transfer in a banking system.

Last updated