# Dynamic Controllability of Processes without Surprises
## 5 Sudden Termination Constellations and Patterns
### Sudden Termination Constellation and Pattern STP-1  
We start by presenting the most fundamental constraint constellation for an STP. In this constellation, the end events of a contingent activity \(C\) and a semi-contingent activity \(S\) are connected by one upper- and one lower-bound constraint: \(ubc(C.e,S.e,w)\), and \(lbc(C.e,S.e,v)\). The only uncertainty in the constellation is the non-controllable actual duration of \(C\). The constraint \(ubc(C.e,S.e,w)\) requires that \(S.e\leq C.e+w\). For actual durations \(S.d\), resp. \(C.d\) of activities \(S\), resp. \(C\), this requires that \(S.s+S.d\leq C.s+C.d+w\). The constraint \(lbc(C.e,S.e,v)\) requires that \(C.e+v\leq S.e\). The _Sudden Termination Pattern 1 (STP-1)_ (see Figure 4) is defined as follows: a contingent activity \(C\) and a semi-contingent activity \(S\), with constraints \(ubc(C.e,S.e,w)\) and \(lbc(C.e,S.e,v)\) as above are in an STP-1, if there is no way to schedule the start of \(S\) and the start of \(C\), such that the value for the end of \(S\) can be fixed, when \(S\) starts. **Definition 7** (Sudden Termination Pattern: STP-1). : _Let \(P\) be a dynamically controllable process. Let \(S\) and \(C\) be activities in \(P\), with the duration constraints \(d(S.S.d_{min},S.d_{max},sc)\) and \(d(C,C.d_{min},C.d_{max},c)\). Let \(ubc(C.e,S.e,w)\) and \(lbc(C.e,S.e,v)\) be constraints in \(P\)._  
\(S\) _and \(C\) are in STP-1, iff \(\forall S.s,C.s\ \forall S.d_{min}\leq S.d\leq S.d_{max}\ \exists C.d_{min} \leq C.d\leq C.d_{max}:S.s+S.d>C.s+C.d+w\), or \(S.s+S.d<C.s+C.d+v\)._  
We now present the sufficient and necessary conditions for checking whether an STP might occur for a given pair of activities \(S\) and \(C\). We observe that if the constraints \(S.s>C.e\) and \(C.s>S.e\) do not hold in \(P\), then the general precondition for the existence of a sudden termination problem is satisfied. **Theorem 1**. : _Let \(P\) be a dynamically controllable process. Let \(S\) be a semi-contingent activity, and \(C\) be a contingent activity in \(P\), with duration constraints \(d(S,S.d_{min},\\ S.d_{max},sc)\) and \(d(C,C.d_{min},C.d_{max},c)\). Let \(ubc(C.e,S.e,w)\) and \(lbc(C.e,S.e,v)\) be constraints in \(P\)._  
_A sudden termination of \(S\) cannot occur, iff \(C.d_{max}+v\leq S.e-C.s\leq C.d_{min}+w\) holds in \(P\)._  
Proof. : We show that \(C.d_{max}+v<S.e-C.s\leq C.d_{min}+w\) is a necessary and sufficient condition that the activities \(S\) and \(C\) are not in an STP. _Necessary condition:_ we show that if the condition does not hold, a sudden termination might occur. If the condition does not hold then \(\
exists S.s,S.d,C.s\) with \(C.d_{max}+v<S.e-C.s\leq C.d_{min}+w\). This is only possible if \(C.d_{max}+v>C.d_{min}+w\). We now assume that \(C\) and \(S\) are in an STP. This means that \(\forall C.s\), \(S.s\) there is no \(S.d\) such that \(\forall C.d\) the constraints hold: \(S.s+S.d\leq C.s+C.d+w\) and \(S.s+S.d\geq C.s+C.d+v\)  
Figure 4: Sudden Termination Pattern 1 (STP-1). Hence \(\
exists S.d\) such that \(\forall C.d\): \(C.d+v\leq S.s+S.d-C.s\leq C.d+w\). Which requires in particular, that \(\
exists S.d\) to satisfy \(C.d_{max}+v\leq S.e-C.s\leq C.d_{min}+w\). _Sufficient condition:_ We show that if the inequality holds, sudden termination does not occur. We show that \(\exists C.s,S.s,S.d\) such that \(\forall C.d_{min}\leq C.d\leq C.d_{max}\) the constraints are satisfied, i.e., \(C.s+C.d+v\leq S.s+S.d\leq C.s+C.d+w\), which holds since \(\forall C.d_{min}\leq C.d\leq C.d_{max}\): \(C.d+v\leq C.d_{max}+v\leq S.s+S.d-C.s\leq C.d_{min}+w\leq C.d+w\). With Theorem 1 we can derive conditions for a process model to be dynamically controllable and such that an STP-1 cannot occur in it. In particular, the conditions require the process model to include a particular pair of a lower- and an upper-bound constraint between the start of \(S\) and the start of \(C\). Theorem 2: _Let \(P\) be a process.