Skip to main content

5  Data Architecture

5.1 Overview of data sources

The data in the BPA Lab comes from three source systems: the process applications (multiple), the business process management system (BPMS) Camunda 8, and the FT-Factory, a physical model factory. The data is stored in two database management systems and can be grouped logically into data categories.

MySQL database management system: Inside MySQL, two separate database schemas keep process application data apart from process execution data from the BPMS:

Application schema. This schema stores the data that the process applications create and use. Data can be differentiated into three categories: - Transactional data records business transactions, namely customer orders, production orders and purchasing orders. - Stock data holds the inventory levels of component stock and product stock. - Master data holds reference data that changes rarely, such as vendors.

BPMS schema. This schema stores the data that Camunda 8 produces while it runs process instances. Data can be logically differentiated into two categories: - Event data records the execution history of process instances, for example of the logistics process, the purchasing process and other sub-processes including events and timestamps. This data is especially interesting for process mining. - In addition, process variables, that process instances carry and change at runtime is available here.

MongoDB database management system: The FT-Factory (and other IOT devices) publishes data as messages through an MQTT broker. These messages are stored in the document-oriented database MongoDB, which suits the semi-structured, high-frequency nature of IoT data. These messsages contains among other aspects (see topics and payloads below): - Status messages describing the current state of the factory, including station status, environmental status (for example sensor readings) and the status of the order processing - Stock information of the high-bay warehouse

The following figure gives an overview of the main data sources and the kinds of data they hold:

Figure 5.1: Data overview in the BPA Lab (based on Gonzalez 2025)

5.2 The application data model

The following diagram shows the concrete data model of the application schema in the MySQL database, including the entities and attributes of the current implementation:

Figure 5.2: MySQL data model

The database serves as the central store for:

  • Product master data — bicycle models and their components,
  • Customer data and delivery addresses,
  • Stock levels for components and finished goods,
  • Orders — customer orders, production orders, purchase orders — together with their status history,
  • Vendor data.

5.3 MQTT topics and payloads

The following list shows the messages accepted or sent by the Fischertechnik Factory (not exhaustive) and stored in the MongoDB database.

5.3.1 Messages send from FT-Factory

Topic: bpalab/ftfactory/f/i/order

{"ts": "2025-07-31T10:57:42.953Z",
"state": "ORDERED",
"type": "WHITE",
"processOrderReference": "None"
}

Topic: bpalab/ftfactory/f/i/stock

{"ts":"2023-06-22T12:m12:12.123",
 "stockItems": 
    [{"workpiece": { "id":"123456789ABCDE", "type":"WHITE", "state":"RAW" }, "location":"A1"},
     {"workpiece": { "id":"156789ABCDE", "type":"RED", "state":"RAW" }, "location":"A2"},
     {"workpiece": { "id":"7765555", "type":"BLUE", "state":"RAW" }, "location":"A3"},
     { "workpiece":null, "location":"B1"},
     { "workpiece":null, "location":"B2"},
     { "workpiece":null, "location":"B3" },
     { "workpiece":null, "location":"C1"},
     { "workpiece":null, "location":"C2"},
     { "workpiece":null, "location":"C3" }] }

Topic: bpalab/ftfactory/i/ldr

{"ts": "2025-07-31T10:58:03.299Z",
"br": 82.2,
"ldr": 11575
}

Topic: bpalab/ftfactory/i/bme680

{"ts": "2025-07-31T10:57:23.356Z",
"t": 24.6,
"rt": 0,
"h": 39,
"rh": 0,
"p": 1000.7,
"iaq": 3,
"aq": 3,
"gr": 0
}

Topic: bpalab/ftfactory/f/i/state/vgr

{"ts": "2025-07-31T10:57:24.089Z",
"station": "vgr",
"code": 1,
"active": 0,
"target": ""
}

Topic: bpalab/ftfactory/f/i/state/dsi

{"ts": "2025-07-31T10:57:16.647Z",
"station": "dsi",
"code": 1,
"active": 0
}

Topic: bpalab/ftfactory/f/i/state/sld

{"ts": "2025-07-31T10:57:18.509Z",
"station": "sld",
"code": 1,
"active": 0
}

Topic: bpalab/ftfactory/f/i/state/dso

{"ts": "2025-07-31T10:57:24.709Z",
"station": "dso",
"code": 1,
"active": 0
}

Topic: bpalab/ftfactory/f/i/state/hbw

{"ts": "2025-07-31T10:57:25.962Z",
"station": "hbw",
"code": 2,
"active": 1
}

Topic: bpalab/ftfactory/f/i/state/mpo

{"ts": "2025-07-31T10:57:34.871Z",
"station": "mpo",
"code": 1,
"active": 0
}

5.3.2 Messages send to FT-Factory

Sample BROADCAST publish:

(send to activate the publisher of FT-Factory)

Topic: bpalab/ftfactory/o/broadcast

{"ts":"2023-06-05T15:20:41.613", "message":"keep-alive"}

Sample ORDER publish:

Topic: bpalab/ftfactory/f/o/order

{"ts":"2026-06-18T08:56:50.022Z","type":"RED","processOrderReference":"00000099-99"}

5.4 The FTFactory IoT data model

The following diagram shows the collections in Mongodb

Figure 5.3: IoT Data model

In addition, the following collection is required for Trino

TrinoSchemaCollection
  id,
  fields,
  table

with the entries shown here:

mqttEventRaw

Fields
  FieldsEntry("\_id", "ObjectId", hidden = true)
  FieldsEntry(name = "\_class", type = "varchar", hidden = true)
  FieldsEntry("timestamp", "timestamp")
  FieldsEntry(name = "topic", type = "varchar", hidden = false)
  FieldsEntry(name = "payload", type = "varchar")
Table
  "mqttEventRaw" 

mqttEventStation

Fields
  FieldsEntry("_id", "ObjectId", hidden = true),
  FieldsEntry(name = "_class", type = "varchar", hidden = true),
  FieldsEntry(name = "topic", type = "varchar", hidden = false),
  FieldsEntry("timestamp", "timestamp", hidden = false),
  FieldsEntry(name = "code", type = "varchar"),
  FieldsEntry(name = "active", type = "boolean"),
  FieldsEntry(name = "station", type = "varchar")
Table
    "mqttEventStation"

mqttEventOrder

Fields
  FieldsEntry("_id", "ObjectId", hidden = true),
  FieldsEntry(name = "_class", type = "varchar", hidden = true),
  FieldsEntry(name = "topic", type = "varchar", hidden = false),
  FieldsEntry("timestamp", "timestamp"),
  FieldsEntry(name = "type", type = "varchar"),
  FieldsEntry(name = "state", type = "varchar"),
  FieldsEntry(name = "processOrderReference", type = "varchar"),
Table
    "mqttEventOrder"

mqttEventVgr, mqttEventLdr, mqttEventBme680 have been omitted for brevity, but follow the same schema.

5.5 The Camunda secondary storage model

The following diagram shows tables from Camundas secondary storage for process data

IoT Data model
Back to top