Search code examples
umlterminologyuse-caserequirementsscenarios

Use case instance and Scenario


In the literature, a scenario has sometimes been defined as an instance of a use case.
Do you see any problem with defining a scenario as an “instance of the use case”?
Please, help me!


Solution

  • The scenarios are not use-case instances and you do not need to reinvent terms:

    • The UML specification define use-cases and use-case instances:

      A UseCase is a specification of behavior. An instance of a UseCase refers to an occurrence of the emergent behavior that conforms to the corresponding UseCase.

    • The UML standard does not define the scenario. But scenario is a common term in use-case literature, and refer to a general sequence of events. Mainstream use-case document templates rely heavily on scenarios (e.g. "Main scenario" and "alternative scenario" for variants, error processing or exceptions).

    Usual ATM example:

    • Withdraw cash would be a use-case

    • Ms. Smith withdraws cash on October 27 2021 at 9:23AM at the ATM #23782 of Bank Y for an amount of 50€ would be an instance of the use-case, i.e. a specific occurence at a given moment in time with a specific user.

    • Following general scenarios could be envisaged for the use-case: use of a bank card to be inserted in the ATM, use of a contactless card, or ATM swallows the card because of wrong codes.

    • The instance may correspond to one of those scenarios. But a same scenario could happen in many instances.