2

Suppose I have a use case with the name "View Items" that shows a list of items to the user. The user may optionally select a specific item to view its details and then back to the list again.

Should "View Item Details" extend "View Items" or they are stand-alone usecases?

Amr Saeed
  • 177
  • 2
  • 12
  • 2
    IMO it should be a single use case, I usually make it as a standalone use case for that situations, it's a common scenario – Gonzalo Jan 18 '18 at 15:12
  • There are various ways and all have pros and cons. This could be as simple as an alternate flow, or it could be two separate use cases or an extension. – muszeo Jan 22 '18 at 07:24

2 Answers2

3

Based on Extending definition here:

Extend is a directed relationship that specifies how and when the behavior defined in usually supplementary (optional) extending use case can be inserted into the behavior defined in the extended use case.

For example (in that reference):

enter image description here

Registration use case is complete and meaningful on its own. It could be extended with optional Get Help On Registration use case.

Meaning that, in Registration Use Case and in it's behavior, we may need to perform Get Help On Registration Use Case too.

It seems only a link, but it is not just a link to Get Help On Registration Use Case (we may need it to perform Registration).

For another example (from this question):
Suppose that we have Answer the Question Use Case and Research the Answer Use Case. To perform Answer the Question Use Case we may need to perform Research the Answer Use Case too. (And also this is not only a link)

enter image description here

For another example:
Suppose that we have Enroll in University and Perform Security Check Use Cases. To perform Enroll in University Use Case we may need to perform Perform Security Check Use Case too.

In Extend:
A behavior extends another if it is in addition to, but not necessarily part of the behavior.

Therefor: In your example to perform View Items Use Case we do not need to perform View Item Details Use Case too. In other word, in the steps of View Items scenario, we do not need to perform (or optionally) View Item Details scenario. They are stand-alone Use Cases.

Gholamali Irani
  • 4,391
  • 6
  • 28
  • 59
2

I simply ask: does it add value? If yes, then just make it a stand alone use case. The use of <<extend>>/<<include>> usually indicates that someone is trying to do functional decomposition. I regard the introduction of these relations as bad move in UML which is likely sprung out of a technicians head than a business person. Added value can not really be sub-divided. Either it is, or is not.

"To add value, that is the question", and "There's something rotten in the state of UML".

qwerty_so
  • 35,448
  • 8
  • 62
  • 86