enterprise architect (6) activity diagram (activity)

Introduction: Activity diagrams are used to model system behaviors that relate to the overall flow of the system. The logical path of a process flow (based on a variety of conditions, parallel processing, data access, interrupts, and other logical paths) used to construct a process, system, or program

that : (1) models the behavior of the system (2) is Interactive modeling of dynamic elements
Activity diagram is another common tool used by UML for modeling the dynamic behavior of a system. It describes the sequence of activities and shows the flow of control from one activity to another. Activity diagrams focus on the flow of control from one activity to another, which is an internal process-driven process.

Features:
(1) Activity diagram is a behavioral view of the system, which describes the sequence of activities of object classes participating in behavior, including condition-dependent behavior and concurrent behavior.

(2) Activity diagrams demonstrate the functional flow in the system. Such as: display business workflow in the business model; display the event flow in a use case when collecting requirements. An activity diagram defines where the workflow begins and ends, what activities occur in the workflow, in what order, and which objects complete the activities.

(3) Activity diagram is an extended form of state diagram. If most of the states in a state diagram are activities that represent operations, and transitions are automatic transitions, it evolves into an activity diagram. But there is a difference between the two. The activity diagram describes the behavior of the object class in response to internal processing, and the state diagram describes the external behavior of the object class in response to events.

(4) Compared with the interaction diagram, the activity diagram also has its own emphasis. Activity diagrams focus on the control flow of activities; while interaction diagrams focus on object-to-object control flow.


Differences between activity diagrams and flowcharts
(1) Activity diagrams and flowcharts are very similar, but there are differences.
(2) The flow chart focuses on describing the processing process, and there is a strict sequence and time relationship between each processing.
(3) The activity diagram describes the rules followed by the sequential relationship of object activities. It focuses on the behavior of the system, rather than the behavior of the system.
     system processing. Activity diagrams can express concurrency situations, while flowcharts cannot.
(4) Activity diagrams are object-oriented, while flow charts are process-oriented.



First, the components of the activity diagram Activity Diagram Element


(1) Activity (activity)
Activity organizes and specifies the participation of subordinate behavior, such as sub-Activitie or Action, to reflect the control flow and data flow of a process. Activity is used for a variety of modeling purposes in the activity diagram. Activity is used for system design from procedural application development, and Activity is used for business process modeling for organizational structure or workflow.

Activity is used to express non-atomic behavior composed of a series of Actions, and its characteristics are as follows:
1. Activity can be decomposed into other sub-activities or Actions.
2. The internal activities of Activity can be represented by another activity diagram.
3. Unlike Action, activities can have entry actions and exit actions, and can also have internal transitions.
4. Action is a special case of active state. If an Activity only includes one action, then it is an Action.


(2) Activity Partition (activity partition)
Activity Partition is used to logically organize an activity. It has no effect on the flow of activities, but is conducive to the view part of structured activities

(3) Structured Activity (structured activities)
structured activities elements are used in the activity diagram. A structured activity is an activity node, which can be an independent activity group containing some subordinate nodes. No other activity can interfere with the processing of this activity.
You can add a Structured Activity element to an activity diagram. It is a composite element, a connector and a child activity diagram, which represent the different types by having small icons in the lower right corner of itself.


(4) Action (action)
Action element describes a basic process or transformation that occurs in the system. It is the basic functional unit in an activity diagram. Actions can be thought of as children of Activity. They both represent processes, but an Activity can contain multiple steps or decomposable processes, each of which can be represented by an Action. Actions cannot be broken down further.

Features of Action: Action refers to an atomic, uninterruptible action that moves to another state by completing a transition after this action is completed. Action state has the following characteristics:

1. Action is atomic, which is the smallest unit of constructing an activity diagram.
2. Action is uninterruptible.
3. Action is an instantaneous behavior.
4. Action can have input conversion, and input conversion can be either action flow or object flow. Action has at least one outgoing transition, which starts from internal completion and has nothing to do with external events.
5. Action is different from the state in the state diagram. It cannot have entry actions and exit actions, and it cannot have internal transitions.
6. In an activity diagram, Action is allowed to appear in multiple places.

(5) Partition (swim lane)

Artition is used to logically organize an Activity, it will not affect the flow of the activity diagram, but it helps to organize the activity diagram.
Displays the Action (action) performed in that object, or that part of the work of that component is performed.

A swimlane divides the activities in the activity diagram into groups, and assigns each group to the business organization, or object, responsible for the group of activities. In an activity diagram, the swimlane distinguishes the objects responsible for the activities, and it clearly indicates which activities are carried out by which objects. In an activity diagram that contains swimlanes, each activity can only belong to exactly one swimlane.

Swimming lanes are drawn with vertical solid lines, and the areas separated by vertical lines are the swimming lanes. Above the swimlane you can give the name of the swimlane or the name of the object that is responsible for all the activities in the swimlane. Swimlanes have no order, activities in different swimlanes can be performed sequentially or concurrently, and action flow and object flow allow crossing lines.

In general, when drawing an activity diagram, you should first focus on the business work or the service content of the system, draw action states and transitions, etc., to clarify the overall behavioral meaning of the system, and then draw a swimlane to assign the responsibility for carrying out the activity. assigned to the object.






(6) Decision (judgment)
Decision is an element of Activity diagram or Interaction Overview diagram, which indicates a conditional forward node. If the condition is true, the process proceeds in one direction, if not in the other direction.

(7) Merge (merge)
In the Activity diagram, the Analysis diagram and the Interaction Overview diagram, the Merge node brings together some optional flow paths. Merge has multiple inflow edges and one outflow edge. Edges flowing in and out of Merge are either object flows or control flows.





(8) Send (send)
In the activity diagram, the Send element is often used to describe the Action (action) to issue a signal.

(9) Receive (receive)
In the activity diagram, the Receive element is used to define a request to receive. The action from the Receive element occurs once the received message satisfies the rules.

(10) Initial (starting point/initial state)
The Initial element is used in Activity diagrams and State Machine diagrams. In the Activity diagram. When an activity is called, it defines the start of a flow. In State Machines, it is a "pseudo-state" used to represent the default state of a Composite State. It can be an area vertex of a Composite State

(11) Final (end point)
activity Final element describes an Activity (activity) completion. When Final is reached, all executions in the activity diagram are terminated.
The activity termination node represents the end of the entire activity

(12) Flow Final (flow end) The
Flow Final element describes a system exit, which has no effect on other ongoing flows in the Activity (activity).

(13) Fork/Join (Fork/Join) Fork/Join
elements have the following different usage patterns
Divide a stream into several concurrent streams.
Merge
some concurrent streams Merge some concurrent streams into other concurrent streams.




Application of Activity Diagram (activity diagram)

1. Analysis of Use Case
When analyzing Use Case, you need to understand what actions will take place in the system and what are the dependencies between the behaviors. At this time, you can use the activity diagram to verify the Use Case.
2. Understand the workflow
Activity diagram is very useful for understanding the business process. The activity diagram of the business workflow can be drawn to communicate with the domain experts to clarify how the business processing operation is carried out and what changes will be made.
3. Algorithms to describe complex processes
In this case, using an activity diagram is just a UML version of the program flow chart, and the regular sequence and branching processes can be represented in the activity diagram.
Loop control structures can also be implemented using branch conditions: one action state sets the loop variable, another conditional action state increments the loop variable, and a predicate tests the loop end condition.
4. Dealing with multi-threaded applications
Using the characteristics of activity diagrams to support concurrent activities, describe the behavior of multi-threaded applications.


Activity diagrams should not be used in the following situations: To
express the cooperative relationship between objects, to understand the behavior of objects during their lifetime, etc. These tasks can be accomplished with interaction diagrams and state diagrams, respectively.








References:
http://www.cnblogs.com/ywqu/archive/2009/12/14/1624082.html

http://smartlife.blog.51cto.com/1146871/289345/

https://wenku.baidu. com/view/bafad709f12d2af90242e609.html

http://www.cnblogs.com/jiqing9006/p/3344221.html

http://jingyan.baidu.com/article/4e5b3e19279ced91901e24fc.html

http://blog.sina.com.cn /s/blog_6d3c1ec60100uuu2.html

http://www.mamicode.com/info-detail-1251283.html


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326067075&siteId=291194637