Activity Diagr
Activity Diagr
They are used to explore the logic of: y y y y y y A complex operation A complex business rule A single use case Several use cases A business process Software processes
Guidelines:
1. 2. 3. 4. 5. 6. 7.
General Guidelines Activities Decision Points Guards Parallel Activities Swimlanes Action Objects
1.
General Guidelines
1.
Place The Start Point In The Top-Left Corner. A start point is modeled with a filled in circle, using the same notation that UML State Chart diagrams use. Every UML Activity Diagram should have a starting point, and placing it in the top left corner reflects the way that people in Western cultures begin , which models the business process of enrolling in a university, takes this approach. reading. Always Include an Ending Point. An ending point is modeled with a filled in circle witha border around it, using the same notation that UML State Chart is interesting because it does not include an end point because it describes a continuous process sometimes the guidelines diagrams use. dont apply. Flowcharting Operations Implies the Need to Simplify. A good rule of thumb is that if an operation is so complex you need to develop a UML Activity diagram to understand it that you should consider refactoring it.
Figure 1
2.
Figure 2
3.
2.
Activities
An activity, also known as an activity state, on a UML Activity diagram typically represents the invocation of an operation, a step in a business process, or an entire business process.
1. 2. Question Black Hole Activities. A black hole activity is one that has transitions into it but none out, typically indicating that you have either missed oneor more transitions. Question Miracle Activities. A miracle activity is one that has transitions out of it but none into it, s omething that should be true only of start points.
3.
Decision Points
Figure 1
2.
Figure 1 includes an implied decision point, a check to see that the forms
4.
Guards
Agile
5.
Parallel Activities
It is possible to show that activities can occur in parallel, as you see in Figure 1 depicted using two parallel bars. The first bar is called a fork, it has one transition entering it and two or more transitions leaving it. The second bar is a join, with two or more transitions entering it and only one leaving it.
1. 2. 3. 4. A Fork Should Have a Corresponding Join. In general, for every start (fork) there is an end (join). In UML 2 it is not required to have a join, but it usually makes sense. Forks Have One Entry Transition. Joins Have One Exit Transition Avoid Superfluous Forks.
There is significant opportunity for parallelism in this process, in fact all of these activities the could happen in parallel, but forks were not introduced because they would only have cluttered the diagram.
Figure 2 depicts a simplified description of the software process of enterprise architectural modeling, a part of Enterprise Unified Process (EUP).
6.
Swimlane Guidelines
A swimlane is a way to group activities performed by the same actor on an activity diagram or to group activities in a single thread. Figure 2 includes three swimlanes, one for each actor.
Figure 2. A UML activity diagram for the enterprise architectural modeling (simplified).
1. 2. 3. 4. 5. 6.
Order Swimlanes in a Logical Manner. Apply Swim Lanes To Linear Processes. A good rule of thumb is that swimlanes are best applied to linear processes, unlike the one depicted in . Have Less Than Five Swimlanes. Consider Swimareas For Complex Diagrams. Swimareas Suggest The Need to Reorganize Into Smaller Activity Diagrams. Consider Horizontal Swimlanes for Business Processes. In convention of drawing them vertically.
Figure 2
Figure 3 you see that the swimlanes are drawn horizontally, going against common
7 Action-Object Guidelines
Activities act on objects, In the strict object-oriented sense of the term an action object is a system object, a software construct. In the looser, and much more useful for business application modeling, sense of the term an action object is any sort of item. For example in Figure 3 the ExpenseForm action object is likely a paper form.
1. 2. 3. 4. 5. Place Shared Action Objects on Swimlane Separators When An Object Appears Several Time Apply State Names State Names Should Reflect the Lifecycle Stage of an Action Object Show Only Critical Inputs and Outputs Depict Action Objects As Smaller Than Activities