Prints or writes a diagram of each AshWorkflow resource.
With resource names, draws those resources. With none, draws every resource
that uses AshWorkflow in the domains this project lists under
:ash_domains.
Without --output, prints each diagram. With several resources, the
diagrams follow one another, and --format json prints one JSON document
per line. With --output DIR, writes one file per resource, named after
it, such as MyApp.Candidate.mmd. The task draws every diagram first, so
an error prints or writes nothing.
In an umbrella project, run from the root, the task reads :ash_domains
from every child application.
Options
--format— a name fromAshWorkflow.Charts.formats/0. Defaults tomermaid.--output— the directory to write the files to.--svg— with--format dot, print the chart as SVG, or write it to.svgfiles. Graphviz must be installed: seeAshWorkflow.Charts.Dot.--theme— with--format dot,lightordark. Defaults to the:themeunderconfig :ash_workflow, :dot, elselight. A dark chart goes to a file such asMyApp.Candidate-dark.svg, so a light run and a dark run can write to the same directory.--no-undo— leave out undo edges.--no-notes— leave out step notes: policies, retry, timeouts that run an action, andeveryentries.
See AshWorkflow.Charts for what each format shows.
Example
mix ash_workflow.diagram MyApp.Candidate
mix ash_workflow.diagram --format json --output priv/diagrams
mix ash_workflow.diagram --format dot --svg --theme dark MyApp.Candidate