# Semi-Automated Approach for Building Event Logs for Process Mining from Relational Database
## 4 Results
### Construction of the Event Log
#### 4.2.3 Event Log Generated
Moreover, several cycles are observed between the \"collect data sensors\" and \"evaluate collected data\" activities, as well as in the \"save data in local storage\" and \"verify saved data\" activities. In addition, there is a return immediately from the \"manage data collection\" to \"collect data sensors\" tasks. In Figure 6, the discovered business process model based on the BPMN language (see Definition 4) using the Split-miner algorithm [26] is shown. In the first part of the discovered process, a flat behavior is observed, only a sequence of activities. This sequence is because no gateways were detected in the event log that determines a path division or a loop in the process's behavior. The business process models discovered by the two algorithms coincide in their flow and behavior. The above guarantees that the built event log can be interpreted by process mining tools, validating that the structure of the event log is correct. \begin{table}
\begin{tabular}{l c c c c c} \hline \hline
**Event Log** & **Cases** & **Events** & **Unique Activities** & **ATC** & **ATE** \\ \hline IoT Air Quality Monitor & 9180 & 511,049 & 24 & 75 & 4 \\ Repository Management Service & 9180 & 215,651 & 8 & 75 & 15 \\ System Access Service & 9180 & 64,260 & 7 & 1 & 0.4 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Metrics of each event log generated. Figure 3: Top five process variants contained in the _IoT Air Quality Monitor_ event log. Figure 7 shows the process model discovered from the event log built for the _Repository Management Service_ participant using the DFG algorithm. In the discovered business process flow, some tasks are identified that relate to the tasks contained in the discovered process model for the _IoT Air Quality Monitor_ participant, which is correct because these participants exchange messages to execute the collaborative business process. This behavior defines a cycle of execution of the activities with a path division element that determines a return to the \"Insert Data Package\", allowing execution to be restarted for the storage management of the values collected by the sensors of the air quality monitoring system. Figure 8 shows the BPMN process model discovered for the same participant using the

Figure 4: Frequency of each activity contained in the event logs. Figure 5: Process model discovered using DFG algorithm for _IoT Air Quality Monitor_ participant event log. split-miner algorithm. The models discovered by the two algorithms agree on the flow and behavior of the business process. Finally, the values achieved in the quality metrics of the business process models discovered are shown in Table 4. In the precision (Equation (3)) and recall (Equation (4)) metrics, the maximum value of 1.0 is obtained in the business process models of the three participants. On the one hand, the precision metric value indicates that each discovered model can reproduce all the behaviors within the event log. On the other hand, the value reached in the recall metric indicates that the models do not contain behaviors that are not included in the event log. In the case of the generaliz

Figure 8: BPMN process model discovered using _Repository Management Service_ event log. Figure 6: BPMN process model discovered using Split-miner for _IoT Air Quality Monitor_ participant event log. Figure 7: Process model discovered by DFG (_Repository Management Service_ participant). the evaluated process models reached the values of 0.991, 0.993, and 0.980 for the _IoT Air Quality Monitor_, _Repository Management Service_, and _System Access Service_ participants, respectively. The value of the generalization metric indicates that the process flow and the behaviors it can reproduce are frequently used. ### Patient Treatment Process Scenario

In this section, we present only the evaluation of the built event log since the previous stages of the framework have the same foundation as described in the earlier case study. Table 5 presents the quality metrics of the event log built for the patient treatment journey map.