Jan Mendling and Stefanie Rinderle-Ma, eds.: Proceedings of EMISA 2016, Gesellschaft für Informatik, Bonn 2016 Automating Data Exchange in Process Choreographies (Extended Abstract)3 D. Fahland1, Andreas Meyer, Luise Pufahl, Kimon Batoulis, Mathias Weske2 Abstract: Communication between organizations is formalized as process choreographies in daily business. While the correct ordering of exchanged messages can be modeled and enacted with cur- rent choreography techniques, no approach exists to describe and automate the exchange of data between processes in a choreography using messages. This paper describes an entirely model-driven approach for BPMN introducing a few concepts that suffice to model data retrieval, data transforma- tion, message exchange, and correlation – four aspects of data exchange. For automation, this work utilizes a recent concept to enact data dependencies in internal processes. We present a modeling guideline to derive local process models from a given choreography; their operational semantics al- lows to correctly enact the entire choreography from the derived models only including the exchange of data. Targeting on successful interactions, we discuss means to ensure correct process choreogra- phy modeling. Finally, we implemented our approach by extending the camunda BPM platform with our approach and show its feasibility by realizing all service interaction patterns using only model- based concepts. The work summarized in this extended abstract has been published in [Me15]. Keywords: Process Modeling, Data Modeling, Process Choreography, Data Exchange, BPMN, SQL 1 Introduction and Problem Description In daily business, organizations interact with each other, e.g., concluding contracts or ex- changing information. Fig. 1(left) describes an interaction between a customer and a sup- plier with respect to a request for a quote. The customer sends the request to a chosen sup- plier which internally processes it and sends the resulting quote as response which then is handled internally by the customer. An interaction between business processes of multiple organizations via message exchange is called process choreography. In BPMN (Business Process Model and Notation), a choreography diagram describes the order of message ex- changes between multiple participants from a global view (global choreography model). A collaboration diagram describes message exchanges are realized via send and receive activities, distributed over the different participants (local choreography model). This paper considers how to implement local choreography models that adhere to a global agreement; we focus on a top-down approach where all participants jointly agree on a 1 d.fahland@tue.nl, Eindhoven University of Technology, The Netherlands 2 andreas.meyer@hpi.de, luise.pufahl@hpi.de, kimon.batoulis@hpi.de, mathias.weske@hpi.de, Hasso Plattner Institute at the University of Potsdam, Germany 3 This article summarizes problem, approach, and selected findings of a study published as Andreas Meyer, Luise Pufahl, Kimon Batoulis, Dirk Fahland, Mathias Weske: Automating data exchange in process choreographies. Inf. Syst. 53: 296-329 (2015) doi:10.1016/j.is.2015.03.008 [Me15] 1 PrivateQProcessQModel CO:QRequest [new] [new] GlobalQCollaborationQDiagram Request Request Quote [created] [sent] [received] LocalQLevelQofQCustomer Customer pk:Qr_id pk:Qr_id pk:Qq_id SendQ ReceiveQ fk:Qr_id request quote Customer GlobalQLevel CreateQ SendQ ReceiveQ Global_Quote request request quote Global_Request CI: Global_Request.r_id CI: Global_Request.r_id Request Quote [new] [new] Message Message Quote QuoteQItem [received] Details [received] Supplier III pk:Qqi_id pk:Qqd_id ReceiveQ SendQ fk:Qq_id fk:Qq_id request quote Global_Request Global_Quote CI:QGlobal_Request.r_id CI:QGlobal_Request.r_id Supplier Fig. 1: Implementing a given global collaboration diagram (left) in a private process model (right) 2 Message Definition 1 Global Collaboration Diagram Global Level 2 Global Data Model 3 Private Process Model 3 Private Process Model 4 Local Data Model 4 Local Data Model Local Level Fig. 2: Modeling Guideline for deriving local process models from a global choreography model. global data exchange and collaboration model to which each participant’s local process and data models either must adhere or are required to be changed accordingly [vdAW01]. Deriving a local choreography from a global one is a non-trivial step; various techniques are required [DW11] including locally enforcing the order of globally specified message exchanges. In general, both control-flow (order of message exchange) and data-flow (ac- tual message contents) need to be addressed when transitioning from global to local mod- els. The paper contributes an approach to for integrating control-flow and data-flow in message exchange; we present a few syntactic extensions to BPMN together with oper- ational semantics that allow to model and realize the intended global interaction using model-based concepts only. 2 Approach We combine several existing approaches to automate data exchange in process choreogra- phies entirely model-driven as follows; these approaches are used along the general guide- line shown in Fig. 2. (1) All participants agree on a global choreography model expressed in BPMN as shown in Fig. 1(left); BPMN will also be used for the local choreography models. 2 (2) In addition, we introduce Local Level of Supplier Request Quote -r_id -q_id that all participants glob- Customer -g_r_id -r_id Global_Quote -state -state Global_Request ally agree to specific data CI: Global_Request.r_id CI: Global_ -date -price 1 -deliveryDate 1 Request.r_id exchange formats used in Receive Create Send 1 the collaboration modeled in request quote quote * UML; Fig 4(top) shows the Article Supplier -a_id -q_id global data model. (3) For Request [new] Article [new] Quote [new] Request -state -articleType mapping the control-flow of [received] [selected] pk: r_id [created] III pk: a_id [received] pk: q_id -quantity -articlePrice pk: r_id fk: q_id fk: r_id a global choreography model CO: Request into local ones, we uti- Fig. 3: Local process model and local data model of the supplier lize the Public-to-Private ap- proach [vdAW01] unchanged; Fig. 1(right) and Fig. 3 show the two local process models obtained from the choreography of Fig. 1(left). (4) Next, we map the data perspective Global Data Model Global_Article Global Level of the global choreography to each lo- Global_Quote Global_Request -a_id -q_id -q_id -r_id -r_id cal process model by defining a straight- -date -totalPrice 1 -type -quantity 1 1 * -deliveryDate forward attribute-level data schema map- -price ping between global and local data mod- Quote Quote Item 1 * els. When exchanging messages local data Local Level -q_id -qi_id Request -r_id -q_id -date -state Quote Details -itemPrice is translated from the local data model of -state -g_r_id -deliveryDate -quantity -r_id 1 1 -g_q_id -totalPrice -type the sender to the globally agreed on data 1 1 -state -q_id -state -g_q_id -qd_id model, and then translated by the recipient Local Data Model of Customer -g_qi_id to its local data model. This way heteroge- nous local data models are isolated from Fig. 4: Data schema mapping from global data each other and are synchronized. By mark- model (messages) to local data model of the Cus- tomer. ing specific attributes of the global data model as correlation identifiers (e.g., Global Request.r id in Fig. 1(left)) we obtain lo- cally usable correlation keys through the above mentioned data schema mapping; these local correlation identifiers can then be used as proposed in the BPMN standard to asso- ciate an incoming message to the right process instance. (5) To process (create and store) messages in a model-driven fashion, we apply (and slightly extend) the approach in [Me13] for automatically deriving SQL queries from BPMN data objects to enact complex data-dependencies. Thereby, we utilize the notion of dedicated (multi-instance) case objects for subprocesses from to realize 1:n communi- cation with a set of participants. Fig. 5 illustrates the syntax and the operational seman- tics we provided with this extension. 1.) To send Global Quote message, activity Send Quote first automatically derives SQL queries based on the annotations to its input data objects [Me13] (a Quote object related to the quote instance, a Request and several Article object related to the quote). 2.) The retrieved local data is transformed into a message car- rying a data object of the global data model by an XQuery generated from the data schema mapping of Fig. 4. 3.+4.) The message is sent and received using standard communication protocols. 5.) The recipient correlates the received message through the designated corre- lation key Global Request.r id; technically, we identify the process instance of the Cus- tomer that holds a Quote object with attribute r id having the same value as the message; 3 Process Engine of Supplier Process Engine of Customer Supplier Customer CO: Request CO: Request [new] 6. Transfor- [new] mation 7. Storage Quote 2. Transfor- Quote of data Quote of data 1. Retrieval [created] mation Details [received] of data Quote Message of data [received] pk: q_id pk: qd_id pk: q_id fk: r_id 4. Receive fk: q_id fk: r_id Global_Quote message Data- CI: Global_Request.r_id Data- base base ... Send ... Receive quote Correlation quote 3. Send mechanism message [new] 5. Correlation Request Article Quote Item of message [received] [selected] [received] III III pk: qd_id pk: a_id pk: qi_id fk: q_id fk: q_id fk: q_id Fig. 5: Operational semantics of data exchange from model-driven concepts. this query is generated automatically. 6.+7.) The received message is transformed into lo- cal data objects (using the data schema mapping) which are then stored in the database of the Customer, again using queries derived from the output data objects of task Receive Quote [Me13]. 3 Results We integrated several existing, isolated techniques for fully model-based definition and enactment of choreographies. We provided a few minor syntactic extensions of BPMN with complimentary operational semantics that translates model features into executable, platform-independent code [Me15]; we implemented our approach based on the Camunda BPM engine; see http://bpt.hpi.uni-potsdam.de/Public/BPMNData. Using this engine, we created fully model-driven implementations of all service interaction pat- terns [BDtH05] including patterns on 1:n message exchange with multiple participants using identical/different correlation identifiers, and referral of correlation identifiers. References [BDtH05] Barros, Alistair; Dumas, Marlon; ter Hofstede, Arthur H. M.: Service interaction pat- terns. In: BPM 2005. volume 3649 of LNCS. Springer, pp. 302–318, 2005. [DW11] Decker, Gero; Weske, Mathias: Interaction-centric modeling of process choreographies. Information Systems, 36(2):292–312, 2011. [Me13] Meyer, Andreas; Pufahl, Luise; Fahland, Dirk; Weske, Mathias: Modeling and Enacting Complex Data Dependencies in Business Processes. In: BPM 2013. volume 8094 of LNCS. Springer, pp. 171–186, 2013. [Me15] Meyer, Andreas; Pufahl, Luise; Batoulis, Kimon; Fahland, Dirk; Weske, Mathias: Au- tomating data exchange in process choreographies. Inf. Syst., 53:296–329, 2015. [vdAW01] van der Aalst, Wil M. P.; Weske, Mathias: The P2P approach to interorganizational work- flows. In: Advanced Information Systems Engineering. Springer, pp. 140–156, 2001. 4