This section of the documentation gives an introduction to some of the main concepts involved with using ignite.js. It concentrates on how to define individual states by using a State Behaviour Object, as well as how to combine states to make a machine by using a State Machine Generator Function.

Index


  • State Machine Generator Function (SMGF)A generator function used to create a state machine.
  • State Behaviour ObjectUsed to describe the behaviour of a single state in a state machine.
    • guardUsed to guard against unwanted transitions into the state.
    • setTAUsed to set the transition arguments used by the state.
    • entryTypically used to start something asynchronous, or to initialise variables or allocate resources required in the state.
    • actionsUsed to register specific event listeners and specify actions to be taken on receipt of the respective events.
    • exitUsed to tidy up after a state, for example releasing resources.
    • plug-insUsed as a convenient and concise way to define states with commonly desired behaviours.

  • State Machine FactoryThe State Machine Factory object is used to both create new instances of state machines and to monitor state machines once they have been created and have started running.
  • RoutingHow to specify the relationship between states once the machine is running.
    • TransitionsMade by the state machine when it moves from one state to another.
    • Events/ActionsUsed to define how a state responds to specific events.

  • Addons