140 likes | 159 Views
Week 12: Activity & Sequence Diagrams. MSIS 670: UML Models. UML Techniques for OO Design. Activity Diagram Communication (Collaboration) Diagram Sequence Diagram Package, Component, Deployment Diagrams. Activity Diagrams.
E N D
Week 12: Activity & Sequence Diagrams MSIS 670: UML Models
UML Techniques for OO Design • Activity Diagram • Communication (Collaboration) Diagram • Sequence Diagram • Package, Component, Deployment Diagrams
Activity 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
Activity Diagram • Focus on system behavior • Model an object’s 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)
When 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.
Interaction 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
A communication diagram Fig. 7.26 | Communication diagram of the ATM executing a balance inquiry.
Sequence diagrams • Help model the timing of collaborations • Lifeline • Dotted line extending down from an object’s rectangle • Represents the progression of time • Activation • Thin vertical rectangle • Indicates that an object is executing
A Sequence Diagram Fig. 7.28 | Sequence diagram that models a Withdrawal executing.