Use Case Diagram
& Use Case
Business process model
•
Business process model describe the different activities that when
combined together support a business process
•
Business process typically cut across functional departments
cut
across multiple objects (from oo perspective)
•
Business process models are powerful tool for communication the
analyst’s current understanding of requirements with the user.
Use Case Diagram
•
Actor
• Refers to a particular role of a user of the system
• Similar to external entities; they exist outside of the system
•
Use case symbols
• An oval indicating the task of the use case
•
Connecting lines
• Arrows and lines used to diagram behavioral relationships
Four Types Of Behavioral Relationships And The Lines Used To Diagram Each
Some components of use case diagrams showing actors, use cases, and relationships for a student enrollment example
Developing the Use Case Scenarios
•
The description of the use case
•
Three main areas:
• Use case identifiers and initiators
• Steps performed
• Conditions, assumptions, and questions
A Use Case Scenario Is Divided into Three Sections
Use case name: Register for Conference UniqueID: Conf RG 003 Area: Conference Planning
Actor(s): Participant
Stakeholder Conference Sponsor, Conference Speakers Level Blue
Description: Allow conference participant to register online for the conference using a secure Web site.
Triggering Event: Participant uses Conference Registration Web site, enters userID and password, and clicks the logon button. Trigger type: External Temporal
Steps Performed (Main Path) Information for Steps
1. Participant logs in using the secure Web server userID, Password
More steps included here…
12. Successful Registration Confirmation Web page is sent to the participant Registration Record Confirmation Number
Preconditions: Participant has already registered and has created a user account. Postconditions: Participant has successfully registered for the conference.
Assumptions: Participant has a browser and a valid userID and password.
Success Guarantee: Participant has registered for the conference and is enrolled in all selected sessions. Minimum Guarantee: Participant was able to logon.
Requirements Met: Allow conference participants to be able to register for the conference using a secure Web site.
Outstanding Issues: How should a rejected credit card be handled? Priority: High
Risk: Medium
Alternative Scenarios
•
Extensions or exceptions to the main use case
•
Number with an integer, decimal point, integer
•
Steps that may or may not always be used
Four Steps Used to Create Use Cases
•
Use agile stories, problem definition objectives, user requirements, or
a features list (as result of requirement gathering
–
last lecture)
•
Ask about the tasks that must be done
•
Determine if there are any iterative or looping actions
•
The use case ends when the customer goal is complete
Major Steps in Writing Case Description and
Use-case Diagrams
•
Step 1. Identify the major use-cases
•
Step 2. Expand the major use-case
•
Step 3. Confirm the major use-cases
Step 1. Identifying the Major Use-Cases
1. Review the activity diagram or flow chart described business process 2. Identify the system’s boundaries
3. List the primary actors and their goals 4. Identify and write the major use-cases
Internet Order System – Functional requirements: 1. Maintain CD Information
1.1……1.2….. 1.3…..
2. Maintain CD marketing information
2.1…. 2.2…. 2.3….
3. Place CD Orders
3.1 Search CDs from “CD Selection” web site; 3.2 Place orders; 3.3……
4. Maintain Orders
4.1….. 4.2…
4.3 Place Instore Hold: If ordered CDs are available in a near store, the CDs are on hold and to be picked up in the store
4.4. Place Special Order: If ordered CDs is not available in a near store, the ordered CDs will be sent to a near store and email to the customer when it is available in the near store
Review activity diagram of Internet order System:
Place CD Order
Maintain CD marketing information
Maintain CD Information
Step 1. Identifying the Major Use-Cases - Example
Step 1. Identifying the Major Use-Cases - Example
Use case name Primary actor
Relationship
Association Include Exclude Maintain marketing
information
Vendor Vendor
Maintain CD information
Distribution system
Distribution system
Place order Customer Customer Maintain order Maintain order Customer
Step 2. Expand the Major Use-Cases
6. Choose one major use-case to expand
7. Fill in details on the use-case template
8. Fill in the steps of the normal flow of events
9. Normalize the size of each step (i.e., if the normal flow of events is too complex or long, decompose into subflows or introduce a new use case)
10. Describe alternate or exceptional flows
Step 2. Expand the Major Use-Cases - Example
Step 2. Expand the Major Use-Cases - Example
•
Expand the major use-case
• By writing down the detailed use cases, it is identified that 3 new use cases are needed
• As shown in the last slide, one “include” use case “Check out” for Place Order use case
• Similarly, Two “extend” use cases “Place instore hold” and “Place special order”
for Maintain Order use case
Step 3. Confirm the Major Use Cases
12. Review the current set of use case, revise as needed
• Consider semantics and syntax
• Helpful to involve the users
Step 4. Create the Use-Case Diagram
1. Draw the system boundary
2. Place the user cases on the diagram (better to put them in order to be easy to read)
3. Place the actors on the diagram
Use case name Primary actor Relationship
Association Include Exclude Maintain
marketing information
Vendor Vendor
Maintain CD information
Distribution system
Distribution system
Place order Customer Customer Check out Maintain order Check out Customer Customer, Credit
Centre
Maintain order
Maintain order Customer Place Instore hold Place special order Place Instore hold Customer Store
Place special order Customer Store
Exercise: Draw use-case diagram
Question. Suppose that 7 major use cases have been identified as below, draw the
Maintain CD
Place instore hold
Place special order <<include>>
<< extend >>
Solution:
<<actor>>
Case Study - ATM
• Model only the transactions
• Customer accounts assumed to exist
• Opening and closing of accounts is handled by another portion of the system
• Include operations “deposit”, withdraw”, “check balance”, “transfer”
Deposit
Withdraw
Check balance
Transfer
Database customer
Login
Logout
Use case narratives - ATM
•
Deposit
• Using this functionality, a user will be able to add some money to his/her account
• Account identification and amount to be deposited must be input
• Upon completion, the balance in the account will be updated to include the additional amount
•
Check balance
• A user can check the balance in an account using this functionality
• Account identification must be input and the balance in the account will be output
Deposit
All dependency relationships are of type <<include>>
Case Study
–
Restaurant System
•
Functional Requirement:
1. Receptionist produce restaurant table chart
2. A customer can request table before going to restaurant 3. A customer place an order
4. A waiter will collect the order
5. An external system manage menu & order so customer can place an order and collected by waiter
6. A customer can pay bill through three ways; by cash, by credit card, or by cheque 7. The cashier will collect money based on billing system information produced by
external system
8. The cashier can update account based on billing system information produced by external system
Case Study
–
Travel Agency
Tasks:
1. Complete (arrow) the Use Case Diagram correctly