How temporal-sa/temporal-order-fulfill-demo works
This TypeScript Temporal demo submits sample or generated orders, executes an order-fulfillment workflow, and reports workflow outcomes. The workflow invokes payment, inventory-reservation, and delivery activities; inventory reservation checks the local stock database. A separate worker registers the workflow and activities with Temporal. The README also documents approval and troubleshooting scenarios, but the sampled workflow does not implement those paths; the demo variants are therefore shown as documented scenarios, not as verified runtime calls.
Main entry points: client.ts Workflow client · worker.ts Temporal worker · activities.ts Fulfillment activities · workflows.ts Fulfillment workflow
Components 12
Order submission
- Workflow client
src/client.ts - Order submission
src/starter.ts
Temporal orchestration
- Temporal worker
src/worker.ts - Fulfillment workflow
src/workflows.ts - Demo scenarios
demo
Fulfillment operations
- Fulfillment activities
src/activities.ts - Inventory lookup
src/api.ts
Configuration and data
- Order model
src/interfaces/order.ts - Stock database
data/stock_database.json - Connection settings
src/interfaces/env.ts
Other components
- Operator
- Temporal Server
Connections 16
- Operator → Workflow client: starts run
README.md - Workflow client → Connection settings: loads settings
src/client.ts - Workflow client → Order submission: submits orders
src/client.ts - Order submission → Fulfillment workflow: executes workflow
src/starter.ts - Temporal worker → Connection settings: loads settings
src/worker.ts - Temporal worker → Fulfillment workflow: registers workflow
src/worker.ts - Temporal worker → Fulfillment activities: registers activities
src/worker.ts - Workflow client → Temporal Server: connects to
src/client.ts - Temporal worker → Temporal Server: connects to
src/worker.ts - Order submission → Temporal Server: starts workflows
src/starter.ts - Fulfillment workflow → Fulfillment activities: invokes activities
src/workflows.ts - Fulfillment activities → Inventory lookup: reserves inventory
src/activities.ts - Inventory lookup → Stock database: reads stock
src/api.ts - Workflow client → Order model: builds orders
src/client.ts - Fulfillment activities → Order model: accepts orders
src/activities.ts - Demo scenarios → Fulfillment workflow: documents variants
README.md