1 / 23

UML Activity Diagrams: Overview, Reading, Drawing, and Usage

Learn about UML activity diagrams, how to read them, draw them, and understand their practical usage. Explore the main elements and different types of activity diagrams.

jeannep
Download Presentation

UML Activity Diagrams: Overview, Reading, Drawing, and Usage

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ACTIVITY DIAGRAMS 《UML面向对象建模基础》

  2. Knowledge Map

  3. Agenda • Overview of the Activity Diagram • How to read the Activity Diagram? • How to draw Activity Diagram? • Where to use Activity Diagrams? • Summary

  4. Agenda • Overview of the Activity Diagram • How to read the Activity Diagram? • How to draw Activity Diagram? • Where to use Activity Diagrams? • Summary

  5. Overview of the Activity Diagram • Activity diagram is another important diagram in UML to describe dynamic aspects of the system. • It captures the dynamic behaviour of the system. The activity diagram is used to show message flow from one activity to another. • Activity diagrams are a technique to describe procedural logic, business process, and work flow .It can be used to business process, workflow modeling, can also be used to modelcase or even program implementation. • In UML 2, activity diagrams were not seen as special Cases of state diagrams.

  6. Agenda • Overview of the Activity Diagram • How to read the Activity Diagram? • How to draw Activity Diagram? • Where to use Activity Diagrams? • Summary

  7. Read the Simple Activity Diagram

  8. The Main Elements of the Activity Diagram • Initial nodandfinal node:With a solid circle to represent the initial node, with a circle plus a solid circle to represent the end of the event • Action:Is one of the most important elements of the activity diagram, which is used to represent an activity • Convert: When an activity is over, the control flow is immediately passed to the next active node, called "conversion" in the activity diagram, with a straight line with arrows

  9. The Main Elements of the Activity Diagram • Flow/edge:The branch is represented by a diamond, and it has an entry transition (arrows are pointed out from the branch)One or more departures (arrows from the branchPointing out). And each will leave the conversion have a guard condition that is used to indicate what is satisfied condition when the implementation of the conversion. • join:

  10. Modified Simple Activity Diagram

  11. Activity Diagram with Swim Lane

  12. Activity Diagram with Object Stream

  13. Complex Activity Diagram • Auxiliary activity diagram : • connector: you must use them in pairs: one with incoming flow, one with an outgoing flow, and both with the same label. But sometimes, you want to do some constraints, then you can use the description of the convergence to complete. The rendezvous description is actually a constraint, and its format is "{constraint condition}".

  14. Complex Activity Diagram • Send signal and receive signal :

  15. Complex Activity Diagram • Pin: Indicates the corresponding parameter of the action • 扩展区:

  16. Agenda • Overview of the Activity Diagram • How to read the Activity Diagram? • How to draw Activity Diagram? • Where to use Activity Diagrams? • Summary

  17. Draw Activity Diagram • “Activity diagram” is more intuitive and easy to understand; with the traditional flow chart is very similar, as long as you can read the activity diagram, it is not difficult to draw the activity diagram. • When deciding whether to use the swim lane first: mainly based on the activity diagrams to reflect the activities of the different implementers. • And then use the basic modeling elements such as join, merge to describe the activity control process. • If necessary, add the object stream and the state changes of the object, using some advanced modeling elements (such as auxiliary activity diagram, confluence description, send signal and receive signal, pin, extended area) to represent more information • The key to modeling the activity diagram is to show the control flow, and the other modeling elements are complementary to the purpose

  18. Agenda • Overview of the Activity Diagram • How to read the Activity Diagram? • How to draw Activity Diagram? • Where to use Activity Diagrams? • Summary

  19. Use Activity Diagrams • Modeling of Workflows: For business modeling, each swim lane represents a unit of responsibility, which effectively reflects the job responsibilities, the scope of business, and the relationship between the units, the information . • The following strategies should be followed when modeling: • Create a focus for the workflow, unless you are involved in the system is very small, it is impossible in a picture shows all the control flow in the system • Choose a business object with a high level of responsibility for all of the workflows and create a swim lane for each important business object • Identify the preconditions of the initial nodes of the workflow and the postconditions of the active endpoints, which effectively model the boundaries of the workflow.

  20. Use Activity Diagrams • Start with the initial node of the workflow, illustrate the actions and activities that occur over time, and represent them as action in the activity diagram • Integrate complex activities or multiple occurrences of activities into an action and represent them through ancillary activity diagrams or sub-activity diagrams • Find the connection to these active nodes, first from the order of the workflow, and then consider the branch, and then consider the bifurcation and convergence • If the workflow involves important objects, you can also add them to the activity diagram • If there are multiple enablements in the workflow, you can use the expansion area

  21. Use Activity Diagrams • Modeling the operation: Each object occupies a swim lane, and the activity is the member method of the object • The following strategies should be followed when modeling: -- the abstract concept involved in the collection operation, including the parameters of the operation, the type of return, the attributes of the class, and some neighboring classes -- the preconditions of the initial node that identifies the operation and the postcondition of the active end point. Also identify the information that must be maintained during the execution of the operation -- start from the initial node of the operation, describe the activities that occur over time, and represent them as actions in the activity diagram -- If necessary, use a branch to describe conditional statements and loop statements -- Only when this operation belongs to an active class, it is necessary to use bifurcation and convergence to illustrate the parallel control flow

  22. Agenda • Overview of the Activity Diagram • How to read the Activity Diagram? • How to draw Activity Diagram? • Where to use Activity Diagrams? • Summary

  23. Summary • First introduced the "activity diagram" of the historical changes; one by one to introduce a simple activity diagram, with swim lanes of the activity diagram, with the object flow of the activities of the reading method • It explains the basic modeling elements such as actions, initial nodes and activity final, flow, merge and fork, and gradually leads to control flow logic such as lane and object flow • Introduces the concept of auxiliary activity diagram, converging descriptions, sending signals and received signals, pins and expansion regions • Finally, a general description of the activities of the drawing points, combined with the workflow modeling and operational modeling of the similarities and differences between.

More Related