230 likes | 431 Views
Dynamic Workflow Modeling and Analysis. J . Wang and R. Rosca Department of Software Engineering Monmouth Universit y. Outline. Motivation An intuitive and formal workflow model Well-formed workflows Verification Tool support Conclusion and future work. Motivation.
E N D
Dynamic Workflow Modeling and Analysis J. Wang and R. Rosca Department of Software Engineering Monmouth University Dynamic Workflow Modeling and Analysis
Outline • Motivation • An intuitive and formal workflow model • Well-formed workflows • Verification • Tool support • Conclusion and future work Dynamic Workflow Modeling and Analysis
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 Dynamic Workflow Modeling and Analysis
WIFA Workflow Definition A workflow is WF = (T, P, C, A, S0), where • T = {T1, T2, …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(T1), A(T2), …, A(Tm)) defines pre-condition set for each task. TkT, A(Tk): *Tk . Let set A’A(Tk). Then TiA’ implies pik = 1. • S0{0, 1, 2, 3}m is the initial state of the workflow. Dynamic Workflow Modeling and Analysis
T2 T6 T5 T4 T1 T7 T8 T3 Example T = {T1, T2, …, T8}, A(T1) = Ø, A(T2) = {{T1}, {T6}}, A(T3) = {{T1}}, A(T4) = {{T2}}, A(T5) = {{T4}}, A(T6) = A(T7) = {{T5}}, A(T8) = {{T3, T7}}. S0 = (1, 0, 0, 0, 0, 0, 0, 0). , Dynamic Workflow Modeling and Analysis
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. Dynamic Workflow Modeling and Analysis
State Transition Rules • A set of rules to guide workflow execution • Denote by Sa(Ti)Sbthat task Tiis executed under state Sa, and the new state after the execution is Sb. • Rules: TjT, • 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 TkA’, then Sb(Tj) = 1; • otherwise Sb(Tj) = 0. Dynamic Workflow Modeling and Analysis
3 2 0 1 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 TkA’, then Sb(Tj) = 3; otherwise Sb(Tj) = 2. • Sa(Tj) = 3 If cij = 0 then Sb(Tj) = 3; otherwise Sb(Tj) = 2. State value change of a task Dynamic Workflow Modeling and Analysis
State Transition Rules • Example T4 T2 T5 T7 T1 c23 = 1 T6 T3 S0 =(1, 0, 0, 0, 0, 0, 0) S1 =(2, 1, 1, 0, 0, 0, 0) S2 =(2, 2, 0, 1, 0, 0, 0) S3 =(2, 0, 2, 0, 0, 1, 0) … … Dynamic Workflow Modeling and Analysis
T2 T6 T5 T4 T1 T7 T8 T3 Modeling Power • Sequential execution • Conflict (decision making) • Concurrency • Synchronization • Loop c23 = 0 c67 = 1 A(T2) = {{T1},{T2}} A(T8) = {T3, T7} Dynamic Workflow Modeling and Analysis
(1 0 0 0 0 0 0 0) T1 (2 1 1 0 0 0 0 0) T2 T3 (2 2 1 1 0 0 0 0) (2 1 2 0 0 0 0 0) T2 T3 T4 T4 (2 2 2 1 0 0 0 0) (2 2 1 2 1 0 0 0) (2 2 2 2 1 0 0 0) T3 T5 T5 (2 2 1 2 2 1 1 0) (2 2 2 2 2 1 1 0) T3 T7 T6 T6 (2 3 1 2 2 2 0 0) (2 3 2 2 2 2 0 0) (2 2 2 2 2 0 2 1) T3 T2 T2 T8 (2 2 1 3 2 2 0 0) (2 2 2 3 2 2 0 0) (2 2 2 2 2 2 0 2) T3 T4 T6 T4 (2 2 1 2 3 2 0 0) (2 2 2 2 3 2 0 0) T6 T3 T5 T5 (2 2 1 2 2 3 1 0) (2 2 2 2 2 3 1 0) T3 T7 T7 (2 2 1 2 2 2 2 0) (2 2 2 2 2 2 2 1) T3 T8 (2 2 2 2 2 2 2 2) Reachability Tree Dynamic Workflow Modeling and Analysis
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 Dynamic Workflow Modeling and Analysis
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 • XOR-In-and-Out • AND-In-AND-Out • AND-In-XOR-Out • XOR-In-XOR-Out Dynamic Workflow Modeling and Analysis
Workflow Dynamics • A couple of theorems developed for quick on-the-fly well-formedness 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, well-formed properties. • Theorems for changing business rules that express task dependencies Dynamic Workflow Modeling and Analysis
Tk Tk1 Tk2 WFA WFB Lemma 1 • Given a workflow WFA= (T, P, C, A, S0) with TkT. As shown in Fig, WFB = (T’, P’, C’, A’, S’0) is obtained by replacing Tk with Tk1 and Tk2, such that • *Tk1 = *Tk, Tk2* = Tk*, Tk1* = {Tk2} and * Tk2 = {Tk1}, • A’ (Tk1) = A(Tk); • C’(Ti, Tj) = C(Ti, Tj) for Ti, Tj Tk*, Then WFB is confusion-free well-formed iff WFA is confusion-free well-formed. Dynamic Workflow Modeling and Analysis
Tk1 Tk2 Tk1 Tk2 WFA WFB Lemma 2 • Let WFA = (T, P, C, A, S0) be a well-formed confusion-free workflow with Tk1, Tk2T, Tk1* = * Tk2 = , and Tk2 is not a predecessor of Tk1. As shown in the figure, WFB = (T’, P’, C’, A’, S’0) is obtained by introducing precedence constraint between Tk1 and Tk2 such that Tk1 is an immediate predecessor of Tk2. Then WFB is also well-formed and confusion-free. Dynamic Workflow Modeling and Analysis
Adding a new task Tk Ti WF Tk Ti *Tk ≠ , Tk* = Tk WF *Tk = , Tk* ≠ WF *Tk ≠ , Tk* ≠ Dynamic Workflow Modeling and Analysis
T6 T3 T5 T4 T7 T8 T1 T2 Changing dependency T6 T3 T5 T4 T7 T8 T1 T2 Dynamic Workflow Modeling and Analysis
T6 T3 T3 T5 T5 T4 T4 T7 T7 T8 T8 T1 T1 T2 T2 Deleting a task Dynamic Workflow Modeling and Analysis
Tool Support for Editing, Validation and Enactment of WFs Dynamic Workflow Modeling and Analysis
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 Dynamic Workflow Modeling and Analysis
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 Dynamic Workflow Modeling and Analysis
Future Work • Data dependency • Decision support • Inter-organizational workflows • Tool enhancement Dynamic Workflow Modeling and Analysis