LTW Kiosk State Machine

Session-driven page navigation for the kiosk. Idle reacts only to session_start. Any active session page can terminate back to idle using session_end.

Mermaid Diagram

stateDiagram-v2 direction LR [*] --> idle state "Idle" as idle state "Account" as account state "Answer" as answer state "Books" as books state "Find Book" as find_book state "Checkout" as checkout state "Crowd Density" as crowd_density idle --> account : session_start account --> answer : show_answer answer --> books : show_books books --> find_book : find_selected_book find_book --> checkout : proceed_to_checkout checkout --> crowd_density : show_crowd_count crowd_density --> account : return_to_account account --> checkout : scan answer --> checkout : scan books --> checkout : scan find_book --> checkout : scan crowd_density --> checkout : scan account --> idle : session_end answer --> idle : session_end books --> idle : session_end find_book --> idle : session_end checkout --> idle : session_end crowd_density --> idle : session_end note right of idle Only reacts to: - session_start end note note right of checkout Scan event jumps here from active session pages end note

Rules

Start state The kiosk starts in idle.
Session start session_start moves the kiosk from idle to account.
Main flow account → answer → books → find_book → checkout → crowd_density → account
Session end session_end returns any active page back to idle.
Scan event scan jumps directly to checkout.