Temporal Take‑Home: Function Stubs Only (Python) with DB Read/Write Notes

Goal

Use Temporal’s open‑source SDK and dev server to orchestrate an Order Lifecycle. You will design the workflows and activities. This doc supplies function implementations that simulate failures and timeouts, plus assignment requirements. Your activities should call these functions and handle database persistence.

Why We Use Temporal

Trellis coordinates long-running, stateful operations where reliability and clear audit trails matter (e.g., multi-step data workflows, vendor calls, human approvals). Temporal gives us:

These capabilities map directly onto Trellis’ needs: dependable automation across unreliable networks and third-party systems, clear visibility for operators, and safe recovery when anything fails.

Why an “Order” workflow (instead of Trellis’s per-service healthcare flows)

We picked an Order → Payment → Shipping model for the exercise because it’s simple and self-contained while still exercising the core Temporal primitives we care about in real work:

An order domain avoids domain-specific baggage and lets you focus on orchestration quality—determinism, resilience, and observability—exactly what we evaluate for Trellis’ production workflows.


What to Build (Domain Scenario)