Table of Contents

Class WorkflowHistoryVisualizationExtensions

Namespace
JD.AI.Workflows.History
Assembly
JD.AI.Workflows.dll

Extension methods for rendering WorkflowHistoryGraph as Mermaid diagrams.

public static class WorkflowHistoryVisualizationExtensions
Inheritance
WorkflowHistoryVisualizationExtensions
Inherited Members

Methods

ToMermaid(WorkflowHistoryGraph, int, long)

Renders the full history graph as a Mermaid graph TD diagram. Nodes are deduplicated by fingerprint. Edge labels show weight. Node color: green for success rate >= 90%, yellow for 50-90%, red for < 50%.

public static string ToMermaid(this WorkflowHistoryGraph graph, int maxNodes = 50, long minEdgeWeight = 1)

Parameters

graph WorkflowHistoryGraph

The graph to render.

maxNodes int

Maximum number of nodes to include; trims to top-N by execution count.

minEdgeWeight long

Minimum edge weight required to include an edge.

Returns

string

ToMermaid(WorkflowHistoryGraph, string, int)

Renders a subgraph rooted at the given fingerprint using BFS up to maxDepth levels.

public static string ToMermaid(this WorkflowHistoryGraph graph, string rootFingerprint, int maxDepth = 5)

Parameters

graph WorkflowHistoryGraph

The graph to render.

rootFingerprint string

The fingerprint of the root node.

maxDepth int

Maximum BFS depth from the root.

Returns

string