Sei sulla pagina 1di 5

Activity Diagram

Introduction
UML is very handy but the terminology can be somewhat dense for a beginner. Don't
feel intimidated when you hear the term "activity diagram"it simply refers to a
standardized system of notation for a flowchart. An activity diagram is nothing more
than a flowchart.

Activity Diagram Examples


We start by laying out examples visually. When you look at the diagram, see if you can
figure out what each part means. The whole point of having a standardized approach is
to make things simple, straight-forward, and intuitive. This page will cover several
examples, go over the notations, and explain what each part of the diagram does.

Activity Diagram Airline Reservation System


The first example shows the process of a reserving a flight. First, you enter the dates.
Once you submit your desired flight plan, you can enter your personal information and
at the same time the system could be searching availability. The system flow then joins
back into one and you can select the specific flight on the dates you want to fly. This
activity diagram gives you two different paths dependent on whether you are using
reward points. After entering payment information, the system performs two processes
at the same time and then sends out a confirmation email.

Activity Diagram for Course Registration System


The second activity diagram shows a typical event or class registration process for a
client. This diagram uses notes to give more details about the initial and final states.
After filling out the registration form, the client submits the form to a validation loop
that is represented as a decision in the flow. If the information is correct, the system

creates an account for the client and lets the client know about the creation of the
account.

Activity Diagram for Login

This last example diagram shows a simple login process. When you enter a name and
password, the system checks to see if the unique pairing is correct. If it is, the system
allows you to login. If not, you're prompted to re-enter your information.

Activity Diagram Notation

Now that you've seen some examples, let's break down an activity diagram into its
individual elements.

A black circle is the standard notation for an initial state before an


activity takes place. It can either stand alone or you can use a note to further elucidate
the starting point.

The black circle that looks like a selected radio button is the UML symbol
for the end state of an activity. As shown in two examples above, notes can also be used
to explain an end state.

The activity symbols are the basic building blocks of an activity


diagram and usually have a short description of the activity they represent.
Arrows represent the direction flow of the flow chart. The arrow
points in the direction of progressing activities.

A join combines two concurrent activities back into a flow where


only one activity is happening at a time.

A fork splits one activity flow into two concurrent activities.

Condition text is placed next to a decision marker to let you know


under what condition an activity flow should split off in that direction.

A marker shaped like a diamond is the standard symbol for a decision.


There are always at least two paths coming out of a decision and the condition text lets
you know which options are mutually exclusive.

The final flow marker shows the ending point for a process in a flow. The
difference between a final flow node and the end state node is that the latter represents
the end of all flows in an activity.

The shape used for notes.

Potrebbero piacerti anche