• 沒有找到結果。

A workflow w is temporal structured with following properties:

(1) w is structured, and

(2) ∀p∈Pw,d(p) and D(p) represents the minimum and maximum working duration of process p.

To facilitate discussion, we assume that if p is an activity process, 0 < d(p)D(p);

otherwise, d(p) = D(p) = 0. Figure 4 illustrates a sample TS workflow.

Figure 4 A Sample TS workflow

2.4 Analysis of Structural and Temporal Relationships between Processes in TS workflow

2.4.1 Loop Reduction

The structural and temporal relationships between processes are the bases of any further analysis of a TS workflow. In [9], [11], and [12], Hsu et al. give several methodology to reveal the structural and temporal relationships between processes in acyclic structured and timed workflows. In [28] and [29], Hsu and Wang et al. claim that in a structured workflow, all the possible state variations of the artifact operated in loops with more than two iterations are the same as those with exact two iterations. Therefore, they reduce a structured loop into a decision structure with three branches representing for no iteration, a single iteration, and two iterations for the analysis of artifact anomalies with better efficiency. In this dissertation, we adopt an approach similar to [7] and [8] to reduce the structured loops in a TS workflow as decision structures to retrieve structural and temporal information in a TS workflow as in [9], [11], and [12].

In a TS workflow, the number of iterations of a loop affects the active timing of processes succeeding to the loop. The loop reduction introduced in [7] and [8] may bring inaccuracy to the analysis of temporal factors, and is therefore not feasible for TS workflow. In [38], Leong considers the worst case scenarios for loops in a workflow and develops a methodology to detect whether the workflow possibly exceeds its deadline during run-time. Here, we combine Leong's concept and the methodology in [7] and [8] to describe a refined loop reduction method for the analysis of TS workflow.

First, it is assumed that the maximal number of iterations for a structured loop in a TS workflow is finite. In other words, the infinite loops are not discussed in this study. Based on the assumption, a structured loop is transformed into a decision structure with three branches: no iteration, a single iteration, and maximal iterations as Figure 5 illustrates.

Figure 5 Refined Loop Reduction for TS Workflow Model

The refined loop reduction bring following advantage: (1) All the possible state variations of artifacts between iterations are still completely captured, (2) the active intervals of the processes succeeding to the structured loop can still be accurately estimated because the worst case scenario is considered, and (3) the methodology for acyclic structured workflow can be adopted in TS workflow because the structured loops are reduced. In this dissertation, loop-reduced TS workflows (LRTS workflows) are widely adopted in our methodology.

2.4.2 Analysis of Structural Relationships between Processes in LRTS workflow

The structural relationships between activity processes are the groundwork for analysis of TS workflow, and are described and proved in the following lemma.

Lemma 1 process is a basic building block of a structured workflow, p and q can always be distributed into two different building blocks combined in a sequence, a parallel structure, or a decision structure illustrated in Figure 2.

Let bp and bq be the building blocks containing p and q separately. If bp and bq is combined in a sequence block, p and q are reachable from former to the later. Since w is loop-reduced, i.e. w is loop free, if Reachable(p, q) holds, Reachable(q, p) is false, and vice versa. Besides, according to the construction rules, there exist no paths between the building blocks split from an XOR/AND-split process. Therefore, Parallel(p, q) and Exclusive(p, q) can not hold in this case.

Otherwise, if bp and bq is combined in a decision block, bp and bq represents different branches split from the XOR-split process starting the decision structure. In other words, p and q resides in different branches of a decision structure, and therefore, Exclusive(p, q) holds.

Since w is loop-reduced, there exist no paths between p and q, both Reachable(p, q) and Reachable(q, p) are false. On the other hand, according to the construction rules, since bp and bq reside on different branches of a decision structure, they can not reside in different branches of a parallel structure. Therefore, Parallel(p, q) does not hold. With similar reason, we can also show that when Parallel(p, q) holds, none of Reachable(p, q), Reachable(q, p), and Exclusive(p, q) holds, and hence, Lemma 1 is shown correct with all the statements above. □

In [9], Hsu et al. use a data structure, ABStack, to record the structural information of processes, and achieve an efficient analysis of the structural relationships between processes in an acyclic structured workflow. In this dissertation, the similar approach is adopted. All the flows in an LRTS workflow are tagged with a branch mark. The branch mark is a natural number ID for each out-flow split from an XOR/AND split process, and is -1 for any other flow

in the LRTS workflow. The branch mark in this dissertation is formally defined as following.

A process in an LRTS workflow might reside in nested decision/parallel structures, and the structures are recorded in the ABStack corresponding to the process. Each of the structures is presented as a structural item composed of the split process starting the structure and the branch mark mapped to one of the out-flows of the split process. In the dissertation, an ABStack is notated as a series of structural items quoted by a pair of double angle brackets, “«” and “»”.

The items representing the inner structures are recorded higher in the ABStack, where the leftmost item is the top of the stack and the rightmost item is the bottom. The definition of an ABStack is formally described as following.

Definition 6 (ABStack)

p∈Pw, p.abstack represents the ABStack corresponding to p.

A structural item, stitem = (sp, bm), is included in p.abstack if and only if

(1) sp∈Pw, sp.type∈{AS, XS}, and a path <sp, …, p, …, jn> in w where jn is the corresponding join process of sp.

(2) bm = BM( (sp, p’) ) where p’ == p or Reachable(p’, p) == true.

p.abstack == « » if and only if p resides in no decision/parallel structure.

p.abstack == «(sp1, bm1), (sp2, bm2), …, (spk, bmk)» exists if and only if a path

<spk, …, sp2, …, sp1, …, p, …, jn1, …, jn2, …, jnk> exists.

To calculate ABStacks of the processes in an LRTS workflow, push and pop functions associated with ABStack are defined as following:

Let an ABStack abs == «(sp1, bm1), (sp2, bm2), …, (spk, bmk

Push( abs, (sp, bm) ) returns a new ABStack abs’, where abs’ == «(sp, bm), (sp1, bm1), (sp2, bm2), …, (spk, bmk

Pop( abs ) returns a new ABStack abs’, where abs’ == «(sp2, bm2), …, (spk, bmk