Skip to content

ResultFlow — Diagram Gallery

All diagram types generated by REslava.Result.Flow, shown on the same PlaceOrder → ValidateUser (Domain) + ProcessPayment (Infrastructure) scenario for easy comparison.


_Diagram — Pipeline flowchart

The base diagram. Every success path, failure branch, async step, and side effect — rendered as a flowchart LR. The method name and output type appear as a native Mermaid title. The chain seed call renders as an amber ENTRY_ROOT node with a thick ==> arrow. v1.47.2: Bind steps use :::bind (thick border); Map steps use :::map (plain); async suffix stripped and appended (no space).

Auto-generated pipeline diagram — full type travel, typed error edges, async markers


_Diagram — Match with typed N-branch fan-out

When Match is called with explicitly-typed lambda parameters (e.g. (ValidationError v) => ...), REslava.Result.Flow emits one typed fail edge per error branch — all converging on the shared FAIL terminal.

Match hexagon with typed N-branch fan-out — one fail edge per error type


_Diagram — Cross-method tracing

With [ResultFlow(MaxDepth = 2)], called methods are expanded inline as subgraph blocks — one diagram spanning multiple classes and layers. The outer ENTRY_ROOT seed node and inner subgraph ENTRY_N arrows both use ==> to mark execution entry points.

Cross-method pipeline tracing — [ResultFlow(MaxDepth = 2)] expands Bind lambdas into named subgraphs


_LayerView — Architecture diagram

Requires [DomainBoundary] on at least one class or method. Groups nodes by architectural layer (flowchart TD) with color-coded subgraphs.

Architecture layer view — Application → Domain → Infrastructure, color-coded subgraphs


_ErrorSurface — Fail-edges only

Same pipeline, but only failure edges are shown — the complete error surface at a glance.

Error surface — fail edges only, all error types at a glance


_ErrorPropagation — Errors grouped by layer

Each error type is shown under the layer subgraph where it originates. Requires [DomainBoundary].

Error propagation by layer — errors grouped under the layer they originate from


_Stats — Pipeline statistics table

A plain Markdown table — no Mermaid block. Counts steps, async steps, error types, layers crossed, and max depth traced.

Property Value
Steps 3
Async steps 1
Possible errors ValidationError, PaymentError
Layers crossed Application → Domain → Infrastructure
Max depth traced 2

Legend — Node type reference (v1.47.3)

One Legend constant is emitted per *_Flows class (not per method). All 9 node types with colors, shapes, and hover tooltip note. The Guard node (Ensure / Filter) shows the guard condition as a hover tooltip in the SVG.

Node type legend — all 9 node types with colors, shapes, and Guard hover tooltip


Auto-generated SVGs

Diagrams are generated by bash scripts/svg.sh (local only — requires mmdc/Puppeteer) and committed as static assets in images/. When a renderer or MethodKindMap changes, re-run svg.sh and commit the updated SVGs. See release-workflow.md §1.5 for the pre-release checklist.