How to show “if” condition on a sequence diagram?

前端 未结 4 2140
抹茶落季
抹茶落季 2020-11-27 10:04

I was wondering, how can one represent \"if\" statement on a sequence diagram?

if (somethingShouldBeDone) {
       // Do it
} else {
       // D         


        
4条回答
  •  广开言路
    2020-11-27 10:34

    If else condition, also called alternatives in UML terms can indeed be represented in sequence diagrams. Here is a link where you can find some nice resources on the subject http://www.ibm.com/developerworks/rational/library/3101.html

    branching with alt

提交回复
热议问题