1. Home
  2. Docs
  3. Mastering UML 2.5: A Use ...
  4. Module 2: The Driver – Us...
  5. Practical 2: Hands-on Use Case Modeling

Practical 2: Hands-on Use Case Modeling

Generating a Use Case Diagram with AI

Visual Paradigm’s AI Diagram Generation feature can create a solid starting point for your use case diagram in seconds, saving significant time during early modeling.

  1. Select Tools > AI Diagram Generation from the main menu.

    Accessing AI Diagram Generation menu

  2. In the AI Diagram Generation window, choose Use Case Diagram as the diagram type. Enter a clear description of your project, system, or problem in the Topic field, then click OK.

    AI Diagram Generation window with Use Case Diagram selected

  3. The AI analyzes your description and automatically generates a complete use case diagram tailored to your input.

    AI-generated use case diagram

  4. Refine the generated diagram by editing names, adding or removing elements, adjusting layout, applying colors, or adding more shapes and relationships. Diagram editing tools are covered in more detail in the next section.

    Use case diagram generated by AI, with manual editing

    Use case diagram generated by AI, with manual editing

Drawing a Use Case Diagram Manually

While AI generation is fast and convenient, manual creation gives you full control over every detail. In this section, we will build a use case diagram for a simple Library Management System from scratch.

  1. Select Diagram > New from the main menu.

    Creating a new diagram

  2. Select Use Case Diagram and click Next.

    Selecting Use Case Diagram type

  3. Choose Blank to start with an empty canvas, then click Next.

    Choosing blank diagram

  4. Enter a meaningful name for the diagram (e.g., “Library Management – Use Cases”) and click OK.

    Naming the new diagram

  5. Create the system boundary first. In the diagram toolbar (left side), click System, then click and drag on the canvas to draw the rectangle. Name it Library Management System.

    Creating system boundary

  6. Add the two main actors: Patron (primary actor) on the left and Library Staff (secondary actor) on the right — this is a common convention for readability.

    Adding Patron and Library Staff actors

  7. Now create use cases connected directly to actors. Hover over the Patron actor until the Resource Catalog icon appears.

    Hovering over actor to show Resource Catalog

  8. Press and drag the Resource Catalog icon into the system boundary.

    Dragging from Resource Catalog

  9. Release the mouse and choose Association → Use Case from the popup.

    Selecting Association to Use Case

  10. Name the new use case Return Book.

    Naming the Return Book use case

  11. Next, model the exceptional case of paying a fine. Hover over the Return Book use case, drag from the Resource Catalog downward, and select Extend → Use Case.

    Creating an extend relationship

  12. Name the extending use case Pay Fine. Your diagram should now resemble this:

    Diagram after adding Pay Fine extension

  13. Use the same Resource Catalog technique to complete the diagram with the remaining elements:
    • Actors: Patron, Library Staff
    • Base use cases: Return Book, Borrow Book, Register Member, Manage Catalog
    • Extend relationship: Return BookextendPay Fine
    • Include relationship: Borrow BookincludeSearch Book

    Completed Library Management use case diagram

Documenting Flow of Events and Scenarios

After creating the diagram, document the detailed Flow of Events (main success scenario + alternatives/exceptions) to clearly specify behavior and validate requirements with stakeholders.

  1. Right-click the desired use case (e.g., Borrow Book) and select Open Use Case Details… from the context menu.
  2. In the Use Case Details window, switch to the Flow of Events tab.
  3. Enter the main success scenario as a numbered list of steps:
    1. The Patron uses the Search Book feature to locate the desired book.
    2. The Patron selects a book from the search results.
    3. The system checks the availability of the selected book.
    4. The Patron requests to borrow the book.
    5. The system validates the Patron’s membership status and borrowing privileges.
    6. The system records the borrowing transaction.
    7. The system assigns a due date to the borrowed book.
    8. The system confirms successful borrowing to the Patron (e.g., via message or receipt).

    Flow of Events editor for Borrow Book use case

    Note: You can create additional scenarios (alternative flows, exceptions, etc.) in the left pane to document different paths under the same use case.

With the diagram structure and detailed flows in place, you now have a clear, validated foundation for requirements — ready to drive design, development, and testing in an agile manner.