Figure 8– Example of a StateMachineType with a SubStateMachine using inheritance

Figure 8gives an example of a StateMachineTypehaving a SubStateMachinefor its "State1". For simplicity no effects and causes are shown, as well as type information for the Statesor ModellingRules.

The "MyStateMachineType" contains an Object"MySubMachine" of type "AnotherStateMachineType" representing a SubStateMachine. The "State1" references this Objectwith a HasSubStateMachine Reference, thus it is a SubStateMachineof "State1". Since "MySubMachine" is an Objectof type "AnotherStateMachineType" it has a Variablerepresenting the current State. Since it is used as an InstanceDeclaration, no value is assigned to this Variable.

An Objectof "MyStateMachineType", called "MyStateMachine" has Variablesfor the current State, but also has an Object"MySubMachine" and a Variablerepresenting the current state of the SubStateMachine. Since the SubStateMachineis only used when "MyStateMachine" is in "State1", a client would receive a Bad_StateNotActive StatusCodewhen reading the SubStateMachine CurrentState Variableif "MyStateMachine" is in a different State.