# Translating Workflow Nets to Process Trees: An Algorithmic Approach

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Preliminaries

#### 2.1. Basic Notation

#### 2.2. Workflow Nets

**Definition**

**1**(Labeled Workflow net (WF-net))

**.**

- 1.
- $\u2022{p}_{i}=\varnothing \wedge \nexists p\in P\backslash \{{p}_{i}\}\left(\u2022p=\varnothing \right)$;${p}_{i}$is the unique source place.
- 2.
- ${p}_{o}\u2022=\varnothing \wedge \nexists p\in P\backslash \{{p}_{o}\}\left(p\u2022=\varnothing \right)$;${p}_{o}$is the unique sink place.
- 3.
- Each element$x\in P\cup T$is on a path from${p}_{i}$to${p}_{o}$.

**Definition**

**2**(Soundness)

**.**

- 1.
- $(W,[{p}_{i}])$is safe,i.e., $\forall M\in \mathcal{R}(W,[{p}_{i}])\left(\forall p\in P\left(M(p)\le 1\right)\right)$,
- 2.
- $[{p}_{o}]$can always be reached, i.e.,$\forall M\in \mathcal{R}(W,[{p}_{i}])\left((W,M)\u21dd(W,[{p}_{o}])\right)$.
- 3.
- Each$t\in T$is enabled, at some point, i.e.,$\forall t\in T\left(\exists M\in \mathcal{R}(W,[{p}_{i}])\left(M[t\rangle \right)\right)$.

#### 2.3. Process Trees

**Definition**

**3**(Process Tree)

**.**

- 1.
- $x\in \Sigma \cup \{\tau \}$; an (non-observable) activity,
- 2.
- $\oplus ({Q}_{1},\dots ,{Q}_{n})$, for$\oplus \in \u2a01$, $n\ge 1$, where${Q}_{1},\dots ,{Q}_{n}$are process trees;

**Definition**

**4**(Process Tree Language)

**.**

**Definition**

**5**(Process Tree Transformation Function)

**.**

## 3. Translating Workflow Nets to Process Trees

#### 3.1. Overview

#### 3.2. PTree-Nets and Their Unfolding

**Definition**

**6**(Process Tree-labeled Petri-net (PTree-net))

**.**

**Definition**

**7**(PTree-net Unfolding)

**.**

- 1.
- ${P}^{\prime}=P\cup {\displaystyle \bigcup _{t\in T}}{\widehat{P}}_{t}$,
- 2.
- ${T}^{\prime}={\displaystyle \bigcup _{t\in T}}{\widehat{T}}_{t}$,
- 3.
- ${F}^{\prime}={\displaystyle \bigcup _{t\in T}}{\widehat{F}}_{t}\cup {\displaystyle \bigcup _{t\in T}}\{(p,t)\mid p\in \u2022t\wedge t\in {p}_{{i}_{t}}\u2022\}\cup {\displaystyle \bigcup _{t\in T}}\{(t,p)\mid p\in t\u2022\wedge t\in \u2022{p}_{{o}_{t}}\}$,
- 4.
- $\ell ={\displaystyle \bigcup _{t\in T}}{\widehat{\ell}}_{t}$. (Since functions are binary Cartesian products, we write set operations here).

#### 3.3. Pattern Reduction

**Definition**

**8**(Feasible Pattern)

**.**

**Definition**

**9**(Pattern Reduction)

**.**

#### 3.3.1. Sequential Pattern

**Proposition**

**1**(→-Pattern)

**.**

- 1.
- $\forall 1\le i<n\left(|{t}_{i}\u2022|\ge 1\wedge {t}_{i}\u2022=\u2022{t}_{i+1}\right)$, transition${t}_{i}$enables${t}_{i+1}$; and
- 2.
- $\forall 1\le i<n\left(\forall p\in {t}_{i}\u2022\left(\u2022p=\{{t}_{i}\}\wedge p\u2022=\{{t}_{i+1}\}\right)\right)$, enabling is unique,

**Proof.**

**Lemma**

**1**(→-Pattern (Proposition 1) is Globally Language-Preserving)

**.**

**Proof.**

#### 3.3.2. Exclusive Choice Pattern

**Proposition**

**2**(×-Pattern)

**.**

- 1.
- $\u2022{t}_{1}=\u2022{t}_{2}=\cdots =\u2022{t}_{n}$, all pre-sets are shared among the members of the pattern;
- 2.
- ${t}_{1}\u2022={t}_{2}\u2022=\cdots ={t}_{n}\u2022$, all post-sets are shared among the members of the pattern; and
- 3.
- $\forall 1\le i\le n\left(\u2022{t}_{i}\ne {t}_{i}\u2022\right)$, self-loops are not allowed,

**Proof.**

**Lemma**

**2**(×-Pattern (Proposition 2) is Globally Language-Preserving)

**.**

**Proof.**

#### 3.3.3. Concurrent Pattern

**Proposition**

**3**(∧-Pattern)

**.**

- 1.
- $\forall 1\le i<j\le n\left(\u2022{t}_{i}\cap \u2022{t}_{j}=\varnothing \right)$, no interaction between the member’s pre-sets;
- 2.
- $\forall 1\le i<j\le n\left({t}_{i}\u2022\cap {t}_{j}\u2022=\varnothing \right)$, no interaction between the member’s post-sets;
- 3.
- $\forall 1\le i\le n\left(\forall p\in \u2022{t}_{i}\left(p\u2022=\left\{{t}_{i}\right\}\right)\right)$, pre-set places uniquely connect to a member;
- 4.
- $\forall 1\le i\le n\left(\forall p\in {t}_{i}\u2022\left(\u2022p=\left\{{t}_{i}\right\}\right)\right)$, post-set places uniquely connect to a member;
- 5.
- $\forall p\in \u2022T\left(\u2022p\cap \{{t}_{1},...,{t}_{n}\}=\varnothing \right)$, members do not influence other members;
- 6.
- $\forall p,{p}^{\prime}\in \u2022T\left(\u2022p=\u2022{p}^{\prime}\right)$, member’s pre-sets share their pre-set;
- 7.
- $\forall p\in T\u2022\left(p\u2022\cap \{{t}_{1},...,{t}_{n}\}=\varnothing \right)$, member firing does not affect other members;
- 8.
- $\forall p,{p}^{\prime}\in T\u2022\left(p\u2022={p}^{\prime}\u2022\right)$, member’s post-sets share their post-set;
- 9.
- $\forall t,{t}^{\prime}\in \u2022\left(\u2022T\right)\left(\u2022t=\u2022{t}^{\prime}\right)$, pre-sets of enablers are equal;
- 10.
- $\forall t,{t}^{\prime}\in \left(T\u2022\right)\u2022\left(t\u2022={t}^{\prime}\u2022\right)$, post-sets of enablers are equal,

**Proof.**

**Lemma**

**3**(∧-Pattern (Proposition 3) is Globally Language-Preserving)

**.**

**Proof.**

#### 3.3.4. Loop Pattern

**Proposition**

**4**(⥀-Pattern)

**.**

- 1.
- $\u2022{t}_{1}={t}_{2}\u2022$, pre-set of${t}_{1}$is the post-set of${t}_{2}$;
- 2.
- ${t}_{1}\u2022=\u2022{t}_{2}$, pre-set of${t}_{2}$is the post-set of${t}_{1}$;
- 3.
- $\forall p\in \u2022{t}_{1}\left(p\u2022=\{{t}_{1}\}\right)$, ${t}_{1}$is the only transition in the post-set of its pre-set;
- 4.
- $\forall p\in {t}_{1}\u2022\left(\u2022p=\{{t}_{1}\}\right)$; ${t}_{1}$, is the only transition in the pre-set of its post-set,

**Proof.**

**Lemma**

**4**(⥀-Pattern (Proposition 4) is Globally Language-Preserving)

**.**

**Proof.**

#### 3.4. Algorithm

Algorithm 1: WF-net reduction |

**Lemma**

**5**(Pattern Reduction is Soundness Preserving)

**.**

**Proof.**

**Lemma**

**6**(Pattern Reduction is Language Preserving in $\mathrm{\Lambda}$)

**.**

**Proof.**

**Theorem**

**1**(Algorithm 1 is able to find Language-Equal Process Trees)

**.**

**Proof.**

## 4. Evaluation

#### 4.1. Implementation

#### 4.2. Experimental Setup

#### 4.3. Results

## 5. Related Work

## 6. Discussion

#### 6.1. Extensibility

#### 6.2. Relation to Refined Process Structure Tree

#### 6.3. Reducibility of WF-Nets

## 7. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- van der Aalst, W.M.P. Process Mining—Data Science in Action, 2nd ed.; Springer: New York, NY, USA, 2016. [Google Scholar]
- Dijkman, R.M.; Dumas, M.; Ouyang, C. Semantics and analysis of business process models in BPMN. Inf. Softw. Technol.
**2008**, 50, 1281–1294. [Google Scholar] [CrossRef] [Green Version] - van der Aalst, W.M.P. Formalization and verification of event-driven process chains. Inf. Softw. Technol.
**1999**, 41, 639–650. [Google Scholar] [CrossRef] - van der Aalst, W.M.P.; Buijs, J.C.A.M.; van Dongen, B.F. Towards Improving the Representational Bias of Process Mining. In Proceedings of the SIMPDA, Campione d’Italia, Italy, 29 June–1 July 2011; pp. 39–54. [Google Scholar]
- Lee, W.L.J.; Verbeek, H.M.W.; Munoz-Gama, J.; van der Aalst, W.M.P.; Sepúlveda, M. Recomposing conformance: Closing the circle on decomposed alignment-based conformance checking in process mining. Inf. Sci.
**2018**, 466, 55–91. [Google Scholar] [CrossRef] - van Zelst, S.J.; Bolt, A.; van Dongen, B.F. Computing Alignments of Event Data and Process Models. ToPNoC
**2018**, 13, 1–26. [Google Scholar] - Schuster, D.; van Zelst, S.J.; van der Aalst, W.M.P. Alignment Approximation for Process Trees (forthcoming). In Proceedings of the 5th International Workshop on Process Querying, Manipulation, and Intelligence (PQMI 2020), Padua, Italy, 18 August 2020. [Google Scholar]
- van der Aalst, W.M.P.; de Medeiros, A.K.A.; Weijters, A.J.M.M. Process Equivalence: Comparing Two Process Models Based on Observed Behavior. In Proceedings of the Business Process Management, 4th International Conference, BPM 2006, Vienna, Austria, 5–7 September 2006; pp. 129–144. [Google Scholar]
- van Dongen, B.F.; Dijkman, R.M.; Mendling, J. Measuring Similarity between Business Process Models. In Seminal Contributions to Information Systems Engineering, 25 Years of CAiSE; Krogstie, J., Pastor, O., Pernici, B., Rolland, C., Sølvberg, A., Eds.; Springer: New York, NY, USA, 2013; pp. 405–419. [Google Scholar]
- Mendling, J.; Lassen, K.B.; Zdun, U. On the transformation of control flow between block-oriented and graph-oriented process modelling languages. IJBPIM
**2008**, 3, 96–108. [Google Scholar] [CrossRef] - Berti, A.; van Zelst, S.J.; van der Aalst, W.M.P. Process Mining for Python (PM4Py): Bridging the Gap Between Process-and Data Science. In Proceedings of the ICPM Demo Track 2019, Aachen, Germany, 24–26 June 2019; pp. 13–16. [Google Scholar]
- Leemans, S.J.J.; Fahland, D.; van der Aalst, W.M.P. Discovering Block-Structured Process Models from Event Logs—A Constructive Approach. In Proceedings of the Application and Theory of Petri Nets and Concurrency—34th International Conference, Milan, Italy, 24–28 June 2013; pp. 311–329. [Google Scholar]
- Verbeek, E.; Buijs, J.C.A.M.; van Dongen, B.F.; van der Aalst, W.M.P. ProM 6: The Process Mining Toolkit. In Proceedings of the Business Process Management 2010 Demonstration Track, Hoboken, NJ, USA, 14–16 September 2010. [Google Scholar]
- van Dongen, B.F. BPI Challenge 2012; Eindhoven University of Technology: Eindhoven, The Netherlands, 2012. [Google Scholar] [CrossRef]
- van der Aalst, W.M.P. The Application of Petri Nets to Workflow Management. J. Circuits Syst. Comput.
**1998**, 8, 21–66. [Google Scholar] [CrossRef] [Green Version] - Murata, T. Petri nets: Properties, analysis and applications. Proc. IEEE
**1989**, 77, 541–580. [Google Scholar] [CrossRef] - van der Aalst, W.M.P. Workflow Verification: Finding Control-Flow Errors Using Petri-Net-Based Techniques. In Proceedings of the Business Process Management, Models, Techniques, and Empirical Studies, Berlin, Germany, 19 April 2000; pp. 161–183. [Google Scholar]
- Jouck, T.; Depaire, B. PTandLogGenerator: A Generator for Artificial Event Data. In Proceedings of the BPM Demo Track 2016, Rio de Janeiro, Brazil, 21 September 2016; pp. 23–27. [Google Scholar]
- Jouck, T.; Depaire, B. Generating Artificial Data for Empirical Analysis of Control-flow Discovery Algorithms—A Process Tree and Log Generator. Bus. Inf. Syst. Eng.
**2019**, 61, 695–712. [Google Scholar] [CrossRef] - Leemans, S. Robust Process Mining with Guarantees. Ph.D. Thesis, Department of Mathematics and Computer Science, Eindhoven University of Technology, Eindhoven, The Netherlands, 2017. [Google Scholar]
- Augusto, A.; Conforti, R.; Dumas, M.; Rosa, M.L.; Maggi, F.M.; Marrella, A.; Mecella, M.; Soo, A. Automated Discovery of Process Models from Event Logs: Review and Benchmark. IEEE Trans. Knowl. Data Eng.
**2019**, 31, 686–705. [Google Scholar] [CrossRef] [Green Version] - Carmona, J.; van Dongen, B.F.; Solti, A.; Weidlich, M. Conformance Checking—Relating Processes and Models; Springer: New York, NY, USA, 2018. [Google Scholar]
- van der Aalst, W.M.P.; Lassen, K.B. Translating unstructured workflow processes to readable BPEL: Theory and implementation. Inf. Softw. Technol.
**2008**, 50, 131–159. [Google Scholar] [CrossRef] - Lassen, K.B.; van der Aalst, W.M.P. WorkflowNet2BPEL4WS: A Tool for Translating Unstructured Workflow Processes to Readable BPEL. In Proceedings of the CoopIS, DOA, GADA, and ODBASE, OTM Confederated International Conferences, Montpellier, France, 29 October–3 November 2006; pp. 127–144. [Google Scholar]
- Vanhatalo, J.; Völzer, H.; Koehler, J. The refined process structure tree. Data Knowl. Eng.
**2009**, 68, 793–818. [Google Scholar] [CrossRef] - Polyvyanyy, A.; Vanhatalo, J.; Völzer, H. Simplified Computation and Generalization of the Refined Process Structure Tree. In Proceedings of the WS-FM 2010, Hoboken, NJ, USA, 16–17 September 2010; pp. 25–41. [Google Scholar]
- Polyvyanyy, A.; García-Bañuelos, L.; Dumas, M. Structuring Acyclic Process Models. In Proceedings of the Business Process Management—8th International Conference, Hoboken, NJ, USA, 13–16 September 2010; pp. 276–293. [Google Scholar]
- Polyvyanyy, A.; García-Bañuelos, L.; Dumas, M. Structuring acyclic process models. Inf. Syst.
**2012**, 37, 518–538. [Google Scholar] [CrossRef] - Polyvyanyy, A.; García-Bañuelos, L.; Fahland, D.; Weske, M. Maximal Structuring of Acyclic Process Models. Comput. J.
**2014**, 57, 12–35. [Google Scholar] [CrossRef] [Green Version] - Weidlich, M.; Polyvyanyy, A.; Mendling, J.; Weske, M. Causal Behavioural Profiles—Efficient Computation, Applications, and Evaluation. Fundam. Inform.
**2011**, 113, 399–435. [Google Scholar] [CrossRef] [Green Version] - Polyvyanyy, A.; Weidlich, M.; Weske, M. The Biconnected Verification of Workflow Nets. In Proceedings of the On the Move to Meaningful Internet Systems: OTM 2010—Confederated International Conferences: CoopIS, IS, DOA and ODBASE, Hersonissos, Crete, Greece, 25–29 October 2010; pp. 410–418. [Google Scholar]
- Suzuki, I.; Murata, T. A Method for Stepwise Refinement and Abstraction of Petri Nets. J. Comput. Syst. Sci.
**1983**, 27, 51–76. [Google Scholar] [CrossRef] [Green Version] - Esparza, J.; Hoffmann, P. Reduction Rules for Colored Workflow Nets. In Proceedings of the Fundamental Approaches to Software Engineering—19th International Conference, FASE 2016, Held as Part of the European Joint Conferences on Theory and Practice of Software, Eindhoven, The Netherlands, 2–8 April 2016; pp. 342–358. [Google Scholar]
- Esparza, J.; Hoffmann, P.; Saha, R. Polynomial analysis algorithms for free choice Probabilistic Workflow Nets. Perform. Evaluation
**2017**, 117, 104–129. [Google Scholar] [CrossRef] [Green Version]

**Figure 1.**A simple example process tree [1], describing all basic control-flow constructs.

**Figure 2.**The same process model, obtained by applying the Inductive Miner [12] implementation of ProM [13] on a real event dataset [14], in different process modeling formalisms. Because of its hierarchical nature, the process tree formalism easily allows us to spot the main control-flow behavior. (

**a**) The process, represented as a WF-net; (

**b**) The process, represented as a process tree.

**Figure 5.**Instantiations of $\lambda $ (5). The $\lambda $-functions for operators are defined recursively, using the $\widehat{\lambda}$-values of their children, i.e., a place “entering”/“exiting” a $\widehat{\lambda}({Q}_{i})$ fragment, connects to ${p}_{i}\u2022$/$\u2022{p}_{o}$ (respectively) of $\lambda ({Q}_{i})$.

**Figure 6.**Application of the algorithm on the running example, i.e., ${W}_{1}$. The label of ${t}_{6}^{\prime}$, i.e., $\kappa ({t}_{6}^{\prime})$, depicted in Figure 6e, is the resulting process tree. The resulting process tree, i.e., $\to (a,\u2940(\to (\wedge (\times (b,c),d),e),f),\times (g,h))$, is equal to Figure 4. (

**a**) Result of the first two rounds of the algorithm. The first two patterns that can be found are choice constructs, between b and c and between g and h, respectively. (

**b**) Result of the third round of the algorithm on the running example. We find a concurrent construct between transition ${t}_{2}^{\prime}$ and ${t}_{4}$. (

**c**) Result of the fourth round of the algorithm. We find a sequential construct. (

**d**) Result of the fifth round of the algorithm. We find a loop construct. (

**e**) Result of the final round of the algorithm. We find a sequence construct.

**Figure 7.**Example WF-net (and a corresponding reduction) in which we are able to detect the feasible pattern $\to (a,c)$. The language of the original net (Figure 7a) is $\{\langle {t}_{1},{t}_{2},{t}_{3},{t}_{4},{t}_{5}\rangle ,\langle {t}_{1},{t}_{3},{t}_{2},{t}_{4},{t}_{5}\rangle ,\langle {t}_{1},{t}_{2},{t}_{4},{t}_{3},{t}_{5}\rangle \}$. The language of the reduced net (Figure 7b) is $\{\langle {t}_{1},{t}_{2}^{\prime},{t}_{3},{t}_{5}\rangle ,\langle {t}_{1},{t}_{3},{t}_{2}^{\prime},{t}_{5}\rangle \}$. Applying the label functions on the firing sequences yields different labeled languages. (

**a**) A WF-net describing concurrent behavior between a sequential construct between a and c and activity b. Observe that the fragment formed by ${p}_{1}$, ${p}_{3}$, ${p}_{5}$, ${t}_{2}$, and ${t}_{4}$ is a feasible sequence pattern. (

**b**) The (PTree)WF-net after reduction of the sequential pattern between ${t}_{2}$, and ${t}_{4}$.

**Figure 8.**Example WF-net (and a corresponding reduction) in which we are able to detect feasible patterns ($\u2940(a,b)$ and $\u2940(c,d)$) that are not globally language preserving. In the exemplary reduced net (Figure 8b), once we have executed ${t}_{2}^{\prime}$, we are only able to execute the loop construct between ${t}_{4}$, and ${t}_{5}$. (

**a**) The WF-net containing two local language equivalent feasible patterns. (

**b**) The (PTree)WF-net after reduction of the loop pattern between ${t}_{2}$, and ${t}_{3}$.

**Figure 9.**Schematic visualization of the →-pattern reduction (dashed arcs are allowed to be part of the pattern, solid arcs are required). The post-set of each transition ${t}_{i}$ acts as the pre-set of ${t}_{i+1}$ ($1\le i<n$). The transition ${t}^{\prime}$ replacing the identified pattern inherits $\u2022{t}_{1}$ and ${t}_{n}\u2022$ (these corresponding places are not explicitly visualized in this figure). The label of ${t}^{\prime}$ is formed by the sequence operator defined on top of the labels of ${t}_{1},\dots ,{t}_{n}$, respectively.

**Figure 10.**Visualization of the ×-pattern reduction (dashed arcs are allowed to be part of the pattern, while solid arcs are required). All transitions in the pattern share the same pre- and post-set. The replacing transition inherits the aforesaid pre- and post-set.

**Figure 11.**Visualization of the ∧-pattern reduction. Transitions ${t}_{1},\dots ,{t}_{n}$ have disjunct pre-sets, yet, their pre-sets have the exact same pre-sets. The same holds for the post-sets of transitions ${t}_{1},..,{t}_{n}$. The replacing transition inherits all pre- and post-sets of ${t}_{1},..,{t}_{n}$.

**Figure 12.**Visualization of the ⥀-pattern reduction. The pre-set of transition ${t}_{1}$ equals the post-set of ${t}_{2}$ and vice versa. The replacing transition inherits the pre- and post-set of transition ${t}_{1}$.

**Figure 14.**Average time performance of the implementation. A quadratic relation, in computation time measured in micro-seconds ($\mu $-seconds), with respect to the size of the WF-net, is observable.

**Figure 15.**Schematic visualization of the ${\u2940}_{s}$-pattern reduction. The pre- and post-set of transitions ${t}_{1},{t}_{2},\dots ,{t}_{n}$ are the same. In the reduction, the places are “split” into two groups, one copying all dashed incoming arcs, one copying all dashed outgoing arcs. The newly added transition ${t}^{\prime}$ is placed in between with label $\u2940(\tau ,\times (\kappa ({t}_{1}),...,\kappa ({t}_{n})))$.

**Figure 16.**Example application of the self-loop pattern reduction. (

**a**) Simple WF-net, having self loop transitions ${t}_{2}$, and ${t}_{3}$. (

**b**) Self-loop reduction where ${T}^{\prime}=\{{t}_{2}\}$. (

**c**) Self-loop reduction where ${T}^{\prime}=\{{t}_{2},{t}_{3}\}$.

**Figure 18.**Example of an RPST decomposition (Figure 18c) based on the workflow graph (Figure 18b) of a simple sound WF-net ${W}_{2}$ (Figure 18a). (

**a**) Simple unsound (not well-handled) WF-net ${W}_{3}$. (

**b**) The workflow graph of ${W}_{3}$, including its canonical fragments. (

**c**) The RPST of ${W}_{3}$.

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

van Zelst, S.J.; Leemans, S.J.J.
Translating Workflow Nets to Process Trees: An Algorithmic Approach. *Algorithms* **2020**, *13*, 279.
https://doi.org/10.3390/a13110279

**AMA Style**

van Zelst SJ, Leemans SJJ.
Translating Workflow Nets to Process Trees: An Algorithmic Approach. *Algorithms*. 2020; 13(11):279.
https://doi.org/10.3390/a13110279

**Chicago/Turabian Style**

van Zelst, Sebastiaan J., and Sander J. J. Leemans.
2020. "Translating Workflow Nets to Process Trees: An Algorithmic Approach" *Algorithms* 13, no. 11: 279.
https://doi.org/10.3390/a13110279