01.01.2015 Views

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Session 15—Applying the Activity Diagram to the Case Study 161<br />

The narrative also told you that the system must:<br />

Update inventory<br />

Notify Accounts Payable<br />

Print a confirmation to go with the receiving documents<br />

Return to its initial state (prior to this Use Case) upon receiving the Cancel option<br />

Figure 15-3 shows the activities to notify accounts payable, update inventory, and print<br />

the confirmation. I added an activity to display a message for each action so that the user<br />

knows that his requirement was met. Right now it looks like you just have fragments, but<br />

you’ll tie all these pieces together further into the session.<br />

Notify Accounts<br />

Payable of the<br />

updated Purchase<br />

Order<br />

Update inventory<br />

for the Products<br />

received<br />

Print the receiving<br />

confirmation<br />

Display the<br />

"Accounts notified"<br />

message<br />

Display "inventory<br />

updated<br />

successfully"<br />

message<br />

done<br />

Figure 15-3 Modeling the post-conditions and terminations<br />

Next, you need to model the processing for each piece in the shipment. Figure 15-4 sets<br />

up the loop “for each product” with a decision diamond that asks whether there are “more<br />

pieces to receive.”<br />

For each product in the Shipment:<br />

1. Find the Purchase Order using the PO_nbr<br />

2. If not found, display “invalid P.O.” error message and set the item aside<br />

3. Else (P.O. found)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!