# Dynamic Controllability of Processes without Surprises
## 3 Process Model
### Temporal Semantics  
We define the temporal semantics of temporally constrained process definitions by defining which executions of a process definition are admissible [4], through the concept of _valid scenario_. A scenario represents a run of a process (i.e., a process instance) with assignments of timestamps specifying:  
* when each event (starting and ending of process steps) occurred, and
* when each advance notice for the start of an activity is given.  
Essentially, a scenario is a mapping of events to timestamps, independent of who assigns these timestamps. Hence, we define a scenario as follows:  
**Definition 2** (Scenario).: _Let \(P(N,E,\mathcal{C},k,\Omega)\) be a process model. A scenario for \(P\) is a function \(\sigma:N^{e}\cup\{n.d|n\in N\}\rightarrow\mathbb{N}\), assigning:_  
* _to each start event_ \(n.s\) _of a node_ \(n\) _a timestamp_ \(\sigma(n.s)\)_, denoted as_ \(\overline{n.s}\)_;_
* _to each end event_ \(n.e\) _of a node_ \(n\) _a timestamp_ \(\sigma(n.e)\)_, denoted as_ \(\overline{n.e}\)_;_
* _to each dispatcher event_ \(n.d\) _a timestamp_ \(\sigma(n.d)\)_, denoted as_ \(\overline{n.d}\)_, at which the notice of start of_ \(n\) _is given._  
A scenario is _valid_, if it is such that all temporal constraints are satisfied:  
**Definition 3** (Valid Scenario).: _Let \(P(N,E,\mathcal{C},k,\Omega)\) be a process model. Let \(\sigma\) be a scenario for \(P\). \(\sigma\) is a valid scenario for \(P\) iff:_  
1. \(\forall(n1,n2)\in E\)_,_ \(\sigma(n1.e)\leq\sigma(n2.s)\)_;_
2. \(\forall d(n,n_{min},n_{max},[c|sc|nc])\in\mathcal{C}\)_,_ \(\sigma(n.s)+n_{min}\leq\sigma(n.e)\leq\sigma(n.s)+n_{max}\)_;_
3. \(\forall ubc(a,b,\delta)\in\mathcal{C}\)_,_ \(\sigma(b)\leq\sigma(a)+\delta\)_;_
4. \(\forall lbc(a,b,\delta)\in\mathcal{C}\)_,_ \(\sigma(a)+\delta\leq\sigma(b)\)_;_
5. \(\sigma(end.e)\leq\sigma(start.s)+\Omega\)_;_
6. \(\forall k(n)>0\)_,_ \(\sigma(n.d)+k(n)\leq\sigma(n.s)\)_._  
An example for a scenario for the example process of Figure 3 is given by the mapping \(\sigma=\{start.s\to 0,start.e\to 0,P.s\to 1,P.e\to 22,PS.s\to 23,PS.e \to 23,A.s\to 23,A.e\to 27,B.s\to 24,B.e\to 26,PJ.s\to 27,PJ.e\to 27,F.s\to 29,F.e\to 33,end.e \to 33,k(F)\to 24\}\). One can verify that the scenario fulfills all requirements 1-6 from Definition 3, hence it is valid.  
A scenario is an assignment that results from following an execution strategy (also called schedule), which states when each controllable event should occur and when each advance notice should be given. For a process to be dynamically controllable, it is necessary that there exists a dynamic execution strategy, in which the decision about starting and ending activities is made based on the timestamp of all earlier events. In particular, a  
Figure 3: Process model for the process of Figure 2. Sets \(N\) (nodes) and \(E\) (edges) are represented as a graph.  
process is dynamically controllable if a dynamic execution strategy for it exists, which leads to a valid scenario.  
Several approaches have been developed in prior work for checking the dynamic controllability of processes. Here, we consider the approach based on mapping a process model to a Simple Temporal Network with Uncertainty (STNU), and applying constraint propagation methods that are proven to be sound and complete for checking STNU dynamic controllability, such as [9]. We present our approach in detail in Section 7.  
In Section 2 we gave examples of dynamically controllable processes that are affected by sudden termination and sudden start. In the next section, we give a formalization of the sudden termination and sudden start problems. We then define semi-dynamic controllability as the possibility to have a dynamically controllable process, which can be scheduled without any sudden termination or sudden start.