如何在序列图中表示在循环中进行的调用? [英] How to represent a call being made in a loop in a sequence diagram?
问题描述
我正在创建一个序列图,其中一个类正在被另一个类观察.被观察的类在循环中每 5 秒调用一次观察者中的更新.我需要在序列图中显示这一点.有没有办法显示它按原样无限循环?
或者在序列图的上下文中没有意义;我不应该包括它吗?或者我应该将它包含在不同类型的图表中?
您可以使用包含消息发送箭头的框(以及同一重复结构中的其他任何内容).
请参阅 (存档)
I'm creating a sequence diagram, and one of the classes is being observed by another class. The observed class is calling update in the observer every 5 seconds in a loop. I need to show this in the sequence diagram. Is there a way to show it looping indefinitely out of sequence as it were?
Or does it not make sense in the context of a sequence diagram; should I not include it? Or should I include it in a different type of diagram?
You can use a box enclosing the message send arrow (and whatever else is inside the same repetitive construct).
See this tutorial for an example.
link to larger image (archived)
这篇关于如何在序列图中表示在循环中进行的调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!