在活动图中使用派生/联接或决策/合并节点来建模用户选择? [英] Use fork/join or decision/merge nodes in an activity diagram for modelling user choices?
问题描述
我试图使用活动图来建模用户与GUI的交互,并遇到了以下问题:在对不同的用户选择进行建模时是使用决策/合并节点还是分叉/联接节点。
例如,用户可以通过单击一个按钮来更改程序的设置,或者通过单击另一个按钮来启动程序。
I was trying to use the activity diagram to model user interactions with a GUI, and came across the following question: whether to use decision/merge nodes or fork/join nodes in modelling different user choices. For example, a user can either change the settings of the program by clicking a button, or launch a process by clicking another button.
在我看来使用决策/合并节点和指向决策节点的控制箭头更为自然,因为无法并行进行选择。但是在这种情况下,其他人似乎更喜欢fork / join节点。图5. [1]中的图5和[2]中的图3(b)。
It seemed to me using decision/merge nodes and a control arrow pointing back to the decision node is more natural, as the choices cannot be taken in parallel. But other people seem to prefer fork/join nodes in such cases, e.g. Figure 5. in [1] and Figure 3(b) in [2].
所以我的问题是:
a)在这里使用fork / join进行用户选择的背后的想法是什么?和
a) what's the idea behind using fork/join for user choices here? and
b),在这种情况下,如果有偏好,哪种组合更广泛地被接受,为什么?
b) which combination is more widely accepted in such cases, if there is a preference, and why?
[1] http://www.ibm.com/developerworks/rational/ library / 4697.html
推荐答案
您通过GUI描述了对用户操作(事件)的反应。在此示例中,最好在活动图中使用事件元素。将活动创建为在GUI层上执行的主要无限过程,并为用户的预期操作添加接受事件操作(Event)。我的意思是,为开始程序设置,启动过程XY等添加事件。
You described reaction on user action (events) by GUI. In this example, it is better to use "Event" element in activity diagram. Create activity as a main infinit process executed on GUI layer and add accept event action (Event) for expected actions from user. I mean, add event for "Start Program Setting" , "Launch Proces XY" etc.
这篇关于在活动图中使用派生/联接或决策/合并节点来建模用户选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!