Zicomi Systems Logo Zicomi Site Banner
uml examples  |  home  |  contact us  |  your privacy
Company
Services
Products
Support
Resources
  OMG Standards
OMG Logo
  Have You Heard?
UML Diagrams
Zicomi Systems publishes some UML example diagrams online from the world famous UML dictionary.
more...
Version 2.5 Released
Zicomi Systems is delighted to announce that version 2.5 of Zicomi Mentor is released. With support for UML 2.0 and all thirteen UML diagrams
more...
Zicomi Systems' Director
speaks about the UML at Objects by Design - an informative interview
more...
Partner Programme
Zicom Systems is delighted to announce a new world wide partner programme, become a partner today.
more...
OMG Member
Zicom Systems is made a member of the OMG!
Choice
Choice  
A choice is a pseudostate that acts a decision point. It has a single incoming transition and two or more outgoing transitions one (and only one) of which will fire as a result of the firing of the incoming transition. Each outgoing transition is guarded by a condition, which must evaluate to "TRUE" or "FALSE". A transition will fire if and only if its guard evaluates to "TRUE".

This is alternative content.

Explanation

A decision acts as a junction point that determines which one of a number of possible paths will be followed when the decision is reached and the guards (conditions) on the outgoing paths are evaluated. It is important that at least one of the outgoing paths can fire otherwise the execution will stall. It is also important that one and only one of the guards is true.

Important Points

All outgoing transitions must be guarded. All outgoing transitions from a decision must be guarded to ensure that there is no ambiguity about which one of the transitions will fire.
The guards must be non overlapping. If one guard evaluates to "true", then no other guard can evaluate to true under any conditions. This is tantamount to saying the guards must be non overlapping or mutually exclusive.
There can be one (and only one) incoming transition to a decision. There can be one and only one incoming transition to a decision, but there can be two or more outgoing transitions.
There can be two or more outgoing transitions. A decision has two or more outgoing transitions. These must be guarded and the guard conditions must be mutually exclusive. These restrictions ensure that in all executions of the decision one (and only one) transition will "fire".

Related Entries

Junction
Junction  Used Together,  Paired Element
A junction is related to a choice as a paired element. Both the junction and the choice are pseudostates but whereas the choice has a single incoming transition and two or more outgoing transitions, the junction can have any number of incoming transitions and one (or more) outgoing transitions. It can be used to re-unite transitions that have been split by a choice pseudostate.
Fork (Vertical)
Fork (Vertical)  Confused with
A fork is related to a choice in the sense that both elements have a single incoming transition and a number of outgoing transitions. There are however a number of important differences. Firstly the fork splits an incoming transition into a number of concurrent outgoing transitions which all fire at the same time, whereas with a decision one (and only one) of the outgoing transitions fires. Secondly the outgoing transitions may not normally be guarded (when forks are used in activity diagrams the outgoing transitions can be guarded) whereas the transitions exiting a decision must always be guarded.
N-ary Association
N-ary Association  Graphically Similar,  Confused with
An n-ary association is related to a decision only because it has the same fundamental shape - the diamond with three or more attached lines. Semantically they are not related. The lines in the n-ary associations are associations representing structural relationships, whereas the incoming and outgoing lines (transitions) in a decision signify changes in state. They also appear in different UML diagrams. The n-ary association is used in the same diagrams where binary associations are found, such as class, component and deployment diagrams, whereas the decision is found in state and activity diagrams.

back to the index...
Unified Modeling Language and UML are either registered

trademarks or trademarks of Object Management Group, Inc. in the

United States and/or other countries.