Search code examples
umlnotationsequence-diagram

Optional function parameter indication in UML Sequence Diagram


Is there any formal way to signal that a function parameter is optional?

For example, in this image:in this image

I want to inform that the nodes_clicked parameter could be populated or left empty.

Thanks.


Solution

  • Optional parameters are nothing handled in UML as it's jus "syntactic sugar" compilers implement to make coders happy. You can mimic that in a SD with a note attached to the message. However, I just would not go to that detail and leave it to the coder (they aren't children you have to tell each single step to take).