Software Engineering – Activity Diagrams

Its time to demonstrate how to produce an Activity Diagram – here we go.

What is their purpose?

The purpose of an activity diagram is to represent data and activity flows in an application.

The components

Within an activity diagram there are many key modelling concepts, here is a select main few of them:

  • image An activity represents an action or a set of actions to be taken.
  • image This is a control flow. It shows the sequence of execution.
  • image This is the initial start node – the beginning of the set of actions (the start basically)
  • image This is the Final node. It stops all flow in an activity diagram.
  • image This is a decision node. It represents a test condition – much like an IF statement.

Example time

A basic example of an activity diagram is like the one that follows:


This is an Activity Diagram for a library user who wishes to make a transaction. This can be one of two things – either returning a book, or loaning a book.

Here are the steps:

  • The user walks up to the librarian (initial node) who then gets the users information – probably from a library card i guess, hehe.
  • If this is a new user, then we need to take the right branch, and create this user an account, listing their details. Other wise, this user already exists so we take the left branch. This is via the decision node.
  • The next activity is the activity of actually making the transaction, however since this is one of two things, then we need another decision node.
  • From this decision node, if we go left, then the user is returning a book, other wise right is the activity of loaning a book.
  • Finally we come to the final node, where we stop progressing any further, and the user leaves the library 🙂

About Badgerati
Computer Scientist, Games Developer, and DevOps Engineer. Fantasy and Sci-fi book lover, also founder of Cadaeic Studios.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: