Runic.Workflow.Serializers.Mermaid (Runic v0.1.0-alpha.7)

Copy Markdown View Source

Serializes Runic Workflows to Mermaid diagram format.

Supports two diagram types:

  • Flowchart: Shows static workflow structure with components as subgraphs
  • Sequence: Shows causal reactions between facts and steps

Examples

# Generate flowchart of workflow structure
mermaid = Runic.Workflow.Serializers.Mermaid.serialize(workflow)

# Generate sequence diagram of causal reactions
mermaid = Runic.Workflow.Serializers.Mermaid.serialize_causal(workflow)

# With options
mermaid = Runic.Workflow.Serializers.Mermaid.serialize(workflow,
  direction: :LR,
  include_memory: false,
  title: "My Workflow"
)

Summary

Functions

Generates a sequence diagram showing causal reactions.

Functions

serialize_causal(workflow, opts \\ [])

Generates a sequence diagram showing causal reactions.

Shows how facts flow through top-level components (or standalone nodes). Each column represents a top-level component with sub-component details. Edges show facts traveling across nodes with cycle information. Originating input facts (no ancestry) are displayed with their raw values.