Supporting Business Rule Management with Inconsistency Analysis Carl Corea1 and Patrick Delfmann1 Institute for Information Systems Research, University of Koblenz-Landau, Germany {ccorea,delfmann}@uni-koblenz.de Abstract. Business rules have reached considerable attention from to- days businesses. Numerous standards such as the Decision Model and Notation (DMN) have been introduced and adapted in practice in order to model company decision logic. However, standards such as DMN often make strong assumptions about respective decision models, e.g. that of complete information. Here, we see a gap between the solutions proposed in research and the actual industry adaptation. As some assumptions in research seem unfeasible in practice, companies currently face the prob- lem of inconsistent business rules and decision models. Here, companies need to be supported in detecting, understanding and resolving incon- sistencies. In this work, we report on current problems for Business Rule Management in the field and present an approach to analyze actual pro- cess executions and corresponding decisions for inconcistencies. Keywords: Business Rules · Inconsistency Measurement · Compliance Management 1 Introduction Business rules (BR) are an important counterpart to Business Process Man- agement (BPM), aimed to ensure that business processes comply to norms and regulations [11, 12]. A multitude of standards have been proposed in the BPM community, cf. Imgrund et al. (2017) for a survey. However, as BPM research is often constrained by assumptions, scientific results may not be plausibly aligned to industral settings. This gap is a potential problem both for companies and academia, as it may not be feasible to implement research results in practice. This is motivated for the DMN standard as follows. 1.1 Problems of BR Research in the Field DMN1 allows to represent business rules in so-called decision tables. Here, columns are used to denote the input to a rule, resp. the output which can be concluded. The rows of the decision tables relate to individual business rules. Contrary to the usage and assumptions envisioned in academia, we identify the following major problems for companies currently seeking to implement DMN. 1 https://www.omg.org/spec/DMN/About-DMN/ F. Casati et al. (Eds.): Proceedings of the Dissertation Award and Demonstration, Industrial Track at BPM 2018, CEUR-WS.org, 2018. Copyright c 2018 for this paper by its authors. Copying permitted for private and academic purposes. This volume is published and copyrighted by its editors. 2 C.Corea, P.Delfmann – Redundant Information. Decision models may contain redundant infor- mation. This could for instance be duplicate rows or columns, distributed over multiple tables. Based on own experiences gained in industry projects, such redundant rows and columns can in fact occur in collaborative settings, contrary to the guidelines of the DMN standard. – Incomplete Information. DMN models work under the assumption of complete information. However, decisions in practice can often be dependent of underlying domain knowledge [5]. Calvanese et al. (2017) have already identified this peculiarity as an assumption in research that may not be plausible in an industry context, and proposed to extend decision models with domain knowledge. – Inconsistent Information. A potential problem for decision models are inconsistencies, i.e. rules actually contradict each other. Inconsistencies can result from collaborative and incremental modeling, and impede the intended use of decision models, as inconsistent models can not correctly be used to govern compliant process execution [3, 12] . 1.2 Supporting Business Rule Management There is a broad consensus that the management of above problems is a current issue for BPM [1, 2, 4, 6, 12]. For example, Batoulis and Weske (2017) report on a recent case-study with a large insurance company, where those authors found that 27% of analyzed rules were erroneous. This motivates the need for sup- porting companies in monitoring correct decision making. This work therefore contributes an approach to detect and analyze inconsistencies in actual process executions, based on an application of results from the field of Inconsistency Measurement [9] to a unified representation of business rules and domain knowl- edge. In case of inconsistencies, the company is presented with a careful analysis, identifying problems as well as providing a quantification of inconsistency. To the best of our knowledge, an application of inconsistency measures in Business Rule Management has not yet been investigated. Our discussion is based on the following main example in Figure 1. Figure 1 shows an exemplary ordering process. We assume that a company uses a process engine to handle this process. A process instance is triggered by a new customer input, i.e. instance data. This customer input is now processed in the context of the shown decision logic. For the given process instance, i.e. the route of the customer data through the process model, every rule which was used for decision making relative to the resp. instance data is highlighted in red. One can observe that there are multiple errors in this decision logic. The FreeShipping table con- tains contradictory information. Also, the conclusion in the Eligibility table contradicts external domain knowledge. Such problems make it impossible for companies to utilize decision logic as intended. Still, it is essential for companies to warrant a correct process execution. In this report, we therefore show how our approach helps companies to detect and analyze such inconsistencies, fostering correct and compliant business process execution. Supporting Business Rule Management with Inconsistency Analysis 3 Region Code Input Output Country Region ra USA Reg1 rb ES Reg2 Eligibility Input Output Region Eligible rc Reg1 True ozess rd Reg2 True Free Shipping Input Output Country Free Shipping s Check Region Code Check Eligibility Check Free Shipping re rf ES ES True False 1.2 Process Logic 1.3 Decision Logic rb: ES → Reg2 ID: 1 ID: 1 The company The company rd: Reg2 → Eligible Country: ES Country: ES does not ship does not ship ... ... to Spain to Spain re: ES → freeShipping rf: ES → not freeShipping 1.1 Instance Data 1.4 Domain Knowledge 1.5 Rule Execution Trace Fig. 1. Main example 2 Extending Business Rules with Domain Knowledge In order to allow for an analysis of problems such as in Figure 1, a unified repre- sentation of business rules and domain knowledge is needed. As a design choice, we consider the Formal Contract Language (FCL) [7] as a logical formalism for business rules in this work. FCL allows to capture company knowledge, distin- guishing between facts and rules. Facts capture atomic pieces of information about a domain of interest, e.g. customer(Mary). Rules are of the form r : A1 , . . . , A n → B (1) where A1 , . . . , An is the premise of the rule, B can be concluded given that the premise is satisfied, and r is an identifier. Please note that FCL also allows to model defeasible rules, superiority relations and other normative rules, e.g. to express deontic constraints. For simplicity, we will not revisit the syntax of FCL in greater detail and will continue our discussion on the basis of introduced expressivity. Please see Governatori and Maher (2017) for further description. FCL can consequently be used to represent business rules [12]. Figure 2 shows an FCL representation of the DMN model in Figure 1. 4 C.Corea, P.Delfmann ra : U SA → Reg1 rd : Reg2 → Eligible rb : ES → Reg2 re : ES → F reeShipping rc : Reg1 → Eligible rf : ES → not F reeShipping Fig. 2. FCL Representation of Business Rules in Figure 1 This FCL representation of business rules can subsequently be enriched with domain knowledge. To this aim, background domain knowledge can be captured in FCL, allowing to further define the semantics and interrelations of rules. d1 : ES → not Eligible Fig. 3. FCL Representation of Domain Knowledge in Figure 1 Figure 3 shows the the external domain knowledge from Figure 1 in an FCL representation. d1 models the domain knowledge from Subfigure 1.4 as an ex- ception. The representation of business rules and domain knowledge in FCL provides a logic-based semantics, allowing to capture rules and the relations between rules such as subsumption, negation or datatypes in a unified model. The following section shows how this shared model can be used to analyze process related decisions for inconsistencies. 3 Inconsistency Analysis Approach A scientific field concerned with the analysis of inconsistent information is the field of Inconsistency Measurement, cf. Grant and Martinez (2018). Here, a cen- tral object of study are quantitative measures, which allow to assign a numerical value to (elements of) a rule base, with the informal meaning that a higher value reflects a higher degree of inconsistency. These measures foster the possibility to identify inconsistencies in rule bases, i.e. pinpoint the exact causes, and quantify the amount of blame, that an individual part of a rule base carries in context of the overall inconsistency. 3.1 Approach Architecture Our approach utilizes these quantitative measures to analyze the consistency of decisions. Here, our proposed application of Inconsistency Measurement results in Business Rules Management provides new forms of quantitative insight for companies. Figure 4 shows the approach architecture. Supporting Business Rule Management with Inconsistency Analysis 5 Analysis For Instance Solver Measures Ranking Analysis Layer Decision Management Rule Execution Domain Management Instance Data Trace Knowledge Execution Representation (FCL) Instance Process Logic Layer Customer Business Rule Layer Input Legend: Fig. 4. Approach Architecture Our approach is geared towards individual process instances. The process logic of a given process instance is defined in the process layer, manifested by the process model. This process layer in turn relies on a business rules layer, governing process execution. The core of our approach is a unified execution representation, comprising instance data, domain knowledge as well as all de- cisions made relative to the process instance. The latter are all business rules which were executed in the context of the respective process instance. These ex- ecuted rules are stored in a so-called rule execution trace. To recall, an example of a rule execution trace is shown in Figure 1.5. Our approach then allows to analyze this execution representation for in- consistencies. In result, companies are supported in monitoring consistent and compliant business process execution. The inconsistency analysis is based on re- sults from the field of Inconsistency Measurement. Applying these results allows to support companies in detecting and quantifying potential inconsistencies, pro- moting an understanding of inconsistencies in process execution. The analysis layer comprises one component for finding inconsistencies, and a second compo- nent analyzing and ranking the resp. inconsistencies, introduced subsequently. 3.2 Finding Inconsistencies Let an FCL rule base B = (F, R) (2) 6 C.Corea, P.Delfmann where F is a set of facts and R is the set of all rules. Let L(B) be the set of all literals appearing in B. We define inconsistency of a rule base B as logical inconsistency, i.e. there is support for contradictory outcomes A and not A at the same time. Definition 1 (FCL Inconsistency). An FCL rule base B is inconsistent, if there exists an l ∈ L(B), s.t. B entails {l, not l }. To clarify, an FCL rule base is inconsistent if there is a contradiction between facts or active rules. Then, given a rule base B, the minimal inconsistent subsets MIS of B are defined as MIS(B) = { B 0 ⊆ B | B 0 is inconsistent and minimal }. (3) This definition of inconsistent subsets can be used to find inconsistencies in business rule bases. re: ES → FreeShipping ES rf: ES → not FreeShipping rb: ES → Reg2 MIS2 rd: Reg2 → Eligible d1: ES → not Eligible MIS1 Fig. 5. Minimal Inconsistent Subsets for Figure 1 We recall the example from Figure 1. An analysis of the execution repre- sentation for this example yields two minimal inconsistent subsets, visualized in Figure 5 as MIS1 and MIS2 . To solve for these MIS, existing reasoners such as SPINdle2 can be utilized. In this way, our approach allows to exploit results from the field of logic programming to detect inconsistencies and support companies in decision management. Next to pinpointing problems, quantitative measures to further analyze these inconsistencies are presented in the following. 3.3 Culpability Measures for Assessing the Causes of Inconsistency So-called culpability measures allow to analyze the FCL rule base from an el- ement perspective [10]. The motivation of culpability measures is to evaluate the responsibility of each element for the overall inconsistency. This is useful for resolving inconsistency in a business rule base, as it allows to identify individual elements that are highly responsible for the inconsistency. Let E denote the set of all possible elements, and B the set of all business rule bases. Then, a culpability measure C is a function C : B × E → [0, ∞) (4) 2 http://spindle.data61.csiro.au/spindle/ Supporting Business Rule Management with Inconsistency Analysis 7 which assigns a non-negative number to a mapping of an individual element to a rule base, and can thus assess the culpability that an individual element represents w.r.t. the rule base. An example is the so-called cardinality based culpability measure Cc [10] which assesses the culpability of an element α for a rule base B, via X 1 Cc (B, α) = . (5) |M | M ∈MIS(B)s.t.α∈M This measure counts the number of minimal inconsistent subsets that an ele- ment α belongs to, normalized by the cardinalities of the respective subsets. Applying the Cc measure for the MIS shown in Figure 5 results in the following quantification: rb = 0.25 rd = 0.25 re = 0.333 rf = 0.333 d2 = 0.25 (6) Note that we only compute values for rules, as we focus on an assessment of modeling errors and inconsistencies between rules. An assessment such as in (6) provides a quantification that can be used as a driver for inconsistency resolution [12]. To further guide modelers in inconsis- tency resolution, we propose a culpability-based ranking. The intuition is that a rule with a higher culpability can be seen as more problematic than others and should be attended to with a higher priority, following [8]. Definition 2 (Culpability Ranking). Let a rule base B and a culpability measure C, then define the culpability ranking over all rules ri ∈ B via hr1 , ..., rn i, where C(B, r1 ) ≥ ... ≥ C(B, rn ). This ranking sorts all rules in B based on their culpability value. Thus, the user can be presented with a prioritized list of which elements to attend to. Given the example in Figure 1 and the respective values computed in (6), this leads to the following culpability ranking: hre , rf , rb , rd , d2 i (7) 4 Key Learnings In this report, we presented an approach to analyze the consistency of all de- cisions made throughout process execution. In case of inconsistent decisions, the company is provided with quantitative insights as a basis for an informed re-modeling strategy. The first key learning is that the plausibility of assumptions made in BPM re- search should be carefully examined. The adaptation in industry may be subject to different settings, counteracting a correct implementation. This is supported by a wealth of recent studies analyzing problems in Decision Management [1, 2, 4, 6] and also matches our won experiences gained in industry projects. 8 C.Corea, P.Delfmann A second key learning follows Sadiq and Governatori (2015). Those authors state that businesses need to be aided with systems to provide capacity to man- age business rules. As a manual analysis is unfeasible in practice, BPM research needs to further focus towards automated approaches helping companies to un- derstand the causes of problems. To this aim, we showed that measures from the field of Inconsistency Measurement can help companies with such an analysis. Last, an important key learning gained from this project is the necessity of domain knowledge. Large-scale collaborative modeling is a challenging task for companies. Here, domain experts have to work closely with business rule engineers in order to create plausible decision logic. To this aim, the insights yielded by inconsistency analysis can be used to bridge the gap between these expert groups, fostering business process improvement and sustainable Business Rule Management. References 1. Batoulis, K., Nesterenko, A., Repitsch, G., Weske, M.: Decision management in the insurance industry: Standards and tools. In: International Conference on Business Process Management. Springer (2017) 2. Batoulis, K., Weske, M.: Soundness of decision-aware business processes. In: Inter- national Conference on Business Process Management. Springer (2017) 3. Branco, M.C., Xiong, Y., Czarnecki, K., Küster, J., Völzer, H.: A case study on consistency management of business and it process models in banking. Software & Systems Modeling 13(3) (2014) 4. Calvanese, D., Dumas, M., Laurson, Ü., Maggi, F.M., Montali, M., Teinemaa, I.: Semantics and analysis of dmn decision tables. In: International Conference on Business Process Management. Springer (2016) 5. Calvanese, D., Dumas, M., Maggi, F.M., Montali, M.: Semantic dmn: Formalizing decision models with domain knowledge. In: International Joint Conference on Rules and Reasoning. Springer (2017) 6. Di Ciccio, C., Maggi, F.M., Montali, M., Mendling, J.: Resolving inconsistencies and redundancies in declarative process models. Information Systems 64 (2017) 7. Governatori, G., Maher, M.J.: Annotated defeasible logic. Theory and Practice of Logic Programming 17(5-6) (2017) 8. Grant, J., Hunter, A.: Measuring consistency gain and information loss in stepwise inconsistency resolution. In: European Conference on Symbolic and Quantitative Approaches to Reasoning and Uncertainty. Springer (2011) 9. Grant, J., Martinez, M.V. (eds.): Measuring Inconsistency in Information. College Publications (2018) 10. Hunter, A., Konieczny, S., et al.: Measuring inconsistency through minimal incon- sistent sets. KR 8 (2008) 11. Imgrund, F., Malorny, M., Janiesch, C.: Eine literaturanalyse zur integration von business rules und business process management. In: Internationale Tagung der Wirtschaftsinformatik (2017) 12. Sadiq, S., Governatori, G.: Managing regulatory compliance in business processes. In: Handbook on Business Process Management 2. Springer (2015)