4

Is it possible to extend a use case multiple times in a Use-CaseDiagram?

I have 2 Actors with their own 'Show post table' use cases. These 2 cases both have a Create, Edit, delete use-cases.

Can I extend these use-cases for both 'Show post table' use cases? Or should I create 2 use-cases for create, edit and delete, and then extend them each to one of the use cases?

See following picture for a better explanation:

Use Case Diagram:enter image description here

Also, is it correct to include the login use case? (As the red arrows shows)

Christophe
  • 68,716
  • 7
  • 72
  • 138
Yoseph
  • 121
  • 1
  • 5
  • 12
  • 1
    I would not approve of any of the extend or include relations. Try to make your use cases as independent of each other as you can, and use pre- and post-conditions to "glue" them together. – Geert Bellekens May 19 '16 at 05:33

2 Answers2

2

Formally you can do that - if your intention is correct.

Practically people use include and extend for functional analysis during use case synthesis. And that is a wrong use. So the best advice is to keeps hands off both links.

N.B.: Your use cases lists Login. But obviously you are on a business level. And Login is no use case on that level. Rather it is a constraint you want to apply to other use cases. A use case isn't one if it does not add value to its actor. Logout of course the same.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
  • I remember, that I have read somewhere, that it's not correct to extend a use-case several places, but just to 1. Does that make sense to You? Fx. 'Create post' can only be extended one place and not 2 places. – Yoseph May 16 '16 at 22:44
  • 1
    You can extend more than once. But please see my point above. – qwerty_so May 17 '16 at 08:30
1

Yes, that's absolutely correct to extend UC more than once as well as extend more than one UC with the same UC. What is important is to properly define what UC is (end thus find real UCs). Remember that each UC should have a business purpose. What is the purpose of showing the table? Isn't it only a sort of starting/ending point for each of your Use Cases? It'll probably be just a behaviour that will be invoked during UC realization. Yet you can have for example use cases like "Create Client", "Update Client" that both extends "Place Order" (you create client if a new one is ordering and you update it when you just provide a new address for an already existing Client - both at the Order placing).

Ister
  • 5,958
  • 17
  • 26