惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Announcements
Recent Announcements
J
Java Code Geeks
雷峰网
雷峰网
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
腾讯CDC
博客园 - 司徒正美
B
Blog RSS Feed
博客园 - 三生石上(FineUI控件)
I
InfoQ
N
Netflix TechBlog - Medium
L
LangChain Blog
博客园_首页
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Tailwind CSS Blog
MyScale Blog
MyScale Blog
美团技术团队
The Cloudflare Blog
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
H
Help Net Security
Martin Fowler
Martin Fowler
V
Visual Studio Blog

Workflow SDK Documentation

Patterns for Defining Tools Human-in-the-Loop Building Durable AI Agents Queueing User Messages Resumable Streams Sleep, Suspense, and Scheduling Streaming Updates from Tools API Reference Workflow Globals Changelog Resilient run start Cookbook Building a World Deploying Astro Express Fastify Hono Getting Started NestJS Next.js Nitro Nuxt Python SvelteKit Vite corrupted-event-log fetch-in-workflow hook-conflict Errors
parseWorkflowName
2026-06-12 · via Workflow SDK Documentation

Parse a machine-readable workflow name into display-friendly components.

Workflow names are stored as machine-readable identifiers like workflow//./src/workflows/order//processOrder. This function parses them into components suitable for display in a UI — for example when listing runs from the World SDK, where run.workflowName holds the machine-readable form.

import { parseWorkflowName } from "workflow/observability"; 

const parsed = parseWorkflowName("workflow//./src/workflows/order//processOrder"); 
// parsed?.shortName → "processOrder"
// parsed?.moduleSpecifier → "./src/workflows/order"
// parsed?.functionName → "processOrder"

Parameters

ParameterTypeDescription
namestringThe machine-readable workflow name (e.g. from run.workflowName)

Returns

{ shortName: string; moduleSpecifier: string; functionName: string } | null

PropertyDescription
shortNameThe display name. For default exports, falls back to the module's short name (e.g. "order" for ./src/workflows/order).
moduleSpecifierThe module the workflow is defined in — a relative path (./src/workflows/order) or a package specifier (@myorg/flows@1.0.0).
functionNameThe full exported function name.

Returns null when the input is not a valid workflow name.

import { getWorld } from "workflow/runtime";
import { parseWorkflowName } from "workflow/observability"; 

const world = await getWorld();
const runs = await world.runs.list({ resolveData: "none" });

for (const run of runs.data) {
  const parsed = parseWorkflowName(run.workflowName); 
  console.log(`${parsed?.shortName ?? run.workflowName}: ${run.status}`);
}