25 Feb 2016

Domain Driven Design: Use Case Template

 

 

          Informal Use Case

Patron Loses a Book The library patron reports to the librarian that she has lost a book. The lost a book. The librarian librarian prints out the library record prints out the library record and asks patron to speak with the head librarian, who will arrange for the patron to pay a fee. The system will be updated to refl

ect lost book, and patron be updated to reflect lost book, and patron s' record is record is updated as well. The head librarian may authorize purchase of a replacement tape.

Formal Use Case

     
1 GOAL Patron wishes to reserve a book using the online catalog
2 Primary Actor Patron
3 Scope Library system
4. Level User
5. Pre Conditions Patron is at the login screen
6. Success end Conditions Book is reserved
7. Failure End Conditions Book is not reserved
8. Triggers Patron logs into system
9. Main Success Scenario 1. Patron enters account and password Scenario
2. System verifies and logs patron in System verifies and logs patron in
3. System presents catalog with search screen
4. Patron enters book title
5.  System finds match and presents location choices to patron
6. Patron selects location and reserves book
7. System confirms reservation and re-presents catalog
10. Extensions ( error scenarios) 2a. Password is incorrect (error scenarios)
         2a.1 System returns patron to login screen
         2a.2 Patron backs out or tries again
11. Variations Patron enters author or subject

 

Steps in creating a use case

1. Identify actors and their goals

        What computers subsystems and people will drive our computers, subsystems and people will drive our system?

          (actors)

 

2. What does each actor need our system to do ?

       (goals )

           3. Write the success scenario

                         – easiest to read and understand

            – everything else is a complication on this

Capture each actor's intent and responsibility, from trigger to goal delivery

                  – say what information passes between them say what information passes between them

                  – number each line

              4. List the failure extensions

              5. List the variations               

 Use case description

1. How and when it begins and ends

2. The interactions between the use case and its actors, including including when the interaction interaction occurs and what is exchanged .

3. How and when the use case will need data from or store data to the system .

4. How and when concepts of the problem domain are handled