Enriching Business Processes with Rules using ... - Semantic Scholar

2 downloads 14660 Views 423KB Size Report
It provides a visual notation emphasizing the workflow in a pro- cess, and ... Developing the integrated software for modeling BP with BR is therefore extremely ...
Enriching Business Processes with Rules using the Oryx BPMN Editor ? Krzysztof Kluza, Krzysztof Kaczor, Grzegorz J. Nalepa AGH University of Science and Technology, al. Mickiewicza 30, 30-059 Krakow, Poland {kluza,kk,gjn}@agh.edu.pl

Abstract BPMN is a leading visual notation for modeling Business Processes. Although it can be efficiently used for modeling workflow structures, it is not suitable for modeling the low-level logic of particular tasks in the process. Recently, Business Rules have been used for this purpose. Such rules are often specified in natural language and in an informal way. In this paper, we consider an approach to the integration of Business Processes with Business Rules. As a proof of concept, we propose a framework based on the Oryx BPMN editor integrated with rule-based tools. The goal of the integration of the BPMN editor with the XTT2 rule framework is to provide an environment for visual modeling processes with formally described business rules. We also discuss execution options of the integrated model. In the future, this opens up a possibility to execute such models using the HeaRT rule engine.

1

Introduction

Business Process Model and Notation (BPMN) [1] is de facto a standard for Business Process (BP) modeling. It provides a visual notation emphasizing the workflow in a process, and describes activities of the organization at an abstract level. The detailed logic of the tasks in the process has to be specified in other way. Recently, the Business Rules (BR) approach [2], based on the the Rule-Based Systems (RBS) concepts [3], has been used for this purpose. However, the common problem with BR is that they are often specified in natural language and in an informal way. In our research, we address this visual modeling problem by using the XTT2 [4] knowledge representation of Business Rules, which is both formalized and can be visually modeled [5]. ?

The paper is supported by the BIMLOQ Project funded from 2010–2012 resources for science as a research project. This is a draft version of a paper presented at the Artificial Intelligence and Soft Computing: 11th International Conference, ICAISC 2012: Zakopane, Poland, April 29–May 3, 2012, published in Lecture Notes in Computer Science vol. 7268, pp. 573-581, eds. L. Rutkowski et al. c

Springer Berlin Heidelberg: http://link.springer.com/chapter/10.1007\ %2F978-3-642-29350-4_68.

Although there is a difference in abstraction levels of BP and BR, rules can be complementary to processes. A BPMN model can define the high level behavior of the system while the low-level process logic can be described by rules. Despite the ongoing research on this integration, there is no standardized and coherent methodology available. The integration details are not well specified, and there is not many tools which provide such an integrated modeling environment. Thus, the further issue is the execution problem of such an integrated model. In this paper, we give an overview of a solution for this problem as well. The rest of this paper is organized as follows. In Section 2, the motivation for the approach is presented. Section 3 describes BPMN and modeling processes in the Oryx editor. It also introduces the BR approach. Section 4 provides the description of the XTT2 Business Rules and the HQEd editor for BR. In Section 5, we present the outline of the Oryx-HQEd Integrated Framework. Section 6 provides an evaluation of the proposal in comparison to the related work. The paper is summarized in Section 7.

2

Motivation

Artificial Intelligence (AI) tools are commonly used as components in intelligent systems [6] and Software Engineering (SE) applications. SE uses visual languages such as Unified Modeling Language (UML) [7] for modeling purposes. Such languages are often derived from the AI tools, e.g. class diagrams derived from the classic AI frame systems. A diagram can replace even a long description and allows for a faster knowledge acquisition. It is a part of policy emphasizing the aspect of high-quality software. In the case of Business Process modeling, UML is far too expressive and overcomplicated to be understood by an average business user. Thus, the BPMN notation was introduced. Although it can perfectly model a workflow in the process, the detailed logic of the process tasks can not be specified in BPMN. Business Rules are one of the solutions which can be used for the specification of task logic in Business Processes [8,9,10]. This opens a field for using RBS solutions from AI. Developing the integrated software for modeling BP with BR is therefore extremely important in order to ensure the high quality of information systems in the future. In our research, we address two main problems dealing with BP and BR: 1. the visual modeling problem – by visual editing the XTT2-based Business Rules. 2. the execution problem of such an integrated model – by running the model using the integrated environment with the rule engine. In this paper, we give an overview of a solution for integration of Business Processes with Business Rules. The research is based upon our previous research concerning visual inference specification methods for modularized rule bases [11] and selected analysis and execution methods for Business Processes [10]. The original contribution of this research is addressing the two abovementioned problems during the integration process. We consider several approaches to this integration. As a proof of concept, we propose an integrated tool framework for BP and BR. The framework uses BPMN and the Oryx editor for modeling processes and the

XTT2-based tools for rules [12]. Oryx1 is a web-based editor for modeling business processes, which enables to model processes in a collaborative way. The tool is extensible by providing a plugin mechanism for adding new functions. In the framework, the EXtended Tabular Tree version 2 (XTT2) [4,13] knowledge representation for Business Rules and the HeKatE Qt Editor (HQEd) with the HeKatE rule engine (HeaRT) [14] are used as well. This allows for visual modeling of both Business Processes and Rules. As to address the execution problem, we propose using the workflow engine which communicates with the HeaRT rule engine. The workflow engine can be either one of the Business Process Execution Language (BPEL) [15] engines (a subset of BPMN models can be transformed to BPEL) or some native execution environment for processes, such as jBPM2 . HeaRT, as a component for executing the logic of particular tasks, is responsible for handling, selection and execution of rules. Such an approach allows for executing a fully specified BPMN model.

3

Modeling Business Processes with BPMN

BPMN is a visual notation for modeling Business Processes using workflow-like diagrams. A BPMN model defines the ways in which operations are carried out to accomplish the intended objectives of an organization. It can be serialized to XML and further processed e.g. into languages for execution of business processes, such as BPEL. Although BPMN defines three models to cover various aspects of processes, in our research, we use only the main BPMN diagram type, Business Process Diagram (BPD), as it is expressive enough to model workflow structures. The categories of elements used in BPDs are shown in Figure 1. There are four basic categories in BPDs: Flow Objects (Events, Activities, and Gateways), Connecting Objects (Sequence Flow, Message Flow, Association), Swimlanes, and additional Artifacts. A BPMN diagram, shown in Figure 2, depicts the process of a simple yet illustrative system, the Polish Liability Insurance (PLLI), which determines the price for the liability insurance for protecting against third party insurance claims. Because the insurance price is determined based on some data from a user, the first task (Enter car and driver data) requires interaction with a user i.e. entering the input data. Further tasks determine the insurance price: the base price is calculated first, then the calculated insurance premium can be increased or decreased, and finally, all discounts are taken into account and the final price for insurance is calculated. Although the BPMN notation is relatively young, there are more than 80 BPMN implementations of various BPMN tools3 . In our research, we extend the Oryx editor. Oryx allows for modeling processes in BPMN. The editor has been selected for our research for a couple reasons. It is implemented as a web-based application, what allows for collaborative modeling processes without installing new software in the user’s operating system. Through implementation of a plug-in concept, it is possible to extend the application with new functions or adapt it to enhance existing functionality. 1 2 3

See: http://code.google.com/p/oryx-editor. See: http://www.jboss.org/jbpm. See: http://www.bpmn.org.

Flow Objects

Connecting Objects

Swimlanes

Artifacts

Sequence Flow Data Object

Gateways

Pool Annotation text

Message Flow

Text Annotations Activities Association

Lanes (within a pool) Group

Events

Figure 1. BPMN core objects

The technologies used in Oryx conform to the standards from the World Wide Web Consortium (W3C), such as SVG, XHTML, CSS or RDF. Oryx also uses Javascript run in a so-called sandbox way in the browser, which prevents the execution of some malicious code in the system. As the BPMN is used only for modeling the workflow between tasks, their lowlevel specification is not defined within the BP model. Recently, the Business Rules approach has been used for this purpose [10]. Although there is a difference in abstraction levels of BP and BR, rules can be complementary to processes. Especially, they can precisely define the logic of a process task, e.g. in structured natural language (refer to the Calculate the base price task in Figure 2): If the c a r e n g i n e c a p a c i t y is below 900 cm3, the b a s e c h a r g e is 537 PLN. If the c a r e n g i n e c a p a c i t y is between 901 and 1300 cm3, the b a s e c h a r g e is 753 PLN. ... If the c a r e n g i n e c a p a c i t y is over 2000 cm3, the b a s e c h a r g e is 1536 PLN.

Such a separation of BP and BR is consistent with the BPMN specification [1], which clarifies that BPMN is not suitable for modeling such concepts as rules.

Polish Liability Insurance vertical

Calculate car discounts

Enter car and driver data

Calculate the base price

Calculate driver discounts

Calculate insurance price

Calculate other discounts

Figure 2. An example of the BPMN diagram for a Polish Liability Insurance process

Krzysztof Kluza

1 of 1

19.10.2011

4

XTT2 Business Rules

The main goal of the XTT2 [12,4,13] representation is to provide a structured knowledge representation supporting the logical and visual specification of rules, and allows for advanced inference control [16]. XTT2 provides formal rule representation language [17,4], based on the Attributive Logic with Set Values over Finite Domains (ALSV(FD)) logic [12], which is more expressive than the propositional logic. Rules in the XTT2 rule base that work together in a common context are grouped into an extended decision table. Table 1 presents a simple decision table for the Calculate the base price task from the PLLI example. The table consists of two columns: the 1st one contains conditional attribute, and the 2nd one contains the decision attribute. Each row corresponds to a single rule that specifies the base insurance price. Table 1. A decision table for the Calculate the base price task Car capacity [cm3 ] Base price [PLN] < 900 537 [901, 1300] 753 [1301, 1600] 1050 [1601, 2000] 1338 > 2000 1536

XTT2 has a well-defined graphical representation and is suitable for visual editors. An advanced XTT2 knowledge base composes a network of the decision tables. HQEd [4] allows for modeling an XTT2-based rule base in a visual way. It also provides an interface for plugins extending its functionality with integration with other systems. The editor can continuously check the model against syntax errors, what allows for discovering errors at the time they appear. HQEd also provides several additional features, e.g. on-line model verification feature with HeaRT [18]. This is, however, out of scope for this paper.

5

Oryx-HQEd Integrated Framework

In order to address the visual modeling problem, the Oryx user interface was adapted for choosing a proper XTT2 decision table for a particular Business Rule task in the BPMN model. Figure 3 presents the integration of the BPMN Business Processes with the XTT2-based Business Rules for the PLLI use case. The model for this case consists of 6 tasks: a User task, which requires interaction with a user, and 5 Business Rule tasks, which are used to determine the insurance price. The BR task Calculate the base price triggers the chosen XTT2 table, which can be selected during the BP design. As the HQEd provides a socket-based interface for its services, XTT2 rules can be edited in the HQEd editor connected via network with Oryx. In such a case opening a rule task in Oryx allows for XTT2 editing in HQEd.

Figure 3. Screenshot from the prototype Oryx GUI for XTT2

As to address the execution problem (the runtime environment for processes with rules), we propose using a workflow engine which communicates with the HeaRT rule engine. Such a workflow engine can be one of the BPEL engines, which follows a process description written in a particular BPEL XML file. As a subset of BPMN models can be transformed to BPEL and HeaRT can be used from the BPEL engine, this can be a potential solution for the execution problem. Another option is using some native workflow engine for BPMN 2.0, e.g. jBPM. jBPM is a generic process engine based on the Process Virtual Machine (PVM)4 , which can execute business processes described in BPMN 2.0. It is not an isolated process engine, thus it can be integrated with HeaRT. Such an approach allows for visual modeling of both processes and rules as well as executing a fully specified BPMN model. An outline of the the Oryx-HQEd framework architecture is presented in Figure 4.

6

Related work

In the area of Business Processes engineering, there is ongoing research concerning the problem of integration of Business Processes with Business Rules. Knolmayer et. al [8] described a rule-based method for modeling workflows. The limitation of this approach, in which the Event-Condition-Action (ECAA) rules were used to specify the processes, is focusing only on several workflow patterns. A hybrid composition approach consisting of the BPEL process and several well-modularized Business Rules was proposed 4

See: http://docs.jboss.com/jbpm/pvm.

Figure 4. An outline of the Oryx-HQEd framework architecture

by Charfi and Mezini in [9]. It consists of two phases separating rules from processes. The authors considered using a rule engine for BP implementation. Zur Muehlen et. al [19] considered the relationship between rules and processes. They analyzed the representation capabilities of two rule modeling languages, SRML and SBVR, in comparison to the Petri net, EPC, IDEF and BPMN 1.0 approaches. In [20] zur Muehlen et. al compared BP-oriented and BR-oriented approaches and presented a decision framework for process and rule modeling. Some guidelines for process and rule modeling according to the particular factors, such as change frequency, implementation responsibility etc. were described. This should help modelers to decide how particular aspects of the organization should be modeled. However, the presented decision framework does not contain the integrated methodology. The abovementioned papers do not provide any tool for the solution but only describe the topic very broadly. Moreover, several of them do not concern the BPMN notation, which is de facto a standard for process modeling. There are many tools that support Business Process modeling, analysis and execution [21,22,23]. However, only several tools are partially adapted for modeling processes with rules. Among such tools, there is no standardized and coherent methodology for BP and BR integration. The existing solutions much differ in terms of aims and scope. In Corel iGrafx Process5 rules can be modeled using BPMN gateways, which controls the flow according to the value of attribute. However, this is a very limited solution. It is not possible to group such defined rules in decision tables or reuse them, and iGrafx does not allow for using rules in BPMN tasks. IBM WebSphere Business Modeler Advanced6 , in turn, supports the Business Rule tasks in models. Such a task requires to define the if-then rule schema and to specify the rules. However, this solution does not provide a visual specification of rules. Business Process Visual Architect7 allows a user to depict single rules and rule grids within a BPMN model. However, such rules are only depicted in 5 6 7

See: http://www.igrafx.com. See: http://www-01.ibm.com/software/integration/wbimodeler. See: http://www.visual-paradigm.com/product/bpva.

the diagram and can not be used in simulation or execution process. Drools8 rule engine, in turn, is integrated with the jBPM engine, so selected BPMN elements can be used to control the inference flow. It constitutes one of the running example of rules and processes integration but does not provide any dedicated decision table editor for visual rule modeling [24]. Our solution outlines a tool framework which supports integration of XTT2 BR with BPMN processes modeled in Oryx. In contrast to the abovementioned tools which do not support advanced rule representations, we use decision tables for defining the task logic in the process. Such tables can be visually designed using HQEd. Rules in a table are formally described, and their syntax can be checked during the design process.

7

Conclusion

In this paper, we propose the integrated framework for BP and BR. The tool framework uses the Oryx editor for processes and the XTT2-based tools for rules. The goal of the integration of the BPMN editor with HQEd is to provide a framework for coherent modeling processes with rules. In our research, we address the visual modeling problem by using the BPMN Business Processes and XTT2 Business Rules, both of which can be modeled in a visual way. We give an overview of a solution for the execution problem of such an integrated model. We propose using the workflow engine integrated with the HeaRT rule engine, which is out of scope of this paper. As future work a full solution for executing the integrated model composed of BPMN process with rules is planned. Besides the solution mentioned above other directions are considered. First of all a translation from the selected BPMN diagrams to the HMR representation is partially developed [25]. It allows for obtaining a full model described by XTT2 rules. Another effort aims at translating XTT2 rules to BPEL. In this way, with the BPMN part translated to BPEL, a workflow engine could be used to run the whole model. An important issue is the quality of the integrated model. The verification features of HeaRT can be used for formal verification of selected BPMN models and rule tasks. However, this is mostly local verification of single rule tasks or simple BPMN constructs. A global verification of the complete model was considered in [26]. The verification process uses the translation to the Alvis modeling language [27], a language for modeling and verification of distributed systems.

References 1. OMG: Business Process Model and Notation (BPMN): Version 2.0 specification. Technical Report formal/2011-01-03, Object Management Group (January 2011) 2. Ross, R.G.: Principles of the Business Rule Approach. Addison-Wesley Professional (2003) 3. Giurca, A., Gasevic, D., Taveter, K., eds.: Handbook of Research on Emerging Rule-Based Languages and Technologies: Open Solutions and Approaches. Information Science Reference, Hershey, New York (2009) 8

See: http://www.jboss.org/drools.

4. Nalepa, G.J., Lig˛eza, A., Kaczor, K.: Formalization and modeling of rules using the XTT2 method. International Journal on Artificial Intelligence Tools 20(6) (2011) 1107–1125 5. Nalepa, G.J.: Proposal of business process and rules modeling with the XTT method. In Negru, V., et al., eds.: Symbolic and numeric algorithms for scientific computing: SYNASC’07: 9th international symposium: RuleApps’2007 – workshop on Rule-based applications: Timisoara, Romania, September 26–29, 2007, Los Alamitos, California ; Washington ; Tokyo, IEEE, CPS Conference Publishing Service (2007) 500–506 6. Tadeusiewicz, R.: Introduction to intelligent systems. In Wilamowski, B.M., Irwin, J.D., eds.: Intelligent systems. The Electrical Engineering Handbook Series. The Industrial Electronics Handbook. Second edition edn. Boca Raton; London; New York: CRC Press Taylor & Francis Group (2011) 1–1–1–12 7. OMG: Unified Modeling Language (OMG UML) version 2.2. superstructure. Technical Report formal/2009-02-02, Object Management Group (February 2009) 8. Knolmayer, G., Endl, R., Pfahrer, M.: Modeling processes and workflows by business rules. In: Business Process Management, Models, Techniques, and Empirical Studies, London, UK, Springer-Verlag (2000) 16–29 9. Charfi, A., Mezini, M.: Hybrid web service composition: Business processes meet business rules. In: Proceedings of the 2nd International Conference on Service-Oriented Computing. ICSOC ’04, New York, NY, USA, ACM (2004) 30–38 10. Nalepa, G.J., Kluza, K., Ernst, S.: Modeling and analysis of business processes with business rules. In Beckmann, J., ed.: Business Process Modeling: Software Engineering, Analysis and Applications. Business Issues, Competition and Entrepreneurship. Nova Publishers (2011) 11. Kluza, K., Nalepa, G.J., Łysik, Ł.: Visual inference specification methods for modularized rulebases. Overview and integration proposal. In Nalepa, G.J., Baumeister, J., eds.: 6th Workshop on Knowledge Engineering and Software Engineering (KESE2009) at the 32nd German conference on Artificial Intelligence: September 21, 2010, Karlsruhe, Germany, Karlsruhe, Germany (2010) 6–17 12. Nalepa, G.J., Lig˛eza, A.: HeKatE methodology, hybrid engineering of intelligent systems. International Journal of Applied Mathematics and Computer Science 20(1) (2010) 35–53 13. Nalepa, G.J.: Semantic Knowledge Engineering. A Rule-Based Approach. Wydawnictwa AGH, Kraków (2011) 14. Nalepa, G.J.: Architecture of the HeaRT hybrid rule engine. In Rutkowski, L., [et al.], eds.: Artificial Intelligence and Soft Computing: 10th International Conference, ICAISC 2010: Zakopane, Poland, June 13–17, 2010, Pt. II. Volume 6114 of Lecture Notes in Artificial Intelligence., Springer (2010) 598–605 15. Sarang, P., Juric, M., Mathew, B.: Business Process Execution Language for Web Services BPEL and BPEL4WS. Packt Publishing (2006) 16. Nalepa, G., Bobek, S., Lig˛eza, A., Kaczor, K.: Algorithms for rule inference in modularized rule bases. In Bassiliades, N., Governatori, G., Paschke, A., eds.: Rule-Based Reasoning, Programming, and Applications. Volume 6826 of Lecture Notes in Computer Science., Springer Berlin / Heidelberg (2011) 305–312 17. Nalepa, G., Lig˛eza, A., Kaczor, K.: Overview of knowledge formalization with XTT2 rules. In Bassiliades, N., Governatori, G., Paschke, A., eds.: Rule-Based Reasoning, Programming, and Applications. Volume 6826 of Lecture Notes in Computer Science., Springer Berlin / Heidelberg (2011) 329–336 18. Nalepa, G., Bobek, S., Lig˛eza, A., Kaczor, K.: HalVA - rule analysis framework for XTT2 rules. In Bassiliades, N., Governatori, G., Paschke, A., eds.: Rule-Based Reasoning, Programming, and Applications. Volume 6826 of Lecture Notes in Computer Science., Springer Berlin / Heidelberg (2011) 337–344

19. zur Muehlen, M., Indulska, M., Kamp, G.: Business process and business rule modeling languages for compliance management: a representational analysis. In: Tutorials, posters, panels and industrial contributions at the 26th international conference on Conceptual modeling - Volume 83. ER ’07, Darlinghurst, Australia, Australia, Australian Computer Society, Inc. (2007) 127–132 20. zur Muehlen, M., Indulska, M., Kittel, K.: Towards integrated modeling of business processes and business rules. In: 19th Australasian Conference on Information Systems ACIS 2008, Christchurch, New Zealand (December 2008) 21. van der Aalst, W.M.P., ter Hofstede, A.H.M.: YAWL: Yet another workflow language. Information Systems 30(4) (2005) 245–275 22. Monsalve, C., Abran, A., April, A.: Measuring software functional size from business process models. International Journal of Software Engineering and Knowledge Engineering 21(3) (2011) 311–338 23. Lam, V.S.W.: Formal analysis of BPMN models: a NuSMV-based approach. International Journal of Software Engineering and Knowledge Engineering 20(7) (2010) 987–1023 24. Kaczor, K., Nalepa, G.J., Łysik, Ł., Kluza, K.: Visual design of Drools rule bases using the XTT2 method. In Katarzyniak, R., Chiu, T.F., Hong, C.F., Nguyen, N., eds.: Semantic Methods for Knowledge Management and Communication. Volume 381 of Studies in Computational Intelligence. Springer-Verlag (2011) 57–66 25. Kluza, K., Ma´slanka, T., Nalepa, G.J., Lig˛eza, A.: Proposal of representing BPMN diagrams with XTT2-based business rules. In Brazier, F.M., Nieuwenhuis, K., Pavlin, G., Warnier, M., Badica, C., eds.: Intelligent Distributed Computing V. Proceedings of the 5th International Symposium on Intelligent Distributed Computing – IDC 2011, Delft, the Netherlands – October 2011. Volume 382 of Studies in Computational Intelligence. Springer-Verlag (2011) 243–248 26. Szpyrka, M., Nalepa, G.J., Lig˛eza, A., Kluza, K.: Proposal of formal verification of selected BPMN models with Alvis modeling language. In Brazier, F.M., Nieuwenhuis, K., Pavlin, G., Warnier, M., Badica, C., eds.: Intelligent Distributed Computing V. Proceedings of the 5th International Symposium on Intelligent Distributed Computing – IDC 2011, Delft, the Netherlands – October 2011. Volume 382 of Studies in Computational Intelligence. SpringerVerlag (2011) 249–255 27. Szpyrka, M., Matyasik, P., Mrówka, R.: Alvis – modelling language for concurrent systems. In Bouvry, P., González-Vélez, H., Kolodziej, J., eds.: Intelligent Decision Systems in Large-Scale Distributed Environments. Volume 362 of Studies in Computational Intelligence. Springer Berlin / Heidelberg (2011) 315–341