DOT (Graphviz) rendering for Choreo.Workflow orchestration diagrams.
Produces workflow-oriented visualisation:
- Start — green circle (entry point)
- End — red double-circle (terminal)
- Task — 3D boxes (automated steps)
- Decision — diamond (conditional branch)
- Fork — inverted house (parallel split)
- Join — house (parallel merge)
- Compensation — note shape with red dashed border (rollback)
- Event — cloud (trigger / signal)
Edge styles:
- Sequence — solid grey
- Compensation — dashed red
- Retry — dotted orange
- Failure — dashed grey
- Timeout — dashdot
Swimlanes are rendered as subgraph clusters with optional fill colours.
Further reading
Summary
Functions
Renders a workflow to a DOT string.
Functions
@spec to_dot( Choreo.Workflow.t(), keyword() ) :: String.t()
Renders a workflow to a DOT string.
Options
:theme—:default,:dark, or aChoreo.Themestruct
Examples
iex> workflow = Choreo.Workflow.new()
iex> workflow = workflow
...> |> Choreo.Workflow.add_start(:start)
...> |> Choreo.Workflow.add_task(:process)
...> |> Choreo.Workflow.add_end(:end)
...> |> Choreo.Workflow.connect(:start, :process)
...> |> Choreo.Workflow.connect(:process, :end)
iex> dot = Choreo.Workflow.Render.DOT.to_dot(workflow)
iex> String.contains?(dot, "digraph")
true
iex> String.contains?(dot, "process")
true