# Dynamic Controllability of Processes without Surprises
## 6 Transforming Sudden Start into Sudden Termination  
We now show that we can treat the problem of the sudden start as a sudden termination problem. Hence, the same techniques for verifying whether a process can be scheduled without sudden termination can also be used to verify whether a process can be scheduled without sudden start, having a \(k\)-advance notice for the start events. The approach is based on transforming a process definition with tasks with \(k\)-warning into a process definition with explicit waiting tasks, which bears the same temporal semantics. \begin{table}
\begin{tabular}{l l l} \hline \hline
**Constraints** & **Condition to Avoid Sudden Termination** & **Constraints to Add** \\ \hline \(ubc(C.e,S.e,w)\) & \(C.d_{max}+v\leq S.e-C.s\leq C.d_{min}+w\) & \(lbc(C.s,S.e,C.d_{max}+v)\) \\ \(lbc(C.e,S.e,v)\) & \(uv(C.s,S.e,C.d_{min}+w)\) \\ \(lbc(C.s,S.e,v)\) & \(v<S.e-C.s\leq C.d_{min}+w\) & \(lbc(C.s,S.e,v)\) \\ \(lbc(C.s,S.e,v)\) & \(C.d_{max}+v<S.e-C.s\leq w\) & \(lbc(C.s,S.e,C.d_{max}+v)\) \\ \(lbc(C.e,S.e,v)\) & \(S.d_{min}+v<S.e-C.s\leq C.d_{min}+w\) & \(lbc(C.s,S.e,S.d_{min}+v)\) \\ \(lbc(C.s,S.e,v)\) & \(wC(.s,S.e,C.d_{min}+w)\) \\ \hline \(ubc(C.e,S.e,w)\) & \(C.d_{max}+S.d_{min}-v<S.e-C.s\leq C.d_{min}+w\) & \(lbc(C.s,S.e,C.d_{min}+w)\) \\ \(ubc(S.s,C.e,v)\) & \(wC(.s,S.e,C.d_{min}+w)\) \\ \hline \(ubc(C.e,S.e,v)\) & \(S.d_{min}-v<S.e-C.s\leq C.d_{min}+w\) & \(lbc(C.s,S.e,C.d_{min}-v)\) \\ \(ubc(S.s,C.s,v)\) & \(S.d_{min}-v<S.e-C.s\leq C.d_{min}+w\) & \(lbc(C.s,S.e,C.d_{min}-w)\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Sudden termination constellations, with conditions to avoid sudden termination, and constraints to add to check for semi-dynamic controllability. **Definition 13** (Process Model Transformation). : _Let \(P(N,E,\mathcal{C},k,\Omega)\) be a process as in Definition 1. Let \(N_{w}\) be a set of new (waiting) nodes: \(\forall n\in N,k(n)>0\)\(\exists wait_{n}\in N_{w}\), \(wait_{n}.type=activity\). Let \(xbc(a,b,\delta)=ubc(a,b,\delta)\) or \(lbc(a,b,\delta)\). Then \(\Psi(P)\) (P extended with waiting tasks) is a new process \(P^{\prime}(N^{\prime},E,\mathcal{C}^{\prime},k^{\prime},\Omega)\) where:_  
* \(N^{\prime}=N\cup N_{w}\)_;_
* \(\mathcal{C}^{\prime}=\mathcal{C}\cup\mathcal{C}_{w}\cup\mathcal{C}_{e}\setminus \mathcal{C}_{s}\)_, where:_
* \(\mathcal{C}_{w}=\{d(wait_{n},k(n),h,sc)|wait_{n}\in N_{w},h\in\mathbb{N},h>\Omega\}\cup\) \(\{lbc(start.s,wait_{n}.s,0)|wait_{n}\in N_{w}\}\cup\) \(\{ubc(wait_{n}.e,n.s,0)|wait_{n}\in N_{w}\}\cup\) \(\{lbc(wait_{n}.e,n.s,0)|wait_{n}\in N_{w}\}\)_;_
* \(\mathcal{C}_{e}=\{xbc(t,wait_{n}.e,\delta)|xbc(t,n.s,\delta)\in\mathcal{C}_{s}\}\cup\) \(\{xbc(wait_{n}.e,t,\delta)|xbc(n.s,t,\delta)\in\mathcal{C}_{s}\}\)_;_
* \(k^{\prime}(n)=0\)\(\forall n\in N^{\prime}\)_._  
Essentially, the transformed process model is the original process model augmented with a waiting task \(wait_{n}\) for each activity \(n\) whose start requires a \(k\)-advance notice. The minimum duration of this waiting task is equal to \(k(n)\), and the maximum duration is a large enough horizon value. In addition, all temporal constraints binding the start event of \(n\) are remapped to refer to the end event of \(wait_{n}\), and the start event of \(n\) is required to take the same timestamp of the end event of \(wait_{n}\). We show that the transformation is sound and complete, i.e., the transformed process model is such that any valid scenario for it is also a valid scenario for the original process model, and vice versa. This follows from the observation that the end time of a waiting task \(wait_{n}\) coincides with the start time of the associated activity \(n\): \(\overline{wait_{n}.e}=\overline{n.s}\). **Lemma 1** (Soundness). : _Let \(P(N,E,\mathcal{C},k,\Omega)\) be a process model; let \(\Psi(P)=P^{\prime}(N^{\prime},E,\mathcal{C}^{\prime},k^{\prime},\Omega)\) be a process model obtained by applying the transformation of Definition 13 to \(P\).