UML-activity diagram

Source: Internet
Author: User
I. Meaning of the activity diagram

Activity digraphs are used to show the activities or actions of the classes involved in the behavior. An activity is essentially a flow chart, which describes the system's activities, points, and branches.

The activity diagram is designed to simplify the workflow of describing a process or operation. The activity is represented by a rounded rectangle. Once an activity is processed, the next activity is automatically triggered. The arrow indicates moving from one activity to the next activity. Similar to the status chart, the start point is represented by a solid circle, and the end point is represented by a semi-solid circle.

Ii. Differences Between Activity charts and flowcharts

(1) The flowchart focuses on the processing process. Its main control structure is sequence, branch, and loop. Each processing process has a strict order and time relationship; the activity diagram describes the rules followed by the sequence of object activities. It focuses on the system behavior rather than the system processing process.

(2) The activity diagram can indicate the concurrent activities, but the flowchart cannot.

(3) The activity diagram is object-oriented, and the flowchart is process-oriented.

3. Basic Elements of the activity diagram (1) Action and transfer

An action status refers to an atomic and non-disruptive action. After the action is completed, it is switched to another State.

Action status features:

1) atoms cannot be decomposed.

2) It cannot be interrupted. Once it starts running, it cannot be poisoned.

3) instantaneous, it takes a very short processing time, and sometimes can even be ignored.

Activity Status features:

1) it can be broken down into other sub-activities or action states. Because it is a combination of uninterruptible actions or actions, it can be interrupted.

2) internal activities in the activity status can be represented by another activity diagram.

Action status is a special case of activity status. 

An arrow is used to indicate the transfer of the action status.

(2) determination

An activity series almost always has to reach a certain point, at which point a decision should be made. One set of conditions throws one execution path, and the other sets of conditions throws another execution path, and these two execution paths are mutually exclusive.

The judgment point is represented in a small diamond chart, and then the possible path is derived from this diamond chart. The condition that causes this path to be executed must be specified near the relevant path, the condition expression is enclosed in square brackets.

(3) Concurrent path

In the activity diagram, a transfer is often divided into two separate parallel (concurrent) execution paths, and then they are merged together. To represent the division of the active path, you can use a black thick line perpendicular to the path. The concurrent path is derived from this solid line and combined with another rough line.

(4) Signal

The activity in the activity sequence can send signals. When the signal is received, an activity may occur. The graphic operator that sends the signal is a convex Pentagon, and the graphic operator that receives the signal is a concave angle without borders.

(5) swimming Channels

A swimming pool groups the activity status of an activity chart. Each group indicates the business organization responsible for those activities. The different responsibilities of an activity are distinguished in the activity Lane. In the activity diagram, each activity can only be clearly defined as one swimming Lane. Each lane must have a unique name to distinguish it from other lanes.

4. Comparison between the activity chart and the status chart:

1. The descriptors are basically the same

2. You can describe the status and behavior of a system and object during its survival.

3. Both the synchronization and concurrent operations of the system or objects in multi-threaded operations can be described.

4. You can use the branch stream to describe the behavior control of a system or object.

An activity chart is a method used to describe the dynamic behavior of a system or object. It is another form of a state chart.

 

Differences:

1. Different migration Triggering mechanisms

Migration of objects in the status chart usually involves a migration event. The activity status migration in the activity diagram does not need to be triggered by an event.

You can directly enter the next activity after the activity ends.

2. The mechanism for describing multiple objects to complete one operation is different:

A state chart is generally used to describe the behavior and status of an object during its lifetime, events that cause state transfer, and actions that occur due to State transfer.

If an activity involves multiple objects, State Nesting is used to describe an operation completed by multiple objects. The activity diagram uses the swimming track to separate multiple objects.

. Clearly shows where the action word is executed.

5. Create an activity diagram

Activity diagram modeling steps:

1. Confirm object: Find the subject object responsible for implementing the workflow.

2. Scope: Specify the start and end statuses.

3. determine the main activity sequence: Path of the main use case for modeling.

4. Process Migration: branch status migration, concurrency and synchronization migration.

5. determine the important objects involved in the workflow: add an object stream.

 

Take the IDC charging system as an example:

 

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.