2

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.

  1. Is there a standard way to show a conditional sequence?
  2. How often is a conditional sequence used in UML sequence diagrams?
asked Mar 23, 2016 at 21:22
2
  • 2
    UML 2.0? ibm.com/developerworks/rational/library/3101.html Commented Mar 23, 2016 at 21:30
  • 4
    If 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. Commented Mar 23, 2016 at 21:51

1 Answer 1

2

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

answered Mar 24, 2016 at 18:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.