Station
A Station is the primary organizational unit of the OPS (Operations) subsystem. Stations are containers that encompass machines, people, and jobs. They represent physical locations or logical steps in a manufacturing process flow (see OEE System Vision).
How Stations Differ from Machines
| Aspect | Station | Machine |
|---|---|---|
| Table | ops_stations | oee_machines |
| Purpose | Job routing, production tracking, process flow stages | OEE metrics & equipment monitoring |
| Tracks | Jobs (pending/in_progress/completed), downtime events, incident events | Machine events (job/downtime/incident) |
| Metrics | Efficiency, throughput, yield, cycle time | OEE (Availability x Performance x Quality) |
| Flow | Connected via ops_station_connections | Connected via oee_machine_connections |
Stations are separate from machines. A station belongs to an oee_systems group (the system is the parent container), and machines and people operate within stations.
Running State
A station is running only when it has a job that is actively being worked on — meaning a person or machine is currently contributing time to a job at that station. If no job is active (no machine or person is clocked in to a job), the station is idle.
Events
Stations participate in all three event types:
- Jobs — production run events that belong to one station at a time. Multiple machines and people contribute time to jobs at the station. Completing a job means finishing it at this station. Jobs are tracked across stations via
job_number. See OEE Job. - Downtime — periods where the station is not producing. A single downtime event can affect multiple stations and/or machines simultaneously. See Downtime Reason.
- Incidents — notable occurrences logged against the station. A single incident can affect multiple stations and/or machines simultaneously. See Incident Reason.
Database Table: ops_stations
| Column | Type | Description |
|---|---|---|
id | UUID (PK) | Auto-generated |
code | VARCHAR(50) | Short identifier (e.g., “ST-01”) |
name | VARCHAR(255) | Display name (e.g., “Assembly Station 1”) |
site_id | UUID (FK) | References Site (oee_sites.id) |
organization_id | UUID | Org ownership |
system_id | UUID (FK, nullable) | References oee_systems.id — the parent system |
is_archived | BOOLEAN | Soft-delete flag |
created_at / updated_at | TIMESTAMPTZ | Audit timestamps |
Indexes: site_id, organization_id, system_id, active stations (is_archived = FALSE)
Relationships
- Belongs to a Site (
oee_sites) - Belongs to a System (
oee_systems) — stations are organized under systems in the hierarchy: System > Station > Machine/Person - Contains zero or more machines (many-to-many via a join table) — a machine can belong to multiple stations, and a station can have multiple machines
- Has many jobs (
ops_jobs.station_id) - Connected to other stations via Station Process Flow (
ops_station_connections) - Has canvas positions for process flow visualization (
ops_station_positions) - Has per-product standard hours via
ops_station_product_standards
SQL Functions
create_ops_station()/get_ops_stations()/update_ops_station()archive_ops_station()/unarchive_ops_station()ops_check_station_org()— authorization helper
Codebase Paths
- Table definition:
database/sql_scripts/tables/ops_stations.sql - Functions:
database/sql_scripts/functions/ops/ops_station_functions.sql - KPI function:
database/sql_scripts/functions/ops/ops_station_dashboard_kpis.sql - Backend endpoint:
backend/endpoints/ops.ts - Frontend components:
frontend/src/app/features/oee-dashboard/
Stations as Containers
Stations are the primary organizational unit that encompasses machines, people, and jobs (see OEE System Vision):
- Stations act as stages in a process flow — a linear or branching sequence of production steps
- Machines and people contribute time to jobs within a station (they are time sources, not stages)
- Multiple jobs can be present (pending or active) at a station
- Configurable: machine-only stations exclude human labor
- Configurable: concurrent job stations allow multiple active jobs simultaneously
See Station Configuration for configuration options and Process Flow Vision for how stations are visualized as large containers in the process flow.