Dynamic Workflow Modeling and Analysis J Wang and

  • Slides: 23
Download presentation
Dynamic Workflow Modeling and Analysis J. Wang and R. Rosca Department of Software Engineering

Dynamic Workflow Modeling and Analysis J. Wang and R. Rosca Department of Software Engineering Monmouth University June 8, 2006 Dynamic Workflow Modeling and Analysis 1

Outline • • • Motivation An intuitive and formal workflow model Well-formed workflows Verification

Outline • • • Motivation An intuitive and formal workflow model Well-formed workflows Verification Tool support Conclusion and future work June 8, 2006 Dynamic Workflow Modeling and Analysis 2

Motivation • Driven by workflow design for incident command systems • Frequent changes of

Motivation • Driven by workflow design for incident command systems • Frequent changes of the course of action dictated by incoming events – Calls for on-the-fly verification of the workflow correctness • Predominantly volunteer-based workforce – Needs intuitive features for the description and modification of the WF • High stake – Needs formal approach (no ambiguity, allows analysis) • We introduced the Workflow Intuitive Formal Approach (WIFA) to meet the needs June 8, 2006 Dynamic Workflow Modeling and Analysis 3

WIFA Workflow Definition A workflow is WF = (T, P, C, A, S 0),

WIFA Workflow Definition A workflow is WF = (T, P, C, A, S 0), where • T = {T 1, T 2, …Tm} is a set of tasks, m ≥ 1. • P = (p)mxm is the precedence matrix of the task set. If Ti is the direct predecessor of Tj, then pij = 1; otherwise, pij = 0. • C = (c)mxm is the conflict matrix of the task set. cij {0, 1} for i = 1, 2, …m and j =1, 2, … m. • A = (A(T 1), A(T 2), …, A(Tm)) defines pre-condition set for each task. Tk T, A(Tk): *Tk . Let set A’ A(Tk). Then Ti A’ implies pik = 1. • S 0 {0, 1, 2, 3}m is the initial state of the workflow. June 8, 2006 Dynamic Workflow Modeling and Analysis 4

Example T 2 T 6 T 4 T 1 T = {T 1, T

Example T 2 T 6 T 4 T 1 T = {T 1, T 2, …, T 8}, T 5 T 7 T 8 , T 3 June 8, 2006 A(T 1) = Ø, A(T 2) = {{T 1}, {T 6}}, A(T 3) = {{T 1}}, A(T 4) = {{T 2}}, A(T 5) = {{T 4}}, A(T 6) = A(T 7) = {{T 5}}, A(T 8) = {{T 3, T 7}}. S 0 = (1, 0, 0, 0, 0). Dynamic Workflow Modeling and Analysis 5

Individual Task State Values • S(Ti) = 0 means Ti is not executable at

Individual Task State Values • S(Ti) = 0 means Ti is not executable at state S and not executed previously. • S(Ti) = 1 means Ti is executable at state S and not executed previously. • S(Ti) = 2 means Ti is not executable at state S and executed previously. • S(Ti) = 3 means Ti is executable at state S and executed previously. June 8, 2006 Dynamic Workflow Modeling and Analysis 6

State Transition Rules • A set of rules to guide workflow execution • Denote

State Transition Rules • A set of rules to guide workflow execution • Denote by Sa(Ti)Sb that task Ti is executed under state Sa, and the new state after the execution is Sb. • Rules: Tj T, – If Tj = Ti then Sb(Tj) = 2. (Tj is just executed) – If Sa(Tj) = 0: • If pij = 1 and A’ A(Tj) such that Sb(Tk) = 2 for any Tk A’, then Sb(Tj) = 1; • otherwise Sb(Tj) = 0. June 8, 2006 Dynamic Workflow Modeling and Analysis 7

State Transition Rules – Sa(Tj) = 1 If cij = 0 then Sb(Tj) =

State Transition Rules – Sa(Tj) = 1 If cij = 0 then Sb(Tj) = 1; otherwise Sb(Tj) = 0. – Sa(Tj) = 2 If pij = 1 and A’ A(Tj) such that Sb(Tk) = 2 for any Tk A’, then Sb(Tj) = 3; otherwise Sb(Tj) = 2. – Sa(Tj) = 3 If cij = 0 then Sb(Tj) = 3; otherwise Sb(Tj) = 2. 0 June 8, 2006 1 2 3 Dynamic Workflow Modeling and Analysis State value change of a task 8

State Transition Rules • Example T 4 T 2 T 5 T 7 T

State Transition Rules • Example T 4 T 2 T 5 T 7 T 1 T 6 T 3 c 23 = 1 S 0 =(1, 0, 0, 0) S 1 =(2, 1, 1, 0, 0) S 2 =(2, 2, 0, 1, 0, 0, 0) S 3 =(2, 0, 0, 1, 0) …… June 8, 2006 Dynamic Workflow Modeling and Analysis 9

Modeling Power • • • Sequential execution Conflict (decision making) Concurrency Synchronization Loop T

Modeling Power • • • Sequential execution Conflict (decision making) Concurrency Synchronization Loop T 2 T 6 T 4 T 1 T 5 c 23 = 0 c 67 = 1 A(T 2) = {{T 1}, {T 2}} A(T 8) = {T 3, T 7} T 7 T 8 T 3 June 8, 2006 Dynamic Workflow Modeling and Analysis 10

(1 0 0 0 0) T 1 Reachability Tree (2 1 1 0 0

(1 0 0 0 0) T 1 Reachability Tree (2 1 1 0 0 0) T 2 T 3 (2 2 1 1 0 0) (2 1 2 0 0 0) T 2 T T 3 (2 2 2 1 0 0) (2 2 1 0 0 0) T 3 T 5 T 4 4 (2 2 1 1 0) T 6 (2 2 2 1 1 0) T 7 T 6 (2 3 1 2 2 2 0 0) T 2 T 3 (2 3 2 2 0 0) T 2 (2 2 2 0 2 1) T 8 (2 2 1 3 2 2 0 0) T 4 T 6 T 3 (2 2 2 3 2 2 0 0) T 4 (2 2 2 0 2) (2 2 1 2 3 2 0 0) T 5 T 3 (2 2 3 2 0 0) T 5 (2 2 1 2 2 3 1 0) T 7 T 3 (2 2 2 3 1 0) T 7 (2 2 1 2 2 0) June 8, 2006 T 3 (2 2 2 2 1) T 8 (2 2 2 2 2) Dynamic Workflow Modeling and Analysis T 6 T 3 11

Well-Formed Workflows • All reachable states form reachable set R • A workflow is

Well-Formed Workflows • All reachable states form reachable set R • A workflow is well-formed if and only if the following two behavior conditions are met: – There is no dangling task – Given any reachable state, there is always an execution path leading the workflow to finish • Validation of a WF being well-formed requires the reachability analysis of the WF June 8, 2006 Dynamic Workflow Modeling and Analysis 12

Confusion-Free Workflows • To simplify workflow modeling and verification • A confusion-free workflow –

Confusion-Free Workflows • To simplify workflow modeling and verification • A confusion-free workflow – Is a well-formed workflow – Either all tasks triggered by the same task are in conflict, or no pairs of them are in conflict – A task becomes executable either when all of its predecessor tasks are executed, or when any one of them is executed June 8, 2006 AND-In-AND-Out XOR-In-and-Out AND-In-XOR-Out XOR-In-XOR-Out Dynamic Workflow Modeling and Analysis 13

Workflow Dynamics • A couple of theorems developed for quick on-the-fly wellformedness verification –

Workflow Dynamics • A couple of theorems developed for quick on-the-fly wellformedness verification – Theorem for adding new tasks to a WF, such that the new WF can preserve the confusion-free, well-formed properties (in the paper). – Theorem for deleting a task from the WF such that the new WF can preserve the confusion-free, wellformed properties. – Theorems for changing business rules that express task dependencies June 8, 2006 Dynamic Workflow Modeling and Analysis 14

Lemma 1 • Given a workflow WFA = (T, P, C, A, S 0)

Lemma 1 • Given a workflow WFA = (T, P, C, A, S 0) with Tk T. As shown in Fig, WFB = (T’, P’, C’, A’, S’ 0) is obtained by replacing Tk with Tk 1 and Tk 2, such that –*Tk 1 = *Tk, Tk 2* = Tk*, Tk 1* = {Tk 2} and * Tk 2 = {Tk 1}, –A’ (Tk 1) = A(Tk); –C’(Ti, Tj) = C(Ti, Tj) for Ti, Tj Tk*, Then WFB is confusion-free well-formed iff WFA is confusion-free wellformed. Tk Tk 1 WFA June 8, 2006 Tk 2 WFB Dynamic Workflow Modeling and Analysis 15

Lemma 2 • Let WFA = (T, P, C, A, S 0) be a

Lemma 2 • Let WFA = (T, P, C, A, S 0) be a well-formed confusion-free workflow with Tk 1, Tk 2 T, Tk 1* = * Tk 2 = , and Tk 2 is not a predecessor of Tk 1. As shown in the figure, WFB = (T’, P’, C’, A’, S’ 0) is obtained by introducing precedence constraint between Tk 1 and Tk 2 such that Tk 1 is an immediate predecessor of Tk 2. Then WFB is also well-formed and confusion-free. Tk 1 WFA June 8, 2006 Tk 2 Tk 1 Tk 2 WFB Dynamic Workflow Modeling and Analysis 16

Adding a new task Ti WF Tk Ti Tk *Tk ≠ , Tk* =

Adding a new task Ti WF Tk Ti Tk *Tk ≠ , Tk* = Tk WF *Tk = , Tk* ≠ WF *Tk ≠ , Tk* ≠ June 8, 2006 Dynamic Workflow Modeling and Analysis 17

Changing dependency T 6 T 3 T 1 T 4 T 2 June 8,

Changing dependency T 6 T 3 T 1 T 4 T 2 June 8, 2006 T 3 T 5 T 7 T 8 T 4 T 5 T 7 T 1 T 8 T 2 Dynamic Workflow Modeling and Analysis 18

Deleting a task T 6 T 3 T 1 T 4 T 2 June

Deleting a task T 6 T 3 T 1 T 4 T 2 June 8, 2006 T 3 T 5 T 7 T 8 T 1 T 5 T 4 T 7 T 8 T 2 Dynamic Workflow Modeling and Analysis 19

Tool Support for Editing, Validation and Enactment of WFs June 8, 2006 Dynamic Workflow

Tool Support for Editing, Validation and Enactment of WFs June 8, 2006 Dynamic Workflow Modeling and Analysis 20

Tool Features • • • Saving workflow in XML or as an image Drag

Tool Features • • • Saving workflow in XML or as an image Drag and Drop interface Dynamically change tasks/workflow properties Zooming in and out to focus on specific sections of the workflow Validate workflow Visually step through workflow in design window Step forward/backward through the simulation Auto-play speed adjustment Audit log – for post incident analysis June 8, 2006 Dynamic Workflow Modeling and Analysis 21

Conclusion • Introduced a new formalism to support dynamic workflow modeling and verification •

Conclusion • Introduced a new formalism to support dynamic workflow modeling and verification • Developed a set of theorems to validate the on-the-fly workflow changes • Implemented a tool to allow easy workflow construction, modification, verification and execution June 8, 2006 Dynamic Workflow Modeling and Analysis 22

Future Work • • Data dependency Decision support Inter-organizational workflows Tool enhancement June 8,

Future Work • • Data dependency Decision support Inter-organizational workflows Tool enhancement June 8, 2006 Dynamic Workflow Modeling and Analysis 23