Title: Week 14: Activity Diagram
1Week 14 Activity Diagram Interaction Diagrams
IFS 410 Advanced Analysis and Design
2UML Techniques for OO Design
- Activity Diagram
- Communication (Collaboration) Diagram
- Sequence Diagram
- Package, Component, Deployment Diagrams
3Activity Diagrams
- Shows the conditional logic for the sequence of
system activities needed to accomplish a business
process - Clearly shows parallel and alternative behaviors
- Can be used to show the logic of a use case
4Activity Diagram
- Focus on system behavior
- Model an objects workflow during program
execution - Model the actions the object will perform and in
what order - UML representation
- Action state ( rectangle with its left and right
sides replaced by arcs curving outwards) - Action order ( arrow with a stick arrowhead)
- Initial state (solid circle)
- Final state (solid circle enclosed in an open
circle)
5Components of Activity Diagram
6Fig. 5.30 Activity diagram for a BalanceInquiry
object.
7Fig. 5.31 Activity diagram for a withdrawal
transaction.
8When to Use Activity Diagrams
- Activity diagrams are useful when you want to
describe a behavior which is parallel, or when
you want to show how behaviors in several
use-cases interact. - Use Communication diagrams when you want to show
how objects collaborate to implement an activity
diagram. Use a state (chart) diagram to show how
one object (attribute) changes during its
lifetime.
9Interaction Diagrams
- Model interactions use UML
- Communication diagrams
- Also called collaboration diagrams
- Emphasize which objects participate in
collaborations - Sequence diagrams
- Emphasize when messages are sent between objects
10A communication diagram
Fig. 7.26 Communication diagram of the ATM
executing a balance inquiry.
11Sequence diagrams
- Help model the timing of collaborations
- Lifeline
- Dotted line extending down from an objects
rectangle - Represents the progression of time
- Activation
- Thin vertical rectangle
- Indicates that an object is executing
12A Sequence Diagram
Fig. 7.28 Sequence diagram that models a
Withdrawal executing.
13Elements in Sequence Diagrams
14Creating a Sequence Diagram