Previous UML Classes Table of Contents UML Packages Next


15.3.2 FinalState

BehaviorStateMachines


*Generalizations

   • State (from BehaviorStateMachines , ProtocolStateMachines ) on page 571

*Description

   A special kind of state signifying that the enclosing region is completed. If the enclosing region is directly contained in a state machine and all other regions in the state machine also are completed, then it means that the entire state machine is completed.

   Attributes

   No additional attributes

   Associations

   No additional associations

   Constraints

   [1] A final state cannot have any outgoing transitions.

   self.outgoing->size() = 0

Issue 8402 -add OCL

   [2] A final state cannot have regions.

   self.region->size() =0

   [3] A final state cannot reference a submachine.

   self.submachine->isEmpty()

   [4] A final state has no entry behavior.

   self.entry->isEmpty()

   [5] A final state has no exit behavior.

   self.exit->isEmpty()

   [6] A final state has no state (doActivity) behavior.

   self.doActivty->isEmpty()

   Semantics

   When the final state is entered, its containing region is completed, which means that it satisfies the completion condition. The containing state for this region is considered completed when all contained regions are completed. If the region is contained in a state machine and all other regions in the state machine also are completed, the entire state machine terminates, implying the termination of the context object of the state machine.

   Notation

    A final state is shown as a circle surrounding a small solid filled circle (see Figure 15.11). The corresponding completion transition on the enclosing state has as notation an unlabeled transition.


   Figure 15.11 - Final State

   Example

    Figure 15.33 on page 581 has an example of a final state (the right most of the states within the composite state).