UML 活动图:决策分支结束整个活动
我想知道是否有一种方法可以在有决定的活动上描述这一点;其中一个分支完全随着活动而终止。这类似于当满足条件时仅将控制权返回给调用者的子例程。
sub activity() {
...
...
if ( condition ) {
...
} else {
return;//This branch finishes the activity
}
...
}
谢谢,
卡洛斯
I was wondering if there is a way to depict that, on an activity that has a decision; one of the branches completely terminates with the activity. This would be similar to a subroutine just returning control to the invoker when a condition is met.
sub activity() {
...
...
if ( condition ) {
...
} else {
return;//This branch finishes the activity
}
...
}
Thanks,
Carlos
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下代码如下图所示。
请注意,在这种情况下,D2:False 在图表和代码中都没有任何作用。我只是想说明导致活动结束的要点。 (注:“0”是活动结束,“o”是开始)
The following code would look like the diagram below it.
Note, that in this case, D2:False goes nowhere, in both the diagram and the code. I was just trying to illustrate the points that lead to the end of the activity. (note: the '0' is the end of the activity and the 'o' is the start)