# BPMNE4 IoT: A Framework for Modeling, Executing and Monitoring IoT-Driven Processes +
## 1 Introduction
### Problem Identification and Motivation  
We illustrate an IoT-driven business process (BP) along an example from smart manufacturing. More precisely, we consider the processing of perishable products (e.g., food, vaccine and chemicals) whose safety and quality control depend on temperature and humidity. We refer to BPs as IoT-driven if they utilize IoT devices and map IoT behavior to process activities and events, respectively. Imagine a smart factory that receives perishable and/or highly sensitive products, which are then processed and stored. According to [8], such products should be checked (weight, size, temperature, and damage) immediately after receipt. Figure 1 presents the flow of a corresponding BP modeled in terms ofBPMN 2.0. The process starts upon the arrival of a container at the receiving department. This can be detected with the help of different sensors, e.g., GPS transmitters, cameras in the goods receiving area or a light barrier at the loading ramp. After the arrival of the container, the monitoring of the environment starts. The warehouse temperature must not be lower than 70 \({}^{\circ}\)C and the humidity must be less than or equal 60%. If the measured temperature and humidity are not in the predefined range, an alarm is triggered. Subsequently, the container is rejected and discarded. In addition to the monitoring of the physical environment, a worker may inspect the history (e.g., NFC code) of the container, e.g., to check whether or not the cooling and humidity chain was interrupted during the transport. Based on this, a decision is made on whether the products meet the specified quality criteria or a violation has occurred. In the latter case, the container is rejected and discarded. Otherwise, it is transported to the production line. Subsequently, the container is registered and unpacked by a worker, the perishable products are sorted, and a QR code is generated in parallel. Finally, the perishable products are stored in the high-bay warehouse. Note that the BP from Figure 1 involves different types of tasks, including manual tasks to be accomplished by humans (cf. Tasks 2 and 10), automated tasks invoking an external service (cf. Tasks 6, 9, and 12) and IoT-driven Tasks (cf. Tasks 3, 4, 5, 7, 8, 11 and 13). As shown in Figure 1, IoT devices and physical context play a crucial role when executing and monitoring IoT-driven BPs. However, when modeling the latter with BPMN 2.0, it does not become clear which tasks are IoT-related and which are not [9]. Instead, the process model viewer needs to interpret the task label to assess this. Furthermore, no visual distinction can be made between IoT-related service tasks (cf. Tasks 3\(A\)5, 7, 8, 11 and 13 in Figure 1) and non-IoT-related ones (cf. Tasks 6, 9 and 12 in Figure 1). This aggravates both the readability and comprehensibility of the process model. Note that similar drawbacks  
Figure 1: IoT-driven business process modeled in terms of BPMN 2.0.  
hold for events as well. For example, it is not possible to distinguish between an IoT-related conditional event (cf. Event 1) and a Non-IoT-related event. Further note that similar concerns hold when using modeling languages such as Petri Nets, Event-driven Process Chains, and WS-BPEL (Business Process Execution Language). Generally, it is unclear how to model IoT aspects, as the semantics provided by contemporary language constructs has not been conceived to address the specific needs of the IoT domain [6]. To execute IoT-driven BPs, the executable process models need to be deployed on an execution engine. Additionally, the IoT devices need to be set up and configured. However, process engineers are familiar with modeling BPs, but usually do not have the knowledge to manage the interactions between BPs and IoT devices. Note that IoT devices may rely on different technologies (e.g., MQTT, CoAP, Zigbee, LoRa, and LoRaWAN) [10]. Moreover, the response messages returned by IoT sensors may differ. While certain IoT devices return raw sensor data, others deliver JSON-formatted results.