0% found this document useful (0 votes)
44 views13 pages

Activity Diagram

Activity diagrams describe workflows by showing sequences of activities. They can show conditional or parallel activities. Activity diagrams are useful for modeling system workflows, analyzing use cases, and showing what actions need to occur and when. Sequence diagrams show message exchanges over time between objects to achieve an outcome. Collaboration diagrams emphasize object relationships and message ordering instead of timing, with numbered messages and object links.

Uploaded by

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

Activity Diagram

Activity diagrams describe workflows by showing sequences of activities. They can show conditional or parallel activities. Activity diagrams are useful for modeling system workflows, analyzing use cases, and showing what actions need to occur and when. Sequence diagrams show message exchanges over time between objects to achieve an outcome. Collaboration diagrams emphasize object relationships and message ordering instead of timing, with numbered messages and object links.

Uploaded by

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

Activity + Interaction

Diagrams
LECTURE 5
Activity Diagram
Activity diagrams describe the workflow behavior of a system.
Activity diagrams are similar to state diagrams because activities are the state of doing
something.
The diagrams describe the state of activities by showing the sequence of activities performed.
Activity diagrams can show activities that are conditional or parallel.
When to Use:
The main reason to use activity diagrams is to model the workflow behind the system being
designed.
 Activity Diagrams are also useful for: analyzing a use case by describing what actions need to
take place and when they should occur;
Activity diagrams do not give detail about how objects behave or how objects collaborate.
How to Draw Activity diagrams
Activity diagrams show the flow of activities through the system.
Diagrams are read from top to bottom and have branches and forks to describe conditions and
parallel activities.
A fork is used when multiple activities are occurring at the same time.
The branch describes what activities will take place based on a set of conditions.
 All branches at some point are followed by a merge to indicate the end of the conditional
behavior started by that branch.
After the merge all of the parallel activities must be combined by a join before transitioning into
the final activity state.
How to Draw Activity diagrams
Activity diagrams - Notations
Activity Activity states - Represent the performance of a step within the
workflow.

Transition show what activity state follows after another.

Decisions (branch) for which a set of guard conditions are defined.


These are conditions that must be met to trigger the transition.

Synchronization bars - which you can use to show parallel sub-flows.


Synchronization bars allow you to show concurrent threads - fork or
join.
Activity Diagram
Draw activity diagram with the four main activities:
• Send order by the customer
• Receipt of the order
• Confirm order
• Dispatch order
After receiving the order request condition checks are performed to check if it is normal or
special order.
After the type of order is identified dispatch activity is performed and that is marked as the
termination of the process.
Interaction Diagrams
 Sequence Diagram
 Collaboration Diagram
Sequence diagrams
Sequence diagrams describe interactions among objects in terms of an exchange of messages
over time.
Sequence diagrams show a detailed flow for a specific use case or even just part of a specific use
case.
The main purpose of a sequence diagram is to define event sequences that result in some
desired outcome.
The focus is on the order in which messages occur.
Elements of Sequence diagrams
Life lines

Send Receive
Messages

Objects
Collaboration diagrams
Dynamic behavior of objects can, in addition to sequence diagrams, also be represented by
collaboration diagrams.
The transformation from a sequence diagram into a collaboration diagram is a bi-directional
function.
The difference between sequence diagrams and collaboration diagrams is that collaboration
diagrams emphasize more the structure than the sequence of interactions.
Within sequence diagrams the order of interactions is established by vertical positioning
whereas in collaboration diagrams the sequence is given by numbering the interactions.
Its elements are:
– Object Links - solid lines between the objects that interact
– On the links are Messages - arrows with one or more message name that show the direction and
names of the messages sent between objects
Collaboration diagrams
Shows the relationship between objects and the order of messages passed between them.
 The objects are listed as rectangles and arrows indicate the messages being passed.
The numbers next to the messages are called sequence numbers.
 convey the same information as sequence diagrams, but focus on object roles instead of the
time sequence.

You might also like