CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
πŸŒ™β˜€οΈ
Log inStart free
Home/Templates/Railways & Public Transport

πŸš† Railways & Public Transport Β· State Machine

Train Ticket (PNR) Status

The states of a train ticket from booking to journey, including RAC and waitlist confirmation and cancellation.

More Railways & Public Transport templates

Drawing diagram…

What this diagram shows

  • Waitlisted tickets move up as others cancel
  • RAC gives a shared berth before full confirmation
  • Unconfirmed e-tickets are cancelled automatically at chart time

Prompt used

State machine for a PNR: Booked as Confirmed, RAC or Waitlisted. Waitlisted can move to RAC or Confirmed on cancellations. At chart preparation, still-waitlisted e-tickets are Cancelled with an automatic refund. Confirmed and RAC tickets become Travelled after the journey, or Cancelled by the passenger with a refund.

Mermaid code
stateDiagram-v2
  [*] --> Confirmed: Seat available
  [*] --> RAC: Shared berth only
  [*] --> Waitlisted: No seat
  Waitlisted --> RAC: Cancellations
  Waitlisted --> Confirmed: Cancellations
  RAC --> Confirmed: Cancellations
  Waitlisted --> AutoCancelled: Chart prepared, still waitlisted
  Confirmed --> Cancelled: Passenger cancels
  RAC --> Cancelled: Passenger cancels
  Confirmed --> Travelled: Journey done
  RAC --> Travelled: Journey done
  AutoCancelled --> [*]
  Cancelled --> [*]
  Travelled --> [*]

Related templates

C4 ArchitectureProRailways & Public Transport

Train Ticket Reservation System

A railway reservation system in the style of IRCTC: seat inventory per train and class, waitlists, Tatkal quota, payments and e-tickets.

SequenceRailways & Public Transport

Metro Smart Card Fare Collection

How a metro fare is charged with a smart card or bank card: tap in at the entry gate, tap out at the exit, fare by distance and balance update.

Data FlowRailways & Public Transport

Live Bus Tracking and Arrival Times

How a city bus app shows live bus positions and arrival times: GPS devices on buses, a prediction model and updates to apps and stop displays.

NetworkRailways & Public Transport

Railway Signalling and Train Control Network

How a modern railway signalling network is connected: interlocking at stations, track circuits, train control radio and the central traffic control centre.

C4 ArchitectureProRailways & Public Transport

Multimodal Journey Planner

A journey planner that combines metro, bus, suburban train and last-mile options into one trip plan with a single ticket.

Database ERDRailways & Public Transport

Train Operations Database Schema

Tables for train operations: trains, routes, stations, scheduled stops, coaches and daily running with actual times.