3

I would like to know if we can use 0..* in a UML sequence diagram. Incase if we can , could anyone please explain what does it mean in the perspective of a sequence diagram?

sujith
  • 665
  • 2
  • 9
  • 22

1 Answers1

6

Take a look at the use cases of sequence diagrams from this link. It is stated that:

A sequence diagram shows an interaction, which represents the sequence of messages between instances of classes, components, subsystems, or actors. Time flows down the diagram, and it shows the flow of control from one participant to another. Use sequence diagrams to visualize instances and events, instead of classes and methods. More than one instance of the same type can appear on the diagram. More than one occurrence of the same message can also appear.

One to one, zero to many, one to many etc. are class diagram relationship indicators and you can not use them in sequence diagrams because they are irrevelant. Also, you may want to take a look at this link

SerhatCan
  • 590
  • 1
  • 7
  • 26
  • 1
    To clarify: if you want to show the same message being sent several times, the sequence diagram construct is an interaction fragment of the "iteration" type. Multiplicity on relationships is not used in sequence diagrams. – Uffe Aug 17 '15 at 14:46
  • @Uffe , I did not quite understand . Yes i am actually trying to show that same message can be sent several types in a single interaction. So can the multiplicity be used in sequence diagrams to indicate this or should this not be used ? – sujith Aug 23 '15 at 12:07
  • 2
    No, multiplicity should not be used. Use an "iteration" fragment instead (if it's a loop). Of course you can also simply draw the same messge several times if that's more appropriate. But "0..*" should not be used. – Uffe Aug 23 '15 at 13:53