When a subtype of FiniteStateMachineType having States extends the StateMachine, it is not allowed to add additional States, but instead SubStateMachines can be added to existing States.

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

image014.png

Figure 12 – Example of a StateMachine with two States

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

image015.png

Figure 13 – Example of a StateMachine extended with two Substates

In Figure 14 the StateMachine of Figure 13 is 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 15 the representation of this example as StateMachineType in the AddressSpace is given. The “MyStateMachineType” defines the StateMachine of Figure 12, and the “MySubStateMachineType” is a subtype and extends the StateMachine with a SubStateMachine as 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