# DataStream XES Extension: Embedding IoT Sensor Data into Extensible Event Stream Logs
## 1 Introduction  
All companies rely on business logic, or more generic, process logic to accomplish business goals. Process logic describes the interaction between machines, humans, software (e.g., ERP, MES), resources (e.g., raw materials), and the environment in order to achieve a predefined business goal. Such process logic is executed by a process engine, which enacts and monitors all the rules contained in the processing logic. This process execution can rely on the Internet of Things (IoT) consisting of a network of (smart) machines and sensors. In this case, the process engine and the IoT work together to execute the processes. The engine orchestrates the process activities, using IoT actuators to automate process tasks, while IoT sensors and tags can be used to closely monitor the execution environment and involved resources [1, 2, 3, 4]. We call such processes IoT-enhanced BPs. To understand and improve the processes, the process execution data is stored in an event log, then can later be analyzed using a variety of process mining techniques [5, 6]. However, IoT-enhanced BPs have special requirements on the data representation that cannot be fulfilled by the de-facto standard for storing event logs for process mining, extensible Event Stream (XES) [7]. When using XES, each observation (i.e., sensor values denoting, for example, temperature, vibration or humidity) by a sensor must be eitherassignable to events or traces [8]. However, this may not be the case for observations. For example, a series of temperature readings representing the mean temperature of a timespan (e.g., 2 min), might span the boundaries of multiple events representing multiple short subsequent real-world tasks. But from a process event log perspective, IoT data (i.e., sensor value, sensor type, sensor configuration, trigger parameters) can be assigned to different context levels such as event, trace, or groups of instances from the same or different processes. For example, humidity might affect a single machining task, a whole process instance consisting of machining and quality assurance, as well as a group of related parallel machining tasks on a factory floor. The assignment is related to semantic process properties, as well as the nature of the collected data (static vs. dynamic, collection frequency, relation to the process, etc.). Depending on logging, knowledge about the executed processes and process models, and physical aspects such as the placement of sensors or their orientation, sensors can be directly assigned to individual events or traces or neither. In addition, IoT data is often ad-hoc, highly variable, contains data quality issues, and has varying degrees of semantic annotations [3; 9], i.e., references to instances in domain ontologies. In the absence of a unified, expressive standard for IoT-enriched event logs, various players in industry and academia are developing their own proprietary formats and database schemas. This results in many highly customized and not-interoperable data formats and procedural applications (examples include--as of 2023: Celonis Execution Management System, IBM Process Mining, Fluxicon Disco, Microsoft Process Advisor, Mehrwerk MPM Process Mining) dealing with process mining, i.e., runtime and ex-post analysis of data-streams to check the compliance with the business logic, search for the cause of errors and gain insights about bottlenecks and resource shortages. In this paper, we present the DataStream XES extension for uniform representation of IoT-enriched event logs. The extension complements plain XES in a way that extensive IoT sensor data can be stored in events or traces, but also, independently of these concepts if the connection is not clear (yet). The foundations of this extension are based in the challenge C3 of the BPM&IoT Manifesto [4], which formulates the requirement of a \"connection of analytical processes with IoT\".