OO diagrams - the activity diagram
Activity diagrams are used to show how a particular activity progresses dynamically, step-by-step and are considered to be very similar to flowcharts because flowcharts do a similar job. They are often used to model business processes as they are very good at describing clearly how systems work. Like flowcharts, they are fairly easy to follow and use less abstract symbols than other types of diagrams and forms of modelling.
In any typical activity, there will have to be elements of control. These kinds of diagrams therefore show repeated actions (iteration), the potential for choices to be made (selection) and progression through a series of steps (sequence).
Activity diagrams use a number of symbols. These include:
* a black filled-in circle, to represent the start state of an activity
* a black filled-in circle in a circle, to show the end an activity
* rounded rectangles, to show actions being taken
* diamonds, to show where a decision has to be made
* black bars, to show when activities happen at the same time.
You can see the similarity with flowcharts in the activity diagram on the left. This describes the process of logging in to the Universities and Colleges Admissions Service (ACAS) to see how an application is progressing.
The filled-in black circle represents the start of the activity. Rounded rectangles are used for data entry, outputs and processes. A diamond is used to examine the input, to see in this case if the login details have been entered correctly. A black filled-in circle in a circle is used to show the end of the activity. There is also a rectangle at the start, which has been used to give additional information relating to this activity.
We can draw an activity diagram to describe what happens after a student has correctly logged on to the Universities and Colleges Admissions Service (ACAS) for the very first time.
When a student has logged in for the for time, they will see their personal information displayed (along with a range of options for updating this information), and what courses are available, which they can search through using a range of tools to find the courses they are interested in (and similar courses) and the places they might consider. These processes will be done at the same time so a black bar is used.
Another bar is used to show that when these processes have been completed, the next activity, 'Select course', can begin.
The student can then select a course they want to apply for. If they have not entered the maximum number of courses they are allowed to apply for, they can enter another course. If they have entered the maximum number of courses they are allowed to apply for, or they don't want to enter another course, their applications are confirmed and the system updates its own database (at the same time, so another black bar is used).
Finally, when both these jobs are done (indicated by a black bar), the system sends an email confirmation to the student. The end of this activity is marked with a black filled-in circle in a circle.