Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UML state diagram: What is the difference between a choice and a junction?

In an UML state diagram, branches in the process flow can be modeled using choice elements (represented by a diamond-shaped symbol) with conditions on the outgoing transitions (see example).

On the other hand, junction elements (represented by a filled circle) can be used to merge several incoming transitions and/or split the process flow into several outgoing transitions, which may also have conditions (see example).

So is a junction really a generalisation of a choice? Is there a situation in which you must use a choice and could not use a junction?

like image 880
Gerd Avatar asked Oct 23 '25 15:10

Gerd


1 Answers

According to UML 2.5.1 specification, section 14.2.3.7, the difference between junction or choice outgoing transition's is when their associated guard is evaluated.

If the outgoing guards evaluation might change according during behavior evaluation, you must use choice pseudostate. If the outgoing guards evaluation will never change, you can of course use both but junction could be more clear.

Hoping it helps, RedBeard

like image 146
Red Beard Avatar answered Oct 27 '25 01:10

Red Beard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!