Reliability-as-code
Move from hand-rolled queues and custom retries to durable, resumable code with simple directives.
export async function welcome(userId: string) { "use workflow"; const user = await getUser(userId); // [!code highlight] const { subject, body } = await generateEmail({ // [!code highlight] name: user.name, plan: user.plan }); const { status } = await sendEmail({ // [!code highlight] to: user.email, subject, body, }); return { status, subject, body };}Workflow completed. logging telemetry...