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!
Option (Combined Fragment)
An option interaction operator (signified by the value of opt) defines a combined fragment where there is a choice between a single defined set of traces occurring or no traces. It is semantically equivalent to an alternatives operator (alt) where there is a single choice between a set of traces and an empty alternative.
Explanation
The option operator is used to define a set of traces that occur in a certain situation. There is a condition that is checked first and if this condition (guard) is TRUE the traces enclosed in the fragment will execute. In the case that the condition (guard) is FALSE nothing occurs. This has the same meaning as an alternatives (alt) operator where there are two options one of which is empty. It can be considered shorthand for the alternatives operator as described above. At a programming level this could be represented by the conditional statement: if <condition> then <action> endif.
A combined fragment with an operator of alternatives (alt) is related to a combined fragment with an operator of option (opt) because the alternatives can express a number of different possibilities all of which have mutually exclusive guards, whereas the option can only have one operand (set of traces).