Click or drag to resize
StaMaStateMachineTemplateCreateStateMachine Method
Creates a StateMachine instance from the StateMachineTemplate.

Namespace: StaMa
Assembly: StaMa (in StaMa.dll) Version: 2.3.1.7
Syntax
public StateMachine CreateStateMachine()

Return Value

Type: StateMachine
A new StateMachine instance.
Exceptions
ExceptionCondition
InvalidOperationException A StateMachine instance cannot be created when the StateMachineTemplate is not complete. The Root property is not initialized to a valid Region instance.
Remarks
The StateMachine is a lightweight object composed of very few members. State names and all other runtime meta information are used per reference from the StateMachineTemplate. A StateMachine contains essentially the following data:
  • A reference to a State that is currently the active state for this state machine. In case of orthogonal regions the active state for each orthogonal region is referenced. The active states are accessible through the ActiveStateConfiguration property.
  • A reference to a State for each region to keep the history.
  • A queue that intermediately caches events sent to the state machine during execution of actions.

All further structural information needed e.g. for transition evaluation is taken from the StateMachineTemplate instance.

See Also