Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_order-fulfillment-workflow

Order fulfillment workflow (orchestrated saga with compensation)

14 COMPONENTS · 14 FLOWS · UPDATED 2026-11-21
GITHUB README / PR PREVIEW CARD
[![Order fulfillment workflow (orchestrated saga with compensation) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_order-fulfillment-workflow/opengraph-image)](https://archos.sageideas.dev/d/dgm_order-fulfillment-workflow)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_order-fulfillment-workflow)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_order-fulfillment-workflow" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Order fulfillment workflow (orchestrated saga with compensation) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  customer_0[("Customer")]
  provider_1[("Payment provider")]
  carrier_2[("Carrier")]
  gw_3["API gateway"]
  orders_4["Order service"]
  policy_5["Policy decision point (PDP)"]
  wf_6[("Workflow orchestrator")]
  secrets_7[("Secrets manager")]
  metrics_8[("Time-series database (TSDB)")]
  alerting_9[("Alerting")]
  stock_10[("Stock store")]
  notify_11[("Notification service")]
  dlq_12[("Dead-letter queue (DLQ)")]
  capacity_13["Capacity Estimate"]
  customer_0 -->|"1. Calls with JWT · HTTPS"| gw_3
  gw_3 -->|"2. Forwards (mTLS) · HTTP/2"| orders_4
  orders_4 -->|"3. Starts workflow · gRPC"| wf_6
  wf_6 -->|"4. Reserve, renew, commit, free · HTTPS"| stock_10
  stock_10 -->|"5. Confirms hold · HTTPS"| wf_6
  wf_6 -->|"6. Charges with key · HTTPS"| provider_1
  provider_1 -->|"7. Returns result · HTTPS"| wf_6
  wf_6 -->|"8a. Books shipment · HTTPS"| carrier_2
  wf_6 -->|"8b. Sends update · HTTPS"| notify_11
  wf_6 -->|"8c. Parks failed steps · TCP"| dlq_12
  orders_4 -->|"Asks permission (mTLS) · gRPC"| policy_5
  secrets_7 -->|"Supplies keys · HTTPS"| wf_6
  metrics_8 -->|"Scrapes step errors · HTTPS"| wf_6
  metrics_8 -->|"Feeds alerts · HTTPS"| alerting_9

COMPONENT STACK (13)

  • CustomerSTATEFUL
    Places an order from a phone
  • Payment providerSTATEFUL
    Same key returns the first result
  • CarrierSTATEFUL
    Books and ships the parcel
  • API gatewaySTATELESS
    Checks the JWT, sheds load over the limit
  • Order serviceSTATELESS
    Validates the order, starts the workflow
  • Policy decision point (PDP)STATELESS
    Decides if this user may place this order
  • Workflow orchestratorSTATEFUL
    Runs each step, then undoes them on failure
  • Secrets managerSTATEFUL
    Holds payment and carrier keys
  • Time-series database (TSDB)STATEFUL
    Stores failed and parked step counts
  • AlertingSTATEFUL
    Pages on-call on failed or parked steps
  • Stock storeSTATEFUL
    Holds reserved units until shipped
  • Notification serviceSTATEFUL
    Sends the order update to the customer
  • Dead-letter queue (DLQ)STATEFUL
    Parks steps that keep failing

REQUEST & DATA FLOW (14)

  1. Customer → API gateway (Calls with JWT)[HTTPS]
  2. API gateway → Order service (Forwards (mTLS))[HTTP/2]
  3. Order service → Workflow orchestrator (Starts workflow)[gRPC]
  4. Workflow orchestrator → Stock store (Reserve, renew, commit, free)[HTTPS]
  5. Stock store → Workflow orchestrator (Confirms hold)[HTTPS]
  6. Workflow orchestrator → Payment provider (Charges with key)[HTTPS]
  7. Payment provider → Workflow orchestrator (Returns result)[HTTPS]
  8. Workflow orchestrator → Carrier (Books shipment)[HTTPS]
  9. Workflow orchestrator → Notification service (Sends update)[HTTPS]
  10. Workflow orchestrator → Dead-letter queue (DLQ) (Parks failed steps)[TCP]
  11. Order service → Policy decision point (PDP) (Asks permission (mTLS))[gRPC]
  12. Secrets manager → Workflow orchestrator (Supplies keys)[HTTPS]
  13. Time-series database (TSDB) → Workflow orchestrator (Scrapes step errors)[HTTPS]
  14. Time-series database (TSDB) → Alerting (Feeds alerts)[HTTPS]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →