Graph Based Methods For The Representation And Analysis Of.
1.
Graph-Based Methods for the Representation and Analysis of Business Workflows Amitava Bagchi Indian Institute of Management Calcutta
2.
References <ul><li>Mukherjee Arindam, Sen Anup K and Bagchi Amitava (2004), Information analysis in workflows represented as task-precedence metagraphs, Proc WITS-2004 , Workshop on Information Technology and Systems, Seattle, WA, USA, pp 32-37 </li></ul><ul><li>Mukherjee Arindam, Sen Anup K and Bagchi Amitava (2005), Representation, Analysis and Verification of Business Processes: A Metagraph-Based Approach, Working Paper WPS-552 , Indian Institute of Management Calcutta ( http:// www.iimcal.ac.in ) </li></ul>
3.
Outline <ul><li>Business Process & Workflow </li></ul><ul><li>Metagraphs & Information Elements </li></ul><ul><li>Task Precedence Metagraphs (TPMGs) </li></ul><ul><li>Information Analysis: Graphical Algorithm </li></ul><ul><li>Functional & Organizational Perspectives </li></ul><ul><li>Workflow Verification </li></ul>
4.
Objectives <ul><li>To describe an AND/OR graph representation scheme for business workflows </li></ul><ul><li>To present a graph traversal algorithm for the analysis of information flow in such workflows </li></ul><ul><li>To extend the above method to task and resource analyses </li></ul><ul><li>To outline how the structural correctness of workflows can be verified </li></ul>
5.
Business Process & Workflow <ul><li>A business process consists of a set of related tasks in one or more functional areas (such as finance or marketing), which, when performed in any one of several permissible orders, enables an organization to achieve a business goal. </li></ul><ul><ul><li>Ex: A loan appraisal system used in a bank </li></ul></ul>
7.
Legend (see fig p 6) <ul><li>PD applicant’s property data </li></ul><ul><li>CD data on comparable properties </li></ul><ul><li>AC applicant’s account data </li></ul><ul><li>APD loan application data </li></ul><ul><li>AV appraised value of property </li></ul><ul><li>CR applicant’s credit rating </li></ul><ul><li>LA loan amount </li></ul><ul><li>RLA revised loan amount </li></ul><ul><li>LR risk level of loan </li></ul><ul><li>AR, MR, BR the loan risk level is acceptable, marginally bad, bad </li></ul><ul><li>BP current portfolio of bank’s loans </li></ul><ul><li>RE bank’s current loan exposure </li></ul><ul><li>YES the application is approved </li></ul><ul><li>NO the application is rejected </li></ul>
8.
Business Process & Workflow <ul><li>Workflow ( or Workflow Instance) : A specific instance of flow of control in a business process; it is a sub-graph of the given process graph </li></ul><ul><ul><li>In practice, the terms business process and workflow are often used interchangeably. </li></ul></ul>
12.
Business Process Modeling: Existing Approaches <ul><li>Petri Nets & Related Formalisms </li></ul><ul><ul><li>Petri Nets (van der Aalst & van Hee 2002) </li></ul></ul><ul><ul><li>Workflow Management Coalition (WfMC) Guidelines ( http://www.wfmc.org ) </li></ul></ul><ul><li>Metagraph-Based Formalisms </li></ul><ul><ul><li>Metagraphs (Basu & Blanning 2000, 1999, 1994) </li></ul></ul>
13.
Petri Nets & Related Formalisms <ul><li>Main focus is on the precedence relationships between tasks </li></ul><ul><li>Flow of information plays a subsidiary role </li></ul><ul><li>Commercial products such as IBM’s MQSeries have adopted this convention </li></ul><ul><li>Widely used, and quite suitable for engineering applications </li></ul>
14.
Metagraph-Based Formalisms <ul><li>A metagraph is a directed (hyper-)graph. It can be viewed as a special type of AND/OR graph. </li></ul><ul><li>A metagraph is typically small in size (at most a few hundred nodes) and is explicitly available, i.e. , the entire graph is supplied as input to a search algorithm. So the expansion of a node just means moving to its immediate successors. </li></ul><ul><li>In (implicit) game trees, new nodes actually get added to the graph as they get created. </li></ul>
15.
Metagraph-Based Formalisms <ul><li>Each node in a metagraph contains one or more information elements ( items ). </li></ul><ul><li>In Information Analysis, an input set of items is supplied at start, specifying the business information initially available . </li></ul><ul><li>Another set of items, called the output set , contains the target set of items that are desired as output. </li></ul>
16.
Metagraph-Based Formalisms <ul><li>Each arc represents a task that converts one set of items to another set of items. </li></ul><ul><li>The objective is to start from the input set of items, perform the tasks in the given order of precedence and derive all the items in the output set. </li></ul>
17.
Metagraph-Based Formalisms <ul><li>The metagraph convention puts more emphasis on the flow of information, so has an advantage over Petri Nets for business applications. </li></ul><ul><li>However, it is not widely used in practice because it suffers from certain shortcomings. </li></ul>
18.
Metagraph for Loan Evaluation Process Account Data (AC) Applicant Data (APD) Credit Rating (CR) Property Data (PD) Comparables Data (CD) Appr .Value (AV) Loan Amt . (LA) Bank’s Portfolio (BP) Loan Risk (LR) Marg . Bad Risk (MR) Loan Approved (YES) Bad Risk (BR) Loan Rejection (NO) Accept Risk (AR) Risk Exposure (RE) e 2 C a l c u l a t e A p p r a i s e d V a l u e o f P r o p e r t y e 5 C a l c u l a t e a n e w L o a n A m o u n t e 6 C a l c u l a t e B a n k ’ s R i s k E x p o s u r e e 8 M a r g i n a l R i s k A s s e s s m e n t e 1 0 B a d R i s k A s s e s s m e n t e 7 A c c e p t a b l e R i s k A s s e s s m e n t e 9 A p p r o v e t h e L o a n e 1 1 R e j e c t t h e L o a n A p p l i c a i t o n e 1 Calculate Credit Rating e 4 Calculate Loan Risk
19.
Metagraphs <ul><li>The existing metagraph model for workflows has three main shortcomings: </li></ul><ul><li>Flow of control is not displayed with clarity and the diagram appears cluttered </li></ul><ul><li>The analysis makes use of symbolic matrices which are not easy to manipulate </li></ul><ul><li>A clear distinction is not always drawn between OR joins & AND joins (or even between OR splits & AND splits) </li></ul>
20.
Task Precedence Metagraphs (TPMGs) <ul><li>A TPMG is a modified form of metagraph. </li></ul><ul><li>It is visually more appealing and is more like an AND/OR graph in appearance. </li></ul><ul><li>It is less cluttered so the flow of control is discerned more easily. </li></ul><ul><li>A TPMG is more general than a WfMC graph in that AND & OR splits and joins are not always required to be matched in pairs. </li></ul>
22.
Task Precedence Metagraphs (TPMGs) <ul><li>Edges are of two types: </li></ul><ul><li>Tasks : shown as bold arrows; a task converts the set of items at its start to another set of items, which cannot be obtained from any other task </li></ul><ul><li>Propagation Edges : shown as lightly drawn arrows; a propagation edge conveys an item from the outgoing end of a task to the incoming end of another task. </li></ul>
23.
Task Precedence Metagraphs (TPMGs) <ul><li>Nodes are also of two types </li></ul><ul><li>Init Nodes </li></ul><ul><ul><li>An init node has a single outgoing edge corresponding to a task </li></ul></ul><ul><ul><li>Is shown as a bold oval </li></ul></ul><ul><li>Prop Nodes </li></ul><ul><ul><li>A prop node can have multiple outgoing edges, all of which are propagation edges </li></ul></ul><ul><ul><li>Is shown as a lightly drawn oval </li></ul></ul>
24.
Task Precedence Metagraphs (TPMGs) <ul><ul><li>Init and Prop Nodes </li></ul></ul><ul><ul><ul><li>On every directed path, init nodes alternate with prop nodes, i.e. , a TPMG is a directed bipartite graph, just like a Petri net. </li></ul></ul></ul>
25.
Task Precedence Metagraphs (TPMGs) <ul><li>Nodes are of two types, OR and AND . </li></ul><ul><li>An OR node (identified with a + sign) shows alternate paths for flow of control. </li></ul><ul><li>An AND node (identified with a • sign) indicates that flow of control takes place along all the edges at the same time. </li></ul><ul><li>An OR (or AND) node is either a split node or a join node . </li></ul>
26.
Task Precedence Metagraphs (TPMGs) <ul><ul><li>Split & Join Nodes </li></ul></ul><ul><ul><ul><li>A split node is a node at which multiple paths begin. It is always a prop node. </li></ul></ul></ul><ul><ul><ul><li>A join node is a node at which multiple paths end. It is always an init node. </li></ul></ul></ul>
27.
Task Precedence Metagraphs (TPMGs) <ul><li>However, a TPMG differs from a Petri Net in that every node has an associated subset of labeled items. This underscores the role of business information in a business process. </li></ul>
28.
Information Analysis <ul><li>Given a workflow, we seek answers to questions of the following type: </li></ul><ul><li>Suppose a set A of items is supplied. Starting from A , can we produce all the items in another given set B ? </li></ul><ul><li>Is item ‘ a’ essential for producing item ‘ b’ ? </li></ul><ul><li>These can be formulated as graph search problems. </li></ul>
29.
Information Analysis <ul><li>But a standard AND/OR graph search algorithm such as AO* (Nilsson 1980) is not appropriate for our purpose because a TPMG differs from an AND/OR graph in some ways: </li></ul><ul><li>TPMG: Multiple start nodes </li></ul><ul><li>AND/OR Graph: One start node </li></ul>
30.
Information Analysis <ul><li>TPMG: Both AND joins and OR joins </li></ul><ul><li>AND/OR Graph: Only OR joins </li></ul><ul><li>TPMG: Can have directed cycles AND/OR Graph: AO* assumes it is cycle-free </li></ul><ul><li>Note that a project scheduling network has only AND splits/joins and no OR splits/joins </li></ul>
31.
Algorithm InfAnalysis <ul><li>Algorithm InfAnalysis is an iterative graph search algorithm </li></ul><ul><li>Given: </li></ul><ul><ul><li>An explicit TPMG </li></ul></ul><ul><ul><li>An input set of items </li></ul></ul><ul><ul><li>An output (target) set of items </li></ul></ul><ul><li>Determines whether all the items in the output set can be derived. </li></ul>
32.
Algorithm InfAnalysis <ul><li>Algorithm InfAnalysis has some similarities with A* and AO* and makes use of an edge-marking method. </li></ul><ul><li>We think of the given TPMG as representing a business process, and the marked solution sub-graph produced by InfAnalysis as a workflow instance. </li></ul>
33.
Algorithm InfAnalysis <ul><li>Makes use of four lists: </li></ul><ul><li>ITEMSET: initially contains the input set of items; new items get added as nodes get expanded </li></ul><ul><li>TARGET: contains the items desired as output </li></ul><ul><li>FRONTIER: only holds init nodes; initially holds those that have all their items in ITEMSET </li></ul><ul><li>STACK: needed for processing OR nodes; remembers which OR alternative should be processed next </li></ul>
34.
Algorithm InfAnalysis <ul><li>An active node is an init node in FRONTIER with all its items in ITEMSET. </li></ul><ul><li>At each iteration, InfAnalysis looks for an active node in FRONTIER, processes the correspond-ing task, and updates ITEMSET & FRONTIER. </li></ul>
35.
Algorithm InfAnalysis <ul><li>If all items in TARGET belong to ITEMSET then a solution has been found ( success ). </li></ul><ul><li>If there is no active node in FRONTIER then the next OR alternative in STACK must be pursued. </li></ul><ul><li>If STACK is also empty then failure. </li></ul>
36.
Algorithm InfAnalysis <ul><li>Thus the algorithm traverses the given TPMG exhaustively, looking for a workflow instance that generates, for the given input set, a set of items that contains the given output set. </li></ul><ul><li>When traversing a workflow instance, the edges in the instance get marked (say by colouring red). </li></ul>
37.
Algorithm InfAnalysis <ul><li>When the next workflow instance is examined, the marking at the corresponding OR split node is changed. </li></ul><ul><li>The advantage of marking is that each instance need not be traversed from scratch; the work done earlier can be remembered and partly reused. </li></ul><ul><li>The algorithm assumes that the TPMG is structurally valid. </li></ul>
38.
Algorithm InfAnalysis <ul><li>Example: For the loan appraisal process, we want to know whether, given the set of items S = { LA, PD, CD, AC, APD, BP } as input, we can produce the item YES as output. </li></ul><ul><li>A graph search algorithm is appropriate for such problems. To keep the algorithm simple, we do not indicate the edge markings. </li></ul>
39.
Algorithm InfAnalysis <ul><li>initialize ITEMSET, FRONTIER, STACK; </li></ul><ul><li>do while (TARGET is not a subset of ITEMSET) { </li></ul><ul><li> if (there is an active node n in FRONTIER) then { </li></ul><ul><li> remove n from FRONTIER; </li></ul><ul><li> expand n, entering its init successors in FRONTIER, </li></ul><ul><li>OR split nodes in ORLIST, and new items in ITEMSET; </li></ul><ul><li> } // else examine next workflow instance </li></ul><ul><li> else if (STACK is not empty) then { </li></ul><ul><li>take next init successor p of OR node m on top of STACK; </li></ul><ul><li>enter p in FRONTIER adding its items to ITEMSET; </li></ul><ul><li> if ( m has no other successors) then pop m ; </li></ul><ul><li>} </li></ul><ul><li>else { announce “failure”; exit; } </li></ul><ul><li>} // no remaining workflow instances </li></ul><ul><li>announce “success”; exit; </li></ul>
40.
Algorithm InfAnalysis: Observations <ul><li>Works correctly on the example shown earlier (TPMG for loan appraisal) </li></ul><ul><li>But for more complex TPMGs containing OR split nodes that are not descendants of each other, the STACK must be replaced by a more flexible data structure </li></ul>
41.
Functional Perspective <ul><li>Queries that relate to the execution of tasks rather than to the flow of information: </li></ul><ul><li>Which other tasks must be completed before a given task t can start? </li></ul><ul><li>If a task t cannot be executed, which other tasks become inoperable? </li></ul>
42.
Functional Perspective <ul><li>Algorithm InfAnalysis can be modified in a simple way to answer such queries. </li></ul><ul><li>For example, to find the tasks that must be completed before task t can start, consider the set S of items contained in the init node that immediately precedes t . Run InfAnalysis with the given inputs and with S as the target set; the required set of tasks are those in the marked sub-graph. </li></ul>
43.
Organizational Perspective <ul><li>Queries that relate to resources ( i.e. , the executors of tasks, whether human agents or machines): </li></ul><ul><li>If a resource r is unavailable, some tasks will not get performed. As a result, some other resources might become idle. Which are the resources that will become idle? </li></ul>
44.
Organizational Perspective <ul><li>Again, Algorithm InfAnalysis can be modified in a simple way to answer such queries. </li></ul><ul><li>For example, to determine the other resources that become idle when resource r is unavailable, first find the set T of tasks that r executes. We can determine which other tasks get held up because the tasks in T cannot be executed. This will tell us whether any resources have become completely idle. </li></ul>
45.
Temporal Constraints <ul><li>The control structure of a workflow imposes temporal constraints on tasks. If a task precedes another task, it must be performed earlier. </li></ul><ul><li>If temporal information, such as the duration of tasks, is supplied, then issues arise similar to those in project scheduling. </li></ul><ul><li>However, the presence of directed cycles in workflows causes additional complications. </li></ul>
46.
Structural Verification <ul><li>A valid workflow always serves a business goal. </li></ul><ul><li>Given a business process W supplied in the form of a TPMG, how do we tell whether W is valid? </li></ul><ul><li>To ensure the validity of W , some structural ( i.e. , syntactic ) constraints must be imposed on W . </li></ul><ul><li>We now give examples of such structural constraints. </li></ul>
47.
Structural Problem: Deadlock <ul><li>Deadlock : Caused when an OR split node is nested with an AND join node. </li></ul><ul><li>In the figure, only one of the two outgoing edges at the OR split node 2 can be marked at any time. So execution cannot proceed beyond the AND join node 7. </li></ul><ul><li>A valid workflow must not have any deadlocks. </li></ul>
48.
Structural Problem: Lack of Synchronization <ul><li>Lack of Synchronization : Caused when an AND split node is nested with an OR join node. </li></ul><ul><li>In the figure, since both the outgoing edges at the AND split node 2 will get marked, the task (7,8) will be executed twice. </li></ul><ul><li>A valid workflow must not suffer from lack of synchronization. </li></ul>
49.
Structural Problem: Non-Terminating Cycle <ul><li>Non-Terminating Cycle: Caused when control cannot exit from a directed cycle. </li></ul><ul><li>This problem can be avoided when every directed cycle is well-formed , i.e. , it has an OR join node lying on it through which control can enter, and an OR split node lying on it through which control can exit (see loan appraisal example). </li></ul>
50.
Other Structural Errors <ul><li>Examples of other structural errors that must be eliminated: </li></ul><ul><li>Dangling Nodes : It should be ensured that if a node in a TPMG contains items that are not target items, then the node has a successor task. </li></ul>
51.
Structural Verification <ul><li>The structural verification algorithm TPMG_SYN traverses the workflow instances in the given TPMG one by one looking for structural problems. </li></ul><ul><li>As soon as it locates a problem it terminates with an appropriate error message. </li></ul><ul><li>If TPMG_SYN does not find a problem, the given TPMG models a valid business process. </li></ul>
52.
Structural Verification <ul><li>TPMG_SYN has many similarities with Algorithm InfAnalysis. </li></ul><ul><li>TPMG_SYN assumes for convenience that there is one start node and one goal node. If this does not hold for the given TPMG, an AND split node can be added at the top and an OR join node at the bottom. </li></ul>
53.
Algorithm TPMG_SYN <ul><li>1 initialize ITEMSET, FRONTIER, STACK; finish = false; </li></ul><ul><li>2 do while (finish == false) { </li></ul><ul><li>3 if (there is a non-goal active node n in FRONTIER) then { </li></ul><ul><li>4 remove n from FRONTIER; </li></ul><ul><li>5 expand n, entering its init successors in FRONTIER, </li></ul><ul><li>6 OR split nodes in ORLIST, and new items in ITEMSET; </li></ul><ul><li>7 } </li></ul><ul><li>8 else if (there is a goal node in FRONTIER) then </li></ul><ul><li>9 announce “one workflow instance scanned”; </li></ul><ul><li>10 else if (STACK is not empty) then { </li></ul><ul><li>11 take next init successor p of OR node m on top of STACK; </li></ul><ul><li>12 enter p in FRONTIER adding its items to ITEMSET; </li></ul><ul><li>13 if ( m has no other successors) then pop m ; </li></ul><ul><li>14 } </li></ul><ul><li>15 else finish = true; </li></ul><ul><li>16 } </li></ul><ul><li>17 announce “the given TPMG is valid”; exit; </li></ul>
54.
TPMG_SYN: Detection of Errors <ul><li>Illegal cycles and lack of synchronization can both be detected at line 5 when node n is expanded. We can just check whether as a result of the expansion an OR join node has two marked incoming edges. This would be illegal in general, but in some situations it can indicate the presence of a legal directed cycle. </li></ul>
55.
TPMG_SYN: Detection of Errors <ul><li>Deadlock can be detected at line 8 when a goal node is not found but inactive nodes are present in FRONTIER. </li></ul><ul><li>Dangling nodes can also be detected at line 5 when node n is expanded. </li></ul>
56.
Workflow Verification <ul><li>Note that some semantic constraints are imposed by the meanings of the items contained in the TPMG nodes. </li></ul><ul><li>TPMG_SYN when appropriately modified can perform certain types of semantic verification of TPMGs. </li></ul>
57.
Workflow Verification <ul><li>A similar verification procedure can be devised for workflows drawn using Petri Nets or any other WfMC convention. </li></ul>
Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.
Be the first to comment