What is the sequence diagram / timing diagram?

Foreword

UML Sequence Diagrams interactive map detailing how to perform the operation. They capture the collaborative interaction between objects in the environment. Is a time sequence diagram focus them to interact intuitively display order by using the vertical axis of the graph to indicate the transmission time of a message and time.

Sequence diagram captures:

  • Interactions occurring or collaborate with operation of embodiments (or generic example of FIG. FIG.)
  • Between the system user and the system, between the high-level interaction between the system and other systems or subsystems (sometimes called the system of FIG sequence)

The sequence of FIG.

  • Advanced interaction between objects generated simulation system
  • To achieve the interaction between the modeled object instances in cooperation with this embodiment
  • Modeling of interaction between collaborative operation to achieve the objects
  • General interactive simulation (show all possible paths through interaction) or specific example interaction (only one path in the interaction)

FIG sequence acquaintance

FIG sequence of display elements with time and interactions, which (vertical) depending on the object tissue (horizontal) and time:

Object Dimensions

  • The horizontal axis represents the elements involved in the interaction
  • Conventionally, the object involved in the operation are listed from left to right according to when they are involved in a message sequence. However, the elements on the horizontal axis can appear in any order

Time dimension

The vertical axis represents the time course of the next page (or progression).

Note: The time sequence diagram is all about sorting, not duration. FIG interaction of vertical space independent of the duration of the interaction.

A sequence diagram showing an example: hotel systems

FIG interaction is a sequence diagram detailing how to perform operations - what to send a message and when to send a message. Organized according to the time sequence of FIG. When you step off the page, time will be. Objects involved in the operation are listed from left to right according to when they are involved in a message sequence.

The following is a sequence diagram hotel reservations. Target sequence are reserved start message window.

Note: The class and object diagrams are static model views. Interaction diagrams are dynamic. They describe how objects collaborate.

FIG sequence notation

Actor

  • One kind of roles (e.g., by exchanging signals and data) to interact with an entity body plays
  • In the subject external (that is, in a sense, part of the Actor instance is not an instance of the corresponding theme).
  • It indicates a role of human users, external hardware, or other themes played.

Participants do not necessarily represent a particular physical entity, but only on behalf of a specific role for an entity object can play the role of several different Actor, on the contrary, an Actor can be represented by a number of different objects

Lifeline

Individual participants interact with representatives of lifeline

Activations

  • Elongated rectangle on the lifeline operation is performed the time period represented by the elements
  • A rectangular top and bottom are aligned with start and finish time

Call Message

  • Message defines a particular communication interaction between the lifeline.
  • call message is a message indicating the target lifeline operation invocation

Note: When the function call call message appears inside the target object function, rather than the caller function

Return Message

  • Return message is a message, indicating to pass information back to the caller before the corresponding message.

Self Message

  • self message is a message of the same message lifeline called representation (it can be understood as calling their methods)

Recursive Message (message recursively)

  • Recursive message is a message of the same message lifeline called representation. It is targeting over activation message calling for activation.

Create Message

  • Create a message is a representation (target) lifeline to instantiate a message (to initialize a target object)

Destroy Message

The destruction of a message is a message indicating that the destruction of the target lifeline request lifecycle (destruction of a target object)

Duration Message

The duration of the message displays the distance between two points in time the message call

Note

Notes (Notes) enabling the various notes attached to the element. Semantic annotations without force, but may contain useful information for modelers.

And focus control message

  • Any event is a little interactive things happen in.
  • Focus of control: also called execution occurrence, an execution occurrence
  • It shows as thin rectangular lifeline
  • It represents the time period of performing the operation element. A rectangular top and bottom are aligned with start and finish time

Sequence fragment (Sequence Fragments)

  • UML 2.0 introduces a sequence (or interaction) fragments. Sequence fragments can more easily create and maintain accurate sequence diagram
  • Sequence fragment is represented as a block, referred to as combined fragments comprising a portion of a sequence diagram interaction
  • Operator fragment (cornet at the top left) indicates the type of segment
  • Slice type: ref, assert, loop, break, alt, opt, neg

Operator Fragment Type
alt Alternate plurality of segments: segment only execute condition is true
opt Optional: provided only if the condition is true only perform segment. Alt equivalent to only a trace.
by Parallel: each segment runs in parallel
loop Cycle: fragments may be performed a plurality of times, and protection indicating an iterative basis
region Key areas: Fragment only one thread at a time to execute it
neg Negatives: snippet shows an invalid interaction
ref Reference: interaction means defined on the other of FIG. Draw frame to cover the lifeline interaction involved. You can define parameters and return values.
sd FIG Sequence: sequence diagram for surrounding the entire

It may be combined to capture a frame, for example, cyclic or branched. Combined Fragment Keywords: alt, opt, break, par, seq, strict, neg, critical, ignore, consideration, assert and loop. Constraints usually used to display the message timing constraints. They may be applied to the interval between the time a message or message.

example

Scene modeling the sequence according to FIG.

User demand is captured for the program to streamline the use of the embodiment. A use case is the interaction between the external system and the set of actors. In UML use cases:

"System (or entity) may perform a series of actions (including variants) specification, participants interact with the system."

Scene through a flow path or use case, the sequence of events that occur during a particular execution of the system described, which is generally indicated by the sequence of FIG.

FIG sequence - code MODELS

Sequence diagram may be a bit closer to the code level, so why not coding the algorithm rather than draw it as a sequence diagram?

  • A good sequence diagram is still higher than the level of the actual code point
  • FIG sequence is a language-neutral
  • Non-coding sequence diagram can be
  • As a team, the sequence diagram easier to do
  • For testing and / or UX wireframes

Description link

What is Sequence Diagram?

Guess you like

Origin blog.csdn.net/weixin_33933118/article/details/91366420