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 8—Identifying the Use Case Scenarios 83<br />

the logic expressed in the Use Case narrative and the scenarios; the places where you grapple<br />

with business objectives; and your plans to cope with all these issues to ensure the success<br />

of the system.<br />

Having said this, I want to voice a caution: You can dissect Use Cases endlessly looking<br />

for anything and everything possible. But you want to avoid analysis paralysis by recognizing<br />

that you won’t get everything right the first time through. It just isn’t possible. Allow<br />

for a number of passes through the problem with limited time frames. Move on to other diagrams<br />

and revisit the Use Cases and scenarios after looking at the problem from the unique<br />

perspectives that the other diagrams provide. Let the diagrams reveal information and<br />

inconsistencies, or prove you right. Above all, allow time for practice. Trial and error can be<br />

excellent teachers.<br />

How to find Use Case scenarios<br />

So how do you find these scenarios Reading a narrative and following every possible path<br />

can be difficult sometimes. One very simple and practical tool to use to find the scenarios<br />

visually is an Activity diagram. I almost always draw Activity diagrams rather than rely<br />

solely on text. Visual models provide a valuable complement to text. <strong>To</strong>gether, the two perspectives<br />

can reveal insights not visible from only one perspective. Given that people learn<br />

in different ways, having different tools to explain the problem can help everyone grasp the<br />

important issues more easily.<br />

One major benefit of an Activity diagram is its ability to quickly reveal dead-end segments<br />

and incomplete paths. The Activity diagram is still grounded in textual description<br />

for each activity, so there is significant overlap that helps ensure that your information is<br />

consistent.<br />

Cross-Ref<br />

If you aren’t comfortable with flowcharts or Activity diagrams, you may want<br />

to skip ahead to Sessions 14 and 15 before finishing this chapter.<br />

<strong>To</strong> find a scenario, start at the beginning. It usually works best to follow the path of the<br />

successful scenario first since it will usually be the most comprehensive. Trace the steps<br />

until you come to a decision, represented by a diamond. Now you have to make a choice.<br />

Select one of the possible paths leading out of the diamond, preferably the path that leads<br />

to the successful completion of the scenario, and continue to trace the steps. Continue the<br />

process until you reach an end point. That is Scenario 1. Now return to the top and retrace<br />

the first scenario to the first branching point (decision). Start the second scenario at the<br />

branch, but follow a different path leading out of the decision. Continue tracing the steps<br />

as before. If you loop back to a place you have already been, then stop. Avoid creating<br />

redundant segments.<br />

Repeat the process until you have traced a path through every segment of the diagram.<br />

You should now have a set of segments that together account for every element of the<br />

Activity diagram.

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

Saved successfully!

Ooh no, something went wrong!