Skip to main content

OEE State Record

Overview

The OeeStateRecord entity represents a recording of an OEE state event. The entity contains several properties including the start and end date time for the record, status of the machine during the record, a list of OEE records associated with the state record, and if the record has been acknowledged and if so when and by whom.

Table Structure

The following table outlines the SQL columns for the oee_state_records table, providing a brief description of each.

ColumnTypeDescriptionExample
idString (ULID)Unique identifier for the entity.01JAP8RJBN-8ZTPXSGY-J9GSDPE1
enabledBooleanIf the entity is enabled or not.true
created_dateDateTimeDate the entity was created.2024-12-31T19:48:44Z
created_byStringPerson who created the entity.TamakiMES
modified_dateDateTimeDate the entity was modified. Value is null upon creation, and gets initially populated upon the first edit.2024-12-31T19:48:44Z
modified_byStringLast person to modify the entity. Value is null upon creation, and gets initially populated upon the first edit.TamakiMES
notesStringNotes about the entity.This entity has these extra notes
spare1StringThe first spare column that can be used for additional context on the entity.some extra context 1
spare2StringThe second spare column that can be used for additional context on the entity.some extra context 2
spare3StringThe third spare column that can be used for additional context on the entity.some extra context 3
location_idString (ULID)References the location of the state record. See Location.01JAP8RJBN-8ZTPXSGY-J9GSDPE1
codeIntegerInteger state number.1
nameStringName of the OEE state.Idle
calculation_typeString (Enum)Determines how the state is used to calculate OEE.RUNNING
interruption_location_idString (ULID)Represents the interruption location for the property. See Location.02K4M9QY3F-7XW8A2ZL-QM9D6B1P
colorStringJSON/CSS style document for the state.#a0c741
statusString (Enum)Status of the OEE record.IDLE
start_dateDateTimeStart date/time of the state record.2025-12-09T19:48:44Z
end_dateDateTimeEnd date/time of the state record.2025-12-09T20:48:44Z
durationDoubleDuration in seconds of the state record.37.056
downtime_reason_idString (ULID)Represents the associated downtime reason for the state record. See Oee Downtime Reason.02K4M9QY3F-7XW8A2ZL-QM9D6B1P
acknowledgedBooleanBoolean indicating whether the state record has been acknowledged.false
acknowledged_byStringThe user who acknowledged the state record.johnD@company.com
acknowledged_dateDateTimeThe date when the state record was acknowledged.2025-12-09T20:48:44Z
mode_record_idString (ULID)Represents the current mode of the machine for the state record. See Oee Mode Record.02K4M9QY3F-7XW8A2ZL-QM9D6B1P
root_cause_state_record_idString (ULID)Represents the root cause state record for blocked/starved states.02K4M9QY3F-7XW8A2ZL-QM9D6B1P
primary_alarm_idString (ULID)Primary alarm ID. Can be used to fetch the actual alarm record when needed.02K4M9QY3F-7XW8A2ZL-QM9D6B1P

Field Details

location_id

References the location of the state record. See Location for details.

code

Integer state number. Each code must be unique for a given configuration.

name

Name of the OEE state.

calculation_type

Determines how the state is used to calculate OEE. Calculation types include IDLE, RUNNING, DOWNTIME, STARVED, and BLOCKED.

interruption_location_id

Location that caused a blocked/starved state on the machine. This will differ from the configured state location, because this will follow the line upstream/downstream to the actual location that caused the interruption. See Location for details.

color

JSON/CSS style document for the state.

status

Status of the OEE record. Status types include IDLE, RUNNING, COMPLETED, FAULTED, CANCELLED, UNKNOWN, and PAUSED.

start_date

Start date/time of the state record.

end_date

End date/time of the state record.

duration

Duration in seconds of the state record.

downtime_reason_id

Represents the associated downtime reason for the state record. See Oee Downtime Reason for details.

acknowledged

Boolean indicating whether the state record has been acknowledged.

acknowledged_by

The user who acknowledged the state record. Will be null if the record hasn't been acknowledged.

acknowledged_date

The date when the state record was acknowledged. Will be null if the record hasn't been acknowledged.

mode_record_id

Represents the current mode of the machine for the state record. See Oee Mode Record for details.

root_cause_state_record_id

Represents the root cause state record for blocked/starved states. Can also be the first half of a downtime state that was later split into multiple states. References another OeeStateRecord entity.

primary_alarm_id

Primary alarm ID (denormalized - stored as string, not FK). This avoids circular FK dependencies and deadlocks during concurrent state cutovers. Can be used to fetch the actual alarm record when needed.