I have created a Sequence Diagram that I wish to convert to a Communication/Collaboration Diagram. I understand the conversion and the numbering process but I am wondering since my Sequence diagram have loops that are under the alt fragment, how is their numbering going to be in Communication Diagram?
Here a sample of my Sequence Diagram that have one of those loops:
Edit: What I want to know here is that since the loop is an IF
situation, is it still OK to number those sequences? I don't think it would make logic if user's communication is, 1.0 Enter registered Username and Password
, 2.0 Re-enter registered Username and Password
...2.0 here is the IF loop situation
Communication diagram and sequence diagram represent the same interactions from a different angle. But the simplified graphical representation of the messages implies restrictions in the communication diagram when it comes to combined fragments.
In the communication diagram you can represent:
1
,2
,3
and decimal numbering, e.g.2.1
,2.2
,2.2.1
loop
operator in sequence diagram), using a*
following the number. More specific looping specifications could follow the start between brackets e.g.*[1..n]
or*[element in collection]
. Your loop conditions are unspecified in the sequence diagram, so a*
would do.opt
operator in sequence diagram), using a condition between brackets after the number e.g.[t>10]
In your example, we could therefore imagine: `
Now there are two issues here: first, in your sequence diagram, there is a missing
check validity
in the loop. Second, I showed for simplicity all the messages, but in a communication diagram you would usually not sho return messages, to keep things simpler. So we'd have a slightly simpler model:Advice for the choice between SD and CD: