用例能否同时包含并将同一其他用例设为前置条件?及登录用例属性疑问
Hey there! Let's tackle your use case questions with clear, practical reasoning:
1. General Technical Question: Can a use case both include another use case and set it as a precondition?
Absolutely, but you need to ensure logical consistency and avoid unnecessary redundancy.
When you set use case B as a precondition for use case A, you're stating that B must be successfully completed before A can even start. If you also have A include B, you're integrating B's steps directly into A's workflow. While this might seem repetitive on the surface, it can be useful in scenarios where you want to explicitly emphasize B's criticality (via the precondition) while also making A's full workflow self-contained (via inclusion).
Just make sure your use case documentation clearly explains this dual relationship so stakeholders don't get confused—there's no hard rule against it, as long as the logic serves your project's clarity needs.
2. Scenario-Specific Question: How to position the "Obtain Access Permissions" use case in an Item Management System?
Let's ground this in your scenario: the system requires authentication for all actions, with core user goals of gaining legitimate access and creating new items. Naming this use case "Obtain Access Permissions" (instead of "Login") is a smart choice because it focuses on the outcome rather than just the action—and this framing helps clarify its dual role:
It can be both an independent use case AND a precondition for other use cases
Here's why this is the most practical approach:
- As an independent use case: This makes perfect sense because "obtaining access permissions" is a standalone user goal. For example, a user might log in just to verify their account status or confirm they have access to the system, with no intention of performing further actions like adding items. This use case has a clear trigger (user needs to validate their access), step-by-step workflow (submit credentials, system verifies permissions, returns access status), and measurable outcomes (successfully authenticated / authentication failed).
- As a precondition for other use cases: Given the system's rule that unauthenticated users can't use any features, every action-oriented use case (like "Add Item") must have "Successfully obtained access permissions" as a precondition. This explicitly enforces the system's security constraints and ensures that only authorized users can attempt to perform those actions.
- Combining both: This dual positioning aligns perfectly with real-world system design. The independent use case covers the user's goal of gaining access, while the precondition ensures that all subsequent actions adhere to the system's security rules. The name "Obtain Access Permissions" reinforces this: it's not just a login action, but a critical gateway that serves both as a user's end goal and a prerequisite for other functionality.
内容的提问来源于stack exchange,提问作者ghassen lassoued

