When a subtype of FiniteStateMachineTypehaving Statesextends the StateMachine, it is not allowed to add additional States, but instead SubStateMachinescan be added to existing States.

The example in Figure 12shows a very simple StateMachinewith two States.

image014.png

Figure 12– Example of a StateMachine with two States

In Figure 13the StateMachineof Figure 12is extended by adding two substates to "State1".

image015.png

Figure 13– Example of a StateMachine extended with two Substates

In Figure 14the StateMachineof Figure 13is extended by adding two substates to "State2", and an effect on the Transition between "State1" and "State2".

image016.png

Figure 14– Example of a StateMachine extended with another two Substates

In Figure 15the representation of this example as StateMachineTypein the AddressSpaceis given. The “MyStateMachineType” defines the StateMachine of Figure 12, and the “MySubStateMachineType” is a subtype and extends the StateMachinewith a SubStateMachineas defined in Figure 13. The “MySubSubStateMachineType” is another subtype as defined in Figure 14.

The States and Transitions of "MyStateMachineType” are replicated to "MySubStateMachineType" and "MySubSubStateMachineType". Since "Method1” is not overridden, the "Transition1" of all three types is referencing the Method of "MyStateMachineType”. In "MySubStateMachineType”, a SubStateMachine for "State1" was added, and in "MySubSubStateMachineType" a SubStateMachine for "State2". In addition, "MySubSubStateMachineType" adds an effect to "Transition1".

image017.png

Figure 15– Example of a StateMachineType adding SubStateMachines in Subtypes