View Source Toolbox.Workflow.Transition (toolbox v5.3.5)

Struct defining a single transition, i.e., a change from one status to another.

The struct should be built only via Toolbox.Workflow.add_transition/2. You can then access this struct in all the workflow callbacks such as when or then.

Summary

Types

@type builtin_when_fn_def() ::
  {:=, [String.t()], term()}
  | {:<, [String.t()], term()}
  | {:>, [String.t()], term()}
  | {:<=, [String.t()], term()}
  | {:>=, [String.t()], term()}
  | {:contains, [String.t()], term()}
  | {:is_in, [String.t()], term()}
@type side_effects_fn_def() :: {atom(), atom()}
@type t() :: %Toolbox.Workflow.Transition{
  attributes: %{required(atom()) => term()},
  from: Toolbox.Workflow.status(),
  side_effects_fn: [side_effects_fn_def()],
  then_fn: [then_fn_def()],
  timeout: integer(),
  timeout?: boolean(),
  to: Toolbox.Workflow.status(),
  update_history_entry_fn: [update_history_entry_fn_def()],
  update_possible_transition_fn: [update_possible_transition_fn_def()],
  when_fn: [when_fn_def()]
}
@type then_fn_def() :: {atom(), atom()}
Link to this type

update_history_entry_fn_def()

View Source
@type update_history_entry_fn_def() :: {atom(), atom()}
Link to this type

update_possible_transition_fn_def()

View Source
@type update_possible_transition_fn_def() :: {atom(), atom()}
@type when_fn_def() ::
  {atom(), atom()} | {:timeout, integer()} | builtin_when_fn_def()