Download presentation
Presentation is loading. Please wait.
Published byCarmella Lamb Modified over 9 years ago
1
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Procedural Activity Patrick Bailey Keith Vander Linden Calvin College
2
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 2 Procedural Activity ● Systems display procedural activity: – Business work-flow – Data flow – Task behavior – Concurrent processes ● Potential modeling solutions: – Flow charts – State diagrams – Activity diagrams
3
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 3 Activity Diagrams ● Activity diagrams model activities as: – Actions – Transitions With additional features for decisions, forks, joins, etc. ● They use many of the same elements provided for state diagrams. Example adapted from Fowler, 2004
4
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 4 Outline ● History History ● Activity Diagrams Activity Diagrams ● Examples Examples ● Using Activity Diagrams Using Activity Diagrams
5
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 5 ● 1962 ● Extended state machines with token flow to represent concurrency ● UML 2.0 activity diagrams use token flow and a similar structure. Carl Adam Petri (1926- ) Petri-Nets Images from www.informatik.uni-hamburg.de, August, 2005 Petri Net for 4 dining philosophers.
6
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 6 Actions ● Actions represent an encapsulated unit of activity. ● They must have at least one incoming and one outgoing transition. ● Actions can be implemented as: – Class methods – Code fragments – Sub-activities
7
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 7 Action Decomposition Actions can be decomposed.
8
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 8 Signals Actions can respond to and produce external signals: – Time signals – Other signals
9
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 9 Transitions ● Transitions (aka. flows, edges) are like state diagram transitions except that they are not event- driven by default. ● Behavior: – They transition in when all incoming transitions join. – They transition out when their action is complete. ● Use connecters as a shorthand.
10
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 10 Data Flow ● Transitions can carry parameter objects. ● You can use pins to specify them.
11
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 11 Connectors Connectors come in various forms: – Decision connectors – Junction connectors Example adapted from Fowler, 2004
12
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 12 Synchronization Bars ● Concurrency is modeled with token flow in activity diagrams. ● Tokens are: – Created at initial nodes – Passed from action to action during activities – Spawned at fork nodes – Joined a join nodes – Consumed at final nodes ● The token flow must be “balanced”. Example adapted from Fowler, 2004
13
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 13 Termination States Termination states represent either local or global termination, depending upon context. − Activity Final − Flow Final
14
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 14 Partitions ● Activity diagrams don’t naturally specify agency. ● Use partitions (aka. swim lanes) to do this. Example adapted from Fowler, 2004
15
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 15 Example: Parallel Algorithm Example from Douglass, Real Time UML, 2004
16
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 16 Example: HCI
17
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 17 Using Activity Diagrams ● Activity diagrams can represent: – Concurrency – Inter-object procedural sequences ● They can be used to specify process for: – State activities (entry, exit, transition, do) – Use cases – Classes ● Real-time modeling uses them primarily for concurrent algorithm specification.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.