A sequence diagram is used to show the interaction sequence between objects.
A sequence diagram represents an interactive relationship as a two-dimensional diagram.
The vertical line is the timeline, and the time goes down along the vertical line.
The horizontal axis represents the class meta-roles of independent objects in the collaboration.
The class meta-role is represented by a lifeline.
When an object exists, the role uses a dotted line. When the object is activated, the lifeline is a dual line.
Messages are represented by arrows from the lifeline of an object to the lifeline of another object.
Arrows are arranged from top to bottom in chronological order.
Elements involved in a sequence diagram:
1. Lifeline
The lifeline name can be underlined. When an underline is used, it means that the lifeline in a sequence diagram represents a specific object of a class.
2.Synchronous Message
The sender will wait for the synchronous Message response before it continues.
3. asynchronous messages
No response message is required before the sender continues.
4. Notes
5. Constraints
The constraint symbol is very simple; format: [Boolean test]
6. Combination of clips
Combined fragments are used to solve the Conditions and Methods for interactive execution.
It allows you to directly represent logical components in a sequence diagram. It is used to define special conditions and sub-processes for any part of any lifeline by specifying conditions or application regions of sub-processes.
Common combinations include:
A.Select (ALT)
The choice is used to specify the mutex selection between two or more message sequences, which is equivalent to the classic if... else...
Choose to generate only one sequence in any scenario. You can set a critical condition in each clip to indicate that the clip can run.ElseThe critical value indicates the fragment that should be run when any other critical value is not true. If all critical values are false and noElse, No fragments are executed.
B.Option (OPT)
Contains a sequence that may or does not occur
C.Loop)
Fragments are repeated for a certain number of times. It can indicate the condition of duplicate fragments in the critical state.
D.Parallel)
Reference http://blog.csdn.net/tianhai110/article/details/6361338
[UML] UML sequence diagram Summary