0

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.

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].

So my questions are:

a) what's the idea behind using fork/join for user choices here? and

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

[2] http://twiki.di.uniroma1.it/pub/Lab_sis_int/PaperEAltroMaterialeDiApprofondimento/PinheirodaSilva_IMKB_2000.pdf

MYP
  • 195
  • 2
  • 10
  • your question seems like [not on-topic](http://stackoverflow.com/help/dont-ask) for this site. No code. No clear answer possible just opinions. Perhaps it should be moved to http://cs.stackexchange.com/. For rationale behind activity diagrams refer to **Conrad Bock's series - UML 2.0 Activities and Actions** referenced from here: http://stackoverflow.com/a/23301076/2626313 and those many articles available from [Conrad Bock's website](http://www.conradbock.org/) – xmojmr Jul 09 '14 at 09:00
  • answer of which one is better (widely accepted) is: it depends. Diagram readability is one of the selection factors. Check this video for an example how you can model decisions made by the user through the GUI - http://www.sparxsystems.com/resources/demos/simulation_prototyping/simulation-prototype.htm – xmojmr Jul 09 '14 at 09:57

1 Answers1

0

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.

Vladimir
  • 2,066
  • 15
  • 13