# `Finitomata.Listener`
[🔗](https://github.com/am-kantox/finitomata/blob/v0.41.0/lib/finitomata/listener.ex#L1)

The behaviour to be implemented and passed to `use Finitomata` to receive
  all the state transitions notifications.

# `after_fork_failure`
*since 0.41.0* *optional* 

```elixir
@callback after_fork_failure(
  id :: Finitomata.fsm_name(),
  state :: Finitomata.Transition.state(),
  error :: any()
) :: :ok
```

To be called when a `c:Finitomata.on_fork/2` resolution fails.

Optional callback; implement it to be notified when the FSM reaches a fork state but the
  fork cannot be resolved (an unknown/ambiguous/missing fork target, a bad return, or a
  raise). `state` is the fork state and `error` is the resolution failure reason.

# `after_transition`

```elixir
@callback after_transition(
  id :: Finitomata.fsm_name(),
  state :: Finitomata.Transition.state(),
  payload :: Finitomata.State.payload()
) :: :ok
```

To be called after a successful transition

---

*Consult [api-reference.md](api-reference.md) for complete listing*
