# BPMNE4 IoT: A Framework for Modeling, Executing and Monitoring IoT-Driven Processes +
## 5 BPMN24 IoT-A Holistic Framework for IoT-Driven BPs
### IoT-Driven Event Log  
As described in Section 5.3, an IoT-driven Event Log is recorded by the IoT-driven BPMS (cf. Step (4)). This log combines the known process event log with the IoT-related data. Figure 13 shows a segment of an IoT-driven process from a smart factory and the resulting excerpt of the generated log. The depicted IoT-driven BP measures the temperature using a sensor artifact. Subsequently, the oven valve is opened using an actuator artifact in combination with a sensor catch artifact. The columns of the event log are as follows:  
* **Case.** Unique identifier of the case to which the event belongs.
* **Label.** Label of the element (e.g., activity, events, and artifacts) to which the event belongs.
* **Timestamp.** Time at which the event occurred.
* **TimestampType.** Indicates the type of the timestamp. This can be either StartTime, EndTime or EvaluationTime.
* **ID.** Unique identifier of the element to which the event refers.
* **Type.** Type of the element to which the event refers (e.g., sensor, actuator and activity).
* **ConnectedTo.** This column is defined for elements of the BPMNE4 IoT extension solely. It refers to the activity to which the respective BPMNE4 IoT artifact is connected.
* **Response Value.** Return value of the executed IoT command (e.g., sensor values).
* **Response Type.** Indicates the type of response (e.g., temperature and humidity).
* **Condition.** Expression (e.g., temperature < 20 \"C) of the IoT-driven Business Expression Evaluator as defined, for example, in a catch artifact.  
First of all, the activation of task _Measure oven temperature_ (green color) creates a log entry. Then, the attached _'temperature sensor'_ artifact (orange color) becomes activated, i.e., the specified sensor in the artifact is queried and a log entry is created. After receiving the sensed value, it is added to the log. Subsequently, the activity _Open oven valve_ (blue color) is executed. Two artifacts are attached to this activity, i.e., actuator _Oven valve_ (purple color) and catch artifact _Oven valve limit switch_ (yellow color). The two artifacts becomes activated simultaneously. The IoT Process Engine sends the execution command to the actuator defined in the actuator artifact. At the same time, the condition defined in the catch artifact is evaluated. At intervals of around 10 ms, sensor values are received and the condition is evaluated. In the meantime, the actuator executes the defined command and returns the status code to 200. From Line 15, it can be observed that the condition of the catch artifact is fulfilled, which results in the completion of activity _Open oven valve_. Afterwards, the remaining part of the process is executed. The described log is not only a valuable input for process mining, but also captures the data provided by the IoT devices. Finally, the IoT-driven process log connects the IoT devices with the corresponding task, enabling the creation of digital twins for IoT processes [58].  
There are several approaches [33; 34; 59] that extend the XES format to enriching process event logs with IoT sensor data (including an extensive semantic description of these data). In future work, we plan to convert the BPMNE4 IoT log to XES. An approach would be to convert the BPMNE4 IoT log into the _SensorStream_ approach [59].