问题
i have found some articles on uml sequence diagrams, which mention a reply message would be optionally, but i could not find any hint to confirm this in the 2.2 uml super structure specification. maybe someone who is familiar with that spec could answer the question and give me a hint in which part of the uml superstructure documentation i could find a definitive answer on this question.
thanks a lot in advance.
thomas
回答1:
Sounds like it is in fact optional.
From Pg. 495 (pdf page 511) of the pdf at OMG v 2.2 Superstructure:
If the Message represents a CallAction, there will normally be a reply message from the called Lifeline back to the calling lifeline before the calling Lifeline will proceed.
Here again, they use the text normally hinting that it's not required at all.
回答2:
If the message is synchronous, the expected behavior is that calling process will wait for the reply mesaage. The decision to show it in the diagram may be optional, although diagram would become confusing.
来源:https://stackoverflow.com/questions/1925283/uml-2-0-sequence-diagram-is-a-reply-message-obligatory-when-modeling-a-synchron