Is that correct way to define multiple selection?
When I want to define selections like in menu?
Asked
Active
Viewed 5,527 times
4
-
can I do it this way? – AlmostAI May 01 '19 at 20:07
2 Answers
5
Yes, you can have any number of outgoing flows. But note, that the label of a decision should not be an action and that each outgoing flow should have a guard condition. The common part of all guards may be used as a decision label.

www.admiraalit.nl
- 5,768
- 1
- 17
- 32
-
thanks, and what about quotes around guardes, is it just an optional choice? – AlmostAI May 02 '19 at 16:27
-
1Yes. A guard is a boolean expression, e.g. choice = 'Save'. In this example, the first part is written in the decision symbol. The recommended expression language in UML diagrams is OCL (Object Constraint Language), but I know very little about OCL. – www.admiraalit.nl May 02 '19 at 22:24
-
1I still don't see much progress around in using OCL except in academic circles. Reading it is rather ok, but writing the correct OCL syntax is a pain. Unless you don't have a code generator plain text is more than enough. My 2 cents. – qwerty_so May 03 '19 at 06:28
4
Yes, you can add as many outgoing edges as you need: https://www.uml-diagrams.org/activity-diagrams-controls.html#decision-node

kvitaliy
- 191
- 1
- 2
- 5
-
1You should mention that there need to be guards on each vertex since without it's random where the flow will go. – qwerty_so May 02 '19 at 04:42