Chapter 3 PRELIMINARIES
3.2. Process models
Process models represent the behaviour of a set of activities that belongs to a process or a workflow. Business process models are very primordial as it helps in having a deeper understanding of how your processes work and the way the business functions, so that the processes can be improved. Process models can be represented by several notations such as BPMN, transition systems, Petri nets, etc. In this thesis, we will use only Petri net representation to represent a process model. Petri net can be easily transformed to other notations.
3.2.1 Petri net
A Petri net is a directed bipartite graph that consists of places and transitions interconnected by directed arcs. Graphically, places are denoted by circles, transitions are represented by rectangles and arcs are represented by arrows with directly link places with transitions. Places represent possible states of the system; Transitions are events or actions which cause the change of state; and every arc simply connects a place with a transition or a transition with a place. A change of a state is denoted by a movement of token(s) (black dots) from place(s) to place(s); and is caused by the firing of a transition. The firing represents an occurrence of the event or an action taken. The firing is subject to the input conditions, denoted by token availability. The formal definition is presented in Definition 3.2. Figure 3.1 shows a petri net model deduced from the event log of Table 3.1.
60
Figure 3.1. The corresponding petri net model of the event log of table 3.1(A sound workflow net)
Definition 3.2 (Petri net graph) (Van der Aalst, 1998).
A Petri net graph is a 3-tuple (P, T, A) in which P is a finite set of places; T is a finite set of transitions, such that 𝑃 ⋂ 𝑇 = ∅; and 𝐴 ⊆ (𝑃 × 𝑇) ∪ (𝑇 × 𝑃) is a set of directed arcs, called the flow relation. A place 𝑝 ∈ 𝑃 is an input place of a transition 𝑡 ∈ 𝑇 if and only if (iff) there exists an arc 𝑎 ∈ 𝐴 such that ∙ 𝑡 = {𝑝 ∈ 𝑃/𝑎(𝑝, 𝑡) > 0}. A place 𝑝 ∈ 𝑃 is an output place of a transition 𝑡 ∈ 𝑇 if there exists an arc 𝑎 ∈ 𝐴 such that 𝑡 ∙= {𝑝 ∈ 𝑃/𝑎(𝑡, 𝑝) >
0}.
A marking of a Petri net (graph). A marking of a Petri net is a multiset of its places, i.e., a mapping 𝑀: 𝑆 → 𝒩, which means that the marking assigns a number of tokens to each place.
A marked Petri net is a pair (N, M), where N = (P, T, A) is a Petri net, and M is a bag over P denoting the marking of the net.
Definition 3.3 (Firing rule) (Van der Aalst, 1998).
Let (N = (P, T, A), M) be a marked Petri net. Transition t ∈ T is enabled (represented as (𝑁, 𝑀)[𝑡 >) iff •t ≤ M. The firing rule −[−> ⊆ N × T × N is the smallest relation satisfying any (N = (P, T, A), M) ∈ N and any t ∈ T, (𝑁, 𝑀)[𝑡 > ⇒ (𝑁, 𝑀)[𝑡 > (𝑁, 𝑀 −• 𝑡 + 𝑡 •).
In the marking shown in Figure 3.1 (i.e., one token in the source place), transition Request purchase is enabled and firing this transition removes the token from the input place and puts a token in the output place. In the resulting marking, transition Approve purchase is
61
enabled. If transition Approve purchase is executed, firing will removes the token from the input place of Approve purchase and puts a token in the output place of Approve purchase and so on.
Definition 3.4. (Reachable markings)
Let (N, s0) be a marked P/T-net in N. A marking s is reachable from the initial marking s0 iff there exists a sequence of enabled transitions whose firing leads from s0 to s.
The set of reachable markings of (N, s0) is denoted [N, s0>.
The marked P/T-net shown in Figure 3.1 has 8 reachable markings. Sometimes it is convenient to know the sequence of transitions that are fired in order to reach some given marking.
Definition 3.5. (Firing sequence)
Let (N, s0) with N = (P, T, F) be a marked P/T net. A sequence σ ∈ T* is called a firing sequence of (N, s0) iff, for some natural number n ∈ IN, there exist markings s1,...,sn and transitions t1,...,tn ∈ T such that σ = t1 ...tn and, for all i with 0 ≤ i.
Definition 3.6. (Connectedness)
A net N = (P, T, F) is weakly connected, or simply connected, iff, for every two nodes x and y in P ∪ T, x(F ∪ F −1)*y, where R−1 is the inverse and R* the reflexive and transitive closure of a relation R. Net N is strongly connected iff, for every two nodes x and y, xF*y.
We assume that all nets are weakly connected and have at least two nodes. The P/T-net shown in Figure 3.1 is connected but not strongly connected because there is no directed path from the sink place to the source place, or from Receive & verify to Request purchase, etc.
(Van der Aalst, 2003).
Definition 3.7. (Boundedness, safeness)
A marked net (N = (P, T, F), s) is bounded iff the set of reachable markings [N, s> is finite. It is safe iff, for any s’ ∈ [N, s> and any p ∈ P, s’ (p) ≤ 1. Note that safeness implies
62 boundedness.
The marked P/T-net shown in Figure 3.1 is safe (and therefore also bounded) because none of the 8 reachable states puts more than one token in a place. (Van der Aalst, 2003).
Definition 3.8. (Dead transitions, liveness)
Let (N = (P, T, F), s) be a marked P/T-net. A transition t ∈ T is dead in (N, s) iff there is no reachable marking s’ ∈ [N, s> such that (N, s’ )[t . (N, s) is live iff, for every reachable marking s’ ∈ [N, s> and t ∈ T, there is a reachable marking s’’ ∈ [N, s’ such that (N, s’’)[t
>. Note that liveness implies the absence of dead transitions.
None of the transitions in the marked P/T-net shown in Figure 3.1 is dead. However, the marked P/T-net is not live since it is not possible to enable each transition continuously.
3.2.2 Workflow net
A workflow net is a special case of a Petri net that is used to model the workflow of process activities. Workflow net transitions represent activities or tasks, while places represent the pre/post conditions. A workflow net is a Petri net with a single source place and a single sink place. In addition, all nodes are on a path from start to end, except the source and sink. The model shown in Figure 3.1 is a workflow net. The formal definition of a workflow net is given as follows.
Definition 3.9.(Workflow net graph) (Van der Aalst, 1998).
(P, T, A) is a workflow net graph iff (P, T, A) is a Petri net graph, and there exists a single source place start 𝑝 ∈ 𝑃 such that ∙ 𝑝 = ∅, and a single sink place end 𝑝 ∈ 𝑃 such that 𝑝 ∙= ∅, and every place and every transition are on a path from start to end.
Sound workflow net:
A workflow net is sound iff a process with a start marking of k tokens in its source place can reach the termination state marking with k tokens in its sink place (defined as k- sound workflow net). At the moment of termination, when there is a token in the sink place, all other places are empty. Additionally, in a sound workflow net, all transitions can
63
fire (Van der Aalst, 1997). The workflow net shown in Figure 3.1 is a sound.