How to draw a UML activity diagram

zhaozj2021-02-08  326

How to draw a UML activity diagram

Scott W. Ambler

(This article is reproduced from Software Engineering Expert Network www.21cmm.com)

The UML activity diagram records logic, single user case, or logic of a single business process. To create a UML activity map, you need to perform the following steps repeatedly.

The first step, the scope of the definition activity map should first define what modeling you want. Single user case force? Part part of a user case? A business process containing multiple user cases? A single way for a class? Once you have defined the range of your draw, you should add a label on it, indicate the title of the figure and the only marker. You may also want to include the time of the picture or even author name.

In the second step, add the start and end points Each activity map has a starting point and end point, so you have to add them immediately. In "UML Distilled), Fowler and Scott believe that the end point is optional. Sometimes a activity is just a simple end. If this is the case, it indicates that its unique shift is that it is also harmless. This way, when other people read your chart, he or she knows how you have considered how to quit these activities.

In the third step, add an activity If you are modeling a user case model, introducing a primary step for each role (actor) into an activity (the activity may include the starting step, plus anything to the starting step system response step). If you are modeling a high-level business process, an activity is introduced for each primary process, usually a user case or user case package. Finally, if you are modeling a method, it is common to introduce an activity to this.

In the fourth step, the transformation between adding activities is always with an event, even if it is transitioning to an end point. Once a moving is multiple transitions, you must be able to indicate each transition.

Step 5, add decision points Sometimes, the logic you model needs to make a decision. It may be necessary to check certain transactions or compare certain transactions. It should be noted that the use of decision points is optional. For example, in Figure 1, I can just simply connect "Accept" and "Reject" to directly receive "ENROLL IN UNIVERSITY" event.

In the sixth step, you can find a parallel activity when there is no direct connection between two activities, and they must end before the third activity begins, and they can run in parallel. In Figure 1, you see is possible "Attend overview" and "Enroll in seminars" can be done in any order, but they have to complete it before you end.

Figure 1. A Map map for the first registration in the school

For more information on UML activity diagrams, see:

· Building Object Applications That Work: Your Step-by-Step Handbook for Developing Robust Systems with Object Technology. New York: Cambridge University Press (Cambridge University Published 1998).

· SCOTT W. AMBLER 's "THE Object Primer" second edition. New York: Cambridge University Press (Cambridge University Press) published in 2000.

· Martin Fowler, Ivar Jacobson and kendall Scott UML essence (UML DISTILED): Applying The Standard Object Modeling Language. Reading, MA: Addison-Wesley Longman, Inc, published in 1997. · James Rumbauh, Grady Booch and Ivar Jacobson Comeceling Language Reference Manual. Reading, MA: Addison-Wesley Longman, Inc., published in 1999.

转载请注明原文地址:https://www.9cbs.com/read-567.html

New Post(0)