Sequence diagram is mainly used to show the order of interaction between objects .

   Sequence diagrams represent interactions as a two-dimensional graph . The vertical is the time axis , Time goes down the vertical line . The horizontal axis represents the class element role of each independent object in collaboration . Class element roles are represented by lifelines . When an object exists , Characters are represented by a dotted line , When the process of an object is active , The lifeline is a two lane line .

   Messages are represented by arrows from the lifeline of one object to the lifeline of another . The arrows are arranged in chronological order from top to bottom in the diagram .

   The elements involved in the sequence diagram :

  1.  Lifeline :

   Lifeline names can be underlined . When using underscores , It means that the lifeline in the sequence diagram represents a specific instance of a class .

  2.  Sync message

   The sender before it continues , Will wait for synchronous message response .

  

  3.  Asynchronous messaging

   Before the sender continues , No need to wait for a response message .

  4.  notes


  5.  constraint

   The sign of the constraint is simple ; The format is : [Boolean Test]

  6.  Combining fragments

   Combining fragments It is used to solve the conditions and methods of interactive execution . It allows direct representation of logical components in sequence diagrams , Used to specify the application area of a condition or subprocess , Define special conditions and subprocesses for any part of any lifeline .

   The common combination fragments are :

   Choose (Alt

   Choices are used to indicate mutually exclusive choices between two or more message sequences , Equivalent to the classic if..else...

   There is only one sequence of choices in any situation .  You can set a threshold in each fragment to indicate the conditions under which the fragment can run .else  It means that none of the other thresholds is  True  The fragment that should be run when . If all the criticalities are  False  And there's no  else, No fragments are executed .

   Options (Opt

   Contains a sequence that may or may not occur

   loop (Loop

   Repeat the fragment a certain number of times .  The condition of fragment repetition can be indicated in criticality .

 

   parallel (Par

   The following table lists the commonly used combination fragments :

Fragment type

name

explain

Opt

Options

Contains a sequence that may or may not occur .  The conditions under which the sequence occurs can be specified in criticality .

Alt

Choose

Contains a list of fragments , These fragments contain alternative message sequences .  In any case, there is only one sequence .

You can set a threshold in each fragment to indicate the conditions under which the fragment can run . else  It means that none of the other thresholds is  True  The fragment that should be run when .  If all the criticalities are  False  And there's no  else, No fragments are executed .

Loop

loop

Repeat the fragment a certain number of times .  The condition of fragment repetition can be indicated in criticality .

Loop  The combined fragment has “Min” and “Max” attribute , They indicate the minimum and maximum number of times a fragment can be repeated .  The default is unlimited .

Break

interrupt

If you execute this fragment , Then discard the rest of the sequence .  Criticality can be used to indicate the condition under which an interrupt occurs .

Par

parallel

parallel processing .  The events in the fragment can be interleaved .

Critical

The key

Use in  Par  or  Seq  In the clip .  Indicates that messages in this fragment must not be interleaved with other messages .

Seq

Weak order

There are two or more fragments of operands .  Messages involving the same lifeline must occur in fragment order .  If the lifeline involved in the message is different , Messages from different fragments may be interleaved in parallel .

Strict

Strong order

There are two or more fragments of operands .  These fragments must occur in a given order .

   About how to interpret fragments of sequences

   By default , The sequence diagram shows a series of messages that can happen .  In the running system , Other messages may appear that you did not choose to display on the diagram .

   The following fragment types can be used to change this definition :

Fragment type

name

explain

Consider

consider

Specify the list of messages described by this fragment .  Other messages can occur in the running system , But it doesn't make much sense to describe it .

stay “Messages” Property, type the list .

Ignore

Ignore

A list of messages not described in this fragment .  These messages can occur in a running system , But it doesn't make much sense to describe it .

stay “Messages” Property, type the list .

Assert

Assertion

The operand fragment specifies a unique valid sequence .  Usually used in  Consider  or  Ignore  In the clip .

Neg

no

The sequence shown in this fragment must not occur .  Usually used in  Consider  or  Ignore  In the clip .

( turn )UML Sequence diagrams summarize more related articles

  1. UML Sequence diagram reference

    UML A description of each diagram :http://www.uml.org.cn/oobject/201509015.asp?artid=16901 UML Description of class diagram :https://www.cnblogs.com/a ...

  2. UML Understanding of sequence diagrams :

    UML Understanding of sequence diagrams :UML Sequence diagram refers to the graph of an object that calls other objects during processing : The point is to highlight the sequence of calls to other objects :

  3. UML Sequence diagram

    Sequence diagram       Sequence diagrams are mainly used to follow a sequence of interactions , Show these interactions between objects . Show how different business objects interact , It's useful for communicating how the current business is going . A sequence diagram is a tool to document system requirements , And sort out the good pictures of the system design . Sequence diagram ...

  4. UML Sequence diagram details

    It's February , And by now you may have read . Or hear people talk about UML 2.0 —— Including a number of progressive UML New specification for , The changes made . Considering the importance of the new specification , We are also revising the basis of this article series , Take our attention away from OMG ...

  5. 【 Tamp PHP Basics 】UML Sequence diagram summary

    Original address Sequence diagram is mainly used to show the order of interaction between objects . Sequence diagrams represent interactions as a two-dimensional graph . The vertical is the time axis , Time goes down the vertical line . The horizontal axis represents the class element role of each independent object in collaboration . Class element roles are represented by lifelines . When an object exists , role ...

  6. In software engineering UML The concept and summary of sequence diagram

    It is said that , Write your own code ,6 It's someone else's code after a month …… review ! review ! review ! The general development process of software engineering : Vision analysis . Business modeling , Demand analysis , Robust design , Key design , The final design , Realization …… Sequence diagram is also called sequence diagram ( Interaction diagram ), It belongs to software ...

  7. UML Sequence diagram summary (Loop、Opt、Par and Alt)

    Sequence diagram is mainly used to show the order of interaction between objects . Sequence diagrams represent interactions as a two-dimensional graph . The vertical is the time axis , Time goes down the vertical line . The horizontal axis represents the class element role of each independent object in collaboration . Class element roles are represented by lifelines . When an object exists , The character uses a dotted line ...

  8. 【UML】UML Sequence diagram summary

    Sequence diagram is mainly used to show the order of interaction between objects . Sequence diagrams represent interactions as a two-dimensional graph . The vertical is the time axis , Time goes down the vertical line . The horizontal axis represents the class element role of each independent object in collaboration . Class element roles are represented by lifelines . When an object exists , Role use ...

  9. UML Sequence diagram summary

    Reprint please indicate the source :htt://blog.csdn.net/tianhai110 Sequence diagram is mainly used to show the order of interaction between objects . Sequence diagrams represent interactions as a two-dimensional graph . The vertical is the time axis , Time goes down the vertical line . The transverse axis represents the distance between ...

Random recommendation

  1. 【 turn 】C# Thread synchronization example

    using System; using System.Threading; // Bank accounts class Account { int balance;                         ...

  2. 【CodeVS1076】 Sort

    Description give n and n It's an integer , I hope you rank them from small to large Input First line a positive integer n The second line n Integers separated by spaces Output Output only one line , From small to large output n Integers separated by spaces Sample ...

  3. sql server The relationship between local variables and global variables Declaration and assignment ( turn )

    source :http://www.111cn.net/database/mssqlserver/36734.htm Example :http://www.cnblogs.com/sunxi/p/4497493.htm ...

  4. 【web Security 】 Second bullet :XSS Compound coding in attack and defense

    I've been studying XSS Attack and defense , especially dom xss, The problem is slowly moving to the browser encoding and decoding order . I was stood up today , But in KFC I read the information for two hours , All of a sudden, there was a sudden sense of relief . The reference materials are posted first : 1. http ...

  5. be based on .NET make IP Intelligent network video monitoring system

    Open source, dedication : be based on .NET make IP Intelligent network video monitoring system ( One ) Open source   Open source dedicated series Links Open source, dedication : be based on .NET make IP Intelligent network video monitoring system ( One ) Open source Open source, dedication : be based on .NET make ...

  6. opencv-python:win7 Next , build python2.7.5 Environmental Science , To configure opencv3.1.0 Ready to start -OpenCV Step by step

    My personal blog : Click here build python2.7.5 Environmental Science download python2.7.5 64 position :https://www.python.org/ftp/python/2.7.5/python-2.7.5.am ...

  7. python— aggregate

    ps: Non empty is true , Not 0 be appointed after a period as acting ( empty ,0 All back to False) pwd=input('pwd:').strip() if pwd: # Three ways to judge whether it is empty ( You can judge directly ) # if pwd!='': # if l ...

  8. List、Set、 data structure 、Collections

    One . data structure : 1. What is a data structure : A way of storing data 2. common 4+1 Data structures Stack structure : It's a container structure with only one opening characteristic : First in, then out (FILO) Example : Cartridge clip , Kebik in barrels Queue structure : It's both ends ...

  9. poj2054 Color a Tree

    Divine topic . This is a giant tumor ... Self portrait is : Empty the air and run like electricity , All over the world On the poor blue down the yellow spring , Both were nowhere to be seen Because we know that : When it's not a tree , Keep selecting the node with the largest value to get the minimum cost . Then we can come up with a wrong greed ...

  10. Website accurate inquiry IP

    Share some websites that can accurately query IP Of https://www.chaidu.com/App/Web/IP/ http://www.ipip.net/ip.html http://www.hao7188.com ...