Process Mining application considering the organizational perspective using Social Network Analysis
Full text
Process mining application considering the organizational perspective using social network analysis By Ahmed Adel Fares Gadelrab Mohamed Dissertation for the degree of Master in Modeling, Data Analytics and Decision Support Systems. Supervised by Professor Joao Gama Professor Pedro Campos Faculdade de Economia Universidade do Porto 2016
Acknowledgments To my family, especially my wife, who has always supported me during the two years of this master and without her efforts, This work couldn’t be accomplished. To Professors João Gama and Pedro Campos for their excellent assistance, support, guidance and understanding. Special thanks to all coordinators of Erasmus Mundus Project "UNetBA", for giving me this great opportunity to achieve this point of submitting my Master’s dissertation. Last but not the least, to all my friends I made here in Portugal who became a real family for me. 1
Biographical Note Ahmed Adel Fares was born on 12th of June 1988 in Alexandria, Egypt. He received a bachelor degree in Management Information Systems at Faculty of Commerce, Alexandria University, Egypt, in 2010, and with a passion for Data Analysis, and an Erasmus scholarship, he joined the Master’s Degree in Modeling, Data Analytics and Decision Support Systems in the School of Economics and Management of the University of Porto (FEP). He works as Functional/Business consultant - Microsoft Dynamics ERP for Paradigm Solutions, Alexandria, Egypt, since 2012. 2
Abstract Process Mining aims to extract useful information from event log by providing techniques and tools that are used for discovering process, control flow, organizational, and social structures from these logs. During this work, we will cover definitions of process mining, social network analysis and how we can mine a social network using process mining techniques. Event logs normally record information about the users executing the activities recorded in the log, so it is possible to extract social network from these logs for further analysis. To do so we combine concepts from process mining and social network analysis. Also a case study will be executed in order to proof the applicability of what has been theoretically mentioned. Keywords: Process Mining, social network analysis, mining social networks, mining organizational perspective 3
Table of contents Acknowledgments 1 Biographical Note 2 Abstract 3 1 Introduction 9 1.1 Motivation................................. 9 1.2 Dissertation overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3 Problemdefinition ............................ 10 1.3.1 Objectives............................. 10 1.3.2 Challenges............................. 11 2 State of the art 13 2.1 Introduction................................ 13 2.2 Some basic definitions . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2.1 ProcessMining .......................... 13 2.2.2 How Process Mining relates to data science? . . . . . . . . . . 14 2.2.3 Social network analysis . . . . . . . . . . . . . . . . . . . . . . 15 2.2.4 Mining social networks . . . . . . . . . . . . . . . . . . . . . . 17 2.3 Relatedwork ............................... 19 2.4 Advanced definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.4.1 Process discovery . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.4.2 Modeling Languages . . . . . . . . . . . . . . . . . . . . . . . 21 2.4.3 Process Mining Algorithms . . . . . . . . . . . . . . . . . . . . 23 2.4.4 Conformance checking . . . . . . . . . . . . . . . . . . . . . . 26 2.5 ProcessMiningtools ........................... 28 2.5.1 Toolsselection........................... 28 2.6 Additional perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.6.1 Organizational perspective . . . . . . . . . . . . . . . . . . . . 29 2.6.2 Time perspectives . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.6.3 Case perspective . . . . . . . . . . . . . . . . . . . . . . . . . 31 4
2.7 Conduct a Process Mining project . . . . . . . . . . . . . . . . . . . . 32 2.7.1 L* life cycle model for Process Mining . . . . . . . . . . . . . 32 2.7.2 Mining Lasagna process . . . . . . . . . . . . . . . . . . . . . 32 2.7.3 Mining Spaghetti process . . . . . . . . . . . . . . . . . . . . . 33 3 Case Study 34 3.1 Introduction................................ 34 3.2 SourcesofData.............................. 34 3.2.1 Statistics Portugal (INE) Process . . . . . . . . . . . . . . . . 34 3.3 Questions ................................. 35 3.4 Objectives................................. 36 3.5 Eventlogreview ............................. 36 3.6 Executionguide.............................. 38 3.6.1 Prepare and describe event log in ProM . . . . . . . . . . . . 38 3.6.2 Compare process discovery techniques . . . . . . . . . . . . . 44 3.6.3 Conformance checking . . . . . . . . . . . . . . . . . . . . . . 51 3.6.4 Extend the model . . . . . . . . . . . . . . . . . . . . . . . . . 54 4 Discussion of results 58 4.1 Introduction................................ 58 4.2 Methodologyreview ........................... 58 4.3 Casestudyresults............................. 60 Bibliography 62 5
List of Figures 2.1 Aneventlog................................ 18 2.2 (a) the control-flow structure of a Petri net, (b) the organizational structure, and (c) a sociogram based on transfer of work . . . . . . . 18 2.3 A marked Petri net (Van der Aalst, 2011) . . . . . . . . . . . . . . . 22 2.4 Process model using the BPMN notation (Van der Aalst, 2011) . . . 23 2.5 Relation between process trees and Petri nets (Buijs et al., 2012) . . 23 2.6 Modeling Petri net from event log using Alpha miner (a) Event log, (b) Footprint matrix, (c) Petri net . . . . . . . . . . . . . . . . . . . 24 2.7 Modeling Petri net from event log using Heuristics miner (a) Event log, (b) Directly-follows matrix, (c)Dependency matrix, (d) Petri net 25 2.8 The different phases of the genetic algorithm (Buijs et al., 2012). . . . 26 2.9 The process model extended with additional perspectives: the organizational perspective (“What are the organizational roles and which resources are performing particular activities?”), the case perspective (“Which characteristics of a case influence a particular decision?”), and the time perspective (“Where are the bottlenecks in my process?”) (VanderAalst,2011). .......................... 29 2.10 A social network (Van der Aalst, 2011). . . . . . . . . . . . . . . . . . 30 3.1 ProMlogdashboard ........................... 39 3.2 ProM Log Start and End Events . . . . . . . . . . . . . . . . . . . . 39 3.3 ProM Log Start and End Events (Reordered) . . . . . . . . . . . . . 40 3.4 Mostfrequenttraces ........................... 40 3.5 Shortesttraces .............................. 41 3.6 Longesttraces............................... 41 3.7 Traces ends after closing the requests . . . . . . . . . . . . . . . . . . 42 3.8 Requests over time colored based on the cost type (Payable in light green and non-payable in purple) . . . . . . . . . . . . . . . . . . . . 43 3.9 Requests over time (connecting events per case) . . . . . . . . . . . . 43 3.10 Requests over time (filtered based on Record the request) . . . . . . . 44 3.11 Petri Net using Alpha algorithm . . . . . . . . . . . . . . . . . . . . . 45 3.12 Petri Net using Alpha algorithm (filter the less frequent activities) . . 46 3.13HeuristicsNet............................... 46 6
3.14HeuristicsPetriNet............................ 47 3.15 Process tree Produced by ETM miner . . . . . . . . . . . . . . . . . . 48 3.16 The first model shown in table 3.1 . . . . . . . . . . . . . . . . . . . . 50 3.17 Models from 2 to 5 in table 3.1 . . . . . . . . . . . . . . . . . . . . . 50 3.18 Petri net as converted from the process tree . . . . . . . . . . . . . . 52 3.19 Petri net after projected with alignment . . . . . . . . . . . . . . . . 52 3.20Moveonlogplace............................. 53 3.21 Performance analysis using time perspective . . . . . . . . . . . . . . 54 3.22 Mine for a handover-of-work Social network . . . . . . . . . . . . . . 56 3.23 Mine for a Subcontracting Social network . . . . . . . . . . . . . . . . 57 7
List of Tables 3.1 Quality dimensions for the best 5 models in Pareto front with ETM . 49 8
The main point where Process Mining differentiates from Business Intelligence (Rozinat, 2014a) is in the depth of the analysis. BI reporting tools focus on displaying the Key Performance Indicators (KPIs). However, they are not able to reach the root causes for the case. Process Mining can provide much deeper analysis into the actual processes by extracting the process flows and bottlenecks based on existing logs. Essentially, BI having the assumption that the processes are known. Process Mining assumes that even for well-defined processes it is not guaranteed that reality will follow exactly the planned, so activities and cases would require more advanced analysis. •Process Mining versus Data Mining: Most of Data Mining tools are used to support business decisions in specific areas i.e., which products should be placed together, or: what are the most promising locations marketing flyers should be sent, but they do not focus on the process itself. At the same time, organizations are investing a lot on process modeling because it is done manually, with high potential to become outdated quickly and not following the reality. BY combining both Data Mining and process modeling strengths, Process Mining can automatically create process models based on existing log data and produces live models that are more connected to the current and most recent business that can be updated easily (Rozinat, 2014b). 2.2.3 Social network analysis Overview SNA aims to analyze social networks regarding the organizational perspective. It has a very important role as it evaluates the relations between people, teams, departments and/or the entire organizations (CROSS, 2001). This kind of analysis is able to deliver important information which could able to improve the flow of communication inside the organizations and provide managers a clear view of how the work is being done as the main goal of SNA is to make the communication process as much transparent as it can and provide tools to enhance the process of communication. All SNA techniques are based on a graphical representation, so the social network would be represented as a graph, where each node is a person (or group of people) and each link between two nodes is a relationship (HU, 2008; Moses and Boudourides, 2001). 15
SNA Measures •Measures for an individual level –Degree: The Degree of a node (sometimes called Degree Centrality) is a number of nodes that are connected to it. This measure can be seen as the popularity of each actor (W.M.P. van der Aalst and Song, 2005). –Betweenness Centrality: Computes the influence that a node has over the spread of information through the network. For example, a node (i.e., person) with high betweenness centrality value means that it performs a critical role in the network because this person enables the connection between two different groups (W.M.P. van der Aalst and Song, 2005). –Closeness Centrality: Computes how close each node is to the other nodes in the network. For example, a node (i.e., person) with a higher closeness centrality value, will need to contact a lot of nodes in its ways to reach another node, and vice versa is happening for a node with a lower closeness centrality value as it has better chance to achieve the rest of nodes in a lower number of steps (W.M.P. van der Aalst and Song, 2005). •Measures for the network level –Density: The value of this measure should range from 0 to 1 indicating how interconnectivity is in the network. In the social context, a highdensity network means that almost everyone communicates with everyone. The density is defined as: Density =n/N2 where nrepresents the links that there are in the network and Nrepresents the maximum number of possible links (Hansen and Shneiderman, 2009). –Clustering coefficient: This metric determines by the probability of a network to be split into a finite number of sub-networks. In the social context, a new cluster is defined as a new team/group in the organization (Hansen and Shneiderman, 2009). –Centralization: This measure is connected to the individual notion of centrality. The lower the number of nodes with high centrality, the higher is the centrality of a network. i.e., the high centralized network is dominated by one or a few persons. If this person is removed, the network quickly split to unconnected sub-networks. A very high central network is not a good sign because it means that it has critical points of failure, putting too much trust and power in a single individual (Hansen and Shneiderman, 2009). 16
2.2.4 Mining social networks All organizations establish a formal social structure where all the hierarchy relationships between employees are defined. However, in most cases, the relationships that really exist in the organizations have some gaps do with the predefined structure (CROSS, 2001). As it has mentioned in introduction, there are three main perspectives in dealing with Process Mining: (W.M.P. van der Aalst and Others, 2007) •Process perspective: focuses on the flow of the information, i.e., the sequence of activities. The main goal here is to define a process which could cover all possible paths and expressed graphically i.e. Petri net. •Organizational perspective focuses on the relations between the performers, i.e., which people are involved in the process model and how they are related and interacting. There are 2 main goals: extract the organizational structure by classifying people and show relationships among performers. •Case perspective: focuses on the cases itself. There are several ways we can characterize case with, they can be characterized by paths they went through or by the values of some variables, e.g., a number of ordered products in a supply order would be a good variable to classify the case. This part is related to the organizational perspective, more precisely in deriving social networks from event logs and makes it available for further SNA. As events are being executed and/or initiating by people, so it is nature to collect information about these people while recording the activities details. For example we can define activity by (c, a, p)where cis the case, ais the activity, and pis the person, and if we have two followed activities regarding the same case could be defined as (c, a1, p1) and (c, a2, p2), in this case we can say that there is some work handover from p1to p2and also we can say that p1 has no relation with p3. Using this information, it is possible to derive a social network in terms of graph or matrix (van der Aalst and Song, 2004). Figure 2.1 (W.M.P. van der Aalst and Others, 2007) shows an example of a log involving 19 events, five activities, and six originators. We can conclude that some activities are being executed by certain persons like activity A which is executed either by John or Sue. From this information we can derive a Petri net in figure 2.2 (a) (W.M.P. van der Aalst and Others, 2007). Also we can discover the organizational structure shown in figure 2.2(b)(W.M.P. van der Aalst and Others, 2007). Figure 2.2 (c)(W.M.P. van der Aalst and Others, 2007) shows another view on the organization based on the handover of work between individuals. Of course, for only five cases, this information are too clear do be caught but considering larger data sets it will not be that easy to capture the main and detailed roles in an organization. 17
Figure 2.1: An event log Figure 2.2: (a) the control-flow structure of a Petri net, (b) the organizational structure, and (c) a sociogram based on transfer of work 18
2.3 Related work "Process Mining: Discovery, Conformance and Enhancement of Business Processes" (Van der Aalst, 2011) is the first book on Process Mining which could be named as the bible of Process Mining as it provides an inclusive overview of the state-of-the- art in Process Mining as a standalone branch of science. The book tends to be the main comprehensive reference covering the entire Process Mining concept. "Mining Social Networks: Uncovering Interaction Patterns in Business Processes" (van der Aalst and Song, 2004) is the first paper proof the applicability to extract social structure from event logs, define the basic metrics and develop a tool to mine social networks from event logs (MiSoN). "Business Process Mining: An industrial application" (W.M.P. van der Aalst and Others, 2007) is a case study describes the application of Process Mining in one of the provincial offices of the Dutch National Public Works Department, responsible for the construction and maintenance of the road and water infrastructure from three different perspectives: (1) the process perspective, (2) the organizational perspective, and (3) the case perspective. It has been built based on (Van der Aalst, 2011) in general and (van der Aalst and Song, 2004) in particular, especially when dealing with the organizational perspective. "Social Network Analysis for Business Process Discovery" is a master thesis in Information Systems and Computer Engineering, Instituto Superior Tecnico, focuses on extracting and mining social networks using business process discovery with the respect of the organizational perspective as mentioned by (W.M.P. van der Aalst and Others, 2007; van der Aalst and Song, 2004) and also proposing approach that aims to overcome the difficulties of presenting the new information in a way that can be easily read by the ordinary users. 2.4 Advanced definitions 2.4.1 Process discovery Process discovery is actually the main challenging task in Process Mining. Process Discovery means learning process model from observed behavior. This learning shows what is really happening in organizations and in the system. In order to do so, process discovery algorithms should consider the following characteristics according to (Van der Aalst, 2011): •Representational Bias: Defines the search space by having the ability to represent concurrency, loops, silent actions, duplicate actions, OR-splits/joins, non-free-choice behavior and hierarchy. 19
•Ability to Deal with Noise: The discovered model should not include noisy (exceptional/infrequent) behavior as users are more interested in seeing the mainstream behavior. Also, rare patterns and/or activities can not produce such a meaningful information so it should be avoided while building the model. There are two ways to avoid noise, the first one is to be removed from the log before running the algorithm, the second one is letting the discovery algorithm to construct the model by abstracting from noise. •Completeness Notion Assumed: Most process discovery algorithms make completeness assumption either implicit or explicit. Some algorithms assume that in order to say that one activity can be directly followed by another activity, this should be seen at least once in the log otherwise it will not be recognized as a relation and will tend to result in underfitting models. Other algorithms assume that the event log contains all possible traces, This is very unrealistic and results in overfitting models. Noise and completeness used to determine the quality of the event log but did not mention the quality of the discovered model. Also, confusion matrix (Ting, 2010) can not be applied because •No negative examples •Log contains the only fraction of possible traces •Almost versus poorly fitting traces •In case of loops often infinitely many possible traces •Murphy’s Law of Process Mining (anything is possible, so probabilities matter) There are so many dimensions being used in order to be able to validate how well a process model describes the observed data. In this work, we had used the four main quality dimensions: fitness, simplicity, precision, and generalization that has been introduced in (Van der Aalst, 2011). In this section, we briefly review these four dimensions and later they will be used in validating the discovered models in the case study. These four quality forces are all pull in different directions at the same time. Whenever you optimize for one, you usually lose the quality in at least another quality dimension. •Replay fitness: Is the model able to replay the observed behavior? •Precision: Does the model not describe more behavior than we have actually seen? It’s very easy to create a model that is capturing all the observed behavior but way too much. So we also want the model to be precise. 20
•Generalization: We need to be able to generalize the behavior from the limited observations. We’ve never seen all the behavior. But we want to describe it in a concise way. •Simplicity: all this should be done in a simple process model. Any user should be able to read it. It shouldn’t be a very large model with many crossing arcs. Besides these four quality forces, there is an important factor in determining the quality of algorithm in order to produce reliable models which is soundness. Soundness or correctness is a set of properties that a process model should be able to reach the end state from the start state without bugs. The first property is the option to complete, so once the process model is running for each state that can be reached in a process model, it should always be able to reach the end state, which is the target state. The second property is proper completion so when the end state is reached, there should be no tokens or work left behind. The third property is a property of no transitions being dead. So each transition in the process represents an activity. And each activity should be able to be executed at some point, through some path. So soundness is captured by three properties. If all three properties are fulfilled, the process model is sound. If one or more properties are not fulfilled, the process model is not sound. 2.4.2 Modeling Languages Petri Net Petri net is the oldest process modeling language which is allowing modeling of concurrency, with simple and executable graphical notation. It has static network structure but, tokens can move in the network according to firing rules. The distribution of tokens over places is determining the state of Petri net and is referred to as its marking see Figure 2.3 (Van der Aalst, 2011). •Places: Represented by the circles. Every Petri net has a start placing, usually with a token in it. In the case of parallelism, one transition will be connected with multiple output places. This is also a parallel split. Similarly, we have a parallel join,so multiple input places are connected to a single transition. We can also model choices, which is the opposite. We have one place, which is connected to multiple transitions. And each transition is competing for a token. Whoever fires first consumes a token, hence disabling the other transition. And therefore, we also have a choice join. So whenever you split a choice, you also have to join it to synchronizing. And finally, we have a final place that marks the end of the process. So as soon as a token is put in the end place, the process is done. 21
Figure 2.3: A marked Petri net (Van der Aalst, 2011) •Transition: Represented by squares. The transitions can move tokens from all the input places that they are connected to all the output places that they are connected to. And they can only fire if all the input places have a token to consume. And it will produce tokens by the number of output places. Also, we may have silent transitions. They do not represent an observable activity, but they mainly distribute tokens in the Petri net. Business Process Model and Notation (BPMN) Similarly to Petri net, BPMN also has a start and an end place with boxes in between representing the activities see Figure 2.4, but the places in between the transitions or activities have been removed. And the parallel and choice constructs have been made explicit. So diamond operators with a plus sign in between, they represent parallelism. So activities can be executed in parallel, and a diamond operator with an X in it represents a choice, So either one of connected activities can be executed, but not all (Muehlen and Recker, 2008). So both the BPMN modeling notation and a Petri net describe exactly the same behavior. However, most process discovery algorithms will use Petri nets, because it’s easier to model and as a more mathematical foundation. Process Trees Process trees guarantee to represent sound process models (van Eck et al., 2015). 22
Figure 2.4: Process model using the BPMN notation (Van der Aalst, 2011) Figure 2.5: Relation between process trees and Petri nets (Buijs et al., 2012) Figure 2.5 shows the Relation between process trees and Petri nets. The five available operator types are: sequence, exclusive choice, loop execution, parallel execution and non-exclusive choice. The order of the children matters as it specifies the order in which they will be executed (from left to right). 2.4.3 Process Mining Algorithms Alpha algorithm Alpha miner is the first algorithm that fit the gap between event logs, and the process model. For sure it has its flaws as it was the very first algorithm to be created, but it was a good starting point for later algorithms. The alpha miner has a few main steps (Van der Aalst, 2011).The first step is scanning the traces for ordering relations between activities then building a footprint matrix using these relations. There are 3 ordering relations that the alpha miner can detect. 23
Figure 2.6: Modeling Petri net from event log using Alpha miner (a) Event log, (b) Footprint matrix, (c) Petri net •Sequence (→): If A is sometimes directly followed by B, but never that B is directly followed by A. •Parallel (||): If both A being directly followed by B, as well as B being directly followed by A. •No direct relation (#): If A never being directly followed by B and B never being directly followed by A. The next step, it takes this footprint matrix and converts it to a Petri net Figure2.6. The α-algorithm nicely illustrates some of the main ideas behind process discovery. However, this simple algorithm is unable to manage the trade-offs involving the four quality dimensions (fitness, simplicity, precision, and generalization). The main limitations in the alpha algorithm, it is ignoring frequencies which lead to completeness issues and also it does not guarantee soundness, so the produced model is not reliable. Heuristics Mining algorithm Heuristics miner is an improvement of the Alpha miner, especially on three issues. It takes frequencies into account, so it can filter out a noisy behavior or infrequent 24
•Work is subcontracting between two resources. For example resource jis frequently execute a task in-between two tasks executed by individual i. •Tow resources are Working together in the same case regardless causal dependencies. For example, resource iwas working in three cases, where resource j was working in the same cases plus additional three cases where resource iwas not working on, then the weight for ito jshould be larger than the weight for jto i. Discovering Organizational Structures Each resource has a profile which indicates the frequent of activities done by that resource. Such profiles could be used by various clustering techniques like agglomerative hierarchical clustering and k-means clustering in order to discover similar resources. Also relevant information about resources and be added to the profile before clustering like salary, age, sex, etc. After creating the resources clusters, these clusters can be matched to activities in the process. For example, if a resource executed a task, the task is assigned to the cluster (or we can call it organizational entities) which the resource belong to. (Song and van der Aalst, 2008). Analyzing Resource Behavior Performance results extracted from the event log could be applied on resources as long as to organizational entities as organizational entities are indirectly related to events in the log. Some logs record the timestamp when a task is assigned to a resource and accomplish. In that case, it would be easy to extract information regarding utilization and response times of resources.Also, in most cases, organizations would like to do that analysis at a higher hierarchical level rather than at the level of resources. (Van der Aalst, 2011) 2.6.2 Time perspectives Focuses on frequency and timing of events using timestamps which allow discovering bottlenecks, measure service levels and utilization of resources and also make a prediction of the remaining processing time for running cases. 2.6.3 Case perspective Focuses on properties of single process instance (case). A path in the process or originators working on it could characterize a case. However, it is most interesting when different properties of individual cases are available. These properties are 31
directly linked to a case, i.e., the amount of money of an invoice. cases can also be characterized by the values of the corresponding data elements. (W.M.P. van der Aalst and Others, 2007) 2.7 Conduct a Process Mining project 2.7.1 L* life cycle model for Process Mining •Stage 0: Plan and Justify planned activities –A data-driven Process Mining project –A question-driven Process Mining project –A goal-driven Process Mining project •Stage 1: Extract –Data –Objectives –Questions –Domain knowledge •Stage 2: –Discover control flow model (Process model) –Connect events in the log to activities in the model (Alignment) •Stage 3: Extend the model –Add perspectives –Return integrated model which is a starting point for further analysis ∗Diagnosis ∗Reengineering ∗Operational support •Stage 4: operational support (Real time) 2.7.2 Mining Lasagna process A process is a Lasagna process if with limited efforts it is possible to create as agreed-upon process model that has a fitness of at least 0.8. It is structured, regular, controllable and repetitive. Also, Process Mining is usually been using for conformance checking rather than process discovery. 32
2.7.3 Mining Spaghetti process Spaghetti process is unstructured, irregular, and flexible. It is very hard to discover such process except some simplifications are performed like •Subset of activities –Only most frequent ones –Selected region of process •Subset of cases –Homogeneous groups of cases (Clustering) –Natural sub-classes (Gold customers) •Subset of paths –Only most frequent paths 33
Chapter 3 Case Study 3.1 Introduction During this chapter, we will first define our case study objectives and goals, the business process and source of data and a detailed event log review with respect to variables and its value and the steps done to prepare the event log for the execution process. Then in section 3.6, the case study will be performed starting from uploading describing the log file in ProM, going through process discovery and conformance checking techniques, and finally extending the model using organizational perspective. 3.2 Sources of Data The data has been received from Statistics Portugal (INE) in order to perform this work. The data is related to Customer Relationship Management system, INE uses in recording all communication with clients requesting for data or information. In the following subsection, we will introduce briefly INE and their CRM system. 3.2.1 Statistics Portugal (INE) Process INE overview INE stands for Instituto Nacional de estatística in Portuguese and the literal translation is "National Institute of Statistics", but it will be mentioned in this work by abbreviation INE or the English name which the institute choose to be named with "Statistics Portugal". The main responsibility for Statistics Portugal is to produce and publish official statistical information in the optimal possible accuracy and reliability, as this information recently became one of the main requirements for any economic or social 34
development.It was created in 1935 and has its head office in Lisbon with delegations in the cities Porto, Coimbra, Évora, and Faro. (INE, 2015). INE CRM •Function: INE is using CRM to record and track all Emails and communications with the client requesting any kind of information such as surveys, data sets, census, etc. CRM is keeping track for all requests during the whole process and includes all resources working on that cases. •Stakeholders: There are different stakeholders using the CRM system at INE like Customer service resources, Internal department consultants, Information technology department, higher management, etc. •Process: The process of CRM starts with receiving an Email from a client requesting some kind of information. First, it is the responsibility of customer service resource to record and follow up the request that been assigned to him/her. later he/she is evaluating the request and give the client a feedback in case the request was within his/her knowledge and authority. Then the request is being forwarded to one of the internal department resources according to the type and specification of the request. After that internal department resource response to customer service employee who is forwarding this response to the client. In some cases requests need to be evaluated for the budget then this budget is being sent to the client for his confirmation, and in the case of approval, the data is sending to the client with and an invoice. 3.3 Questions The following questions regarding the dataset would be answered during the work •What is the form of the process? •Which activities should be included in the model, and Which other activities will not have a big impact on the model in case we ignored them? •Does the process comply with the guidelines? •Does the process take too long time? •Which performers are involved and how are they related? •Are there employees not working with any other employee and only connected to specific employees? 35
3.4 Objectives After analyzing the process and the social network we should be able to: •Figure out how the real process should look like. •Determine which activities should be included in the model and Which other activities will not have a big impact on the model in case we ignored them? •Analyze whether there are deviations from the guidelines. •Analyze and understand the social network by showing the relations between the performers. 3.5 Event log review Originally the log was not in the desired format as rows represent cases and not activities with a total number of records 6812 related to all requests received during the year 2015. Most of the requests had been closed during 2015 but some of them did not close until March 10, 2016. This is why we can see some activities happening during the first quarter of 2016. Sometimes two or more records merged in the case of having more than one value for any variable, so the number of cases (Requests) is less than the number of records. After translating variables and its values from Portuguese to English and unifying format of all date fields, we got the first log file version to start working with the following Variables list: •Entry date: The date when the INE received and recorded the request. •Final State: the last state achieved regarding a request. •Request ID: Is the identifier of the request (Case) •Name (Int.Dep.): Name of the responsible person for a particular request from the internal department. •Last contact with the client: Latest reply from the client. •Issue Classification: Requests are classified based on its nature (i.e.Population census, International trade, Healthcare, etc.) ) •Closing date: The date when INE send the final answer to the client and close the case. •Name (Cust.Serv.): Name of customer service agent who is responsible for a particular request. 36
•Response date from Int. dep: The date when internal department employee sends his response to customer service agent. •Customer Response: The feedback regarding the budget. •Requires budgeting?: classify request into payable and non-payable requests. •Budget value: budget value in case of payable requests. The first challenge was to find a way to clean and reformat the log, so it would be suitable for Process Mining in the following steps: •Coding the values of the following variables for the data confidentiality: –Name (Cust.Serv.) –> Agentxx (i.e.Agent01, Agent02,etc.) –Name (Int.Dep.) –> Consxx (i.e. Cons01, Cons02, etc.) –Blank values for employees names had been filled by imaginary two employees Cons00 and Agent00. –Budget amounts using some kind of conversion formula. •Merge values with similar functions in a more general name. •Ignore nonclosed requests •convert the data set into log format with variables (Request ID, Activity, Time, Resource, Role (Customer service, Internal department), Point of specialty, Requires budgeting?, Budget Value, )in the following steps: 1. Convert ’Entry date’ variable into ’Record the request’ activity 2. Convert ’Response date from Int. dep.’ variable into ’Response from Int. dep.’ Activity 3. Covert ’Closing date’ variable into ’Close the request’ activity 4. Convert ’Last contact with the client’ variable based on its values. 5. Convert ’Final State’ variable based on its value and the same date of ’Closing date’ as it is the final activity just before closing the request. 6. Convert ’Customer Response’ variable based on its values with the same date of ’ the Last contact with the client date’ 37
3.6 Execution guide 3.6.1 Prepare and describe event log in ProM 1. Upload the .csv file to ProM using “CSV File (XES Conversion with Log package)” plug-in. 2. Convert the file into .XES format using “Convert CSV to XES” plug-in using the following mapping" •Request ID –> Concept:instance •Activity –> Concept:name •Date –> time:timestamp (dd-mm-yy h:mm) •Resource –> org:resource •Role –> org:role •Requires budgeting –> cost:type •Budget value –> cost:amount 3. Now we extract some statistical summary of the log (i.e. Number of cases, total,minimum ,maximum, average number of activities per case,Start date, End date, etc.) see Figure 3.1. Also, we can know occurrences of events in log (How many times an event has appeared). From Figure 3.2 we can see both activities ’recording the request’ and ’Close the request’ have been taken placed exactly the same number of times (5811 times) which are the same number of cases in the log. Also, 100% of cases were started with ’record the request’ event, but only 3.7% of cases ended with ’Close the requests’. This happened because some case have the same timestamp, so we should reorder tasks with the same date in more logical order using “Enhance log: change the ordering of Event log with same timestamp (In place)” plug-in. From Figure 3.3 it makes more sense now by having more than 98% of cases ended with ’Close the request’ event.The cases did not end with ’Close the request’ (some activities followed the closing) will be studied in the following point. 4. By focusing more on traces using another view ’Explore Event Log (Trace variants, Searchable, Sortable)’, we can see the most frequent cases in Figure 3.4, shortest traces in Figure 3.5, longest traces in Figure 3.6, The cases did not ended with ’Close the request’ in Figure 3.7. 5. Dotted chart view had been used to view cases and activities behavior over time. For a clearer view, activities had been colored based cost type (Payable vs. non-payable). From Figure 3.8 we can see that cases are almost having the same behavior of using activities over time except for the last quarter of 2015 38
Figure 3.1: ProM log dashboard Figure 3.2: ProM Log Start and End Events 39
Figure 3.3: ProM Log Start and End Events (Reordered) Figure 3.4: Most frequent traces 40
Figure 3.14: Heuristics Petri Net 1. So "Response from Int.dep." transition (which sometimes be followed by itself) now is not separated from the model and it is represented in a loop. See zoom in in Figure 3.14. Although the model generated by Heuristics miner had overcome the soundness problem of having dead transitions, the model still not sound because the proper completion problem still exists as some silent transitions produce 2 tokens, one of them is consumed through the model and reach the end stat while the second token could stick in the model. ETM algorithm We had chosen to use ETM miner for two reasons. First reason, is to be able to guarantee to generate sound models because we could not generate sound models using Alpha and Heuristics miners. Second reason, to be able to choose our preferred quality criteria in case we are not satisfied with the results to come with the default parameters. In this section we will present the model comes with the default quality weights, then we will manipulate quality criteria and produce some other models in order to look for alternative models. During our work, we had tried several ways to generate a model using ETM miner using different parameters, here we will present 2 of these ways using the parameters that gave us the best results during our trials. The first way is using predefined weights for the quality criteria and ETM miner will search for the best model satisfying these weights. The second way is to set ranges of the desired qualities for each criterion separately and ETM will return a set of models satisfying 47
Figure 3.15: Process tree Produced by ETM miner these ranges and user can list a preview the models based on any of the criteria. In a first way, we had used "Mine a process tree with ETMd" plug-in using the default quality criteria in the following weights: Fitness = 10, Precision = 5, Simplicity = 1, Generalization = 1. Also, we used a constraint of 30 steady states as stop criteria in order to not to take very long time. So if the algorithm could not find better models after 30 attempts, it will return the best model so far. Starting from generation number 70 and until generation number 99, the algorithm has reached the best model with fitness of 0.967 and the result was promising as shown in figure 3.15 . The model makes a lot of sense in representing the actual behavior of the process in a simple way of representing the most important (or most frequent) activities in a meaningful way and good order. The process tree has 9 nodes or activities, starts with "Record the request" activity, then having non-exclusive choice (OR) between 3 activities on the first hand that either "Request is not feasible" or exclusive choice loop with "Budget accepted" or "Response from Int.dep.". Normally the process instant has one "Budget accepted" event and one or more "Response from Int.dep." which in most of the cases followed itself because the system does not record the event of sending the request to internal department and just sufficed with recording the response from internal department. Also, There could be several responses from the internal department for the same request as the response could be not satisfied by the client or the client had changed his requirements during the same request also . On the other hand of the non-exclusive choice, there could be one of the 2 activities "Sending clarification of link" and "General communication with the client". Then the process goes to an exclusive choice (XOR) between either "Request is duplicated" or "Sending final answer" as a final step before reaching the end of the process by "Close the request" activity. 48
Seq. Ftiness Precision Generalization Simplicity Overall average quality 1 0.962 0.907 0.967 1.000 0.959 2 0.962 0.895 0.974 1.000 0.958 3 0.966 0.895 0.967 1.000 0.957 4 0.968 0.862 0.975 1.000 0.951 5 0.971 0.853 0.972 1.000 0.949 Table 3.1: Quality dimensions for the best 5 models in Pareto front with ETM In a second way, we had used "Mine Pareto front with ETMd in live mode" plug-in with ranges of minimum 0.85 and maximum 1.00 for fitness and precision, minimum 0.75 and maximum 1.00 for simplicity and generalization. Also, we used a constraint of 1000 maximum number of generations as it was running in live mode and we had the option to force stop the searching whenever we satisfy with the results. After more than 55 minutes and 1000 generation, 292 models had been generated that satisfying our quality ranges. Because the main quality dimension is replay fitness, we had choose the best 5 models with the highest Fitness values but also taking into consideration the business requirements of the desired model as Some models returns unacceptable results, for example, having the option to start with activities other than "Record the request" which is an original business requirement that should be satisfied in the model. The results are shown in table 3.1, ordered by the average quality assuming equal weights for all dimensions. Although numbers in table 3.1 are very close to each other, but the models represented in process trees are quite different. For example, model 1,3 and 5 have 10 nodes but models 2,4 have just 9 and even the nodes are not exactly the same. Another example of the differences between models is that all models do not have a parallel relation (AND) except in models 2 and 5 between activities "General communication with the client" and "Budget accepted" that 2 activities are represented in the rest of model by non-exclusive relation. See figures 3.16 and 3.17. These differences proof that quality dimensions are helping to filter the candidate models but the opinion of business experts and business process requirements will always have the final decision. The major drawback of ETM miner is not in the generated model but in the time consumed in generating that model. As ETM is a genetic algorithm, it is building the models based on repeating the following cycle until one or more stop criteria are satisfied (which could be a maximum number of generations, maximum time consumed and/or number of steady states). The cycle starts with generating random models, evaluate each model by computing overall quality based on the user defined weights, select the best ncandidates and add them to the new generated random models, and then repeat the cycle. After satisfying the stop criteria, the 49
Figure 3.16: The first model shown in table 3.1 Figure 3.17: Models from 2 to 5 in table 3.1 50
best model in the last generation is selected. 3.6.3 Conformance checking It does not make sense to check the conformance of not sound models because even if the fitness was satisfied and the rest quality dimensions were within acceptable ranges, the results still are not reliable and we could not depend on them. In this section we will connect events in the log to activities in the model in order to check the performance of the sound model which has been generated from ETM miner in two points of interest, Control flow and time consumed. We will use Alignmentbased approach which mentioned in section 2.4.4. Control flow The first step was converting the process tree into a Petri net using "Convert process tree to Petri net" plug-in as shown in figure 3.18. Then aligning the model on the log file using "Replay a Log on Petri Net for Conformance Analysis" plug-in. The Petri in figure 3.19 showing the same Petri net in figure 3.18 after projected with alignment. Also, it contains the legend for the colors used and a zoom-in of two different transitions. First transition is "sending clarification or link" which is totally aligned with the model (100% Synchronous) with total number of cases went through it 4083, and the second one is "General communication with client" which have total of 1035 moves in the model, 425 of them moved in model only without occurrence in the original log, and 610 moves were Synchronous in both model and log. Finally, Because some of the activities had been eliminated from the model, some of the moves on log ( the place had been visited in cases occurred in log but could not be visited in the model as they are coming from activities that do not exist in the model) could not be projected in the model. So the projected model presented them using places, while place size shows the frequency of move log only. Also, we can know in which activities these moves on log should come from before visiting the selected place. In figure 3.20 a place named "sink 49" had been selected, so the tab named "Elements Statistics" shown 5 activities with the number of traced that each activity had a move on log in order to reach this place. For example, activity "Sending data" was missing in the model, so alignment algorithm had to make 297 moves on log in order align these 297 traces into the selected place, which would be a good point to enhance the model by adding this activity. Time consumed Time perspective is very similar to case perspective as it is shown in figure 3.21. Using "Replay a Log on Petri Net for Performance/Conformance Analysis", we 51
Figure 3.18: Petri net as converted from the process tree Figure 3.19: Petri net after projected with alignment 52
Figure 3.20: Move on log place could generate the same process model (Petri net) but now it is projected with time consumed. That allow us to detected the bottlenecks in the process by discovering which activity takes much time to be performed. Using the alignments, we know exactly how to relate events to the process model, and we can annotate activities with the times at which it has been observed. For now, we only know the completion times and we have no clue when they had started. So the time has been calculated for each activity as the difference between its completion time and the previous activity’s completion time (which leads to the current activity). If we also had the starting time, we could distinguish between waiting time and execution time of an activity. From the inspector box on the right-hand side in figure 3.21, we may know the coloring scale and some good information about the time consumed in order to perform the whole process from start to end. It shows that it takes on average 5.41 days with a standard deviation of 14.23 days. Also, cases have the time range from 1 day and up to 11 months. Also from figure 3.21, we know there is a potential bottleneck in Activity "Response from Int.dep", as it appears with very dark color which means it is taking so much time to be accomplished comparing with the rest of activities. In the lefthand box, there is detailed information regarding "Response from Int.dep" activity. It shows that it takes on average 5.59 days which is even higher that the average time for the whole process. Also, it shows that in some cases it takes more than 6 months in order to be performed. So this activity needs a further analysis which 53
Figure 3.21: Performance analysis using time perspective should be done with the cooperation of business owners in order to know the origin of the problem. 3.6.4 Extend the model Extending the model or analyzing the model in some different perspectives rather than the process perspective which had been mentioned during this case study, is an important factor in order to understand the process in different points of views. In this section, we will consider Organizational perspective mentioned in section 2.6.1. As a reminder, our event log has 81 originators or resource distributed in two roles "Customer service" and "Internal department". "Customer service" role include 13 resources coded with names from Agent00 to Agent12. "Internal department" role include 68 resources coded with names from Cons00 to Cons71. "Internal department" resource are responsible for performing only one activity which is "Response from Int.dep." and the rest of activities are being performed by "Customer service" resources. Each case has only one resource from "Customer service" plus one resource from "Internal department" in cases required feedback from internal department resources. In ProM 6 (Prom, 2010) there are 5 plug-ins responsible for mining for the social network using event log. "Mine for a handover-of-work Social network", "Mine for a Reassignment Social network", "Mine for a Similar-Task Social network", "Mine for a Subcontracting Social network", and "Mine for a Working-Together Social network". The idea behind these plug-ins had been mentioned in section 2.6.1. As we already know from the log and process, each case has maximum one resource from each department and "Internal department" resources are responsible 54
for only one activity, so there is no need to mine for Reassignment or Similar-Task as they will not add any new information. The most suitable plug-ins for our work are "Mine for a handover-of-work Social network", "Mine for a Subcontracting Social network", "Mine for a Working- Together Social network". Before start in presenting the social networks, there are 2 main parameters, that we will consider in each social network preview, Layout, and rank. In layout parameter, there are 6 different types of layouts that we can choose from them for the most suitable presentation to our case. In our work, we had used "ISOMLayout" because it is working on arranging the nodes according to homogeneous clusters, so the nodes related to the same clusters will be presented in the nearest distances to each other as possible and they will have the same color. Ranking parameter has the tree main social network analysis measures introduced in section 2.2.3, and during our work we had used "Degree" ranking in order to be able to distinguish between resources that are connected with higher number of other resources (in the center of the network) and resources with fewer connections with others (in the edges of the network). Using "Mine for a handover-of-work Social network" plug-in, we can extract social network in figure 3.22. It shows that resources with very high number of connections are in the center of the network, that resources are not very interested to be studied as they are representing the normal scenario of the applicability for any resource from "Customer service" to be Connected to any resource from "Internal department", but the resources on the edges of the network are more interested as they are representing the special cases where resources are always contacted with a specific resource(s). In bottom left corner, cons39 is selected and all the connected resources are highlighted. it shows that Cons39 is connected with just 4 resources, but always receiving tasks from 3 of them (Agent01, Agent03, Agent08) and handover tasks to 2 resources (Agent01, Cons41). It is not normal to have 2 resources with the same type connected to each other (Cons39 and Cons41) but this happened in some cases when the case was delegated to an internal resource, then for any reason this case is delegated to another internal resource. Also in the down right corner, it shows that Agent00 and agent12 are not handing over any work or receiving work from others (they are always working alone). Using "Mine for a Subcontracting Social network", we got the social network in Figure 3.23. It is very close to the network from handover in figure 3.22, but here the relations between nodes are in one way (Customer service resources are always sending and internal department resources are always receiving), which makes perfect sense regarding the process. As we can see on the right-hand side, that Cons39 now is only connected with one resource which is Agent01 who is always executing tasks before and after Cons39 execute his task. and for sure the direction is one way from Agent01 (Customer service) to Cons39 (Internal department). 55
Figure 3.22: Mine for a handover-of-work Social network Also on the upper-left corner, we can see 5 isolated resources: Agent00, Agent12, Cons12, Cons30, and Cons58. These resources are not subcontracting or being subcontracted by any other resources. We already know from Handover network that Agent00 and Agent12 are not communicating with any other resources, but now additional 3 resources from Internal department had been isolated as they had only one-way connection in handover network. 56
the 20th International Conference on Advanced Information Systems Engineering (CAiSE’08), 5074:465–479. Prom (2010). Prom 6 tutorial. http://www.promtools.org/prom6/downloads/ prom-6.0-tutorial.pdf. R. Agrawal, D. G. and Leymann, F. (1998). Mining process models from workflow logs. In Sixth International Conference on Extending Database Technology. Rozinat, A. (2014a). How process mining compares to business intelligence. https: //fluxicon.com/blog/2011/01/how-pm-compares-to-bi/. Rozinat, A. (2014b). How process mining compares to data mining. https://fluxicon.com/blog/2011/02/ how-process-mining-compares-to-data-mining/. Song, M. and van der Aalst, W. (2008). Towards comprehensive support for organizational mining. Decis. Support Syst., 46(1):300–317. Ting, K. M. (2010). Confusion Matrix, pages 209–209. Springer US, Boston, MA. Van der Aalst, W. (2011). Process Mining: Discovery, Conformance and Enhancement of Business Processes. Springer. Van der Aalst, W. (2015). Extracting event data from databases to unleash process mining. In BPM - Driving innovation in a digital world, pages 105–128. Springer. van der Aalst, W. and Song, M. (2004). Mining social networks:uncovering interaction patterns in business processes. In International Conference on Business Process Management (BPM 2004), Berlin, Germany. van Eck, M. L., Buijs, J. C. A. M., and van Dongen, B. F. (2015). Genetic Process Mining: Alignment-Based Process Model Mutation, pages 291–303. Springer International Publishing, Cham. Weijters, A. J. M. M. and Ribeiro, J. T. S. (2011). Flexible heuristics miner (fhm). In Computational Intelligence and Data 565 Mining (CIDM), 2011 IEEE Symposium on (pp. 310–317). W.M.P. van der Aalst, H.A. Reijers, A. W. and Others (2007). Business process mining: An industrial application. Information Systems, 32(5):713–732. W.M.P. van der Aalst, H. R. and Song, M. (2005). Discovering social networks from event logs. Compute. Supported Coop. Work, 14:549–593. W.M.P. van der Aalst, B.F. van Dongen, J. H. and Others (2003). Workflow mining: A survey of issues and approaches. Data and Knowledge Engineering, 47(2):237–267. 63