UML sequence diagram

Source: Internet
Author: User
I. Introduction to the time sequence diagram (Brief Introduction)
Sequence digraphs are graphs that show interactions between objects. These objects are arranged in chronological order. The sequence diagram shows the order of message interaction between the objects involved in the interaction and their objects. The time sequence diagram contains the following modeling elements: Object (actor), lifeline, focus of control, and message.
 
Ii. Sequence dimo-elements)
 
Role)
 
System roles can be people, and other systems or subsystems.
 
Object)
 
There are three naming methods for objects:
 
The first method includes the Object Name and class name;
 
In the second method, only the class name is displayed and the object name is not displayed, indicating that the class name is an anonymous object;
 
In the third method, only the object name is displayed, but the class name is not displayed.
 

Lifeline)
 
In the sequence diagram, the lifeline represents a dotted line extending down from the object icon, indicating the time when the object exists, as shown in
 
 
The focus of control refers to the time period symbol in the sequence diagram. During this time period, the object will perform corresponding operations. It is represented by a small rectangle, such.
 

Message)
 
Messages are generally divided into synchronous Message, asynchronous message, and return message, as shown in:
 
 
 
Synchronous Message = call message (synchronous Message)
 
The message sender sends the control to the receiver of the message, stops the activity, and waits for the receiver to give up or return the control. Used to indicate the meaning of synchronization.
 
 
 
Asynchronous Message)
 
The message sender transmits the signal to the receiver of the message, and then continues the activity without waiting for the receiver to return the message or control the message. The receiver and sender of asynchronous messages work concurrently.
 
 
 
Return message)
 
The returned message indicates that the process call returns
 
 
 
Self-message)
 
Indicates the call of the method itself and one method in an object to call another method.
 

Combined fragments
 

 
 
Ø alternative fragment (denoted "ALT") and if... Then... Else
 
Ø option fragment (denoted "opt") corresponds to switch
 
Ø parallel fragment (denoted "par") indicates simultaneous occurrence
 
Ø loop fragment (denoted "loop") corresponds to for or foreach
 
 
 
Iii. sequece dimo-example Analysis)
 
Sequence Chart scenario
 

The course creation function is completed in the following steps:
 
1. On the Add course page, enter the course form and click Create.
 
2. Add course information to the database
 
3. append topic information to the course object
 
4. Assign teachers to the course
 
5. Complete the course creation Function
 
 
 
Sequence Chart instance
 

 
 

Sequence Graph instance analysis
 
1. Serial No. 1.0-1.3 completes page Initialization
 
2. Fill in the course form by the course administrator No. 1.4-1.5
 
3. The course administrator clicks the "Create" button in sequence 1.6-1.7 and responds to the click event.
 
4. Create a course at service layer
 
5. Add the course to the database in sequence 1.9-1.10, and return the course number courseid.
 
6. Add the course subject to the database in sequence 1.11-1.12, and return the topic ID topicid.
 
7. Assign instructors to the course in sequence 1.13
 
8. Message No. 1.14: whether the course is successfully created or not
 
4. Summary)
 
Sequence digraphs are graphs that show interactions between objects. These objects are arranged in chronological order. The sequence diagram shows the order of message interaction between the objects involved in the interaction and their objects. The time sequence diagram contains the following modeling elements: Object (actor), lifeline, focus of control, and message. Finally, the course creation function is used to demonstrate a sequence chart instance.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.