ash_state_machine/lib/builtin_changes/builtin_changes.ex

18 lines
478 B
Elixir
Raw Normal View History

defmodule AshStateMachine.BuiltinChanges do
2023-04-22 07:25:39 +12:00
@moduledoc """
Changes for working with AshStateMachine resources.
2023-04-22 07:25:39 +12:00
"""
@doc """
Changes the state to the target state, validating the transition
"""
def transition_state(target) do
{AshStateMachine.BuiltinChanges.TransitionState, target: target}
2023-04-22 07:25:39 +12:00
end
@doc """
Try and transition to the next state. Must be only one possible next state.
"""
def next_state, do: AshStateMachine.BuiltinChanges.NextState
2023-04-22 07:25:39 +12:00
end