StateMachineTemplateTransition Method (String, String, String, Object, StateMachineGuardCallback, StateMachineActionCallback) |
Namespace: StaMa
public void Transition( string name, string sourceState, string[] targetStates, Object triggerEvent, StateMachineGuardCallback guard, StateMachineActionCallback transitionAction )
Exception | Condition |
---|---|
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. |
The source state may only reference a state or state configuration of sub-states of the anchor state.
The target state may reference any state or state configuration within the state machine template.
Usually the source state will be identical with the name of the State defined through the enclosing State(String) call. In some cases it may be useful to define a transition on a higher hierarchical level in order to raise its priority above other transitions that are handled premptive due to their hierarchy level. For such cases the sourceState may reference a State on a hierarchical lower layer than the immediate State parent.