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!
Final State
A final state represents the last or "final" state of the enclosing composite state. There may be more than one final state at any level signifying that the composite state can end in different ways or conditions. When a final state is reached and there are no other enclosing states it means that the entire state machine has completed its transitions and no more transitions can occur.
Explanation
There may be a number of final states in a statechart diagram. Each composite state can have a number of final states. They represent the condition in which the statechart or state machine (that the diagram represents) can conclude. Diagrams are often drawn with a single final state but it is more common that the state machine can finish in a number of different ways or have a number of discrete outcomes. Naming the final states adds clarity and precision to the diagram. A final state may have a number of incoming transitions that represent different paths that culminate in this state; it cannot however have any outgoing paths.
The initial is related to the final state in the sense that it marks the entry point to a composite state. It is a paired element, with the final state but it is important to remember that there can be one (and only one) initial state at any level of a composite state, whereas there can be many final states at any given level.
A terminate is related to a final state in that a terminate will end the execution within the enclosing region and also end the execution of the entire state machine. A final state signifies that only the execution of the enclosing region of the state machine is complete. In the circumstance that a final state is reached and all other regions of the state machine have finished executing the result will be the same as if a terminate pseudostate had been reached.