## 2 WFT-Net Model
### Data Table
\(\mathcal{O}_{\mathcal{R}}\): \(T\)\(\rightarrow\)\(\{\)\(\mathit{sel}\), \(\mathit{ins}\), \(\mathit{upd}\), \(\mathit{del}\)\(\}\) represents persistent data operations on \(\mathcal{R}_{t}\), in which sel (resp. ins, \(\mathit{upd}\), \(\mathit{del}\)) is a labeling function of selecting (resp. inserting, updating, deleting) tuples based on tables, and the set of all data tables whose tuples are selected (resp. inserted, updated, deleted) by transition \(t\in T\) is denoted as \(\mathcal{R}_{t}^{\mathit{sel}}\) (resp. \(\mathcal{R}_{t}^{\mathit{ins}}\), \(\mathcal{R}_{t}^{\mathit{upd}}\), \(\mathcal{R}_{t}^{\mathit{ded}}\));
6. \(\mathcal{G}\): \(T\)\(\rightarrow\)\(\mathcal{G}_{\Pi}\) assigns guards to transitions, where \(\mathcal{G}_{\Pi}\) is a guard set, and each guard is a predicate expression over the predicate set \(\Pi=\{\pi_{1},\cdots,\pi_{n}\}\). An example of WFT-nets is shown in Figure 2. Figure 2a describes its basic business logic, data/table operations, and guards. Figure 2b shows its database tables with some initial tuples. In Figure 2, \(\mathcal{D}=\{\mathit{aid}\), \(\mathit{ac}\), \(\mathit{bid}\}\), where their domains are \(\mathbb{Q}\) (the rational numbers) for uniformity. The label functions of process data operations on transition \(t_{4}\) are \(\mathcal{O}_{\mathcal{D}}(t_{4})=\{rd\}\) and \(\mathcal{D}_{t_{4}}^{\mathit{rd}}=\{\mathit{aid}\}\). Similarly, the label functions of persistent data operations on \(t_{3}\) are \(\mathcal{O}_{\mathcal{R}}(t_{4})=\{ins\}\) and \(\mathcal{R}_{t_{4}}^{\mathit{ins}}=\{R_{1}\}\). \(\Pi=\{\pi_{1}\): \(Null(\mathit{sel}\langle R_{1}[\mathit{Aid}](\mathit{Aid})\diamond(\mathit{ aid})\rangle)\), \(\pi_{2}\): \(Null(\mathit{sel}\langle R_{2}[\mathit{Bid}](\mathit{Bid})\diamond(\mathit{ aid})\rangle)\), and \(\mathcal{G}_{\Pi}=\{\pi_{1}\): \(Null(\mathit{sel}\langle R_{1}[\mathit{Aid}](\mathit{Aid})\diamond(\mathit{ aid})\rangle)\), \(\
eg\pi_{1}\): \(Null(\mathit{sel}\langle R_{1}[\mathit{Aid}](\mathit{Aid})\diamond(\mathit{ aid})\rangle)\), \(\pi_{2}\): \(Null(\mathit{sel}\langle R_{2}[\mathit{Bid}](\mathit{Bid})\diamond(\mathit{ bid})\rangle)\), \(\
eg\pi_{2}\): \(Null(\mathit{sel}\langle R_{2}[\mathit{Bid}](\mathit{Bid})\diamond(\mathit{ bid})\rangle)\). And guards formalize the constraints on firing transitions in WFT-nets. The guard on \(t_{4}\) is \(G(t_{4})=\pi_{1}\), which means that the value of \(\mathit{aid}\) can be stored into the table \(R_{1}\) if it does not exist in \(R_{1}\). In these ways, it is easy to understand the labels and guards on other transitions. As described in the example, each data element \(d\) in WFT-nets can be viewed as the intermediate variable between the control flow and the underlying database, and its values may be stored into some tables as the values of an attribute \(u\) via appropriate table operations under certain data constraints. In this case, such \(d\) is considered to be related to the attribute \(u\) of these tables, table operations, and data constraints. Conveniently, let \(d\)\(\sim\)\(u\) denote that the data element \(d\) is related to the attribute \(u\); let \(\mathcal{D}_{t}^{\mathit{sel}}\), \(\mathcal{D}_{t}^{\mathit{ins}}\), \(\mathcal{D}_{t}^{\mathit{upd}}\), \(\mathcal{D}_{t}^{\mathit{del}}\) be the set of all data elements related to the select, insert, update, and delete operation on transition \(t\); and let \(\mathcal{D}^{\pi}\) (resp. \(\mathcal{D}_{t}^{\mathit{G}}\)) and \(\mathcal{R}^{\pi}\) (resp. \(\mathcal{R}_{t}^{\mathit{G}}\)) be the sets of all data elements and tables occurring in a predicate (resp. guard on \(t\)), respectively.