Search documentation of Finitomata

# View Source Finitomata.State (Finitomata v0.22.1)

Carries the state of the FSM.

# Summary

## Types

last_error()

The map that holds last error which happened on transition (at given state and event).

payload()

The payload that has been passed to the FSM instance on startup

t()

The internal representation of the FSM state

## Functions

excerpt(state, payload? \\ true)

Exposes the short excerpt from state of FSM which is log-friendly

# Types

Link to this type

# last_error()

View Source

    @type last_error() ::
      %{
        state: Finitomata.Transition.state(),
        event: Finitomata.Transition.event(),
        error: any()
      }
      | nil

The map that holds last error which happened on transition (at given state and event).

Link to this type

# payload()

View Source

    @type payload() :: any()

The payload that has been passed to the FSM instance on startup

Link to this type

# t()

View Source

    @type t() :: %Finitomata.State{
      name: Finitomata.fsm_name(),
      lifecycle: :loaded | :created | :unknown,
      persistency: nil | module(),
      listener: nil | module(),
      current: Finitomata.Transition.state(),
      payload: payload(),
      timer: non_neg_integer(),
      history: [Finitomata.Transition.state()],
      last_error: last_error()
    }

The internal representation of the FSM state

# Functions

Link to this function

# excerpt(state, payload? \\ true)

View Source

Exposes the short excerpt from state of FSM which is log-friendly