UML Weekend Crash Course⢠- To Parent Directory
UML Weekend Crash Course⢠- To Parent Directory UML Weekend Crash Course⢠- To Parent Directory
Session 15—Applying the Activity Diagram to the Case Study 163 Now you have all the pieces you need to do a bit of organizing. One opportunity to watch for is concurrency. Identify tasks that may be done at the same time because they don’t depend on one another. For example, Figure 15-6 shows that notifying accounts payable and updating inventory don’t overlap or depend on one another so they can be modeled as concurrent activities. Use the fork bar to show that you want to follow both logical paths at the same time. Use the synchronization bar to show that you’re done with the concurrent tasks and want to continue on a single logical path. In this example, after all the updates and notifications are done, you can print the confirmation. Notify Accounts Payable of the updated Purchase Order Update inventory for the Products received Display the "Accounts Payable notified" message Display "inventory updated successfully" message Print the receiving confirmation done Figure 15-6 Modeling the concurrency opportunity Figure 15-7 puts all the segments together. Notice in the bottom left below the activity labeled “Display “invalid item” error message” I added another merge point to bring together the segments from Figures 15-4 and 15-5.
164 Saturday Afternoon start (merge point) proceed or cancel [cancel] [proceed] cancelled Enter Shipper_ID Prompt to reenter or cancel [Shipper not found] Find Shipper Display Shipper Details [Shipper found] More products to receive [no] [P.O. not found] [yes] Display "invalid P.O." error message Display "invalid item" error message [no match] (merge point) Find the Purchase Order for the product [P.O. found] Match the product to an item on the Purchase Order Check off the item and quantity on the Purchase Order [match found] Notify Accounts Payable of the updated Purchase Order Display the "Accounts Payable notified" message Update inventory for the Products received Display "inventory updated successfully" message Set the item aside (merge point) Print the receiving confirmation done Figure 15-7 The complete Activity diagram As you can see from the example, all the old flowchart elements are still there. UML has added concurrency to keep pace with technology. REVIEW Often, text can be a bit too ambiguous for defining a complex process. The Activity diagram offers a visual alternative that also supports common programming constructs. As such, it bridges the gap nicely between user requirements and programming requirements. To translate the user description into an Activity diagram, isolate each task as an activity. Indicate the sequence of the tasks by drawing the transition arrow from one activity to the next activity in the sequence.
- Page 136 and 137: Session 10—The Class Diagram: Ass
- Page 138 and 139: Part II — Saturday Morning Part R
- Page 140 and 141: SESSION 11 The Class Diagram: Aggre
- Page 142 and 143: Session 11—The Class Diagram: Agg
- Page 144 and 145: Session 11—The Class Diagram: Agg
- Page 146 and 147: Session 11—The Class Diagram: Agg
- Page 148 and 149: Session 11—The Class Diagram: Agg
- Page 150: Session 11—The Class Diagram: Agg
- Page 153 and 154: 130 Saturday Afternoon or not. Each
- Page 155 and 156: 132 Saturday Afternoon 5. “Any it
- Page 157 and 158: 134 Saturday Afternoon designed to
- Page 159 and 160: 136 Saturday Afternoon Table 12-3 T
- Page 161 and 162: 138 Saturday Afternoon REVIEW The C
- Page 163 and 164: 140 Saturday Afternoon Introducing
- Page 165 and 166: 142 Saturday Afternoon Table 13-1 C
- Page 167 and 168: 144 Saturday Afternoon 28: VendorPr
- Page 169 and 170: 146 Saturday Afternoon 0..* VendorP
- Page 172 and 173: SESSION 14 Modeling the Functional
- Page 174 and 175: Session 14—Modeling the Functiona
- Page 176 and 177: Session 14—Modeling the Functiona
- Page 178: Session 14—Modeling the Functiona
- Page 181 and 182: 158 Saturday Afternoon Table 15-1 T
- Page 183 and 184: 160 Saturday Afternoon Figure 15-1
- Page 185: 162 Saturday Afternoon More product
- Page 190 and 191: SESSION 16 Modeling the Dynamic Vie
- Page 192 and 193: Session 16—Modeling the Dynamic V
- Page 194 and 195: Session 16—Modeling the Dynamic V
- Page 196 and 197: Session 16—Modeling the Dynamic V
- Page 199 and 200: PART III # Saturday Afternoon Part
- Page 201 and 202: PART IV Saturday Evening Session 17
- Page 203 and 204: 180 Saturday Evening Scenario 1 Get
- Page 205 and 206: 182 Saturday Evening The next step
- Page 207 and 208: 184 Saturday Evening For Scenario 2
- Page 209 and 210: 186 Saturday Evening For subsequent
- Page 211 and 212: 188 Saturday Evening 6:addProduct(c
- Page 213 and 214: 190 Saturday Evening 7:addProduct(c
- Page 215 and 216: 192 Saturday Evening REVIEW The Col
- Page 217 and 218: 194 Saturday Evening Scenario 1 Get
- Page 219 and 220: 196 Saturday Evening pointing towar
- Page 221 and 222: 198 Saturday Evening :OrderFullfill
- Page 223 and 224: 200 Saturday Evening Scenario 5, in
- Page 226 and 227: SESSION 20 Modeling the Dynamic Vie
- Page 228 and 229: Session 20—Modeling the Dynamic V
- Page 230 and 231: Session 20—Modeling the Dynamic V
- Page 232 and 233: Session 20—Modeling the Dynamic V
- Page 234: Session 20—Modeling the Dynamic V
164<br />
Saturday Afternoon<br />
start<br />
(merge point)<br />
proceed or cancel<br />
[cancel]<br />
[proceed]<br />
cancelled<br />
Enter<br />
Shipper_ID<br />
Prompt to reenter<br />
or cancel<br />
[Shipper not found]<br />
Find Shipper<br />
Display<br />
Shipper<br />
Details<br />
[Shipper found]<br />
More products to receive<br />
[no]<br />
[P.O. not found]<br />
[yes]<br />
Display "invalid<br />
P.O." error<br />
message<br />
Display "invalid<br />
item" error<br />
message<br />
[no match]<br />
(merge point)<br />
Find the<br />
Purchase Order<br />
for the product<br />
[P.O. found]<br />
Match the product<br />
to an item on the<br />
Purchase Order<br />
Check off the item<br />
and quantity on<br />
the Purchase Order<br />
[match found]<br />
Notify Accounts<br />
Payable of the<br />
updated<br />
Purchase Order<br />
Display the<br />
"Accounts<br />
Payable notified"<br />
message<br />
Update<br />
inventory for<br />
the Products<br />
received<br />
Display "inventory<br />
updated<br />
successfully"<br />
message<br />
Set the item<br />
aside<br />
(merge point)<br />
Print the<br />
receiving<br />
confirmation<br />
done<br />
Figure 15-7 The complete Activity diagram<br />
As you can see from the example, all the old flowchart elements are still there. <strong>UML</strong> has<br />
added concurrency to keep pace with technology.<br />
REVIEW<br />
Often, text can be a bit too ambiguous for defining a complex process. The Activity diagram<br />
offers a visual alternative that also supports common programming constructs. As such, it<br />
bridges the gap nicely between user requirements and programming requirements.<br />
<strong>To</strong> translate the user description into an Activity diagram, isolate each task as an<br />
activity. Indicate the sequence of the tasks by drawing the transition arrow from<br />
one activity to the next activity in the sequence.