Flexflow.Process behaviour (flexflow v0.1.6) View Source

Process

Link to this section Summary

Callbacks

Invoked when process is started, after events and transitions init, see Flexflow.Api.init/1

Module name

Link to this section Types

Specs

handle_call_return() ::
  {:reply, term(), t()}
  | {:noreply, term()}
  | {:stop, term(), term()}
  | {:stop, term(), term(), t()}

Specs

handle_cast_return() :: {:noreply, t()} | {:stop, term(), t()}
Link to this type

handle_continue_return()

View Source

Specs

handle_continue_return() :: {:noreply, t()} | {:stop, term(), t()}

Specs

handle_info_return() :: {:noreply, t()} | {:stop, term(), t()}

Specs

identity() :: {:event | :transition, Flexflow.key_normalize()}

Specs

result() :: {:ok, t()} | {:error, term()}

Init result

Specs

server_return() :: {:ok | :exist, pid()} | {:error, term()}

Specs

state()

Process state

[:created, :active, :loop, :waiting, :paused]

Specs

t() :: %Flexflow.Process{
  __args__: Flexflow.process_args(),
  __context__: Flexflow.Context.t(),
  __counter__: integer(),
  __graphviz__: keyword(),
  __histories__: [Flexflow.History.t()],
  __identities__: [identity()],
  __loop_counter__: integer(),
  __opts__: keyword(),
  __tasks__: %{required(reference()) => term()},
  events: Flexflow.events(),
  id: Flexflow.id() | nil,
  module: module(),
  name: Flexflow.name() | nil,
  state: state(),
  transitions: Flexflow.transitions()
}

Link to this section Functions

Specs

async(t(), (... -> term()), [term()]) :: t()
Link to this macro

event(key, opts \\ [])

View Source (macro)
Link to this function

handle_call(p, input, from \\ nil)

View Source

Specs

handle_call(t(), term(), GenServer.from() | nil) :: handle_call_return()

Specs

handle_cast(t(), term()) :: handle_cast_return()
Link to this function

handle_continue(p, input)

View Source

Specs

handle_continue(t(), term()) :: handle_continue_return()

Specs

handle_info(t(), term()) :: handle_info_return()

Specs

init(t()) :: result()

Specs

loop(t()) :: result()
Link to this function

new(module, id, args \\ %{})

View Source

Specs

Specs

next(t()) :: result()
Link to this function

start(module, id, args \\ %{})

View Source

Specs

Specs

terminate(t(), term()) :: term()
Link to this macro

transition(key, tuple, opts \\ [])

View Source (macro)

Link to this section Callbacks

Link to this callback

handle_call(t, term, arg3)

View Source (optional)

Specs

handle_call(t(), term(), GenServer.from()) :: handle_call_return()
Link to this callback

handle_cast(t, term)

View Source (optional)

Specs

handle_cast(t(), term()) :: handle_cast_return()
Link to this callback

handle_continue(t, term)

View Source (optional)

Specs

handle_continue(t(), term()) :: handle_continue_return()
Link to this callback

handle_info(t, term)

View Source (optional)

Specs

handle_info(t(), term()) :: handle_info_return()

Specs

init(t()) :: result()

Invoked when process is started, after events and transitions init, see Flexflow.Api.init/1

Specs

name() :: Flexflow.name()

Module name

Link to this callback

terminate(t, term)

View Source (optional)

Specs

terminate(t(), term()) :: term()