UML 一个菱形同时作为决策和合并节点
UML a diamond as decision and merge node at the same time
例如,应用程序在 usecase
中的两个不同的不相关位置询问用户密码,并在收到答案后使用相同的算法做出决定。我可以在 Activity diagram
中使用它来显示信息吗:
或者在所有流都到达合并节点之前合并节点不会退出,我必须创建一个 subactivity diagram
并使用 call activity action
?
来自 UML 2.5 规范:
15.7.12 DecisionNode [Class]
A DecisionNode is a ControlNode that chooses between outgoing ActivityEdges for the routing of tokens.
和
15.7.21 MergeNode [Class]
A merge node is a control node that brings together multiple alternate flows. It is not used to synchronize concurrent flows but to accept one among several alternate flows.
所以两者都是不同的元素,只是看起来一样。但是,正如您自己发现的那样,p 上有一个数字。 390:
The functionality of a MergeNode and a DecisionNode can be combined by using the same node symbol, as shown in Figure 15.34. At most one of the incoming flows may be annotated as a decisionInputFlow. This notation maps to a model containing a MergeNode with all the incoming edges shown in the diagram and one outgoing edge to a DecisionNode that has all the outgoing edges shown in the diagram.
例如,应用程序在 usecase
中的两个不同的不相关位置询问用户密码,并在收到答案后使用相同的算法做出决定。我可以在 Activity diagram
中使用它来显示信息吗:
或者在所有流都到达合并节点之前合并节点不会退出,我必须创建一个 subactivity diagram
并使用 call activity action
?
来自 UML 2.5 规范:
15.7.12 DecisionNode [Class]
A DecisionNode is a ControlNode that chooses between outgoing ActivityEdges for the routing of tokens.
和
15.7.21 MergeNode [Class]
A merge node is a control node that brings together multiple alternate flows. It is not used to synchronize concurrent flows but to accept one among several alternate flows.
所以两者都是不同的元素,只是看起来一样。但是,正如您自己发现的那样,p 上有一个数字。 390:
The functionality of a MergeNode and a DecisionNode can be combined by using the same node symbol, as shown in Figure 15.34. At most one of the incoming flows may be annotated as a decisionInputFlow. This notation maps to a model containing a MergeNode with all the incoming edges shown in the diagram and one outgoing edge to a DecisionNode that has all the outgoing edges shown in the diagram.