Reproduced UML Timing Diagram Summary

Source: Internet
Author: User
Tags dashed line

Objective

In my work, the most used is the time series diagram. Probably because of the work, I also like to draw time series diagram, very clear, very clearly, when to send what message, to what state, all of a sudden on the display in your mind, for the message-driven program, is no better.

Introduction to timing diagrams

First, time series diagrams are used to denote the order of behavior in a use case, when a routine is performed, each message in a sequence diagram corresponds to a class operation or an event that causes a transition in the state machine, and second, the time series diagram shows the interaction between objects, which is the occurrence of the event flow in the scene or use case. Time series diagrams are dynamic models, and finally, time series diagrams focus on message sequences, that is, describe how messages are sent and received between objects. Represents the time order in which messages are passed between objects. Also, don't forget, the way to explore the time series diagram is to view the messages exchanged between objects from top to bottom.

Elements in a time series diagram

The modeling elements included in the time series diagram are: Roles, objects, lifelines, control focus, messages, and combined fragments. Next, each element is introduced, as well as the presentation of their representation in the Astah.

Role

Such as:

The villain in the picture shows a role, where the role can be human, or other subsystems or systems.

Object

Such as:

Each lifeline is associated with an object with three lifelines, and you can see three objects, but the three objects are named differently. When using Astah to draw a time series diagram, select an object that can be changed in the properties to describe these three naming methods:

  1. Display instance name and class name, mode: Instance Name: Class name;
  2. Show only class name, Mode:: Class name;
  3. Displays only the instance name, in: instance name.

In fact, three kinds of naming methods, no special requirements, which can let the reading of the time series diagram of the person can see clearly, the use of which, and I generally use the first and second, the first kind of information, in a single case, can be used to express; Just have to make the class name, but, third, I have not known the meaning of existence, give you an instance name, actually do not see its class name. So, personally, I would recommend that you use the first and second types.

Lifeline

There is nothing to say, from the two graphs above, we can see a dashed line that extends downward, and this dashed line represents the lifeline that represents the time at which an object exists.

Control focus

The control focus is the symbol representing the time period in the sequence diagram, during which the object will perform the appropriate action. Represented by a small rectangle. As indicated:

News

Messages are generally divided into synchronous messages, asynchronous messages, and return messages, as indicated.

Synchronizing a message means that the sender of the message passes control to the recipient of the message, and then stops the activity, waiting for the recipient of the message to discard or return control. Used to indicate the meaning of synchronization. An asynchronous message is a message that the sender passes a message to the recipient of the message, and then resumes its activity without waiting for the recipient to return the message or control. The recipient and sender of an asynchronous message are working concurrently. The return message means that the message is returned from the procedure call.

Self-correlating messages

Represents the method's own invocation and one method within an object that invokes another method, such as:

Combined fragments

Represents a message sent with some specific criteria.

Http://image.mamicode.com/info/201601/20181017062248239491.png

For example, the loop (loop) sends the GetProperty message to get the property. When you use Astah to draw a time series diagram, you can change the sending criteria in the corresponding properties panel after you select a combined fragments. There are a lot of introductions here, listing one or two here:

  1. Alternative fragment (denoted "alt") corresponds to If...then...else
  2. Option fragment (denoted "opt") corresponds to switch
  3. Parallel fragment (denoted "par") indicates simultaneous occurrence
  4. Loop fragment (denoted "loop") corresponds to for or foreach
Summarize

On the time series diagram, so far, not very deep, mainly on the concept of time series diagram, not involving the application, as well as the actual case analysis, always feel the shortcomings of what, is it. No matter, you can refer to this: "UML Modeling time series diagram (Sequence Diagram)".

Blog turn from: "UML Timing Diagram Summary"

Reproduced UML Timing Diagram Summary

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.