如何识别从同一激活栏实例化的操作不是同时发生的? (时序图)

How to identify actions instantiated from same activation bar is not happened concurrently? (Sequence digram)

我正在查看类似于附加快照的序列图,对象 A 在同一激活栏上实例化了 3 个动作,并且对象 B 也使用相同的激活栏接收。

所以我可以说这3个函数是一个接一个执行的吗?由于是实心箭头,我不确定我的理解是否正确。

请指教,谢谢

can I say the 3 functions are being executed one after one? Since they are solid arrowhead

箭头表示同步消息,所以第二条消息不能在函数A执行结束前发送,第一条消息不能在函数A执行结束前发送对象A生命线上的函数BExecutionSpecification不能在对象A执行结束前结束=47=]函数C。

object A instantiated 3 actions on same activation bar

所有这三个消息都可以从 对象 A

生命线上的相同 ExecutionSpecification 开始

3 actions ... received by object B with same activation bar

这是无效的,一个ExecutionSpecification代表执行一个且只有一个action/behavior,所以你需要三个ExecutionSpecification on 对象 B 的生命线,你不能只有一个。

有效图表可以是:

或同时显示 returns :

(在 function_b return 时不会立即调用 function_c,在 对象 a 上执行 'something' 在引入延迟之前,以及 'something' 之后)


根据您的评论:

From the requirements saying these 3 functions should be executed by objectB concurrently. That means i should use line arrow head instead of solid arrow head? And can i use the same ExecutionSpecification on objectB if functions are executed concurrently?

如果你使用异步调用(打开箭头)没有return消息,所以object a无法知道执行何时结束,它可以立即发送下一条消息。

3个函数应该由object b同时执行的事实是另外一回事,异步调用可以由接收者顺序执行,而接收者并发执行的事实不暗示异步调用,但是是的,你可以使用异步调用。

您仍然需要在 object b 上使用 3 ExecutionSpecification,以显示并发执行只需使用 combined 片段"par".

例如: