# Business Process Configuration according to Data Dependency Specification
## 4 Conf-BP Framework: A Configurable System to Create Imperative BP
### Automatic Transformation from Declarative to Imperative Model
#### 4.3.2 Transformation of the COP results into a BP Imperative Model
With the aim of facilitating the understanding of the algorithm and our proposal in general, we use the example of Figure 8, with the list of tuples:  
* (R1) \(\langle A_{1}.output\leq 50\), \(A_{1}\), \(A_{3}\rangle\)
* (R2) \(\langle A_{1}.output<100\), \(A_{1}\), \(A_{4}\rangle\)
* (R3) \(\langle true\), \(A_{3}\), \(A_{5}\rangle\)
* (R4) \(\langle true\), \(A_{4}\), \(A_{5}\rangle\)
* (R5) \(\langle true\), \(A_{5}\), \(A_{8}\rangle\)
* (R6) \(\langle true\), \(A_{2}\), \(A_{8}\rangle\)
* (R7) \(\langle true\), \(A_{6}\), \(A_{7}\rangle\)  
The trace follows the next steps:  
1. **Look for sequential points:** Firstly, the set of activities should be separated by the sequential points (arrow 1 in Figure 8). The separation is carried out by detecting those instants of time where there is a sequential point. The intervals that are derived from these sequential points delimit the subset of activities. In the example, the set of activities is separated into two subsets of activities, since there is only one sequential point in \(t_{3}\). The first subset \(secp1\) goes from \(t_{0}\) to \(t_{3}\) and includes all activities except activity \(A_{8}\). On the other hand, the second subset \(secp2\) goes from \(t_{3}\) to \(t_{4}\) and only includes activity \(A_{8}\). 2. **Solving sequential sub-problems:** Each subset of activities is solved as a sub-problem (arrows 2 and 3) and combined sequentially both BPMN-sub-graphs are solved. 3. **Look for parallel subsets:** The \(secp1\) is separated in three parallel subsets: \(subg1\), \(subg2\) and \(subg3\). To obtain these subsets, the idea described in Definition 10 is applied: 1. Create a subset of each activity: {\(ps_{1}\): {\(A_{1}\)}, \(ps_{2}\): {\(A_{2}\)}, \(ps_{3}\): {\(A_{3}\)}, \(ps_{4}\): {\(A_{4}\)}, \(ps_{5}\): {\(A_{5}\)}, \(ps_{6}\): {\(A_{6}\)}, \(ps_{7}\): {\(A_{7}\)}. 2. Since \(A_{1}\) is related with \(A_{3}\) in \(R1\), and with \(A_{4}\) in \(R2\), both subsets are merged. Also, \(A_{6}\) and \(A_{7}\) are related in \(R7\). The obtained parallel subsets are: \(\{ps_{1}\): \(\{A_{1},\,A_{3},\,A_{4}\}\), \(ps_{2}\): \(\{A_{2}\}\), \(ps_{5}\): \(\{A_{5}\}\), \(ps_{6}\): \(\{A_{6},\,A_{7}\}\)]. 3. Since \(A_{5}\) is related with \(A_{3}\) in \(R3\), and with \(A_{4}\) in \(R4\), both subsets are merged. Therefore, the parallel subsets: \(\{ps_{1}\): \(\{A_{1},\,A_{3},\,A_{4},\,A_{5}\}\), \(ps_{2}\): \(\{A_{2}\}\), \(ps_{6}\): \(\{A_{6},\,A_{7}\}\) are also obtained. 4. Tuple relations \((R5)\) and \((R6)\) are not used in the creation of subsets since \(A_{8}\) is not involved in the parallel analysis. 4. **Solving parallel sub-problems:** The next step implies to solve each sub-problem (arrows 4, 5 and 6), followed by the search of **sequential points**. 5. **Combining parallel sub-problems:** To solve \(scep1\) it is necessary to combine the sub-graphs obtained by solving \(subg1\), \(subg2\) and \(subg3\) (return of arrow 4, 5 and 6). These BPMN-sub-graphs are combined as various branches joined by a split and join node (G2 in the example). 6. **Combining sequential sub-problems:** The obtained results after a sequential analysis of sub-graphs (returns of arrow 2 and 3) implies joining the results of \(scep1\) and \(scep2\). To this end, the result (BPMN-Graph) of \(scep1\) and \(scep2\) are joined by an edge between the final vertex of \(scep1\) and the initial vertex of \(scep2\), which are \(G2\) and \(A_{8}\) respectively. Figure 8: Trace example of the Algorithm to create a BPMN-Graph using the COP results.