UML序列图中有两个激活而不是一个的情况是否正确?

huangapple go评论60阅读模式
英文:

Is the UML sequence diagram with two activations instead of one correct?

问题

以下序列图由Sparx Enterprise Architect渲染。新激活(蓝色)的开始是否正确?它不应该继续在Object2上的现有激活上吗?

请注意,流程是以异步(红色)调用开始的。

如果图表是正确的,为什么在下面的情况中(几乎相同),新的激活没有启动?

UML序列图中有两个激活而不是一个的情况是否正确?

UML序列图中有两个激活而不是一个的情况是否正确?

英文:

The following sequence diagram is rendered by Sparx Enterprise Architect. Is the start of the new activation (blue) correct? Shouldn't it rather continue with the existing activation on the Object2?

Please note that the flow starts with the asynchronous (red) call.

UML序列图中有两个激活而不是一个的情况是否正确?

If the diagram is correct, why the new activation is not started in the following (almost identical) case?

UML序列图中有两个激活而不是一个的情况是否正确?

答案1

得分: 2

UML leaves you full flexibility about the execution specifications. So it is indeed a choice whether the blue message is in a separate activation or within the same activation.

UML让您在执行规范方面具有完全的灵活性。因此,将蓝色消息放在单独的激活中还是在同一个激活中,确实是一个选择。

EA makes tries to make an educated guess. It is not clear to me why in the second case it continues and in the first not, but it may be related to some heuristics.

EA试图做出合理的猜测。我不清楚为什么在第二种情况下它继续,而在第一种情况下不继续,但这可能与某些启发式方法有关。

Regardless of what EA proposes, you can however override it, by right clicking on the relevant message to get the contextual menu. You may then chose Extend Source Activation Down to make the previous activation continue.

无论EA提出什么建议,您都可以通过右键单击相关消息以获得上下文菜单来覆盖它。然后,您可以选择Extend Source Activation Down来使前一个激活继续。

英文:

UML leaves you full flexibility about the execution specifications. So it is indeed a choice whether the blue message is in a separate activation or within the same activation.

EA makes tries to make an educated guess. It is not clear to me why in the second case it continues and in the first not, but it may be related to some heuristics.

Regardless of what EA proposes, you can however override it, by right clicking on the relevant message to get the contextual menu. You may then chose Extend Source Activation Down to make the previous activation continue.

huangapple
  • 本文由 发表于 2023年5月22日 21:21:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/76306648.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定