Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uml sequence diagram - modelling generic behaviour that is applied to operations

Tags:

uml

I have a sequence diagram where a client makes an initial call to set up a session. After that initial call, every subsequent operation (e.g. call X, call Y, call Z) called on the server is checked to see if the session exists. Is there a way to describe this behaviour generically without having to show it for each and every call? I guess one option is to add a note, but there may be a better way?

session sequence diagram

like image 637
Chris Snow Avatar asked Mar 23 '23 01:03

Chris Snow


1 Answers

Since Sequence diagram is to show a particular execution (Client and Server should be :Client and :Server in the diagram) it is difficult to introduce factorization. You could use an InteractionUse to reuse a sequence fragment but in this case it will not help since you have only one message ("check session").

Don't forget that diagrams are views of the systems and particularly sequence diagrams are view of a particular transaction. You don't have to show everything in the diagram. You need not show the "check session" messages in this diagram and use another one to show that a server always checks the session, maybe with a state diagram.

like image 131
Xaelis Avatar answered Apr 27 '23 08:04

Xaelis