Use Case Diagrams Examples
Here we provide some examples of UML use case diagrams.
Examples of business use case diagrams:
Purpose: An example of a business use case diagram for airport check-in and security screening.
Summary: Business use cases are Individual Check-In, Group Check-In (for groups of tourists), Security Screening, etc. - representing business functions or processes taking place in an airport and serving needs of passengers.
Purpose: Two alternative examples of business use case diagram for a Restaurant - external and internal business views of a restaurant.
Summary: Several business actors having some needs and goals as related to the restaurant and business use cases expressing expectations of the actors from the business.
Examples of system use case diagrams:
Purpose: Show that ticket vending machine allows commuters to buy tickets.
Summary: The ultimate goal of a Commuter in relation to our ticket vending machine is to buy a ticket. We have a single Purchase Ticket use case, as this vending machine is not providing any other services.
Purpose: Describe use cases that an automated teller machine (ATM) or the automatic banking machine (ABM) provides to the bank customers.
Summary: Customer uses a bank ATM to check balances of his/her bank accounts, deposit funds, withdraw cash and/or transfer funds (use cases). ATM Technician provides maintenance and repairs to the ATM.
Purpose: An example of use cases for a Point of Sale (POS) Terminal or Checkout in a supermarket.
Summary: Checkout use case involves Customer, Clerk and Credit Payment Service actors and includes scanning items, calculating total and taxes, and payment use cases. This is an example of a large and complex use case split into several smaller use cases.
Purpose: List top level use cases for e-Library online public access catalog.
Summary: Patrons of a library can search library catalog online to locate various resources - books, periodicals, audio and visual materials, or other items under control of the library. Patrons may reserve or renew item, provide feedback, and manage their account.
Purpose: Provide top level use cases for a web customer making purchases online.
Purpose: Define major use cases for a credit card processing system (credit card payment gateway).
Summary: The merchant submits a credit card transaction request to the credit card payment gateway on behalf of a customer. Bank which issued customer's credit card is actor which could approve or reject the transaction. If transaction is approved, funds will be transferred to merchant's bank account.
Website management or administration UML use case diagrams example. Website Administrator actor could manage user groups, users, user sessions, and logs. Help Desk staff uses a subset of functions available to the Website Administrator.
Purpose: Describe major services (functionality) provided by a hospital's reception.
This UML use case diagram example shows actor and use cases for a hospital's reception. Hospital Reception subsystem or module supports some of the many job duties of a hospital receptionist. Receptionist schedules patient's appointment and admission to the hospital, collects information from the patient by phone and/or upon patient's arrival to the hospital.
For the patient that will stay in the hospital ("inpatient") she or he should have a bed allotted in a ward. Receptionists might also receive patient's payments, record them in a database and provide receipts, file insurance claims and medical reports.
Sentinel License Development Kit (Sentinel LDK) is a Software Digital Rights Management (DRM) solution by SafeNet Inc. that delivers strong copy protection, protection for Intellectual Property (IP), and secure and flexible licensing.
Use case diagram example shows some simplified view of software licensing use cases supported by Sentinel EMS Application. The Sentinel EMS handles three major workflows - license planning, order processing and production, and software activation.
Airport Check-In and Security Screening
This is an example of Business Use Case Diagram which is created during Business Modeling and is rendered here in notation used by Rational Unified Process (RUP).
Business actors are Passenger, Tour Guide, Minor (Child), Passenger with Special Needs (e.g. with disabilities), all playing external roles in relation to airport business.
Business use cases are Individual Check-In, Group Check-In (for groups of tourists), Security Screening, etc. - representing business functions or processes taking place in airport and serving the needs of passengers.
Business use cases Baggage Check-in and Baggage Handling extend Check-In use cases, because passenger might have no luggage, so baggage check-in and handling are optional.
An example of use case diagram for airport check-in and security screening
Here we provide two alternative examples of Business Use Case Diagram for a Restaurant rendered in notation used by Rational Unified Process (RUP).
First example shows external business view of a restaurant. We can see several business actors having some needs and goals as related to the restaurant and business use cases expressing expectations of the actors from the business.
Business use case diagram for Restaurant - External view
For example, Customer wants to Have Meal, Candidate - to Apply for Job, and Contractor - to fix some appliances. Note, that we don't have such actors as Chef or Waiter. They are not external roles but part of the business we model - the Restaurant, thus - they are not actors. In terms of RUP Chef and Waiter are business workers.
Second example shows internal business view of a restaurant. In this case we can see that restaurant has several business processes represented by business use cases which provide some services to external business actors. As in the previous example, actors have some needs and goals as related to the restaurant.
This approach could be more useful to model services that the business provides to different types of customers, but reading this kind of business use case diagrams could be confusing.
For example, Customer is now connected to Serve Meal use case, Supplier - to Purchase Supplies. We have now new actor Potential Customer participating in Advertise use case by reading ads and getting some information about restaurant. At the same time, Contractor actor is gone because Repair Appliances is not a service usually provided by restaurants.
Business use case diagram for Restaurant - Internal view
Still, in this example we don't have actors as Chef or Waiter for the same reasons as before - they both are not external roles but part of the business we model.
Bank ATM Use Cases
An automated teller machine (ATM) or the automatic banking machine (ABM) is banking subsystem (subject) that provides bank customers with access to financial transactions in a public space without the need for a cashier, clerk or bank teller.
Customer (actor) uses bank ATM to check balances of his/her bank accounts, deposit funds, withdraw cash and/or transfer funds (use cases). ATM Technician provides maintenance and repairs. All these use cases also involve Bank actor whether it is related to customer transactions or to the ATM servicing.
An example of use case diagram for Bank ATM subsystem - top level use cases.
On most bank ATMs, the customer is authenticated by inserting a plastic ATM card and entering a personal identification number (PIN). Customer Authentication use case is required for every ATM transaction so we show it as include relationship. Including this use case as well as transaction generalizations make the ATM Transaction an abstract use case.
Bank ATM Transactions and Customer Authentication Use Cases Example.
If needed, customer may ask ATM for help. ATM Transaction use case is extended via Menu extension point by the ATM Help use case whenever ATM Transaction is at the location specified by the Menu and the bank customer requests help, e.g. by selecting Help menu item.
Bank ATM Maintenance, Repair, Diagnostics Use Cases Example.
ATM Technician maintains or repairs Bank ATM. Maintenance use case includes Replenishing ATM with cash, ink or printer paper, Upgrades of hardware, firmware or software, and remote or on-site Diagnostics. Diagnostics is also included in (shared with) Repair use case.
Point of Sales Terminal
An example of use cases for Point of Sale (POS) Terminal or Checkout. A retail POS system typically includes a computer, monitor, keyboard, barcode scanners, weight scale, receipt printer, credit card processing system, etc. and POS terminal software.
Top level use cases for Point of Sales Terminal.
Checkout use case involves Customer, Clerk and Credit Payment Service actors and includes scanning items, calculating total and taxes, payment use cases. This is an example of large and complex use case split into several use cases each describing some logical unit of behavior. Note, that including use case becomes incomplete by itself and requires the included use cases to be complete.
Checkout use case in detail.
Payment use case is represented using generalization relationship. It means that only one specific type of payment is accepted - either by cash, or by credit, debit, or with check. An alternative to such representation could be to use include relationship so that not just single but several forms of payment could be accepted from the same client during checkout.
An Online Public Access Catalog (OPAC) is e-Library website which is part of Integrated Library System (ILS), also known as a Library Management System (LMS), and managed by a library or group of libraries.
Patrons of the library can search library catalog online to locate various resources - books, periodicals, audio and visual materials, or other items under control of the library. Patrons may reserve or renew item, provide feedback, and manage their account.
An example of use case diagram for e-Library Online Public Access Catalog
Credit Card Processing System Use Cases
In this use cases example, Credit Card Processing System (Credit Card Payment Gateway) is a subject, i.e. system under design or consideration. Primary actor of the system is the Merchant’s Credit Card Processing System. The merchant submits a credit card transaction request to the credit card payment gateway on behalf of a customer. Bank which issued customer's credit card is actor which could approve or reject the transaction. If transaction is approved, funds will be transferred to merchant's bank account.
Authorize and Capture use case is the most common type of credit card transaction. The requested amount of money should be first authorized by Customer's Credit Card Bank, and if approved, is further submitted for settlement. During the settlement funds approved for the credit card transaction are deposited into the Merchant's Bank account.
In some cases, only authorization is requested and the transaction will not be sent for settlement. In this case, usually if no further action is taken within some number of days, the authorization expires. Merchants can submit this request if they want to verify the availability of funds on the customer’s credit card, if item is not currently in stock, or if merchant wants to review orders before shipping.
Capture (request to capture funds that were previously authorized) use case describes several scenarios when merchant needs to complete some previously authorized transaction - either submitted through the payment gateway or requested without using the system, e.g. using voice authorization.
Credit Card Processing System Use Cases.
Credit use case describes situations when customer should receive a refund for a transaction that was either successfully processed and settled through the system or for some transaction that was not originally submitted through the payment gateway.
Void use case describes cases when it is needed to cancel one or several related transactions that were not yet settled. If possible, the transactions will not be sent for settlement. If the Void transaction fails, the original transaction is likely already settled.
Verify use case describes zero or small amount verification transactions which could also include verification of some client's data such as address.
You can find excellent resources, documentation, white papers, guides, etc. related to the credit card processing at Authorize.Net - Payment Gateway to Accept Online Payments.