## 5 Process Analyzing Functionality
### The Structural Analysis of Rediscovered XPDL Process Models
```
1:An activity graph of a rediscovered SICN process model, \(\Gamma\);
2:The XPDL process model, \(\gamma\) of \(\Gamma\);
3:Initialize \(\gamma\leftarrow\emptyset\);
4:\(\gamma.InsertHeader()\); \(\triangleright\) Insert the header format of XPDL ver 2.1: \(<\)xpdf:Pakage...\(>\), \(<\)xpdf:PackageHeader\(>\)
5:\(\gamma.InsertTagAttribute(\"xpdf:Processes\")\); \(\triangleright\) Insert the processes attribute to \(\gamma\)
6:\(\gamma.InsertTagAttribute(\"xpdf:Activities\")\); \(\triangleright\) Insert the activities attribute to \(\gamma\)
7:for (\(\forall\) node \(\eta\) in \(\Gamma\))do\(\triangleright\) Read all the nodes (activities or gateways) in \(\Gamma\) and then add all of their tags to \(\gamma\)
8:\(\gamma.InsertTagAttribute(\"xpdf:Activity\")\); \(\triangleright\) Insert the activity attribute to \(\gamma\)
9: currentNode \(\leftarrow\)\(\eta.GetCurrentNodeInfo\);
10: routeType \(\leftarrow\)defaultRouteType; shapeType \(\leftarrow\)defaultShapeType; gateType \(\leftarrow\)\(\emptyset\);
11:if (currentNode is OrGateway) then
12: routeType \(\leftarrow\) \"Exclusive-OR\";
13: shapeType \(\leftarrow\) \"Exclusive-OR Gateway\";
14:elseif (currentNode is AndGateway) then
15: routeType \(\leftarrow\) \"Parallel-AND\";
16: shapeType \(\leftarrow\) \"Parallel-AND Gateway\";
17:elseif (currentNode is LoopGateway) then
18: routeType \(\leftarrow\) \"Iterative-LOOP\";
19: shapeType \(\leftarrow\) \"Iterative-LOOP Gateway\";
20:endif
21:if (currentNode is OpenGateway) then
22: gateType \(\leftarrow\) \"Split\";
23:elseif (currentNode is ClosedGateway) then
24: routeType \(\leftarrow\) \"Join\";
25:endif
26:\(\gamma.InsertAttribute(type=activity, currentNode, routeType, shapeType, gateType);
27:endfor
28:\(\gamma.InsertTagAttribute(\"xpdf:Transitions\")\); \(\triangleright\) Insert the transition attribute to \(\gamma\)
29:for (\(\forall\) edge \(\theta\) in \(\Gamma\))do
30: currentEdge \(\leftarrow\)\(\theta.GetEdgeInfo()\);
31: fromActivityID \(\leftarrow\) currentEdge.GetFromID0;
32: toActivityID \(\leftarrow\) currentEdge.GetToID();
33: \(\gamma.InsertAttribute(type=transition, fromActivityID, toActivityID);
34:endfor
35:Return \(\gamma\); \(\triangleright\) Finally output the XPDL process model

### The Behavioral Analysis of Rediscovered Process Models

The behavioral analysis of a rediscovered XPDL process model is based upon the primitive control-flow process patterns introduced in [Definition 1] in the previous subsection. The control-flow attributes of the rediscovered process model are also composed by the combinational permutation of the four types of the structural transition patterns, such as sequential, disjunctive, conjunctive, and iterative transition patterns. Therefore, the behaviors (i.e., execution sequences of process instances) of the rediscovered process model are analyzed and measured by tracing these combinational primitive process patterns. Figure 6 illustrates how the behavioral analysis and statistical measurement works on the rediscovered process model. The \(\rho\)-Algorithm rediscovers a SICN process model from a dataset of event logs. Assume that the rediscovered SICN process model is made up of two disjunctive process patterns and a single conjunctive process pattern, as shown in the figure. The algorithm discovers not only the SICN process model but also the execution occurrences of its process instances and workitems, in addition. From the rediscovered SICN process model and its execution statistics, the process analyzing function generates the corresponding XPDL process model with extended tags of the statistical attributes and analyzes the behavioral sequences and quantitative statistical measurement, as well. [Definition 2] defines the behavioral sequence net; that is, the formal representation of a behavioral sequence and its execution statistics (i.e., the number of occurrences). Additionally, the Algorithm 2 named the behavioral sequence analysis algorithm is for generating a set of behavioral sequence nets from a rediscovered SICN process model.