|I l @ ve RuBoard|
Activity diagrams also may be created at this stage in the life cycle. These diagrams represent the dynamics of the system. They are flow charts that are used to show the workflow of a system; that is, they show the flow of control from activity to activity in the system, what activities can be done in parallel, and any alternate paths through the flow. At this point in the life cycle, activity diagrams may be created to represent the flow across use cases or they may be created to represent the flow within a particular use case. Later in the life cycle, activity diagrams may be created to show the workflow for an operation.
Activity diagrams contain activities, transitions between the activities, decision points, and synchronization bars. In the UML, activities are represented as rectangles with rounded edges, transitions are drawn as directed arrows, decision points are shown as diamonds, and synchronization bars are drawn as thick horizontal or vertical bars as shown in Figure 3-12.
CREATING ACTIVITY DIAGRAMS IN RATIONAL ROSE
Figure 3-12. UML Notation for Activity Diagram Elements
A browser view of an activity diagram is shown in Figure 3-13.
Figure 3-13. Activity Diagram in the Browser
An activity represents the performance of some behavior in the workflow.
CREATING ACTIVITIES IN RATIONAL ROSE
Activities are shown in Figure 3-14.
Figure 3-14. Activities
Transitions are used to show the passing of the flow of control from activity to activity. They are typically triggered by the completion of the behavior in the originating activity.
CREATING TRANSITIONS IN RATIONAL ROSE
Transitions are shown in Figure 3-15.
Figure 3-15. Transitions
When modeling the workflow of a system it is often necessary to show where the flow of control branches based on a decision point. The transitions from a decision point contain a guard condition, which is used to determine which path from the decision point is taken. Decisions along with their guard conditions allow you to show alternate paths through a work flow.
CREATING DECISION POINTS IN RATIONAL ROSE
A decision point is shown in Figure 3-16.
CREATING GUARDED TRANSITIONS IN RATIONAL ROSE
Figure 3-16. Decision in an Activity Diagram
A transition with a guard is shown in Figure 3-17.
CREATING RECTILINEAR LINES IN RATIONAL ROSE
Figure 3-17. Guarded Transition
Rectilinear lines are shown in Figure 3-18.
Figure 3-18. Rectilinear Lines
In a workflow there are typically some activities that may be done in parallel. A synchronization bar allows you to specify what activities may be done concurrently. Synchronization bars are also used to show joins in the workflow; that is, what activities must complete before processing may continue. That said, a synchronization bar may have many incoming transitions and one outgoing transition, or one incoming transition and many outgoing transitions.
CREATING SYNCHRONIZATION BARS IN RATIONAL ROSE
Synchronization bars are shown in Figure 3-19.
Figure 3-19. Synchronization Bars
Swimlanes may be used to partition an activity diagram. This typically is done to show what person or organization is responsible for the activities contained in the swimlane .
CREATING SWIMLANES IN RATIONAL ROSE
An activity diagram with swimlanes is shown in Figure 3-20.
Figure 3-20. Swimlanes
Initial and Final Activities
There are special symbols that are used to show the starting and final activities in a workflow. The starting activity is shown using a solid filled circle and the final activities are shown using a bull's eye. Typically, there is one starting activity for the workflow and there may be more than one ending activity (one for each alternate flow in the workflow).
CREATING STARTING AND ENDING ACTIVITIES IN RATIONAL ROSE
An activity diagram with start and end states is shown in Figure 3-21.
Figure 3-21. Start and End States
|I l @ ve RuBoard|