Example
Complete procedure: a guest-facing procedure that builds an order and takes payment before confirmation or sync.
Goal: One coherent purchase path — shared payment core for occupancy and menu flows.
Typical step order
- Guest / time / elements context — as in booking-classic-occupancy, or skip occupancy for booking-menu-checkout.
- Build the order
- Aggiungi posizione (
AddPositionToOrder) — configured orderables; quantities usually FromOtherParameter. - Ordina da menu (
OrderFromMenu) — guest-picked SKUs.
- Aggiungi posizione (
- Pagamento diretto online (
PayNow) — checkout when gross total > 0; skipped when nothing is owed. - Persist / notify — Crea una prenotazione (
SyncReservationEntry) / Crea un ordine (SyncOrderEntry) / Creare una fattura (SyncInvoiceEntry), then Informa gli ospiti via e-mail (InformGuestViaEmail) → Informare gli operatori (InformOperator).
Choosing order-building steps
| Scenario | Prefer |
|---|---|
| Fixed or parameter-driven price list | Aggiungi posizione (AddPositionToOrder) |
| Guest browses menu | Ordina da menu (OrderFromMenu) |
| Multi-night stay | Aggiungi posizione notti (AddNightsToOrder) before Pagamento diretto online (PayNow) |
| Pay first, order more later | Pagamento diretto online (PayNow) then Menu di riordino (ReOrderMenu) / Invia come riordino (SubmitAsReorder) |
Related patterns: booking-classic-occupancy, booking-menu-checkout, booking-kiosk-tickets.
Testing split: Component guides for knobs; this pattern for chaining; Playwright for one E2E path; procedure-manager tests for Pagamento diretto online (PayNow) edge cases.