I went on an interview last year and was shown a sequence diagram and was asked to describe the the sequence. There were 2 things in the diagram I had never seen before. I asked what one of them was and was told that's how an if statement is shown in a sequence diagram. The other was an arrow going back to the actor that originated the arrow, I assumed that was a loop.
- Is there a standard way to show a conditional sequence?
- How often is a conditional sequence used in UML sequence diagrams?
-
2UML 2.0? ibm.com/developerworks/rational/library/3101.htmlNikki9696– Nikki96962016年03月23日 21:30:43 +00:00Commented Mar 23, 2016 at 21:30
-
4If you start wanting to put conditions in sequence diagrams, your sequence diagrams are probably two complex. Generally, you create a diagram for the "Happy Path" and maybe a couple for common error cases.user53141– user531412016年03月23日 21:51:03 +00:00Commented Mar 23, 2016 at 21:51
1 Answer 1
1.Is there a standard way to show a conditional sequence?
Yes. You can use the If else condition, also called alternatives in UML terms.
2.How often is a conditional sequence used in UML sequence diagrams? Every time there is the need to explain the choice between two or more message sequences.
You can read more about it here