Build a Temporal workflow with activities and error handling

domain: docs.temporal.io · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Define an Activity function (or class) for each external call; annotate or register it with the Temporal worker, setting schedule_to_close_timeout
  2. Define a Workflow function that calls activities via workflow.execute_activity (Python) or workflow.ExecuteActivity (Go/Java); activities run outside the workflow sandbox
  3. Register both workflows and activities with a Worker pointed at your Temporal server address and a task queue name
  4. Start a workflow execution via the Temporal client: client.start_workflow(MyWorkflow.run, args, id='YOUR_WORKFLOW_ID', task_queue='YOUR_QUEUE')
  5. Handle activity failures with retry policies on the ActivityOptions; workflows automatically retry activities per the policy without replaying the whole workflow

Known gotchas

Related routes

Write Temporal workflows that survive replay
temporal.io · 4 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans