The basic idea of activity diagrams is to show what activities happen and in what order, where choices are made, and when things happen in parallel. They're most often used for modelling high-level processes, e.g. how the overall flow of a use case works, but can be used e.g. to show how an object reacts to a message if that's ever useful.

Key thing to check: that you're clear about the meaning of fork and join bars, and of decision and merge diamonds, and are not confusing the two.

I discussed briefly in a lecture the question of whether it was OK for two arrows to come into or go out of the same activity in an activity diagram, and if so, what it meant. Brief advice: don't do that!

Why? Because, although it's technically allowed by UML specification, the spec is somewhat ambiguous about what it means. (When two arrows come out of an activity, with no conditions on them, are both arrows followed, or only one?) If you are tempted to have:

Q1)

There are actually lots of correct answers for this one. You should have activities called things like select items and calculate price, etc. One point of interest: should you have one activity called pay, or two for the two methods of paying? It's really up to you. Check that you can use a decision diamond with conditions such as [customer chooses Paypal] on the arrows to use two. If you have two activities, use a merge diamond to bring the flows back together afterwards, like this: activity diagram

Q2)

Assemble order and check payment can probably go in parallel, at least. What about update stock control system?

Q3)

Use a dotted line to separate what the customer does from what the staff do, and label the regions appropriately. They don't have to be columns strictly: anything clear will do.

Q4)

straightforward, but with lots of scope for making different choices and being more or less ambitious about what to show. The main source text is that in the Week 4 tutorial sheet, of course. Points I would expect might come up:
This page is maintained by Perdita Stevens (perdita@inf.ed.ac.uk)


Home : Teaching : Courses : Seoc : 2014_2015 : Tutorials 

Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail: school-office@inf.ed.ac.uk
Please contact our webadmin with any comments or corrections. Logging and Cookies
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh