UML 序列图消息分支

UML Sequence Diagram Message Branching

有人在序列图中使用过消息分支吗?有谁知道这个是专门做什么用的吗?

据我所知,它用于显示多个收件人收到的单个消息

我刚刚看到它用于显示并发性,但我认为这是不正确的,应该用 "par" 片段或在共同区域内描述。

想法和意见?

UML 2+

据我所知,UML 2+ 中的序列图中没有消息分支之类的东西(但请参阅结尾)。

首先,Message 是一对 sendEventreceiveEvent,其中 sendEvent(对于 foundMessage)和 receiveEvent( for lostMessage) 可以是可选的,但不能有多个 senders/receivers.

如果有的话,您的图表将是两个不同的消息发送,因为如果您有两个接收者,那么每个接收者都会呈现不同的 receiveEvent(因此是唯一的 Message)。

此外,您使用的符号很奇怪,因为[强调我的]

In an interaction diagram each vertical line describes the time-line for a process, where time increases down the page. The distance between two events on a time-line does not represent any literal measurement of time, only that non-zero time has passed.

所以非水平线表示非零时间间隔,规范中没有提到这种弯曲线。

UML 1.3 (<2)

我在 UML 1.3 (http://doc.omg.org/formal/2000-03-01.pdf)

中发现了消息分支

Variation: Branching

A branch is shown by multiple arrows leaving a single point, each labeled by a guard condition. Depending on whether the guard conditions are mutually exclusive, the construct may represent conditionality or concurrency.

但是 UML 1.3 没有明确定义的元模型。

总结

据我所知,从 UML 2 开始,消息分支已从规范中删除。但是,它可以由两个具有明确定义 Ordering 的单独消息或使用 par 片段,如果它是平行的(这不是一回事)。