Difference between revisions of "Sequence Diagram"

From Open Risk Manual
(Example)
 
(6 intermediate revisions by the same user not shown)
Line 11: Line 11:
  
 
== PlantUML Elements ==
 
== PlantUML Elements ==
A PlantUML sequence diagram specifies and shows the following:
+
A [[PlantUML]] sequence diagram specifies and shows the following:
  
 
* Actors
 
* Actors
Line 30: Line 30:
  
 
Payer -> Payee: Another Payment
 
Payer -> Payee: Another Payment
Payee <-- Payer: Another Payment Confirmation
+
Payee --> Payer: Another Payment Confirmation
 
@enduml
 
@enduml
 
</pre>
 
</pre>
 +
 +
[[File:Sequence.png|Sequence Diagram]]
  
 
== References ==
 
== References ==

Latest revision as of 17:23, 16 February 2022

Definition

A Sequence Diagram is a type of Interaction Diagram that focuses on Message interchanges between entities. In the UML modelling context it is a type of behavior diagram that enables defining Behavior in some detail.

A sequence diagram interactions by depicting sequences of Message exchanges. In OOP design a sequence diagram describes the interactions between objects to fulfill a specific task. The focus is on the chronological order of the messages exchanged between the interactiong objects.

A sequence diagram typically shows, as parallel vertical or horizontal lines (also called lifelines), different processes or objects that "live" simultaneously, and, as horizontal or vertical arrows, the messages exchanged between them. The spatial arrangement indicates the temporal order in which messages happen.

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.

A sequence diagram is related to but distinct from collaboration and communication diagrams that place less emphasis on the depiction of the temporal dimension.

PlantUML Elements

A PlantUML sequence diagram specifies and shows the following:

  • Actors
  • Messages (methods) invoked by these actors
  • Return values (if any) associated with previous messages
  • Indication of any loops or iteration area

Example

@startuml
'https://plantuml.com/sequence-diagram

autonumber

Payer -> Payee: Payment 
Payee --> Payer: Payment Confirmation

Payer -> Payee: Another Payment
Payee --> Payer: Another Payment Confirmation
@enduml

Sequence Diagram

References