In this lesson will be explained ways of representing decisions, concurrent paths, signals and swimlanes in the activity diagrams.
Decisions
Decision point can be represented in two ways, it's all to you to make decision what way to use in your activity diagrams.
One
way is to show the possible paths coming directly out of an activity. the other is to have
the activity transition to a small diamond and have the possible paths flow out of the
diamond. Either way, you indicate the condition with a bracketed condition statement near
the appropriate path.
Imagine that you have
to go to the work. You get your car, put the key in the ignition, and there are two
possible situations: your car will start or it will not start it's engine. These possible
cases will produce two other activities: drive a car, or go by a bus, taxi, bike or go
walking. This scenario is shown on this picture (make attention of two ways showing a
decision):
Activity diagram showing two ways of decision |
Concurrent paths
When you modeling activities, very frequently you'll have a occasion to separate a transition into two separate paths that run at the same time (concurrently), and the come together.
Split
is represented by a solid bold line perpendicular to the transition and show the paths
coming out of the line. To represent the merge, show the paths pointing at another solid
bold line.
Activity diagram representing a transition split into two paths that run concurrently and then come together |
Signals
During a sequence of activities, it's possible to send a signal. When received, the signal causes an activity to take a place.
The
symbol for sending a symbol is a convex pentagon, and the symbol for receiving a signal is
a concave polygon.
Sending and receiving a signal |
Swimlanes
The activity diagram adds the dimension of vizualizing roles. To do that, you separate the diagram into parallel segments called swimlanes. Each swimlane shows the name of a role at the top, and represents the activities of each role. Transitions can take place from one swimlane to another.
It's possible to combine the activity diagram with the symbols from other diagrams and thus produce a hybrid diagram.
Following lesson will give you a written example for an activity diagram.