# Technical Document: Process Flow Diagrams for Station Search and Booking
This document provides a detailed extraction and analysis of three interconnected process flow diagrams. The diagrams outline the logic for a station selection, booking confirmation, and result handling system.
## Component Isolation
The image is divided into three distinct vertical segments, each representing a specific phase of the user journey:
1. **Left Segment:** Station Search and Selection Process.
2. **Middle Segment:** Booking Details and Confirmation Process.
3. **Right Segment:** Transaction Result and Error Handling.
---
## 1. Station Search and Selection Process (Left Segment)
This flow describes the repetitive logic used to select both departure and arrival stations.
### Flow Details:
* **Start:** The process begins at the **Start** node.
* **Action:** **Search Departure**.
* **Sub-process/Function:** `search_station`.
* **Decision Point:** **Multiple Pages?**
* **Yes:** Leads to **Show Pagination**, then proceeds to **Select Station**.
* **No:** Proceeds directly to **Select Station**.
* **Action:** **Select Station**.
* **Action:** **Search Arrival**.
* **Sub-process/Function:** `search_station`.
* **Decision Point:** **Multiple Pages?**
* **Yes:** Leads to **Show Pagination**, then proceeds to **Select Station**.
* **No:** Proceeds directly to **Select Station**.
* **Action:** **Select Station**.
* **Exit Point:** **To Booking Process** (Indicated by a dashed border box).
---
## 2. Booking Details and Confirmation (Middle Segment)
This flow handles the collection of user information and the final purchase execution.
### Flow Details:
* **Entry Point:** **From Station Search** (Indicated by a dashed border box).
* **Action:** **Collect Details**.
* **Decision Point:** **Valid Input?**
* **No:** Loops back to **Collect Details**.
* **Yes:** Proceeds to **Show Summary**.
* **Action:** **Show Summary**.
* **Decision Point:** **Confirmed?**
* **No:** Loops back to **Collect Details**.
* **Yes:** Proceeds to the purchase function.
* **Sub-process/Function:** `buy_ticket`.
* **Exit Point:** **To Result Process** (Indicated by a dashed border box).
---
## 3. Transaction Result and Error Handling (Right Segment)
This flow manages the outcome of the `buy_ticket` function.
### Flow Details:
* **Entry Point:** **From Booking** (Indicated by a dashed border box).
* **Decision Point:** **Success?**
* **Yes:** Leads to **Show Confirmation**.
* **Action:** **Show Confirmation**.
* **End:** The process terminates at the **End** node.
* **No:** Leads to **Show Error**.
* **Action:** **Show Error**.
* **Exit Point:** **To Booking Process** (Indicated by a dashed border box), suggesting a retry mechanism.
---
## Summary of Textual Elements
### Process Nodes (Rectangles)
* Start
* Search Departure
* Show Pagination
* Select Station
* Search Arrival
* Collect Details
* Show Summary
* Show Confirmation
* Show Error
* End
### Decision Nodes (Diamonds)
* Multiple Pages?
* Valid Input?
* Confirmed?
* Success?
### External References / Connectors (Dashed Rectangles)
* To Booking Process
* From Station Search
* To Result Process
* From Booking
### Functions/System Calls (Plain Text on Connectors or Grey Boxes)
* `search_station` (Used twice in the search phase)
* `buy_ticket` (Used in the confirmation phase)
### Logic Labels
* Yes
* No