views:

72

answers:

3

If a use case is performed by 2 different users and the flow of activities changes according to this role, should be specified in 2 different sequence diagram one per role?

A: 

two different type of users and different activities means two separate diagrams. Even if the activities are not different, still it will be better to use two separate diagrams most of the times in case the two users aren't forming a group.

Sander Pham
The prupose of the activity is the same, but there are some steps that wont happened if the user has a specific role. Should this be assumed like an alternative path? Or a different diagram?
Milena
+1  A: 

You have more choices. First of all, the question would be if you have different primary actors in that use case. If not, I guess one use case will be sufficient. If you have different actors, but the use case scenario is very similar in both cases and differs in small behaviour or artefact flowing through the use case, you can parametrize it, or if the difference is isolated, you can create an extension point. Keep in mind, that resulting use cases and extension points have to make sense in the first place, these mechanism are not just for reusability purposes. Once you have different use cases, you need separate sequence diagrams. For a parametrized use case, you can create parametrized sequence diagram. Extension points are representing in sequence diagrams by call to other behaviour, which means separate diagram.

Gabriel Ščerbák
+1  A: 

Remember that a sequence diagram represents a possible interaction scenario with the system to perform a given functionality. Therefore, if the way the two roles interact with the system is different then I´d recommend using two different sequence diagrams.

If the difference is small, you can have one sequence diagram with an alternative subsection (this possibility is allowed in the standard, check the standard document for the "alt" notation if you want to see an example)

Jordi Cabot