1

I am very new to the concept of use case diagrams and I am a little confused, I have a use case diagram "Monthly Report Archiving" and I want to ask if the use of << include >> of a case must pass login? and Is the use case that I made correct?

so in my case right now it's about "Monthly Report Archiving". The flow is: public relations receives a proposal from the community, then the proposal data will be stored by the community relations into the system to be later seen by Division X and agreed upon whether the proposal will be accepted or rejected. Division X can then see information about the proposal and then division X can choose whether the proposal will be accepted or rejected, if accepted, the proposal will be archived. Division X then makes a monthly report from the archived proposal to be given to the manager. Every month managers can see reports that have been made by division X.

this image 1

image1

and this image 2 every case must include login. image2

So which one is better? Picture 1 or picture 2?

AdityaDees
  • 1,022
  • 18
  • 39
  • Not a duplicate, but related : https://stackoverflow.com/questions/1696927/whats-is-the-difference-between-include-and-extend-in-use-case-diagram. In your case, note that the include annotation does not pertain to login even in that specific set of diagrams. Whether your diagrams are correct is arguably not on topic for SO, but a use case can be written out as a text specification, it need not be a diagram. So write out your use case as a specification and see if it makes sense, then change diagram as needed. – paisanco Dec 23 '18 at 21:38
  • So I don't need to include login for every case? – AdityaDees Dec 23 '18 at 21:42
  • Does the use case requirement call for a login for each use case or not? That's specific to the use case, not a general UML requirement. – paisanco Dec 23 '18 at 21:44
  • Yes you must login for do that. – AdityaDees Dec 23 '18 at 21:50

1 Answers1

8

Login is no use case since it does not have any added value. This is just a simple constraint. You could attach it in a note reading { <actor> must be logged on } and stereotype it <<invariant>>. Or attach it to the actor and describe it { must be logged on for any use case }.

And by the way: don't try any functional decomposition. Use cases show the added value a system brings to its actors. Nothing else, please. Also, use <verb> <substantive> to describe a single use case.

As a rule of thumb: if your UC diagrams start resembling a spider's web, your design is broken.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
  • So which one should I use? Image 1 or image 2. I have searched in several sources and most people use the first picture. In fact on my system, everyone is required to login before using the system. – AdityaDees Dec 24 '18 at 11:42
  • @bruno `user logs in` is a use case, but it's not a _user goal level_ use case which I assume to be expected on the diagram. Same for `password verification` and `Display an error message` (which aren't proper use case names). – Vlad Jan 02 '19 at 12:22
  • @vlad I doubt those are UCs. They are just activities (in a UC). It's a common mistake to take activities as UCs. – qwerty_so Jan 02 '19 at 12:58