• 沒有找到結果。

2.1 Definition of a structured workflow

A workflow is composed of processes and flows [12], where processes are connected by flows. Each process is in charge of start, end, control and activity processes, and each flow entering/leaving a process work to the in-flow/out-flow of the process.

An start (ST)/end (END) process represents the starting/ending point of the workflow. An activity (ACT) process represents a piece of work to be executed in a workflow. There are four types of control processes: AND-split (AS), AND-join (AJ), XOR-split (XS) and XOR-join (XJ) processes. An AND-split process splits two or more output branches to run concurrently. An AND-join process is activated when all its input branches enters. An XOR-split process selects one of its output branches to run, while an XOR-join process is activated when one of its input branches arrives.

Figure 2.1 shows the graph notation in workflow based on [12].

Figure 2.1 The graph notation in a workflow

Figure 2.2 The blocks in a workflow

In a structured workflow, each AND/XOR split process has a corresponding AND / XOR join process to form a block [12]. All the processes between the start and end process in a structured workflow are organized with the blocks shown in Figure 2.2. In figure 2.2(a) indicates there is only an activity process. Figure 2.2(b) indicates a sequence of blocks W1, W2,..., Wn. Figure 2.2(c) indicates a decision to select one of the blocks W1,W2, …, Wn to be executed. Figure 2.2(d) indicates a parallel structure that all the blocks W1,W2, …, Wn are executed simultaneously. Figure 2.2(e) indicates a loop structure where the entrance is an XOR joint process and output is an XOR split process, where the inner branch is the branch to execute the loop continually and

outer branch is the branch to execute after the loop stops.

Besides, a process is reachable from the other one if there is a path from the latter to it. Two processes are parallel if they reside in different branches of a parallel structure, and are exclusive to each other if they reside in different branches of a decision structure.

2.2 A temporal structured workflow

As in [12], a timed and structured workflow is called a temporal structured workflow (TS workflow). For each process p in a temporal workflow,d(p) and D(p) are added to p where d(p) and D(p) represent the minimum and maximum working duration of process p. To simplify discussion, we assume that 0 < d(p)D(p) if p is an activity process, d(p) = D(p) = 0 otherwise.

Figure 2.3 The method of computing EAI

The Estimated Active Interval (EAI) of a process is a time interval indicating when the process can be initialized and when it has to be terminated. For each process p in a TS workflow, EAI(p) = [EST(p), LET(p)] is a time interval where EST(p) indicates the earliest time p can be initialized and LET(p) indicates the latest time p must be terminated. Figure 2.3 shows how to calculate EAI of a process.

On the other hand, the parallel processes in a TS workflow would not be possibly executed at the same time if their working durations do not overlap. Two processes p and q in a TS workflow are concurrent if p and q are parallel, and EAI(p) and EAI(q) are overlapped, p and q are sequential if p is reachable to q or q is reachable to p. Let processes p, q are both selected to execute during run-time, and q is reachable from p, q cannot be executed before p. On the other hand, if p and q are parallel, and EAI(p) is before EAI(q), p is also executed before q. For both circumstances above, p is before q, and there is no operation working on the same artifact at the estimated time interval before p’s EAI and after q’s EAI, p is said to be a immediate successor of q, q is a immediate predecessor of p.

2.3 Artifact operations and anomalies

As in [12], an activity process in a TS workflow may operate an artifact with the following way(s): define (Def), use (Use) and kill (Kill). Def operation is to assign a value to the artifact, Use operation is to reference the artifact, and Kill operation is to delete value of the artifact. A process may also do nothing (Nop) on an artifact.

As in [12], an artifact in a TS workflow is initially stated undefined (UD), and turns to defined&no-use (DN) after it is defined. When a DN artifact is used, it turns to defined&reference (DR). Figure 2.4 shows the state changes of an artifact due to the artifact operations.

Figure 2.4 Artifact states transition diagram

On the other hand, when more than one process operates on the same artifact concurrently, these operations may interleave with each other for accessing the artifact and anomalies might be generated. These operations are called Interleaving Operations, and require additional consideration during anomalies analysis.

Interleaving operations can be clarified as following:

1. Interleaving Definition(s)&Kill(s), abbreviated as IDK, definition(s) and kill(s).

2. Interleaving Definitions, abbreviated as IDS, multiple definitions, but no kill.

3. Interleaving Kill(s), abbreviated as IKS, multiple kills, but no definition.

4. Interleaving Definition&Usage(s), abbreviated as IDU, one definition, no kill, and at least one usage.

5. Interleaving Usage(s)&Kill, abbreviated as IUK, one kill, no definition, and at least one usage.

6. Interleaving Usages, abbreviated as IUS, multiple usages only.

Artifact anomalies can be generated due to structural and temporal relationships between processes. In [12], there are four types of anomalies: Useless Definition, Undefined Usage, Null Kill and Ambiguous Usage. Useless Definition occurs when killing or defining a DN artifact makes the previous definition useless because the definition is destroyed (or redefined) without any usage. Undefined Usage occurs when using an UD artifact is an error leading to faulty execution. It is necessary to be handled by the designers. Null Kill occurs when a null kill represents a process trying to remove an inexistent definition. For instance, kill a UD artifact. Ambiguous Usage occurs when an ambiguous usage means that an activity process uses an artifact which is ambiguous in definitions or in states. For instance, the direct usage of an AB artifact is an ambiguous usage.

2.4 Loop reduction

For the loop structure, there are several approach [8][9][10]. These approaches all assume that there is at least zero time of execution. However, they do not consider the case which has at least k turns, k > 0. In Figure 2.5, X and Y represent the blocks in a TS workflow and the numbers of potential minimal and maximal iterations are m and n, where both numbers are larger than zero. The loop graph can be transformed as the lower graph, where the left sequence structure represents that a sequence of m blocks, and the right decision structure represents a loop structure at most (n - m) turns as in [12]. The transforming process is named as transformation of cyclic workflow to acyclic workflow (TCA).

Figure 2.5 The loop is transformed into an acyclic structure

相關文件