Skip to main content
Log in

Message choreography modeling

A domain-specific language for consistent enterprise service integration

  • Theme Section Paper
  • Published:
Software & Systems Modeling Aims and scope Submit manuscript

Abstract

Service-based applications are based on modern architectures that require careful design of interfaces and protocols to allow smooth integration of service components. These design artifacts are not only useful for implementation, but could also be used for the derivation of integration tests. In order to be applied in these different activities of the development process, they have to conform to existing requirements and other specifications at different architectural levels. In addition, their internal consistency has to be ensured. In this paper, we present an approach to service integration based on a domain-specific language for service choreographies. We first explain the motivation for our work by defining the industrial context that led to the definition of a domain-specific choreography language, called message choreography modeling (MCM). We then provide syntax and semantics for MCM, together with suitable methods for ensuring its consistency. Finally, we report on our experience in applying the described language in practice.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

Notes

  1. http://www.w3.org/TR/wsdl.

  2. http://www.w3.org/2002/ws/chor.

  3. Eclipse Modeling Framework—http://www.eclipse.org/emf.

  4. Graphical Tool Development Framework—http://www.eclipse.org/graphiti.

  5. The state space of a system is defined by all the possible general states a system can enter. Here a system state takes into account not only the control state but also all the variables or buffers of the system. Then, an unbounded variable or buffer may render the state space infinite.

  6. This might happen, if the buyer constantly cancels the offers of the seller and afterwards sends new synchronous requests fast enough to block the seller from processing the asynchronous cancellations.

  7. http://www.atelierb.eu/index-en.php.

  8. http://www.sdn.sap.com/irj/sdn/abap.

  9. SAP also recently released an Eclipse project implementing BPMN2 meta-model on EMF, online at: http://git.eclipse.org/c/bpmn2.

  10. CHOReOS - “Large Scale Choreographies for the Future Internet” FP7-ICT-2009-5, Objective 1.2, Oct. 2010—Sept. 2013—http://www.choreos.eu.

  11. In order to have an unified semantic treatment of different choreography types, an ISO standard like PSL (http://www.mel.nist.gov/psl/) may be used.

References

  1. Forrester. Enterprise and SMB software survey, North America and Europe, Q4 2008. Business data service survey, Forrester Research, Cambridge (2008)

  2. Heffner, R.: SOA adoption 2010: Still important, still strong. Technical Report 59058, Forrester, March (2011)

  3. Woods, D., Mattern, T.: Enterprise SOA—Designing IT for Business Innovation. O’Reilly, Sebastopol (2006)

    Google Scholar 

  4. Wieczorek, S., Roth, A., Stefanescu, A., Kozyura, V., Charfi, A., Kraft, F.M., Schieferdecker, I.: Viewpoints for modeling choreographies in service-oriented architectures. In: Proceedings of the 8th Working IEEE/IFIP Conference on Software Architecture (WICSA’09), pp. 11–20. IEEE Computer Society, Los Alamitos (2009)

  5. Wieczorek, S., Roth, A., Stefanescu, A., Charfi, A.: Precise steps for choreography modeling for SOA validation and verification. In: Proceedings of the IEEE 4th International Symposium on Service-Oriented Software Engineering (SOSE’08), pp. 148–153. IEEE Computer Society, Los Alamitos (2008)

  6. Wieczorek, S., Stefanescu, A., Roth, A.: Model-driven service integration testing—a case study. In: Proceeding of the 7th International Conference on the Quality of Information and Communications Technology (QUATIC’10), pp. 292–297. IEEE Computer Society, Los Alamitos (2010)

  7. Wieczorek, S., Kozyura, V., Roth, A., Leuschel, M., Bendisposto, J., Plagge, D., Schieferdecker, I.: Applying model checking to generate model-based integration tests from choreography models. In: Proceedings of the International Conference on Testing of Communicating Systems (TESTCOM’09). LNCS, vol. 5826, pp. 179–194. Springer, Berlin (2009)

  8. Stefanescu, A., Wieczorek, S., Kirshin, A.: MBT4Chor: A model-based testing approach for service choreographies. In: Proceedings of the European Conference on Model Driven Architecture—Foundations and Applications (ECMDA-FA’09). LNCS, vol. 5562, pp. 313–324. Springer, Berlin (2009)

  9. Papazoglou, M.P., Traverso, P., Dustdar, S., Leymann, F.: Service-oriented computing: state of the art and research challenges. IEEE Comput. 40(11), 38–45 (2007)

    Article  Google Scholar 

  10. W3C. Web service glossary. http://www.w3.org/TR/ws-gloss/, (2004). Version 20040211

  11. W3C. Web Services Choreography Description Language (WS-CDL). http://www.w3.org/TR/ws-cdl-10/, (2004). Version 1.0

  12. Decker, G., Kopp, O., Leymann, F., Weske, M.: BPEL4Chor: Extending BPEL for modeling choreographies. In: Proceedings of the Intenational Conference on Web Services (ICWS 2007), pp. 296–303. IEEE Computer Society, Los Alamitos (2007)

  13. Zaha, J.M., Barros, A.P., Dumas, M., ter Hofstede, A.H.M.: Let’s dance: a language for service behavior modeling. In: Proceedings of the CoopIS’06. LNCS, vol. 4275, pp. 145–162. Springer, Berlin (2006)

  14. OMG. Business Process Modeling Notation (BPMN) 2.0. http://www.omg.org/spec/BPMN/2.0 (2011)

  15. OMG. Meta Object Facility (MOF) core specification version 2.0. http://www.omg.org/cgi-bin/doc?formal/2006-01-01 (2006)

  16. OASIS. Web services reliable messaging. http://docs.oasis-open.org/ws-rx/wsrm/v1.2/wsrm.pdf, (2007). Version 1.2

  17. Motwani, R., Ullman, J.D., Hopcroft, J.E.: Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, Boston (2007)

    Google Scholar 

  18. Honda, K., Vasconcelos, V.T., Kubo, M.: Language primitives and type discipline for structured communication-based programming. In: Proceedings of the ESOP’98. LNCS, vol. 1381, pp. 122–138. Springer, Berlin (1998)

  19. Honda, K., Yoshida, N., Carbone, M.: Multiparty asynchronous session types. In: Proceedings of the POPL’08, pp. 273–284. ACM, New York (2008)

  20. Honda, K., Mukhamedov, A., Brown, G., Chen, T.-C., Yoshida, N.: Scribbling interactions with a formal foundation. In: Proceedings of the ICDCIT’11. LNCS, vol. 6536, pp. 55–75. Springer, Berlin (2011). Tool at: http://www.jboss.org/scribble

  21. Skogan, D., Grønmo, R., Solheim, I.: Web service composition in UML. In: Proceedings of the 8th IEEE International Enterprise Distributed Object Computing Conference (EDOC), pp. 47–57. IEEE Computer Society, Los Alamitos (2004)

  22. Zhang, J., Chang, C.K., Chung, J.-Y., Kim, S.W.: WS-Net: A Petri-net based specification model for web services. In: Proceedings of the IEEE International Conference on Web Services (ICWS’04), pp. 420–427 (2004)

  23. McNeile, A.T.: Protocol contracts with application to choreographed multiparty collaborations. Serv Oriented Comput Appl 4(2), 109–136 (2010)

    Article  Google Scholar 

  24. Safa, L.: The making of user-interface designer: A proprietary DSM tool. In: Proceedings of the 7th OOPSLA Workshop on domain-specific modeling, pp. 21–22 (2007)

  25. Kelly, S., Tolvanen, J.-P.: Domain-Specific Modeling: Enabling Full Code Generation. Wiley-IEEE, New York (2008)

    Book  Google Scholar 

  26. Kärnä, J., Tolvanen, J.-P., Kelly, S.: Evaluating the use of domain-specific modeling in practice. In: Proceedings of the DSM’09, pp. 14–20. HSE, Sudbury (2009)

  27. van Glabbeek, R.J., Goltz, U.: Equivalences and refinement. In: Proceedings of the Semantics of Systems of Concurrent Processes. LNCS, vol. 469, pp. 309–333. Springer, Berlin (1990)

  28. Utting, M., Legeard, B.: Practical Model-Based Testing—a Tools Approach. Morgan Kaufmann, Menlo Park (2007)

    Google Scholar 

  29. Decker, G., Weske, M.: Local enforceability in interaction Petri Nets. In: Proceedings of the 5th International Conferenc on Business Process Management (BPM’07). LNCS, vol. 4714, pp. 305–319. Springer, Berlin (2007)

  30. Kozyura, V., Roth, A., Wei, W.: Local enforceability and inconsumable messages in choreography models. In: Proceedings of the 4th South-East European Workshop on Formal Methods (SEEFM), pp. 10–16. IEEE Computer Society, Los Alamitos (2009)

  31. Abrial, J.-R., Butler, M.J., Hallerstede, S., Hoang, T.S., Mehta, F., Voisin, L.: Rodin: an open toolset for modelling and reasoning in Event-B. STTT 12(6), 447–466 (2010)

    Article  Google Scholar 

  32. Leuschel, M., Butler, M.J.: ProB: an automated analysis toolset for the B method. STTT 10(2), 185–203 (2008)

    Article  Google Scholar 

  33. Schur, M.: User interaction in formal verification of service choreography models. Master’s thesis, Hochschule Karlsruhe Technik und Wirtschaft (2009)

  34. Kätker, S., Patig, S.: Model-driven development of service-oriented business application systems. In: Business Services: Konzepte, Technologien, Anwendungen, vol. Band 1, pp. 171–180. Österreichische Computer Gesellschaft, Wien (2009)

  35. Wei, W., Roth, A., Wieczorek, S., Kozyura, V.: Checking consistency between message choreographies and their implementation models. In: Proceedings of the International Workshop on Automated Verification of Critical Systems (AVOCS’10). ECEASST, vol. 35, pp. 1–15, (2010)

  36. Varro, D.: A formal semantics of UML statecharts by model transition systems. In: Proceedings of the 1st International Conference on Graph Transformation (ICGT). LNCS, vol. 2505, pp. 378–392. Springer, Berlin (2002)

  37. Abrial, J.R.: Modeling in Event-B—System and Software Engineering. Cambridge Univ Press, London (2010)

    Book  MATH  Google Scholar 

  38. Abrial, J.R.: The B-book. Cambridge Univ Press, London (1996)

    Book  MATH  Google Scholar 

Download references

Acknowledgments

This work was partially supported by the EC-funded projects DEPLOY FP7 Grant no. 214158 and MODELPLEX FP6 Grant no. 034081 and Romanian research Grants CNCS-UEFISCDI no. 7/05.08.2010 and no. PN-II-ID-PCE-2011-3-0688 (project MuVet). We also thank our colleagues Andreas Roth and Anis Charfi who contributed to the MCM development, and the anonymous reviewers.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Alin Stefanescu.

Additional information

Communicated by Dr. Jeff Gray, Juha-Pekka  Tolvanen, and Matti Rossi.

Appendix: MCM semantics via transformation to the Event-B language

Appendix: MCM semantics via transformation to the Event-B language

In the main paper the trace semantics of MCM has been given. This trace semantics can be refined by describing a transformation of MCM artifacts to a modeling notation with a formally defined semantics. This is a common approach to defining language semantics (cf. [36]). In this section, the transformation of MCM into the formal language Event-B [37], as published in [7], is presented.

Event-B fits quite naturally with MCM as interactions can be expressed seamlessly as events and the relationship between GCM and LPMs can be formulated as Event-B refinement. Apart from defining the MCM semantics, Event-B opens a variety of possibilities for analyzing the model, as described in Sect. 4.4. In this appendix, we start with a brief overview of Event-B. Afterwards, the translation of MCM artifacts into Event-B is introduced.

1.1 Introduction to Event-B

Event-B [37] is an evolution of the B-Method [38] that places emphasis on a lean design. In particular, the core language of Event-B is (with a few exceptions) a subset of the language used in its predecessor. It distinguishes between static and dynamic properties of a system. While static properties are specified in a context, the dynamic properties are specified in what is termed a “machine”. A context contains definitions of carrier sets, constants as well as a number of axioms. A machine basically consists of a finite set of variables and events. The variables form the state of the machine and can be restricted by invariants. The events describe transitions from one state into another state.

An event has the form

$$\begin{aligned} EVENT\,\widehat{=}\,ANY\,t\,WHERE\,G(t,x)\,THEN\,S(x,t)\,END \end{aligned}$$

It consists of a set of local variables \(t\), a predicate \(G\), called the guard and a substitution \(S(x,t)\). The guard restricts possible values for \(t\) and \(x\). If the guard of an event is false, the event cannot occur and is called disabled. The substitution \(S\) modifies the variables \(x\). It can use the old values of \(x\) and the local variables \(t\). For example, an event that takes two natural numbers \(a, b\) and adds the product \(ab\) to the state variable \(x\) could be written as

$$\begin{aligned}&\!\!\!EVENT \,\widehat{=}\,ANY\,a,b\,WHERE\,a \in \mathbb N \wedge b \in \mathbb N \\&\!\!\!THEN x:=x+a*b\,END \end{aligned}$$

For events that do not require local variables, the abbreviated form

$$\begin{aligned} EVENT\,\widehat{=}\,WHEN\,G(x)\,THEN\,S(x)\,END \end{aligned}$$

can be used. The primary way to structure a development in Event-B is through incremental refinement preserving the system’s safety and termination properties.

1.2 Design considerations of the transformation

The transformation from MCM to Event-B contains a formal representation of both, the GCM and the CS, incorporating the two LPMs and the CM. Therefore, the subsequently described translation generates two Event-B machines, which use a common context. The Global Model describes the GCM and the Local Model describes the composition (defined as in [37]) of the two LPMs and the CM. Both machines describe the exchange of messages, the former in terms of observing a message, and the latter in terms of sending and receiving messages.

As messages with the same type and content may occur more than once, a unique natural number is assigned to each message, and this number is incremented when a new message is sent. Further, to each message data type is assigned while it is possible to specify the content of the message as functions on the message data type. Because we aim towards the use of a model checking technique, the translation result is designed to be as deterministic as possible. We experimented with an assignment of types to messages which was non-deterministically initialized upfront; however this resulted in too big a state space for the model checker.

1.3 Transformation description

By defining a translation from the global and from the local MCM models into the two Event-B machines a precise semantics of MCM is obtained, which is presented in the following. The transformation is implemented and can thus be applied completely automatically.

Global model For each GCM transition exactly one event is generated. The states are represented by a global variable \(status\) with elements from a set type \({s_1,\ldots ,s_k}\), with constants \(s_1,\ldots ,s_k\). It is initialized with \(init \in S\). The basic translation of an interaction \(i\in I\) with \(({s_1,\ldots ,s_k}, \ I, \ s_m) \in \, \Rightarrow \) is as follows:

$$\begin{aligned}&i\,\widehat{=}\,WHEN\,guard1:\,status=s_1 \wedge \cdots \wedge status=s_k\\&THEN\,act1:\,status\,:=\,s_m\,END \end{aligned}$$

This basic translation must be augmented with preconditions and actions, associated with that interaction. Therefore, data types, constants, variables, terms and formulae used in MCM must be represented in Event-B. This is done as follows. For each data type \(t\in T\), a set is defined in the Event-B context, without explicit characterization of elements. These sets are named in Event-B according to their type name \(name(t)\). For each complex data type \(t={(f, t^{\prime })}\), we define a partial function \(f\!\!: name(t) \nrightarrow name(t^{\prime })\). \(f\) is initialized with \(f:=\emptyset \).

The constants and global variables are defined in a standard way. For each constant \(c \in C_t\) an element is added to the set \(name(t)\). For the interactions \(I=\{i_1,\ldots ,i_n\}\), we additionally define a set \(MESSAGES=\{name(itype(i_1)),\ldots , name(itype(i_n))\}.\)

Example 6

Consider the interaction Request with

$$\begin{aligned}&\!\!\!pre(\mathtt{Request}) = msg.\mathtt{Header.ID} \not \in \mathtt{ID\_SET}\\&\!\!\!act(\mathtt{Request}) (\mathtt{ID\_SET})\\&\quad = \mathtt{ID\_SET} \cup \{msg.\mathtt{Header.ID}\} \end{aligned}$$

of the running example. For this interaction, the partial functions \(Header: \mathbb N \nrightarrow MessageHeader\) and \(ID: MessageHeader \nrightarrow InstanceID\) (here, \(MessageHeader\) and \(InstanceID\) are the corresponding names from \(name (T)\)) are defined, as well as the local variables \(t1\) and \(t2\) in order to choose appropriate values to be assigned in the functions. Because \(ID\_SET \in T_{Set(InstanceId)}\), an Event-B variable \(ID\_SET\) of type \(\mathbb P (InstanceID)\) is defined.

$$\begin{aligned}&\!\!\!Request \widehat{=} ANY\,t1\,t2\,WHERE\\&\!\!\!grd1: status= Reserved \vee status= Start \\&\!\!\!grd2: t1 \in MessageHeader \\&\!\!\!grd3: t2 \in InstanceID \\&\!\!\!grd4: t3 \notin ID\_SET \\&\!\!\!grd5: t1 \in dom(ID) \Rightarrow ID(t1)=t2 \\&\!\!\!THEN\\&\!\!\!act1: status:=Requested \\&\!\!\!act2: Header(msg):=t1 \\&\!\!\!act3: ID(t1):=t2 \\&\!\!\!act4: type(msg):=Request\\&\!\!\!act5: ID\_SET:= ID\_SET \cup \{t3\} \\&\!\!\!act6: msg := msg + 1 \\&\!\!\!END \end{aligned}$$

The guard \(grd5\) describes a consistency property: if the function is already defined on an element, then the value must be the corresponding term.

For the accepting state \(e_i \subseteq S\), a special event \(terminate\) with a guard (\(status=c_1 \vee \cdots \vee status=c_k\)) such that \(e_i=\{c_1,\ldots ,c_k\}\) and an action \(acceptingstate:=true\) is defined, where \(acceptingstate\) is a global variable. In each event from the translation of GCM, an additional action \(acceptingstate:=false\) is added. As a result, \(acceptingstate\) equals true if and only if the system state is an accepting state.

Local model In the local model, events representing the sending and receiving of messages are generated. Depending on the viewpoint either the send or the receive event can be defined as a refinement of the corresponding interaction in GCM.

By definition of LPMs, the variables from \(V\) and the status variable are duplicated (one for each partner). The variable \(msg\) is translated as for the GCM in order to keep the unique message enumeration. It is only used by send events, where it is set in the same way as in the GCM. In receive events, local variables (parameters) are used in order to obtain a message from a channel.

A channel is defined as a global variable of type \(\mathbb P (\mathbb N )\), denoting the set of messages being exchanged. It is initialized with \(\emptyset \). Typically, there are two partners \(P_1\) and \(P_2\) and two sequencing contexts (EO and EOIO). In that case, four possible channels can be obtained in the model (two for each direction).

Example 7

Below, a translation of the interaction Request from the LPMs for the partners buyer (\(B\)) and seller (\(S\)) in the example is shown. The duplicated variables can be distinguished by the corresponding prefixes. The channel from buyer to seller having the sequencing EO is denoted by \(channel\_BS\_EO\).

$$\begin{aligned}&send\_Request \,\widehat{=}\, ANY\,t1\,t2\,t3 WHERE\\&grd1: B\_status= Reserved \vee B\_status=Start \\&grd2: t1 \in MessageHeader \\&grd3: t2 \in InstanceID \\&grd4: t3 \notin B\_ID\_SET \\&grd5: t1 \in dom(ID)\Rightarrow ID(t1)=t2 \\&THEN\\&act1: B\_status:= Requested \\&act2: Header(msg):=t1 \\&act3: ID(t1):=t2 \\&act4: type(msg):=Request \\&act5: B\_ID\_SET:=B\_ID\_SET \cup \{t3\} \\&act6: channel\_BS\_EO:= channel\_BS\_EO \cup \{msg\} \\&act7: msg := msg + 1 \\&END \\&receive\_Request \;\widehat{=}\; m WHERE \\&grd1: S\_status= Reserved \vee S\_status=Start \\&grd2: m \in channel\_BS\_EO \\&grd3: type(m) = Request \\&grd4: m \in dom(Header) \\&grd5: Header(m) \in dom(ID) \\&grd6: ID(Header(m)) \notin S\_ID\_SET \\&THEN \\&act1: S\_status := Requested \\&act2: S\_ID\_SET := S\_ID\_SET \cup \{ID(Header(m))\} \\&act3: channel\_BS\_EO := channel\_BS\_EO \setminus \{m\} \\&END \end{aligned}$$

The translation of a send event is very similar to the translation of the corresponding event in GCM. In receive events, all function values are already set, so that the purpose is to find a matching message \(m\) in the channel and “receive” it (i.e., delete it from the channel). If a sequencing context is EOIO, then an additional guard is needed to ensure that the message \(m\) has the smallest number in the channel.

For inhibitor conditions \(inhib(i)=C\) (with \(i \in I\)), a guard \(status \notin C\) is added to the event \(send\_i\). In our example, the guard \(grd6: B\_status \notin \{Reserved\}\) is added to \(send\_Request\).

Accepting states are treated in a similar way to the translation of GCM, except that it is demanded additionally that \(channel=\emptyset \) for all of them, because only if all channels are empty can the system enter into an accepting state. For all other events of the translation from the LPM, an action \(acceptingstate:=false\) is added.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Stefanescu, A., Wieczorek, S. & Schur, M. Message choreography modeling. Softw Syst Model 13, 9–33 (2014). https://doi.org/10.1007/s10270-012-0272-x

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10270-012-0272-x

Keywords

Navigation