Timeline, activity, status, and collaboration

Source: Internet
Author: User

 

Sequence Chart

Time Sequence diagram used to describeThe time sequence of passing messages between objectsThat is, the behavior sequence in the use case.

When executing a use case, each message in the sequence diagram corresponds to a class operation or a conversion trigger event.

In UML, the sequence diagram is represented asTwo-Dimensional Relationship DiagramWhere, the vertical axis is the timeline, and the time is extended vertically. the horizontal axis represents each independent object in the collaboration. when an object exists, the lifeline is represented by a dotted line, and the message is represented by an arrow from the lifeline of an object to the lifeline of another object. arrows are arranged up and down in chronological order.

Sequence Chart of successful login by an ATM user

Basic concepts in the sequence diagram

 

Object: an object in a sequence chart is represented by a rectangle with an underline under the object name. Placing the object at the top of the sequence chart indicates that the object already exists at the beginning of interaction.
If the object is not on the top, the object is created during interaction..

Lifeline: the lifeline is a vertical dotted line, indicating that the objects in the sequence chart exist within a lifecycle. the center of each object carries a lifeline.

Message: single-channel communication between two objects. Direct the message from the sender to the receiver. return messages are rarely used in the time sequence diagram.

Activation: a sequence diagram describes the activation and passivation of an object. activation indicates that the object is occupied to complete a task. passivation indicates that the object is idle and waiting for a message. in UML, when an object is activated, the lifeline of the object is extended to a rectangle. A rectangle is called a plan bar or a control period. the object is activated at the top of the activation bar. the object is inactive after it completes its work.

Object creation and destruction: In the sequence chart, the default position of the object is at the top of the graph. this indicates that the object already exists before the interaction starts. if the object is created during the interaction process, put the object in the middle. if you want to cancel an object, place the "X" symbol at its lifeline termination point.

Exercise: Sun yat-sen's ......

 

Activity diagram

In UML, an activity diagram is essentiallyFlowchartIt is used to describe system activities, points and branches.

 

Basic concepts in the activity diagram

 

Action status:Atomic and non-disruptive actionsAnd then changes to another action. In UML, the action State is represented by the rounded corner rectangle, and the Action indicated by the action state is written inside the rounded corner rectangle.

 

Branch and merge: branches are common in software systems and are generally used to indicate the conditional behavior of object classes.Use a Boolean expression to determine the direction of the action. The condition behavior is expressed by branch and merge. In the activity diagram, the branch is represented by a small hollow diamond.
The branch includes an inbound conversion and two conditional outbound conversions., The output conversion conditions should be mutually exclusive, and only one output conversion must be triggered.The merge operation includes two conditional input transformations and one output conversion.

Status chart

Status chart: Describes the dynamic behavior of an object over time by establishing a lifecycle model of the object.

 

 

Basic concepts in the status chart

State: the State name is represented by a rounded rectangle. The state name is usually represented by a string. the name of a State must be unique in the context where the state chart is located.

Conversion: uses a straight line with arrows to indicate that one end is connected to the source State and the other end is connected to the target State.

Initial status: Each status chart has an initial status. this status indicates the starting position of the status chart. the initial status can only be used as the conversion source, not as the conversion target, and only one status chart can be used. the initial State is represented by a solid circle.

Termination status: the final state of the model element. It is the end point of a state chart. There can be multiple termination statuses in a state chart.

 

Collaboration Diagram

A collaboration diagram (also called a collaboration diagram) is an interaction diagram.

The time sequence diagram focuses on the time sequence of message passing between objects.Interaction between objects and association between objects in a collaborative chart

 

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.