• 沒有找到結果。

Analysis of Structural Relationships between Processes in LRTS workflow . 12

Chapter 2. Temporal Structured Workflow Model

2.4 Analysis of Structural and Temporal Relationships between Processes in TS

2.4.2 Analysis of Structural Relationships between Processes in LRTS workflow . 12

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

Figure 6 illustrates how push and pop functions work for the calculation of the ABStacks corresponding to the processes in an LRTS workflow.

Figure 6 Calculation of ABStacks for Processes in an LRTS Workflow

Figure 7 illustrates a sample LRTS workflow decorated with ABStacks. Take process v5

for example. The items (as1, 2), and (xs1, 1) in the ABStack of v4 shows that v4 resides on #2 branch split from the AND-split process as1 and #1 branch split from the XOR-split process xs1. The order of (as1, 2) and (xs1, 1) indicates that the parallel structure started from as1 is nestedly contained by the decision structure started from xs1.

Figure 7 A Sample TS workflow with ABStacks and EAIs

Besides, the structural items (as1, 1) and (as1, 2) in the ABStacks of v4 and v5 correspondingly indicate that v4 and v5 reside on different branches split from AND-split process, as1. In other words, v4 and v5 are parallel. The parallelism or exclusiveness between processes can be identified through comparing the ABStacks of the corresponding processes, and Lemma 2 shows how ABStacks work for identification of structural relationships between processes in an LRTS workflow.

Lemma 2

For an LRTS workflow w, and p, q∈Pw

(1) Parallel(p, q) holds if and only if

(sp, bm)p.abstack and (sp, bm’)q.abstack where sp∈Pw, sp.type == AS and bm ≠ bm’.

(2) Exclusive(p, q) holds if and only if

(sp, bm)p.abstack and (sp, bm‘)q.abstack where sp∈Pw, sp.type == XS and bm ≠ bm’.

Proof:

Consider the if-part of statement (1), according to Definition 6, if (sp, bm)p.abstack and (sp, bm’)q.abstack where sp∈Pw, sp.type == AS and bm ≠ bm’, there exists a process m that bm == (sp, m), and m is either equivalent to p or Reachable(m, p) holds. Similarly, there exists another process n for q. bm ≠ bm’ indicates that m ≠ n, and p and q reside on different branches split from the AND-split process, sp. Thus Parallel(p, q) holds and the if part is shown correct.

As for the only-if-part, if Parallel(p, q) == true, p and q reside on different branches of a parallel structure. Let sp be the AND-split process starting the parallel structure, and jn be the

AND-join process terminating it. The nodes in the path from sp to p are totally different from those in the path from sp to q. Besides sp and jn, two distinct paths, <sp, …, p, …, jn> and

<sp, …, q, …, jn>, exist. Therefore, there exists a process m that (sp, m)Fw and either m is equivalent to p or Reachable(m, p) == true. Similarly, there also exists such a process n for q.

m and n can not be the same process because they reside on different branches split from sp, and thus, BM(sp, m) ≠ BM(sp, n). According to Definition 6, (sp, BM(sp, m)) is included in p.abstack, and (sp, BM(sp, n)) is included in q.abstack. The only-if part of statement (1) of the lemma is proved.

Part (2) can be proved similarly and the proof is omitted here. With the paragraphs above, Lemma 2 is shown correct.□

2.4.3 Analysis of Twisted Temporal and Structural Relationships between Processes in LRTS workflow

In a TS workflow, the temporal and structural relationships between processes are twisted.

This section firstly shows how to identify the temporal property between processes.

Figure 8 The Temporal Relationships between Time Intervals [39]

A time interval is duration of a segment of time. In [39], Allen defines seven reasoning relationships between time intervals. Figure 8 illustrates the temporal relationships adopted in this dissertation on the basis of Allen’s definition, and Definition 7 describes the formal

definition of time intervals and the temporal relationships between time intervals adopted in this dissertation.

Definition 7 (Time Intervals)

A time interval ti = [S(ti), E(ti)] indicates a duration from the time point S(ti) to E(ti), E(ti)S(ti).

A time point tp can be represented as a time interval [tp, tp], and ctime is the time point indicating the current time.

For any two time intervals ti1 and ti2,

ti1 is before ti2, notated as ti1pTIti2, if and only if E(ti1)≤S(ti2).

ti1 is after ti2, notated as ti1fTIti2, if and only if ti2 is before ti1. ti1 overlaps ti2, notated as ti1TIti2, if and only if

MIN({E(ti1), E(ti2)}) – MAX({S(ti1), S(ti2)}) > 0

ti2 contains ti1, notated as ti2TIti1, if and only if S(ti2)≤S(ti1) and E(ti2)≥E(ti1).

In Definition 7, two utility functions MAX and MIN are invoked. Function MAX returns the element with the maximum value among the parameter set, and function MIN returns the minimal one.

In [23] and [40], Joshi et al use not only individual time intervals but also the periodic temporal expressions to describe the temporal constraints in roles for temporal RBAC model.

For example, the expression “the night time duty is activated 6pm to 11pm every Wednesday and Friday” indicates that the permissions for night time duty are activated during certain repeated time durations. The periodic temporal expressions can be viewed as a combination of multiple time intervals, and are grouped as a time description as following definition.

Definition 8 (Time Descriptions)

A time description td is a set of time intervals. For any two time intervals tiz and tiy

in td, tix and tiy are exclusive. On the other hand, for any two non-empty time description tda and tdb, tda contains tdb notated as tdaTDtdb if and only if

tibtdb, ∃tiatda such that tiaTItib.

Figure 9 Calculation of EAIs in an LRTS Workflow [34][37]

In [34] and [37], the minimum and maximum working durations are used to estimate the active duration of a process corresponding to the start of workflow. The Estimated Active Interval (EAI) of a process is a time interval indicating when the process can be initialized and when it should be terminated. In this dissertation, the Estimated Active Interval of a process p, notated as EAI(p) is defined as following:

Definition 9 (Estimated Active Interval) For a TS workflow w and a process p∈Pw,

EAI(p) = [EST(p), LET(p)], and corresponding to when w starts:

EST(p) indicates the earliest time that p can be initialized.

LET(p) indicates the latest time that p must terminate.

With the assumption that the EST and LET of the start process of a TS workflow are zero, the methodology described in [34] and [37] is adopted to calculate the EAIs of processes in an LRTS workflow as Figure 9 illustrates.

With Lemma 1 and Lemma 2, whether two processes in an LRTS workflow are exclusive, parallel, or reachable from one to the other is identified with corresponding ABStacks. The path direction of two reachable processes can be further derived according to

the corresponding EAIs, and the following lemmas show how EAIs can be adopted in analysis of LRTS workflow.

Lemma 3

For an LRTS workflow w, p and q∈Pw, q.type == ACT, if Reachable(p, q), LET(p) < LET(q)

Proof:

Reachable(p, q) represents that the path <p, m1, m2, …, mn, q> exists. Now we prove the lemma with mathematical induction. For n = 0, (p, q)Fw, since q.type = ACT, D(q) > 0 and LET(q) = LET(p) + D(q). LET(p) < LET(q) holds.

Hypothesis: The lemma holds when n < k.

For n = k, LET(q) = LET(mk) + D(q) and LET(mk) < LET(q). According to the construction rule of TS workflow, mk.type ≠ S, E, and mk.type{AS, XS, AJ, XJ, ACT}. The following conditions should be discussed:

For any 1ik, if there exists an mi where mi.type = ACT, according to the hypothesis, LET(p) < LET(mi) and LET(mi) < LET(q). Therefore, LET(p) < LET(q). Otherwise, for any 1ik, mi.type{AS, XS, AJ, XJ}, according to the EAI calculation methods, for any (u, mi)

Fw, LET(u)LET(mi). Since there exists a path from p to mi, LET(p)LET(mi). On the other hand, according to the hypothesis, LET(mi) < LET(q). Therefore, LET(p) < LET(q).

With statements above, we know the lemma holds for n = k, and on the basis of mathematical induction, Lemma 3 is proved. □

Lemma 4

For an LRTS workflow w, p and q∈Pw, p.type == q.type == ACT, if Parrallel(p, q) == Exclusive(p, q) == false, and LET(p) < LET(q),

Reachable(p, q) == true.

Lemma 4 can be shown correct with Lemma 1 and the construction rule of LRTS workflow. Lemma 4 describes that if two activity processes in an LRTS workflow are not mutually parallel or exclusive, the process with larger LET is reachable from the process with smaller LET. From Lemma 1, we know that in an LRTS workflow, two processes are either parallel, exclusive, or reachable from one to the other. Therefore, Lemma 4 can be re-stated as Lemma 5 that if two activity processes in an LRTS workflow are reachable from one to the other, the activity processes with larger LET is reachable from the one with smaller LET.

Lemma 5

For an LRTS workflow w, p, qPw, p.type == q.type == ACT,

If (Reachable(p, q)Reachable(q, p)) == true, and LET(p) < LET(q), Reachable(p, q) == true.

On the other hand, two processes are concurrent if and only if they are structurally parallel and overlapped in EAIs. On the basis of Lemma 5, a process is before another one if one of the following statements holds, (1) the latter is structurally reachable from the former, and (2) they are structurally parallel and the EAI of the former is before the EAI of the latter. The definition of the structural and temporal relationships in LRTS workflow is formally described as following.

Definition 10 (Structural and Temporal Relationships in LRTS workflow) For an LRTS workflow w,

Concurrent: Pw×Pw{true, false}

Concurrent(p, q) == true if and only if

( Parallel(p, q)EAI(p)TIEAI(q) ) == true.

Before: Pw×Pw{true, false}

Before(p, q) == true if and only if

( Reachable(p, q)( Parallel(p, q)EAI(p)pTIEAI(q) ) ) == true.

After: Pw×Pw{true, false}

After(p, q) == true if and only if Before(q, p) == true.

Chapter 3. A Delegation Framework for WfMS based on