javi0unavailable
javi0unavailable

Reputation: 59

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.

Upvotes: 3

Views: 3370

Answers (2)

qwerty_so
qwerty_so

Reputation: 36313

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).

Upvotes: 2

Red Beard
Red Beard

Reputation: 3506

Sequence diagrams represent sequence of function calls. Each messages calls functions with their parameters and the values of these parameters. So you can not model the fact that a parameter can have a value or another...

Upvotes: 1

Related Questions