# DataStream XES Extension: Embedding IoT Sensor Data into Extensible Event Stream Logs
## 2 Foundations and Related Work
### Process Mining
These standardized subprocesses are then tailored to the currently produced part by invoking them with the parameters needed for the individual piece/use-case. In the scenario discussed in Section 4.2 we focus on a process, where several components work together to produce and measure a chess piece. The components are: (1) a milling machine, (2) a robot for handling the part, and (3) a measuring machine (and an independent lift moving the part through the optical measuring machine) conducting an optical measurement of the part diameter. The process uses these components by (1) manufacturing the part in the milling machine, (2) taking the part out of the machine with the robot and putting it on the lift, (3) moving the lift down to measure the produced part optically, and (4) finally taking the part from the lift and putting it on a palette (see Figure 8). During all of these steps, different data from the involved components is collected and stored in the logs, as proposed in the XES DataStream extension format. This data includes machining data such as the workload of the drive, the axis speed for different axis, and the actual speed and workload of the spindle as well as measuring data from the optical measurement. The dataset ([[https://doi.org/10.5281/zenodo.7477845](https://doi.org/10.5281/zenodo.7477845)]([https://doi.org/10.5281/zenodo.7477845](https://doi.org/10.5281/zenodo.7477845)) (accessed on 8 February 2023)) which is created adheres to the earlier described XES DataStream extension format provides the basis for analysis tasks such as process mining, prediction of part quality, or detection of broken tools. As also described in Section 4.1 a process model is enacted by the process execution engine cpee.org. The process model includes tasks having data probes which define how to collect/extract data and attach it to the log (see Figures 6 and 7 for examples). In this scenario, machining data (see Listing 8) as well as measuring data (see Listing 9) are collected. The stream points shown in Listing 9 represent a time series of measurements of the contour of the chess piece. Without the DataStream extension, these measurements would have been part of the log in a proprietary format as provided by the machine (as part of a PDF file). By representing the measurements in the DataStream format, data extraction and transformation steps can be avoided, and data for different measurement machines becomes readily comparable due to the uniform representation. ### Discussion of Results

For the scenarios described in Sections 4.1 and 4.2 the DataStream XES extension allowed to collect not only the process flow data but also IoT data collected during the process. Such context data contains important information, e.g., when performing a root cause analysis for process outcome properties such as part quality. For example, in transportation data set (see Section 4.1) the traffic state is explicitly queried as part of the process model, leading to a value between 0 (no traffic flow) and 1 (free traffic flow). In a traditional process log all the sensor readings (from different crossings) in the vicinity would not be part of the data set but might yield crucial information for process improvement (in this case, e.g., changing the timing of traffic lights, or moving the station). Another, even clearer example can be highlighted in the manufacturing data set (see Section 4.2) the task of producing a rook from the process point of view only results in \"success\" or \"no success\". The over twenty sensors that produced several thousand readings during the two-minute duration of machining, cannot easily be included in a traditional XES file, and were traditionally analyzed separately from the process. The XES DataStream extension provides a means to structure and store these readings in a common format. Linking/integrating the data directly in the event log, can provide a common basis for future analysis tools that can perform a joint analysis of process and IoT data.