ebook img

Analysis of Web Services Composition Languages: The Case of BPEL4WS PDF

19 Pages·2003·0.181 MB·
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Analysis of Web Services Composition Languages: The Case of BPEL4WS

Analysis of Web Services Composition Languages: The Case of BPEL4WS Petia Wohed1? Wil M.P. van der Aalst2 Marlon Dumas3 Arthur H.M. ter Hofstede3 1 Department of Computer and Systems Sciences Stockholm University/The Royal Institute of Technology, Sweden [email protected] 2 Department of Technology Management Eindhoven University of Technology, The Netherlands [email protected] 3 Centre for Information Technology Innovation Queensland University of Technology, Australia {m.dumas, a.terhofstede}@qut.edu.au Abstract. Webservicescompositionisanemergingparadigmforappli- cation integration within and across organizational boundaries. A land- scape of languages and techniques for web services composition has emerged and is continuously being enriched with new proposals from different vendors and coalitions. However, little effort has been dedi- catedtosystematicallyevaluatethecapabilitiesandlimitationsofthese languages and techniques. The work reported in this paper is a step in this direction. It presents an in-depth analysis of the Business Process Execution Language for Web Services (BPEL4WS) with respect to a framework composed of workflow and communication patterns. Keywords: webservicescomposition,businessprocessmodeling,inter- organizational workflow, BPEL4WS 1 Introduction Web Services is a rapidly emerging paradigm for architecting and imple- menting business collaborations within and across organizational bound- aries. In this paradigm, the functionalities provided by business appli- cations are encapsulated within web services: software components de- scribed at a semantical level, which can be invoked by application pro- gramsorbyotherservicesthroughastackofInternetstandardsincluding HTTP, XML, SOAP, WSDL, and UDDI [7]. Once deployed, web services provided by various organizations can be inter-connected in order to im- plement business collaborations, leading to composite web services. Business collaborations require long-running interactions driven by explicit process models [1]. Accordingly, it is a natural choice to cap- ture the logic of a composite web service using business process modeling ? Research conducted while at the Queensland University of Technology. languages tailored for web services. Many such languages have recently emerged, including WSCI [21], BPML [5], BPEL4WS [8], BPSS [20], and XPDL [22], with little effort being dedicated to their evaluation with re- spect to common benchmarks. The comparative evaluation of these lan- guages would contribute to ongoing standardization and development ef- forts, by identifying their relative strengths and weaknesses, delimiting their capabilities and limitations, and detecting ambiguities. As a step in this direction, this paper analyses one of these emerging languages, namely BPEL4WS. An evaluation of BPML can be found in [2] and is briefly summarized in Section 4. Similar evaluations of other languages for web services composition will be conducted in the future. Approach The reported analysis is based on a framework composed of patterns: abstracted forms of recurring situations encountered at various stages of software development [13]. Specifically, the framework brings together a set of workflow patterns documented in [4], and a set of com- munication patterns documented in [17]. The workflow patterns (WPs) have been compiled from an analysis of workflow languages. They capture typical control flow dependencies encountered in workflow modeling. More than 12 commercial Workflow ManagementSystems(WFMS)aswellastheUMLActivityDiagramsno- tation,havebeenevaluatedintermsoftheirsupportforthesepatterns[4, 10]. Since the functionalities abstracted by the WPs are also required for capturing interactions between web services, these patterns are arguably suitable for analysing languages for web services composition. The Communication Patterns (CPs) on the other hand, are related to the way in which system modules interact in the context of Enter- prise Application Integration (EAI). Given the strong overlap between EAI and web services composition, both requiring the representation of communication flows between distributed processes, the communication patterns defined for EAI provide an arguably suitable framework for the analysis of web services composition languages. The evaluation framework therefore focuses on the control-flow and the communication perspectives. In particular, it excludes the data ma- nipulation and the resource allocation perspectives (e.g. partner selec- tion). The argument is that data manipulation and resource allocation can be treated separately from control-flow and communication, and that a separate framework could be designed for evaluating languages with respect to these other perspectives. Although data manipulation (e.g. counters and boolean variables used as flags) can be used for captur- ing control-flow aspects, this is undesirable, not only because it breaks the principle of separation of concerns, but more importantly, because it hinders the applicability of verification and analysis techniques to the resulting process models [14]. Overview of BPEL4WS BPEL4WSbuildsonIBM’sWSFL(WebSer- vices Flow Language) and Microsoft’s XLANG (Web Services for Busi- ness Process Design). Accordingly, it combines the features of a block structured process language (XLANG) with those of a graph-based pro- cess language (WSFL). BPEL4WS is intended for modeling two types of processes: executable and abstract processes. An abstract process is a business protocol specifying the message exchange behavior between different parties without revealing the internal behavior of any of them. An executable process specifies the execution order between a number of constituent activities, the partners involved, the messages exchanged be- tween these partners, and the fault and exception handling mechanisms. A BPEL4WS process specification is a kind of flow-chart. Each ele- ment in the process is called an activity. An activity is either primitive or structured. The primitive activity types are: invoke (to invoke an opera- tion of a web service described in WSDL); receive (to wait for a message from an external source); reply (to reply to an external source); wait (to remain idle for some time); assign (to copy data from one data container to another); throw (to indicate errors in the execution); terminate (to ter- minate the entire service instance); and empty (to do nothing). Toenabletherepresentationofcomplexstructuresthefollowingstruc- tured activities are provided: sequence, for defining an execution order; switch, for conditional routing; while, for looping; pick, for race conditions based on timing or external triggers; flow, for parallel routing; and scope, for grouping activities to be treated by the same fault-handler. Struc- tured activities can be nested. Given a set of activities contained within thesameflow,theexecutionordercanfurtherbecontrolledthrough(con- trol) links, which allow the definition of dependencies between two activi- ties:thetargetactivitymayonlystartwhenthesourceactivityhasended. Activitiescanbeconnectedthroughlinkstoformdirectedacyclicgraphs. Related work BPEL4WS was released as part of a trio of standard proposals, together with WS-Coordination (WS-C) and WS-Transaction (WS-T).However,WS-CandWS-Tdealwithissuesorthogonaltocontrol- flow and communication and hence fall outside the scope of this paper. WS-C and WS-T are concerned with the coordination of distributed pro- cesses,inparticularforthepurposeofperformingACIDtransactionsand businessactivities(i.e.long-runningtransactions).AcomparisonofWS-C and WS-T with a competing proposal, namely the Business Transaction Protocol (BTP), is reported in [9]. Existing frameworks for comparing process modeling languages [12, 19,18] are coarse-grained and syntactical in nature, answering questions such as: “does a language offer more operators than another and which ones?”, or “does it integrate a given ontological construct?”. This con- trastswiththefunctionalnatureoftheworkflowpatternsapproachwhich addresses questions such as: “does a language provide a given functional- ity and how?”. As a result, the above frameworks are more appropriate for IS/IT-managers requiring a high-level view of business processes [19]. They are therefore complementary to the analysis presented here. 2 The Workflow Patterns in BPEL4WS Web services composition and workflow management are related in the sensethatbothareconcernedwithexecutableprocesses.Therefore,much ofthefunctionalityinworkflowmanagementsystems[3,11,16]isalsorel- evant for web services composition languages like BPEL4WS, XLANG, and WSFL. In this section, we consider the 20 workflow patterns pre- sented in [4], and we discuss how and to what extent these patterns can be captured in BPEL4WS. Most of the solutions are presented in a sim- plified BPEL4WS notation, which is rich enough for capturing the key ideas of the solutions, while avoiding irrelevant coding details. WP1 Sequence An activity in a workflow process is enabled after the completion of another activity in the same process. Example: After the activity order registration the activity customer notification is executed. Solution, WP1 This pattern is directly supported by the construct se- quence. WP2 Parallel Split A point in the process where a single thread of control splits into multiple threads which can be executed in parallel, thus allowing activities to be executed simultaneously or in any order [6]. Example: After activity new cellphone subscription order, the activity insert new subscription inHomeLocationRegistryapplicationandinsert new subscription in Mobile answer application are executed in parallel. WP3 Synchronization A point in the process where multiple parallel branches converge into one single thread of control, thus synchronizing multiple threads [6]. It is an assumption of this pattern that after an in- coming branch has been completed, it cannot be completed again while the merge is still waiting for other branches to be completed. Also, it is assumed that the threads to be synchronized belong to the same global process instance (i.e., to the same “case” in workflow terminology). Ex- ample: Activity archive is executed after the completion of both activity send tickets and activity receive payment. Obviously, the send tickets and receive payment relate to the same client request. Solutions, WP2 & WP3 The Parallel Split is realized by defining the activities to be run in parallel as components of an activity of type flow (Listing 1, lines 2–5). If no link is defined within a flow, the activities within it are executed in parallel. Adding an activity after the flow, e.g. activity B in line 6, yields the solution to the Synchronization pattern. Alternative solutions using control links are given in Listing 2. Links L1 and L2 are defined in a flow F which consists of activities A1, A2 and B. The sources of L1 and L2 are A1 and A2 respectively (lines 7 and 9) and the target for both links is activity B (lines 12 and 13). In order to ensure that B is only executed after both A1 and A2, an and joinCondition is included (line 11). Listing 1 Listing 2 1<sequence> 1<flow name="F"> 2 <flow> 2 <links> 3 activityA1 3 <link name="L1"/> 4 activityA2 4 <link name="L2"/> 5 </flow> 5 </links> 6 activityB 6 activityA1 7</sequence> 7 <source linkName="L1"/>... 8 activityA2 9 <source linkName="L2"/>... 10 activityB 11 joinCondition="L1 AND L2" 12 <target linkName="L1"/> 13 <target linkName="L2"/>... 14</flow> Listings 1 and 2 illustrate the two styles of process modeling sup- ported by BPEL4WS. Listing 1 shows the “XLANG-style” of modeling (i.e., routing through structured activities). Listing 2 shows the “WSFL- style” of modeling (i.e., using links instead of structured activities). It is also possible to mix both styles by having links crossing the boundaries of structured activities.4 An example is given in Listing 3, where the se- quences Sa and Sb are defined to run in parallel. The definition of link L (lines 3, 7 and 13) implies that activity B2 (which follows B1) can be executedonlyafteractivityA1hascompleted.Inotherwords,linkLcap- tures an intermediate synchronization point between the parallel threads Sa and Sb. This inter-thread synchronization cannot be expressed using structured activities only (for a proof see [15]), so that the solution of the pattern that uses links, is more general than the one without. Figure 1 illustrates the example in graphical form. Listing 3 Figure 1 1<flow name="F"> Flow F 2 <links> Sa Sb 3 <link name="L"/> 4 </links> A1 B1 5 <sequence name="Sa"> L 6 activityA1 A2 B2 7 <source linkName="L"/> 8 activityA2 9 </sequence> 10 <sequence name="Sb"> Legend: 11 activityB1 Activity 12 activityB2 Flow 13 <target linkName="L"/> 14 </sequence> Sequence 15</flow> Link WP4 Exclusive Choice A point in the process where, based on a de- cision or control data, one of several branches is chosen. Example: The manager is informed if an order exceeds $600, otherwise not. WP5 Simple Merge A point in the workflow process where two or more alternative branches come together without synchronization. It is an assumption of this pattern that none of the alternative branches is ever executedin parallel (if it is notthe case, thensee the patterns Multi- Merge and Discriminator). Example: After the payment is received or the credit is granted, the car is delivered to the customer. Solutions, WP4 & WP5 As in the previous patterns, two solutions are proposed. The first one relies on the activity switch inherited from XLANG(Listing4).Eachcasespecifiestheactivitytobeperformedwhen aconditionisfulfilled.Thesecondsolutionusescontrollinks(seeListing5 4 However,inordertopreventdeadlocks,linksarenotallowedtocrosstheboundaries of while loops, serializable scopes, or compensation handlers. and Figure 2). The different conditions (C1 and C2 in the example) are specified as transitionConditions, one for each corresponding link (L1 or L2). This implies that the activities specified as targets for these links (A1 and A2 in the example) will be executed only if the corresponding conditions are fulfilled. An empty activity is the source of links L1 and L2, implying that conditions C1 and C2 are evaluated as soon as the flow is initiated. Activity C is the target of links L1s and L2s whose sources are A1 and A2 respectively, thereby capturing the Simple Merge pattern. Listing 4 Listing 5 1<switch> 1<flow> 2 <case condition="C1"> 2 <links> 3 activityA1 3 <link name="L1"/> 4 </case> 4 <link name="L2"/> 5 <case condition="C2"> 5 <link name="L1s"/> 6 activityA2 6 <link name="L2s"/> 7 </case> 7 </links> 8</switch> 8 <empty> 9activityC 9 <source linkName="L1" 10 transitionCondition="C1"/> 11 <source linkName="L2" Figure 2 12 transitionCondition="C2"/> 13 </empty> Flow 14 activityA1 15 <target linkName="L1"> Empty 16 <source linkName="L1s"> L1: C1 L2:C2 17 activityA2 18 <target linkName="L2"> A1 A2 19 <source linkName="L2s"> 20 activityC L1s OR L2s 21 joinCondition="L1s OR L2s" Empty 22 <target linkName="L1s"> 23 <target linkName="L2s"> ... 24</flow> C A difference between these two solutions is that in the solution of Listing 4 only one activity is triggered, the first one for which the spec- ified condition evaluates to true. Meanwhile, in the solution of Listing 5 multiple branches may be triggered if more than one of the conditions evaluates to true. To ensure that only one of the branches is triggered, the conditions have to be disjoint. WP6 Multi-Choice A point in the process, where, based on a decision or control data, a number of branches are chosen and executed as parallel threads. Example: After executing the activity evaluate damage the ac- tivity contact fire department or the activity contact insurance company is executed. At least one of these activities is executed. However, it is also possible that both need to be executed. WP7 Synchronizing Merge A point in the process where multiple paths converge into one single thread. Some of these paths are “active” (i.e.theyare beingexecuted)andsome arenot.Ifonlyonepathis active, the activity after the merge is triggered as soon as this path completes. If more than one path is active, synchronization of all active paths needs to take place before the next activity is triggered. It is an assumption of this pattern that a branch that has already been activated, cannot be activated again while the merge is still waiting for other branches to com- plete. Example: After either or both of the activities contact fire depart- ment and contact insurance company have been completed (depending on whether they were executed at all), the activity submit report needs to be performed (exactly once). Solutions,WP6&WP7ThesolutionofWP6andWP7areidenticalto theWSFL-stylesolutionsofWP4andWP5(Listing5).Thisfollowsfrom the dead-path elimination principle, according to which the truth value of an incoming link is propagated to its outgoing link. In the example of Listing5,ifconditionC1(C2)evaluatestotrue,activityA1(A2)receives apositivevalueandisthereforeexecuted.Ontheotherhand,ifcondition C1 (C2) evaluates to false, activity A1 (A2) receives a negative value, and it is not executed but still propagates the negative value through its outgoing link L1s (L2s). In particular, both A1 and A2 are executed if the two conditions C1 and C2 evaluate to true. In any case, the OR joinCondition attached to C, ensures that C is always executed, provided that one of the activities A1 or A2 is executed. WP8 Multi-Merge A point in a process where two or more branches reconverge without synchronization. If more than one branch gets acti- vated, possibly concurrently, the activity following the merge is started for every action of every incoming branch. Example: Two activities au- dit application and process applications running in parallel should both be followed by an activity close case. Activity close case should be ex- ecuted twice if both activities audit application and process applications are executed. Solution, WP8 BPEL4WS offers no direct support for WP8. Neither XLANG nor WSFL allow multiple (possibly concurrent) activations of an activity following a point where multiple paths converge. In the above example, the close case activity cannot be activated once after the com- pletion of audit application and another time after the completion of process applications. WP9 Discriminator A point in the workflow process that waits for one of the incoming branches to complete before activating the subsequent activity. From that moment on it waits for all remaining branches to complete and ’ignores’ them. Once all incoming branches have been trig- gered, it resets itself so that it can be triggered again (which is important otherwise it could not really be used in the context of a loop). Example: To improve query response time a complex search is sent to two different databases over the Internet. The first one that comes up with the result should proceed the flow. The second result is ignored. Solution, WP9 This pattern is not directly supported in BPEL4WS. Neither is there a structured activity construct which can be used for implementing it, nor can links be used for capturing it. The reason for notbeingabletouselinkswithanorjoinConditionisthatajoinCondition isonlyevaluatedwhenthestatusofallincominglinksaredeterminedand not, as required in this case, when the first positive link is determined. WP10 Arbitrary Cycles A point where a portion of the process (in- cluding one or more activities and connectors) needs to be “visited” re- peatedlywithoutimposingrestrictionsonthenumber,location,andnest- ing of these points. Solution, WP10ThispatternisnotsupportedinBPEL4WS.Thewhile activitycanonlycapturestructuredcycles,i.e.loopswithoneentrypoint and one exit point. The restrictions made in BPEL4WS that links should notcrosstheboundariesofaloop,andthatlinksshouldnotcreatecycles, entails that there is no support for arbitrary cycles. Note that there exist non-structured cycles that cannot be unfolded into structured ones [15]. WP11 Implicit Termination A given subprocess is terminated when there is nothing left to do, i.e. termination does not require an explicit termination activity. Solution, WP11 The pattern is directly supported since in BPEL4WS there is no need to explicitly specify a termination activity. WP12 MI without Synchronization Within the context of a single casemultipleinstancesofanactivitymaybecreated,i.e.thereisafacility for spawning off new threads of control, all of them independent of each other.Theinstancesmightbecreatedconsecutively,buttheywillbeable to run in parallel, which distinguishes this pattern from the pattern for ArbitraryCycles.Example:Whenbookingatrip,theactivitybook flight is executed multiple times if the trip involves multiple flights. Solution, WP12 Multiple instances of an activity can be created by using the invoke activity embedded in a while loop (see Listing 6). The invoked process, i.e., process B, has to have the attribute createInstance within its receive activity assigned to “yes” (see Listing 7). WP13-WP15 MI with SynchronizationApointinaworkflowwhere anumberofinstancesofagivenactivityareinitiated,andtheseinstances are later synchronized, before proceeding with the rest of the process. In WP13 the number of instances to be started/synchronized is known at design time. In WP14 the number is known at some stage during run time, but before the initiation of the instances has started. In WP15 the number of instances to be created is not known in advance: new instances arecreatedondemand,untilnomoreinstancesarerequired.Example of WP15:Whenbookingatrip,theactivitybook flight isexecutedmultiple times if the trip involves multiple flights. Once all bookings are made, an invoice is sent to the client. How many bookings are made is only known at runtime through interaction with the user. Solutions, WP13-WP15Ifthenumberofinstancestobesynchronized is known at design time (WP13), a solution is to replicate the activity as many times as it needs to be instantiated, and run the replicas in parallel by placing them in a flow activity. The solution becomes more complex if the number of instances to be created and synchronized is only known at run time (WP14), or not known (WP15) – see Listing 8. In this solution a pick activity within a while loop is used, enabling repetitive processing triggeredbythreedifferentmessages:oneindicatingthatanewinstanceis required, one indicating the completion of a previously initiated instance, and one indicating that no more instances need to be created. Depending onthemessagereceivedanactivityisperformed/invokedineachiteration oftheloop.However,thisisonlyawork-aroundsolutionsincethelogicof thesepatternsisencodedbymeansofaloopandacounter:thecounteris incremented when a new instance is created, and decremented each time that an instance is completed. The loop is exited when the value of the counter is zero and no more instances need to be created. WP16 Deferred Choice A point in a process where one among sev- eral alternative branches is chosen based on information which is not necessarily available when this point is reached. This differs from the normal exclusive choice in that the choice is not made immediately when

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.