Process Flow

oee process-flow schematic

The Process Flow is a visual diagram that shows how stations and machines connect to form a production pipeline. It is rendered by the Schematic Builder feature at /oee/process-flow.

Two Levels of Process Flow

The system has two connection models that operate at different levels:

Station Connections (ops_station_connections)

Station connections define the job routing logic. When a job completes at a station, the system checks station connections to determine where the job goes next. These connections drive Job Auto-Advancement.

ColumnTypeDescription
from_station_idUUID (FK)Source station
to_station_idUUID (FK)Destination station
connection_typeVARCHAR(20)'feeds_into' or 'rework'
labelVARCHAR(100)Optional display label
exit_sideVARCHAR(10)Arrow exit edge override
entry_sideVARCHAR(10)Arrow entry edge override
sort_orderINTEGEROrdering for multiple outbound connections

Station connection types:

TypePurposeTriggers Auto-Advance?
feeds_intoNormal forward production flowYes (if exactly 1 connection)
reworkReturn path for defective itemsNo

Equipment Connections (oee_equipment_connections)

Equipment connections define the machine-level flow within or across stations. These are used for the schematic visualization and batch routing between machines.

ColumnTypeDescription
from_equipment_idUUID (FK)Source machine
to_equipment_idUUID (FK)Destination machine
connection_typeVARCHAR(20)'feeds_into', 'parallel', 'optional', or 'feedback'
labelVARCHAR(100)Optional display label
exit_sideVARCHAR(10)Arrow exit edge override
entry_sideVARCHAR(10)Arrow entry edge override
sort_orderINTEGEROrdering for multiple outbound connections

Equipment connection types:

TypePurpose
feeds_intoNormal forward flow between machines
parallelMachines that run in parallel
optionalOptional path (machine can be skipped)
feedbackReturn path (similar to rework at station level)

Connection Properties

Both station and equipment connections share these optional properties:

Exit/Entry Side

Controls which edge of the node the arrow connects to. Values: 'left', 'right', 'top', 'bottom', or NULL (auto-calculated).

When set to NULL, the system calculates the optimal attachment point based on the relative positions of the two nodes. Manual overrides are useful when the auto-calculated path creates visual clutter.

Label

An optional text label displayed on the connection line. Useful for annotating what flows between stations (e.g., “QC Pass”, “Reject”).

Sort Order

Controls the ordering when a node has multiple outbound connections. Lower numbers appear first.

Schematic Builder

The schematic builder is the visual editor for the process flow diagram. It uses ngx-graph for rendering with a custom manual layout engine that respects saved positions.

Node Rendering

Each machine node on the schematic displays:

  • Machine name and code
  • Current state as a color-coded background (green = running, red = down, gray = idle, blue = planned downtime, orange = scheduled)
  • Active batch count — number of batches currently running on the machine
  • Queue count — number of batches waiting in the machine’s queue
  • Rolling 7-day OEE percentage

Canvas Interaction

Users can:

  • Drag nodes to position machines on the canvas
  • Resize nodes via corner/edge handles (min 100x70, max 500x400 pixels)
  • Draw connections between machines by clicking source then destination
  • Delete connections via a button at the connection midpoint
  • Zoom and pan the canvas
  • Fit to view to auto-center all nodes

Node Positions

Machine positions are stored in oee_machine_positions (for equipment) or ops_station_positions (for stations):

ColumnTypeDescription
equipment_id / station_idUUID (FK, unique)One position per node
x_position / y_positionNUMERICCanvas coordinates
node_width / node_heightNUMERICNode dimensions in pixels

Positions are saved automatically when the user moves or resizes nodes.

Grid System

The canvas uses a grid system with 100 pixels per grid unit. Nodes snap to grid positions for clean alignment.

Live State on the Schematic

The schematic updates in real-time to reflect the current state of machines:

  • Running machines show green with their active batch information
  • Down machines show red with the downtime reason
  • Idle machines show gray
  • Batches in transit (completed on one machine, not yet started on next) are tracked and can be routed to the next machine

Context Actions

Right-clicking or clicking a node opens an action panel with:

  • Start Batch — begin a new batch on the machine
  • Complete Batch — finish the current batch
  • Log Downtime — record a downtime event
  • Log Incident — record an incident
  • Resolve Error — mark a downtime event as resolved
  • View Events — see the machine’s event history

Codebase Paths

  • Equipment connections table: database/sql_scripts/tables/oee_equipment_connections.sql
  • Station connections table: database/sql_scripts/tables/ops_station_connections.sql
  • Equipment positions table: database/sql_scripts/tables/oee_machine_positions.sql
  • Station positions table: database/sql_scripts/tables/ops_station_positions.sql
  • Schematic models: frontend/src/app/features/schematic-builder/models/schematic.model.ts
  • Schematic canvas: frontend/src/app/features/schematic-builder/components/schematic-canvas/
  • Schematic service: frontend/src/app/features/schematic-builder/services/schematic.service.ts
  • Backend endpoints: backend/endpoints/schematic.ts

See Also