Use-case specification of included use-case

2019-06-10 06:08发布

问题:

Does anyone know how to describe (specify) the use-case that includes another usecase in the use-case specification table? For example, I have a use-case "change password" that includes use-case "login" (this is just an example, i know that login should just be in the pre-condition of the use-case) May i specify it like this?


Use-case identity: Change password

Actor: User

Pre-condition: ...

Normal flow:

  1. Do use-case "Login"

  2. ....

  3. ....

  4. ....


What is the proper way to specify the use-case that includes another use-case?

回答1:

It depends on the further rules and conventions used together with the "use-case specification table" document. Consult your company documents for the rules (and some examples).

Overall yes, your approach is valid.

The "Login" use case might be also invoked implicitly if you'd move it to the "Pre-condition: User is logged-in"

Even for free text without any Software Requirements Management tool consider using the "Name and unique-number" referencing best practice

To wrap your head around it I'd recommend (among other Google-able resources) to read the Alistair Cockburn's book "Writing Effective Use Cases", draft version is available online on his site - http://alistair.cockburn.us/get/2465


EDIT: after @BobRodes's challenge to share some alternative methodology

For more serious work consider using a Requirements Management tool, or at least evaluate some tools to adopt the best practices they support/recommend.

For one example see the link below explaining how Sparx Systems Enterprise Architect formalizes work with Use Cases and how Use Case traceability works and how it can generate documentation, UML Activity Diagram etc.

Sparx Systems: Model-Driven Use Case Analysis with Structured Scenarios, Webinar August 2013, 18min video

For another example of managing Use Case traceability and what usually happens after the Use Cases are written see

Jama Software: Jama Recorded Demo, 30min video



回答2:

You might want to look into "use case narrative". In such a narrative, one of the things you will do is list included use cases and extension points. So, add a section called "Includes:" to your narrative, before the normal flow section.

Edit: Here's a bit more from Tom Pender's "The UML Bible":

The features of a use case narrative aren't standardized, but these are common elements in wide use:

  • Use case initiation, or trigger, describes how to start a use case.
  • Assumptions define conditions that must be true before the use case may execute, but are not tested by the use case.
  • Preconditions define conditions that must be true before the use case may execute, and are tested by the use case.
  • The use case dialog explains how the user (whether an actor or another use case) interacts with the system during the execution of the use case.
  • Use case terminations define the different mechanisms that can cause the use case to stop execution.
  • Post conditions define the state of the system that must be true when the use case ends. This helps prevent use cases from leaving
    the system in an unstable condition for other use cases that follow.
  • Minimum guarantees describe what the actors can expect from a use case, no matter what happens during the execution of the use case.
  • Successful guarantees describe what the actors can expect from a use case when it completes successfully.

Although these elements are valuable, they are by no means exclusive. Definitely look into other books and online resources on use cases, and augment the narrative to support your own method of development.

So, perhaps I shouldn't have said that you "will" list included use cases and extension points, instead saying that you "may" do so. I like to put them in, so I don't have to keep referring back to the diagrams to look them up. Of course, you can just mention them in the dialog, too.



回答3:

In UML there is standard relationship named include. Start relationship from including UseCase and end on included UseCase. See UseCase section of UML Superstructure document. UML website



标签: uml use-case