Skip to content

Workflow ​

The Workflow screen answers one operator question: "Where does this message, event, or saga fit in the system?" You give it a type name; it traces that type across every monitored service and draws the result as a diagram. It works for any messaging application, not just event-sourced ones.

Reach it from the Explore → Workflow sidebar item (/workflow).

One model ​

CritterWatch assembles a single workflow model on the server by unioning three sources:

  • inferred — the static structure read from your code's signatures (handlers → emitted/cascaded messages → projections),
  • observed — the causation and event-append edges actually seen at runtime,
  • confirmed — edges present in both.

That model is drawn as the Flow Graph: the workflow laid out left-to-right on an interactive graph substrate, with per-service compound nodes, hover path-highlighting, expand/collapse, and a minimap.

The Event Model is its own screen now. It was a second view mode here, and it was never a second rendering of this model: it draws a service's assembled Event Model, a merge of what the service declares and what CritterWatch has watched it do, and it needs no traced subject. See Event Modeling. /workflow?mode=lanes redirects there and keeps its type=.

Mermaid is now an export format, not a view. The Flow Graph's toolbar offers Copy as Mermaid (plus SVG / PNG), and the C# projector still serves Mermaid text to the MCP tools and CLI. The old primary "Sequence" view mode was retired once the Flow Graph substrate landed.

Tracing a type ​

The scope bar drives everything, together with the global service selector in the header:

  • Service — the header's global service selector, "All Services" by default. This is a display scope (the trace itself is always fleet-wide); narrowing it emphasises one service's nodes and decides which service's trace provider the per-instance lookup queries.
  • Subject input — a message, event, or saga type (short name or fully-qualified). It autocompletes from the fleet's known message and saga state types, each suggestion naming the service that owns it, and its placeholder example is taken from your own fleet. Pick a suggestion, press Enter, or click Trace.
  • Depth stepper (1–10) — how far the cascade expands. When the model is capped you'll see a "Truncated at depth N — increase depth to expand the cascade" note.

Before anything is traced, the screen offers Subjects in this fleet — chips for real types that trace on click — and a Browse the full message catalog → link. A subject that matches no known type is caught before the trace, with a Did you mean …? link to the closest one.

Deep links: /workflow?type=Fully.Qualified.Name pre-seeds the subject and traces automatically. The View in Workflow buttons (message-type page, message catalog, Topology message drawer) and the Open in Workflow button on each detail page's Workflow neighborhood card route here with that query. The old /lifecycle?type= URL redirects here and keeps its query, so existing bookmarks still resolve.

Reading the diagram ​

  • Graph nodes are clickable: a handler routes to its handler-chain detail, a projection to its projection detail — so the graph is a navigation surface, not just a picture. Hovering a node lights its full upstream/downstream path and dims the rest.
  • A provenance legend (before you load an instance) explains the edge styles: ► inferred (structural), ◆ observed (runtime), ✓ confirmed (source + runtime).
  • A gaps list explains anywhere the model couldn't be completed. (The traced subject itself shows in the Subject box; there is no separate seed line.)

Cross-linking with live conversations ​

The Flow Graph is wired to the Conversations view both ways:

  • Click an edge to open a drawer of the real captured conversations that actually flowed down it; each entry opens that conversation on its Visualization tab. Conversations follow messages, so an edge into an event lists the conversations through the message whose handler appended it, and says so; an edge into a projection or a read model explains that no conversation passes through it.
  • Coming the other way, a conversation's Show on workflow map button lands here with its exact path lit across the graph (everything off the path dims), and a banner offering Clear.

If the trace returns but every service shows as unreachable, the diagram falls back to runtime-observed edges only (no static structure) — usually because the sample services don't ship the event-model responder. The trace still renders what it has rather than blocking.

"What happened" — per-instance lookup ​

The per-instance bar turns the abstract workflow into the concrete history of one saga or correlation:

  • Instance id — the saga-id / correlation-id value — plus the What happened? button.
  • Correlation tag (optional) — override the discriminating tag key; otherwise CritterWatch auto-resolves the saga's {SagaName}Id and shows "matching <tagKey>".

The result card stitches together all correlated OTel traces for that id into one "what happened" sequence, including scheduled re-entrances (saga timeouts, deferred commands). This is pulled on demand from the OTel backend you bound under Settings → Trace Providers → Per-service bindings — so an empty result means either no trace provider is bound for that service or the spans have aged out of the provider's retention window.

Past vs. still-to-come ​

Once an instance is loaded, the legend flips to ✓ observed (N) / ⟳ still to come (N) and the Flow Graph fuses the two: edges already seen for this instance render solid, while edges the model expects but hasn't observed yet render dashed. It's the difference between "what this saga did" and "what it will do next."

⚠️ The per-instance overlay is a Flow Graph feature. The shared renderer behind the Event Model view draws no per-edge fusion or timing marks, so switching to it while an instance is loaded shows the model without the instance's path.