Specification (iteration 2)

Scenarios

A scenario is a sequence of messages sent between an actor and a system in order to perform a use case.

a1s1a2s2s3...

More formally, a scenario is a protocol followed by a sequence of such messages.

Message exchanges can be represented using UML sequence diagrams:

 

Alternate Scenarios

A use case elaboration consists of a main scenario and perhaps several alternate scenarios. An alternate scenario may have a different tail than the main scenario and is triggered by some condition such as an error.

For example, here are some scenarios for the Make Call use case:

connection
busy
no answer
misdial

Extensions

In some cases an alternate scenario might constitute a use case on its own, for example if the alternate scenario is complex or describes an independent coherent function. In this case we say that the alternate use case extends the main use case:

Inclusions

In some cases a subsequence of a use case might constitute a use case on its own, for example if the subsequence is complex or describes an independent coherent function. In this case we say that the main use case includes the subsequence use case. Included use cases are useful if the same subsequence appears in the main scenarios of several use cases:

Specializations

In some cases one use case describes a specialized version of another use case and as a result replaces or modifies one or more scenarios. The difference between F specializes E and G extends E can be subtle. Remember, G is like an alternate scenario triggered by some condition, while F might have a different main scenario than E.

Abstract Use Cases

An abstract use case has no scenarios at all. All of its scenarios must be shown as specializations. This can simplify a use case diagram as the actor associations of the abstract use case are inherited by all of the specializations:

Use Case Diagrams

Word Processor

E-mail Client

Telephone

Calculator