Reputation: 59
Is there any formal way to signal that a function parameter is optional?
For example, in this image:
I want to inform that the nodes_clicked
parameter could be populated or left empty.
Thanks.
Upvotes: 3
Views: 3370
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
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