# Addressing Business Process Deviations through the Evaluation of Alternative Pattern-Based Models
## 5 Discussion and Limitations  
This paper presents a novel approach to address unexpected situations in a workflow by introducing three basic types of repairs with the ability to verify and validate each injected solution. Unlike conventional approaches, where repairs are either predicted deviations or exceptions that are solved locally, this study introduces a dynamic approach that modifies the model by inserting or deleting parts of the workflow. In other words, the novelty lies in the fact that the library does not inherently contain solutions mapped to each problem, but rather it is populated with patterns stored by different collaborators. These patterns serve as potential solutions for unexpected problems, which distinguishes our approach from the existing literature. Furthermore, a unique aspect of this work is the replacement of not only one block on the main model but multiple blocks, accomplished through the utilization of a bypass-type repair mechanism. In this paper, candidate solutions were evaluated and sorted based on performance indicators, and the decision maker can define an objective function to select the best solution automatically or manually. The proposed method utilizes a collaborative library of random patterns that are stored by domain experts. This library serves to identify compatible solutions based on the current state of the system, thus leveraging the expertise of both internal and external sources to address unexpected problems. Unlike conventional approaches found in the literature, this library does not store solutions for each problem. Instead, it stores patterns that may or may not serve as candidates for an unexpected deviation in the execution of a model. One of the notable strengths of the proposed approach is its searching mechanism, which involves the system searching through a large number of patterns to identify, rank, and select the most suitable solution set. This was demonstrated in the previous section. The underlying concept behind this mechanism is to swiftly eliminate patterns that are not compatible by utilizing basic computing tools. For example, the system can compare if a range of values falls within a given interval or compute the likelihood of an event occurring. By employing these simple computational techniques, the potential set of solutions can be rapidly narrowed down to a smaller subset of patterns. Subsequently, more sophisticated tools can be applied to refine and accurately rank the results. In order to comprehensively evaluate the performance of our proposed mechanism, additional tests were conducted as part of the experiment. Specifically, the mechanism was tested on various library sizes, encompassing different scenarios including 1000; 10,000; 100,000; 1,000,000; and 2,000,000 patterns. The results of these tests are summarized in Table 3. This table provides valuable insights into the performance of our approach and demonstrates its effectiveness in terms of time efficiency. This approach is in stark contrast to using intricate methods, such as simulations, from the outset, which are time-consuming to reduce the set of patterns. The proposed approach is designed to be efficient and effective by leveraging simple tools in the initial stages of the search process, and then using more advanced techniques as the set of candidates is narrowed down. By adopting this approach, the proposed method can provide a rapid and accurate identification of solutions. In this paper new characterization and notations were provided, enriching the BPMN elements to better describe a deviation, a pattern and the system state. Basic BPMN gates were put in focus in terms of what is happening to the state token when it propagates throughout these gates. These characterizations were necessary to be able to compute where the output of a pattern can be injected later and how many blocks on the main model can be bypassed.