# Business Process Configuration according to Data Dependency Specification
## 5 Results: Transformation Applied to the Trip Planner Example  
To illustrate the use of the algorithms, the application of the algorithms to the Trip Planner example is presented in this section.  
The first step is to obtain the list of tuples of Condition-Relation according Definition 8. Analyzing the constraints of the example, we can find: (i) Constraints C1, C2, C3, and C4 do not relate input and output of the activities, then they are not involved in the list of tuples of Condition-Relation; (ii) Constraint C5 is used to create the relation: \(\langle\)_true_, \(A_{F}\), \(A_{H}\) \(\rangle\); (iii) Constraint C6 is used to create the tuple: \(\langle\)Condition of C6, Start\({}_{-}\)Event, \(A_{CR1}\) \(\rangle\); (iv) Constraint C7 creates the same tuple than Constraint C5: \(\langle\)_true_, \(A_{F}\), \(A_{H}\) \(\rangle\), and; (v) Constraint C8 is used to create the tuple: \(\langle\)Condition of C8, \(A_{F}\), \(A_{CR2}\rangle\)\(\rangle\).  
After that, the second step is to build the COP as detailed in Section 4.3.1, that for the example will have the form.  
* **Variables:**\(t_{ini}^{AF}\), \(t_{end^{\prime}}^{AF}\), \(t_{ini}^{AH}\), \(t_{end^{\prime}}^{AH}\), \(t_{ini}^{AC^{\prime}R1}\), \(t_{end}^{AC^{\prime}R2}\), \(t_{ini}^{AC^{\prime}R2}\), \(T\).  
* Supposing that the theoretical execution time of each activity is a unit of time, the domains are:
* \(t_{ini}^{AF}\), \(t_{ini}^{AH}\), \(t_{ini}^{AC^{\prime}R1}\), \(t_{ini}^{AC^{\prime}R2}\): 0..3 \(\langle\)Since there are 4 different activities.
* \(t_{end^{\prime}}^{AF}\), \(t_{end^{\prime}}^{AH}\), \(t_{end^{\prime}}^{AC^{\prime}R1}\), \(t_{end}^{AC^{\prime}R2}\): 1..4
* T: 1..4  
* \(t_{ini}^{AF}+1\leq t_{end}^{AF}\)
* \(t_{ini}^{AH}+1\leq t_{end}^{AH}\)
* \(t_{ini}^{AC^{\prime}R1}+1\leq t_{end}^{AC^{\prime}R1}\)  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Gateway** & **Constraints Conditions** \\ \hline Parallel & No dependencies in domains \\ Exclusive & Domains without overlaps \\ Inclusive & Domains with overlaps \\ \hline \hline \end{tabular}
\end{table}
Table 2: Type of gateway decision.  
Figure 12: From graph to BPMN Model Example.  
\(t_{ini}^{A^{CR2}}+1\leq t_{end}^{A^{CR2}}\) * \(T\geq t_{end}^{A^{F}}\wedge T\geq t_{end}^{A^{CH}}\wedge T\geq t_{end}^{A^{CR2}}\) * For the list of tuples of Condition-Relation mentioned above, the constraints included in the COP are: * \(t_{ini}^{A^{H}}\geq t_{end}^{A^{F}}\) * \(t_{ini}^{A^{CR2}}\geq t_{end}^{A^{F}}\)
* **Goal:**\(t_{ini}^{A^{F}}\), \(t_{ini}^{A^{H}}\), \(t_{ini}^{A^{CR1}}\), \(t_{ini}^{A^{CR2}}\)
* **Objective:**\(\text{minimization}(T)\).  
The obtained values of the variables after the resolution of the COP are:  
* \(TEnd\): 2
* \(t_{ini}^{A^{F}}\): 0 and \(t_{end}^{A^{F}}\): 1
* \(t_{ini}^{A^{H}}\): 1 and \(t_{end}^{A^{H}}\): 2
* \(t_{ini}^{A^{CR1}}\): 0 and \(t_{end}^{A^{CR1}}\): [1..2], selecting the greatest value (2).
* \(t_{ini}^{A^{CR2}}\): 1 and \(t_{end}^{A^{CR2}}\): 2  
The resulting BP Model is shown in Figure 13. According to the results, \"_Flight Search_\" and \"_Car Rental 1 Search_\" activities start at instant 0. However, the \"_Car Rental 2 Search_\" activity depends on the value of the output data of the \"_Flight Search_\" activity, so there is an exclusive gateway before this activity. Since there is not a complete domain with the constraint that determines the execution of the \"_Car Rental 2 Search_\" activity, then there is a branch by default which indicates that nothing happens when the condition is not met. The same situation occurs with \"_Hotel Search_\" and \"_Car Rental 2 Search_\" activities.  
The solution parallelizes the activities according to the data input and output relations, being possible execute it in two units of times.