Click or drag to resize
StaMaStateMachineTemplateTransition Method (String, String, String, Object)

Namespace: StaMa
Assembly: StaMa (in StaMa.dll) Version: 2.3.1.7
Syntax
public void Transition(
	string name,
	string sourceState,
	string targetState,
	Object triggerEvent
)

Parameters

name
Type: SystemString
The name of the Transition to identify the Transition for debugging and tracing purposes. Must be unique within the StateMachineTemplate.
sourceState
Type: SystemString
The name of a State instance that defines the Transition source-State.
targetState
Type: SystemString
The name of a State instance that defines the Transition target-State.
triggerEvent
Type: SystemObject
A Object that represents the trigger event that will execute the transition or null to indicate an "any" transition. See also SendTriggerEvent(Object).
Exceptions
ExceptionCondition
ArgumentNullException The name is null or empty.
ArgumentOutOfRangeException The name is not a valid identifier for a Transition: The identifier of a Transition must start with a character followed by nonspace characters or digits.
ArgumentOutOfRangeException The name is not a unique: A Transition with the same name already exists within the StateMachineTemplate instance.
StateMachineException A syntax error was detected with this or the preceeding Region, EndRegion, State, EndState or Transition statements.
Remarks

The sourceState may only reference a State that is a sub-State of the anchor-State.

The targetState may reference any State within this StateMachineTemplate.

Usually the sourceState will be identical with the name of the State defined through the enclosing StateMachineTemplate.State Overload ... EndState statements.

In some cases it may be useful to define a Transition on a higher hierarchical level in order to raise the Transition's priority above other transitions that would otherwise be handled premptive due to their hierarchy level. For such cases the sourceState will reference a State that is hierachically nested within the immediate enclosing StateMachineTemplate.State Overload ... EndState statement pair.

See Also