ExecutionContext

An ExecutionContext represents a running finite state machine. In order to execute a step, it maintains a reference to the executor, the current state, and a client-provided memento which will be passed as the sole argument of every action invocation.

To obtain a new execution context, a client should call StateMachine.createExecutionContext on an established FSM.

To execute a step, a client should call handleEvent with an appropriate event.

Author

Mark van Gulik

Todd L Smith

Parameters

State

The state type.

Event

The event type.

GuardKey

The guard key type.

ActionKey

The action key type.

Memento

The memento type.

machine

The state machine to instantiate as an ExecutionContext.

memento

The object which should be passed to all actions.

Properties

Link copied to clipboard

The current state.

Functions

Link copied to clipboard

Handle the specified event.