BPXE.Engine.FlowHandler behaviour (bpxe v0.4.0)

Link to this section Summary

Link to this section Callbacks

Link to this callback

commit_state(model, generation, model_id, id, handler_config)

Specs

commit_state(
  model :: term(),
  generation :: term(),
  model_id :: term(),
  id :: term(),
  handler_config :: term()
) :: :ok | {:error, :term}
Link to this callback

restore_state(model, model_id, handler_config)

(optional)

Specs

restore_state(model :: term(), model_id :: term(), handler_config :: term()) ::
  :ok | {:error, :term}
Link to this callback

save_state(model, generation, model_id, id, pid, state, handler_config)

Specs

save_state(
  model :: term(),
  generation :: term(),
  model_id :: term(),
  id :: term(),
  pid :: pid(),
  state :: term(),
  handler_config :: term()
) :: :ok | {:error, :term}