在活动图中,是否允许有两个启动事件?
我想对一个活动进行建模,其中可以有两个启动事件。这些事件有两个几位负责人。是否允许 UML 活动图可以有两个起始事件并且只有一个结束?可以加入动作流吗? 我想知道我这样做是否违反了 UML 建模原则。
如果能给我一些提示,那就太好了。
问候, 马丁
I want to model an activity, where there can be two several initiating events. These events has two several responsible actors. Is it allowed that a UML activity-diagram could have two initiating events and only one end? Could the action-flow be joined?
I want to know if I defy against the UML-modeling principles, if I do this.
Would be nice, if there are some hints for me.
Greetings,
Martin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
UML 2.3 上层结构规范 (p389) 说:
An活动可能有多个初始节点。
并且
如果一个活动有多个初始节点,则调用该活动会启动多个流,每个初始节点一个。
因此根据 UML说明你没有违反规则。
也就是说,@Dave 是有钱的——最重要的是你的模型对你和那些会使用它的人来说是有意义的。 UML 规范充满了不一致和模糊性,以至于“合规”的含义值得怀疑。
只要您和该模型的所有用户对其所表示的内容有共同的理解,就不要沉迷于 UML 的伪语义。
(当然,这假设您使用模型作为通信图片,而不是作为将被解释/编译为代码的正式规范。如果是这样,您需要形式化您自己的语义以了解其含义)。
The UML 2.3 superstructure specification (p389) says:
An activity may have more than one initial node.
and
If an activity has more than one initial node, then invoking the activity starts multiple flows, one at each initial node.
So according to the UML spec you're not violating the rules.
That said, @Dave is on the money - the most important thing is your model makes sense to you and those who will consume it. The UML specification is so riddled with inconsistency and ambiguity that it's questionable what 'being compliant' even means.
So long as you and all users of the model have a common understanding of what it's representing then don't get hung up on the UML's pseudo-semantics.
(Of course, this assumes you're using the model as a picture for communication, not as a formal specification that will be interpreted/compiled to code. If so, you'll need to formalise your own semantics for what it means).