UML Weekend Crash Course⢠- To Parent Directory
UML Weekend Crash Course⢠- To Parent Directory UML Weekend Crash Course⢠- To Parent Directory
Session 8—Identifying the Use Case Scenarios 83 the logic expressed in the Use Case narrative and the scenarios; the places where you grapple with business objectives; and your plans to cope with all these issues to ensure the success of the system. Having said this, I want to voice a caution: You can dissect Use Cases endlessly looking for anything and everything possible. But you want to avoid analysis paralysis by recognizing that you won’t get everything right the first time through. It just isn’t possible. Allow for a number of passes through the problem with limited time frames. Move on to other diagrams and revisit the Use Cases and scenarios after looking at the problem from the unique perspectives that the other diagrams provide. Let the diagrams reveal information and inconsistencies, or prove you right. Above all, allow time for practice. Trial and error can be excellent teachers. How to find Use Case scenarios So how do you find these scenarios Reading a narrative and following every possible path can be difficult sometimes. One very simple and practical tool to use to find the scenarios visually is an Activity diagram. I almost always draw Activity diagrams rather than rely solely on text. Visual models provide a valuable complement to text. Together, the two perspectives can reveal insights not visible from only one perspective. Given that people learn in different ways, having different tools to explain the problem can help everyone grasp the important issues more easily. One major benefit of an Activity diagram is its ability to quickly reveal dead-end segments and incomplete paths. The Activity diagram is still grounded in textual description for each activity, so there is significant overlap that helps ensure that your information is consistent. Cross-Ref If you aren’t comfortable with flowcharts or Activity diagrams, you may want to skip ahead to Sessions 14 and 15 before finishing this chapter. To find a scenario, start at the beginning. It usually works best to follow the path of the successful scenario first since it will usually be the most comprehensive. Trace the steps until you come to a decision, represented by a diamond. Now you have to make a choice. Select one of the possible paths leading out of the diamond, preferably the path that leads to the successful completion of the scenario, and continue to trace the steps. Continue the process until you reach an end point. That is Scenario 1. Now return to the top and retrace the first scenario to the first branching point (decision). Start the second scenario at the branch, but follow a different path leading out of the decision. Continue tracing the steps as before. If you loop back to a place you have already been, then stop. Avoid creating redundant segments. Repeat the process until you have traced a path through every segment of the diagram. You should now have a set of segments that together account for every element of the Activity diagram.
84 Saturday Morning Finding Use Case scenarios for the case study Now that you have an understanding of what a scenario is and how to find one, I want to walk you through the case study Use Case “FillOrder.” Table 8-1 contains the dialog portion of the Use Case narrative for FillOrder (created in Session 7) that will be the basis for the Activity diagram to follow. Table 8-1 Use Case Narrative for FillOrder Field Name Use Case dialog Field Description The system asks the user for an order number. The user provides the order number. The system asks for the order (from LocateOrder Use Case). If the Order is not found, Error, stop. Else: The system provides the order to the user. The user chooses an item. Until the user indicates that she is done or there are no unfilled item quantities greater than 0: The system asks for the location of the item and unfilled quantity (from the LocateProduct Use Case). If the item is found (available): The user indicates the quantity of the item filled. If there are any unfilled item quantities greater than 0: Create a backorder (using the CreateBackorder Use Case).
- Page 56: Session 3—How to Approach the UML
- Page 59 and 60: 36 Friday Evening Remember to pay c
- Page 61 and 62: 38 Friday Evening Constraints The s
- Page 63 and 64: 40 Friday Evening An Inventory Cont
- Page 65 and 66: 42 Friday Evening Performance How
- Page 67 and 68: 44 Friday Evening In the effort to
- Page 70 and 71: Part II — Saturday Morning Sessio
- Page 72 and 73: SESSION 5 Understanding the Use Cas
- Page 74 and 75: Session 5—Understanding the Use C
- Page 76 and 77: Session 5—Understanding the Use C
- Page 78 and 79: Session 5—Understanding the Use C
- Page 80 and 81: Session 5—Understanding the Use C
- Page 82: Session 5—Understanding the Use C
- Page 85 and 86: 62 Saturday Morning Order Fulfillme
- Page 87 and 88: 64 Saturday Morning What does the
- Page 89 and 90: 66 Saturday Morning For example, th
- Page 91 and 92: 68 Saturday Morning REVIEW The goal
- Page 93 and 94: 70 Saturday Morning Much of this la
- Page 95 and 96: 72 Saturday Morning You reply that
- Page 97 and 98: 74 Saturday Morning Writing a Use C
- Page 99 and 100: 76 Saturday Morning Use Case dialog
- Page 101 and 102: 78 Saturday Morning Table 7-7 The F
- Page 104 and 105: SESSION 8 Identifying the Use Case
- Page 108 and 109: Session 8—Identifying the Use Cas
- Page 110 and 111: Session 8—Identifying the Use Cas
- Page 112 and 113: Session 8—Identifying the Use Cas
- Page 114: Session 8—Identifying the Use Cas
- Page 117 and 118: 94 Saturday Morning The Class diagr
- Page 119 and 120: 96 Saturday Morning Attribute visib
- Page 121 and 122: 98 Saturday Morning In a modeling t
- Page 123 and 124: 100 Saturday Morning Table 9-2 Cont
- Page 125 and 126: 102 Saturday Morning Operation comp
- Page 128 and 129: SESSION 10 The Class Diagram: Assoc
- Page 130 and 131: Session 10—The Class Diagram: Ass
- Page 132 and 133: Session 10—The Class Diagram: Ass
- Page 134 and 135: Session 10—The Class Diagram: Ass
- 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
84<br />
Saturday Morning<br />
Finding Use Case scenarios for the case study<br />
Now that you have an understanding of what a scenario is and how to find one, I want to<br />
walk you through the case study Use Case “FillOrder.” Table 8-1 contains the dialog portion<br />
of the Use Case narrative for FillOrder (created in Session 7) that will be the basis for the<br />
Activity diagram to follow.<br />
Table 8-1<br />
Use Case Narrative for FillOrder<br />
Field Name<br />
Use Case dialog<br />
Field Description<br />
The system asks the user for an order number.<br />
The user provides the order number.<br />
The system asks for the order (from LocateOrder Use<br />
Case).<br />
If the Order is not found, Error, stop.<br />
Else:<br />
The system provides the order to the user.<br />
The user chooses an item.<br />
Until the user indicates that she is done or there are no<br />
unfilled item quantities greater than 0:<br />
The system asks for the location of the item and<br />
unfilled quantity (from the LocateProduct Use Case).<br />
If the item is found (available):<br />
The user indicates the quantity of the item filled.<br />
If there are any unfilled item quantities greater than 0:<br />
Create a backorder (using the CreateBackorder Use<br />
Case).