TLX.Extractor.AshStateMachine (TLX v0.5.2)

Copy Markdown

Extracts state machine structure from Ash resources using AshStateMachine.

Uses the AshStateMachine.Info introspection API to read states, transitions, and initial states from a compiled resource module. No AST walking required — the DSL is fully declarative.

Usage

{:ok, result} = TLX.Extractor.AshStateMachine.extract_from_module(MyApp.Order)

result.states       #=> [:pending, :started, :complete]
result.initial      #=> :pending
result.transitions  #=> [%{event: :begin, from: :pending, to: :started, ...}]

Requires ash_state_machine to be available. Returns an error if not.

Summary

Functions

Extract state machine structure from a compiled Ash resource with AshStateMachine.

Functions

extract_from_module(module)

Extract state machine structure from a compiled Ash resource with AshStateMachine.