Sequence diagram of UML

Source: Internet
Author: User

This article focuses on the UML time sequence diagram. The Modeling Elements in the UML time sequence diagram mainly include: Object (actor), lifeline (Lifeline), control focus (focusofcontrol), message) and so on.

I. Introduction to the UML time sequence diagram (briefintroduction) sequencedivisor is a diagram that shows interactions between objects 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, focusofcontrol, and message.
Ii. Role of the sequencediagramelements (actor)
System roles can be people, and other systems or subsystems.
Object)
The object includes three naming methods: the first method includes the Object Name and class name; the second method only displays the class name and does not show the object name, that is, it indicates that it 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
Focusofcontrol)
The control focus is the symbol indicating the time period in the sequence diagram. During this time period, the object will perform corresponding operations. It is represented by a small rectangle, such.
Message)

In the UML sequence diagram, messages are generally divided into synchronousmessage, asynchronousmessage, and returnmessage, as shown in:


◆ Synchronous Message = synchronousmessage)
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.
◆ Asynchronousmessage)
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.
◆ Returnmessage)
The returned message indicates that the process call returns
◆ Self-associated message)
Indicates the call of the method itself and one method in an object to call another method.
Iii. UML sequence diagram Example Analysis (sequecediagramexampleanalysis) UML sequence diagram 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
UML sequence diagram instance

UML sequence diagram 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 the 1.8service 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 UML Sequence Diagram (sequencedigoal) is a diagram that shows the interaction 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, focusofcontrol, and message ..


Sequence diagram of UML

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.