41 A weighted coupling metric for business process models Irene Vanderfeesten1 , Jorge Cardoso2 , Hajo A. Reijers1 1 Technische Universiteit Eindhoven, Department of Technology Management, PO Box 513, 5600 MB Eindhoven, The Netherlands {i.t.p.vanderfeesten, h.a.reijers}@tm.tue.nl 2 University of Madeira, Department of Mathematics and Engineering, 9000-390 Funchal, Portugal jcardoso@uma.pt Abstract. Various efforts recently aimed at the development of quality metrics for process models. In this paper, we propose a new notion of coupling, which has been used successfully in software engineering for many years. It extends other work by specifically incorporating the effects of different types of connectors used on a process model’s coupling level. 1 Introduction Quality metrics in software engineering have shown their potential as guidance to improve software designs and make them more understandable and easier to maintain. Since business process and software program designs have a lot in com- mon [7,9], the adaptation of quality metrics to the business process design area seems worthwhile. Several researchers already identified the potential for these business process metrics [1,4,5]. We adopted a classification of quality metrics into five categories from software engineering [2,8]: (i) coupling, (ii) cohesion, (iii) complexity, (iv) modularity, and (v) size. Together with cohesion, coupling is considered to be the most important metric [8]. In this paper we present a coupling metric for business process models. 2 A weighted coupling metric The definition we use for coupling is taken from the definitions found in the soft- ware engineering area [2,3]: Coupling measures the number of interconnections between the activities in a process model. The degree of coupling depends on how complicated the connections are and also on the type of connections between the activities. So far, only a small number of researchers have developed coupling metrics for business processes [6,7]. However, they have not considered the different types of coupling in business processes, as perhaps seems logical on the basis of the definition of coupling that is used in the software engineering field. The contri- bution of this paper is a new coupling metric, based on the existing ones [6,7,9] 42 and inspired by software metrics, which weights different connections between activities (e.g. AND, OR, XOR). Our coupling metric CP counts all pairs of activities in a process model that are connected to each other:  t1 ,t2 ∈T connected(t1 , t2 ) CP = |T | ∗ (|T | − 1) where connected(t1 , t2 ) = ⎧ ⎪ 1 , if (t1 → t2 ) ∧ (t1 = t2 ) ⎪ ⎪ ⎪ ⎨1 , if (t1 → AND → t2 ) ∧ (t1 = t2 ) m n m 1 n (2 −1)·(2 −1) + (2(2m−1)·(2 −1)−1 1 −1)·(2n −1) · m·n , if (t1 → OR → t2 ) ∧ (t1 = t2 ) ⎪ ⎪ 1 ⎪ ⎪ , if (t1 → XOR → t2 ) ∧ (t1 = t2 ) ⎩ m·n 0 , if (t1 = t2 ) in which t1 and t2 are activities, m is the number of ingoing arcs to the connec- tor, and n is the number of outgoing arcs from the connector. Each branch between two activities receives a weight according to the type of connection. This weight is based on the probability that the particular branch is executed. Because we often do not know about the probabilities for execu- tion of certain branches in a model at runtime, we assume they are uniformly distributed. The weights for each branch can then be determined as follows: – the AND is the strongest binder, because every branch of the AND con- nector is followed in 100% of the cases. Thus, the probability of following a particular branch is 1. Figure 1(a) presents a small process model with an AND-constructor. After A has been executed, always B and C have to be executed as well. Therefore, the branch from A to B and the branch from A to C both have a probability of 1 to be followed (and thus a weight of 1). – the XOR is the weakest binder, because in any case only one of the branches 1 is followed. Thus, the probability of following a particular branch is m·n , where m is the number of ingoing branches and n is the number of outgoing branches. The process model in Figure 1(c) includes two alternatives: either the branch of A to B is followed, or the branch from A to C. Both cannot be followed at the same time. Because of our assumption that the two branches 1 have an equal likelihood of being followed, their probability is 1·2 = 12 . And thus, the weight of each branch in the XOR case of Figure 1(c) is 12 . – the OR must have a weight in between the AND and XOR, since one does not know upfront how many of the branches will be followed. It could be that they are all followed (cf. AND situation), that only one branch is followed (cf. XOR situation), but it could also well be that several branches are followed. The weight of an arc is therefore dependent on the probability that the arc is followed. In case of an OR there are (2m −1)·(2n −1) combinations of arcs that can be followed. One of them is the AND situation, for which the probability 1 (2m −1)(2n −1)−1 then is (2m −1)(2 n −1) ∗ 1. All the other combinations ( (2m −1)(2n −1) ) get the 1 weight of an XOR ( m·n ). Thus, in total, the weight of an arc going from one 43 activity to another activity via an OR connector can be calculated by: 1 (2m −1)·(2n −1)−1 1 (2m −1)·(2n −1) + (2m −1)·(2n −1) · m·n . Figure 1(b) shows an example. The 1 2 1 (2 −1)·(2 −1)−1 1 2 weight for each connection is: (21 −1)·(2 2 −1) + (21 −1)·(22 −1) · 1·2 = 3 . A A A AND OR XOR B C B C B C (a) cp = 0.333 (b) cp = 0.222 (c) cp = 0.167 Fig. 1. Some examples of business process model (fragments) and their value for the coupling metric. A B ABCDEFG A 0 0 23 0 0 0 0 \/ C B 0 0 23 0 0 0 0 C 0 0 0 12 21 0 0 X D 0 0 0 0 0 0 0 D E E 0 0 0 0 0 1 1 /\ F 0 0 0 0 0 0 0 G 0 0 0 0 0 0 0 F G Fig. 2. An example EPC process model and a table containing the weighted values of the connections between the activities of the process model Example - In Figure 2 an example process model is shown, represented in the EPC modelling language. Next to the figure a table shows the weights of the connections. The total coupling for this process model then is: 2 + 23 + 12 + 12 + 1 + 1 CP = 3 = 0.103 7∗6 44 3 Conclusion The development of business process metrics to evaluate business processes is only a recently emerging area of research. In this paper we presented a coupling metric that deals with the different types of connections that can exist between the activities in a process model (e.g. AND, OR, XOR). We believe these business process metrics can help to identify problems in a process model and design process models that are easy to understand and maintain. Further empirical work will be necessary to investigate these presumptions. Acknowledgement This research is partly supported by the Technology Foundation STW, applied science division of NWO and the technology programme of the Dutch Ministry of Economic Affairs. References 1. Cardoso, J., Mendling, J., Neumann, G., and Reijers, H.A. A discourse on complex- ity of process models. In: Eder, J., Dustdar, S., et al, editors, BPM 2006 workshops, Lecture Notes in Computer Science 4103, Springer-Verlag Berlin, pp 115-126, 2006. 2. Conte, S.D., Dunsmore, H.E., and Shen, V.Y. Software Engineering Metrics and models. Benjamin/Cummings Publishing Company, Inc., 1986. 3. Fenton, N., and Melton, A. Deriving Structurally Based Software Measures. Jour- nal of Systems and Software, vol. 12, pages 177-187, 1990. 4. Gruhn, V., and Laue, R. Complexity metrics for business process models. In: Witold Abramowicz and Heinrich C. Mayr, editors, 9th international conference on business information systems (BIS 2006), volume 85 of Lecture Notes in Infor- matics, pages 1-12, 2006. 5. Latva-Koivisto, A.M. Finding a complexity measure for business process models. Helsinki University of Technology, Systems Analysis Laboratory, 2001. 6. Mendling, J. Testing Density as a Complexity Metric for EPcs. German EPC workshop on density of process models, 2006. Retrieved from: http://wi.wu- wien.ac.at/home/mendling/publications/TR06-density.pdf 7. Reijers, H.A., and Vanderfeesten, I. Cohesion and Coupling Metrics for Workflow Process Design. In: Desel, J., Pernici, B., and Weske, M., editors, Business Process Management (BPM 2004), Lecture Notes in Computer Science, volume 3080, pages 290-305, Springer-Verlag Berlin, 2004. 8. Troy, D.A., Zweben, S.H. Measuring the Quality of Structured Designs. Journal of Systems and Software, (2) pages 113-120, 1981. 9. Vanderfeesten, I.; Cardoso, J.; Mendling, J.; Reijers, H.A.; and Aalst, W.M.P. van der. Quality Metrics for Business Process Models. In: L. Fischer, ed.: Work- flow Handbook 2007, Workflow Management Coalition, Lighthouse Point, Florida, USA, 2007.