0% found this document useful (0 votes)
36 views29 pages

UML (Unified Modeling Language)

Activity diagrams describe the coordination of activities and workflow through a process using elements like activities, transitions, decisions, start/stop markers, and swim lanes. They are useful for modeling how operations are implemented and for showing dependencies between essential activities before determining the order. Elements like forks, joins, and merges allow for modeling concurrent threads, synchronization, and branching of activities.

Uploaded by

Yaseen Shahid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views29 pages

UML (Unified Modeling Language)

Activity diagrams describe the coordination of activities and workflow through a process using elements like activities, transitions, decisions, start/stop markers, and swim lanes. They are useful for modeling how operations are implemented and for showing dependencies between essential activities before determining the order. Elements like forks, joins, and merges allow for modeling concurrent threads, synchronization, and branching of activities.

Uploaded by

Yaseen Shahid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 29

UML (Unified Modeling

Language)
If a use case
gets too
complex, we
use activity
diagrams to
clarify things
Activity diagram
• Activity diagrams describe how activities are coordinated.

– For example, an activity diagram may be used (like an


interaction diagram) to show how an operation could
be implemented
• An activity diagram is particularly useful

– when you know that an operation has to achieve a


number of different things, and

4
Activity diagram
– you want to model what the essential dependencies
between them are, before you decide in what order to
do them
• Activity diagrams are much better at showing this clearly
than interaction diagrams.
– Activity diagrams model the workflow of a business
process and the sequence of activities in a process.

5
Activity diagrams
– These diagrams are very similar to a flowchart because
you can model a workflow from activity to activity or
from activity to state.
– It is often beneficial to create an activity diagram early
in the modeling of a process to help you understand the
overall process.
– Activity diagrams are also useful when you want to
describe parallel behavior or illustrate how behaviors in
several use cases interact.

6
Activities are rectangles
with rounded corners
Transitions are
shown by arrows
 Sometimes the transition may have text to
explain what is happening
Start and Finish

 A start is shown by a filled in circle


 A finish is a circle containing a filled in circle
Decisions are denoted
by diamonds
Synchronization bars

 Allow for the branching and joining of


synchronous activities

 Synchronous means that two


or more things are happening
simultaneously
Activity Diagram

12
13
Fork and Join Nodes
• Forks and joins have the same notation: either a horizontal
or vertical bar (the orientation is dependent on whether the
control flow is running left to right or top to bottom).
• They indicate the start and end of concurrent threads of
control.
• The following diagram shows an example of their use.

17
Fork and Join Nodes (cont)
• A join is different from a merge in that the join
synchronizes two inflows and produces a single outflow.
• The outflow from a join cannot execute until all inflows
have been received.
• A merge passes any control flows straight through it.

• If two or more inflows are received by a merge symbol,


the action pointed to by its outflow is executed two or
more times.

18
• At the UML semantics level, activity diagrams are state
diagrams extended for convenience with some extra
notation
• Elements of activity diagrams

– Activity

– Transition

– Synchronization bar

– Decision diamond

– Start and stop markers

19
Swim Lanes
• There is one other big notational element to activity
diagrams, Swim Lanes.
• Swim Lanes are used to illustrate which portions of a
system are responsible for particular elements of your
diagram.
• Here's an example:
• This diagram illustrates a User and a Website. The user is
attempting to log on to the website. As you can see, the
User is responsible for providing login credentials, while
the Website is responsible for authenticating the user.

21
Example of activity diagram with swim lanes:

22
Example
of swim
lanes
activity
diagram:

23
Business level activity diagram of the
library

24
Example:

25
Example:

26
Activity Diagram –
Example 1
Solution
Activity Diagram –
Example 2

You might also like