1. Accueil
  2. Docs
  3. Streamlining the Software...
  4. 4. Detailed Use Case Spec...
  5. 4.1 AI-Powered Description Generation

4.1 AI-Powered Description Generation

Automatically Writing Multi-Section Specifications, Including Preconditions and Postconditions, Main, Alternative, and Exception Flows

The most time-intensive and error-prone part of use case modeling has traditionally been writing the detailed flow-of-events — the step-by-step narrative that explains exactly how the system and actor(s) collaborate to achieve a goal. Visual Paradigm’s AI-Powered Use Case Modeling Studio changes this dramatically by generating a complete, professionally structured use case specification in seconds.

After selecting a use case from the refined diagram (or the candidate list), you click “Generate Specification” (or similar label). The AI draws on:

  • the use case name and goal
  • the primary and secondary actors
  • defined «include» and «extend» relationships
  • the overall system scope, problem context, and stakeholder needs

It then produces a multi-section document that includes at minimum:

  • Use Case Name / ID
  • Primary Actor
  • Secondary Actors (if applicable)
  • Preconditions — what must be true for the use case to begin meaningfully
  • Postconditions — the guaranteed state of the system after successful completion
  • Main Success Scenario — the happy path, written as numbered steps
  • Alternative Flows — variations that still achieve success (often numbered as extensions of the main flow, e.g., 3a, 4b)
  • Exception Flows — error conditions, recovery actions, or graceful failure (commonly prefixed with the step where the error occurs, e.g., 5a, 5b)

Additional sections the AI may auto-populate (depending on context) include extension points, priority, frequency of use, business rules, and non-functional notes.

The generated text appears in an integrated markdown-style editor, making it easy to review, rephrase, add domain-specific details, or adjust tone. Changes remain traceable to the originating use case and diagram.

Practical Examples

Example 1: GourmetReserve – Use Case: Book a Table

AI-Generated Specification (excerpt – after clicking Generate):

  • Use Case: UC-001 Book a Table
  • Primary Actor: Diner
  • Secondary Actors: Payment Gateway, Notification Service
  • Preconditions
    • Diner is authenticated (via «include» Authenticate User).
    • At least one restaurant is registered and has table availability data.
    • Current date/time is within restaurant operating hours.
  • Postconditions
    • A reservation record is created and confirmed.
    • Required deposit (if any) is successfully processed.
    • Confirmation notification is sent to the diner.
    • Reminder notification is scheduled (via Notification Service).
  • Main Success Scenario
    1. Diner searches for available tables by entering location, date, time, and party size.
    2. System displays list of restaurants with matching open slots.
    3. Diner selects a restaurant, specific table/time slot, and confirms party size.
    4. System includes Process Payment to collect required deposit.
    5. Diner reviews and confirms booking details.
    6. System creates reservation and marks the slot as booked.
    7. System sends immediate confirmation (email/push) and schedules reminder.
  • Alternative Flows 3a. No tables available at requested time → System offers closest available slots or waitlist option (extends via Handle Waitlist). 4a. Diner applies valid promo code → System applies discount during Process Payment.
  • Exception Flows 4b. Payment authorization fails → System displays error message, cancels current booking attempt, and returns diner to step 3. 6a. Reservation creation fails due to concurrent booking → System notifies diner of race condition and suggests retry or alternative slot.

Typical human refinement: Add business rule after step 4: “Deposit = 10% of estimated bill for parties ≥ 8 or Fri/Sat 7–9 pm; waived for returning customers with loyalty status.”

Example 2: SecureATM – Use Case: Withdraw Cash

AI-Generated Key Sections:

  • Preconditions
    • User is authenticated (via «include» Authenticate User).
    • ATM has sufficient cash in the requested denomination.
  • Postconditions
    • Account balance is reduced by withdrawal amount + fee (if applicable).
    • Cash is dispensed to the user.
    • Transaction is logged for audit and fraud monitoring.
  • Main Success Scenario
    1. System includes Authenticate User.
    2. User selects “Withdraw Cash” from main menu.
    3. System includes Validate Transaction Limits.
    4. User enters desired amount.
    5. System checks account balance and available cash.
    6. System dispenses requested cash and prints transaction receipt (if selected).
    7. System updates account balance and logs transaction.
  • Exception Flows 4a. Amount exceeds daily withdrawal limit → System displays limit message and returns to amount entry (step 4). 5a. Insufficient funds → System shows balance and suggests lower amount. 5b. Insufficient cash in ATM → System displays “Temporarily unavailable – please try later” and alerts operations team.

Example 3: CorpLearn – Use Case: Take Final Assessment

AI-Generated Excerpt:

  • Preconditions
    • Learner is enrolled in the course (via prior Enroll in Course).
    • All prerequisite modules are completed.
    • Assessment is available (not past due date).
  • Postconditions
    • Assessment score is recorded.
    • Learning progress is updated (via «include» Record Learning Progress).
    • If passing score achieved → Certificate is issued (via «extend» Issue Certificate).
  • Main Success Scenario
    1. Learner navigates to course and selects “Start Final Assessment”.
    2. System presents timed questions (multiple choice + short answer).
    3. Learner answers all questions and submits.
    4. System evaluates answers and calculates score.
    5. System includes Record Learning Progress.
    6. If score ≥ 80% → System extends with Issue Certificate.
    7. System displays results and next steps (retake / proceed).
  • Exception Flows 2a. Time limit reached → System auto-submits current answers and proceeds to evaluation. 4a. Technical submission failure → System saves draft and allows retry within grace period.

Tips for Working with AI-Generated Specifications

  • Review preconditions/postconditions first — They often reveal missing assumptions or domain rules you need to add.
  • Check that «include» steps appear as single-line references (e.g., “System includes Authenticate User”) — this keeps flows concise.
  • Look for extension points — The AI should reference them in alternative/exception flows when «extend» relationships exist.
  • Add specificity — AI may use generic phrasing; replace with exact business rules, error messages, or UI hints.
  • Iterate — Generate → refine → regenerate if major changes are made (the tool often preserves your edits).

By the end of this section, each important use case will have a clear, structured, and largely AI-authored specification that minimizes writing effort while maximizing completeness and consistency. This becomes the authoritative reference for developers, the direct source for behavioral diagram generation (Module 5), and the foundation for automated test case creation (Module 7). The AI handles the boilerplate and structure—you focus on injecting precision and domain truth.