View Source AshStateMachine (ash_state_machine v0.1.2)

Dsl documentation for AshStateMachine

dsl-documentation

DSL Documentation

index

Index

docs

Docs

state_machine

state_machine


  • :deprecated_states (list of atom/0) - A list of states that have been deprecated. The list of states is derived from the transitions normally. Use this option to express that certain types should still be included even though no transitions go to/from that state anymore. The default value is [].

  • :state_attribute (atom/0) - The attribute to store the state in. The default value is :state.

  • :initial_states (list of atom/0) - Required. The allowed starting states of this state machine.

  • :default_initial_state (atom/0) - The default initial state

transitions

transitions


transition

  • :action (atom/0) - The corresponding action that is invoked for the transition. Use :* to allow any update action to perform this transition.

  • :from - Required. The states in which this action may be called. If not specified, then any state is accepted.

  • :to - Required. The states that this action may move to. If not specified, then any state is accepted.

Link to this section Summary

Link to this section Functions

Link to this function

transition_state(changeset, target)

View Source