YOUR FEEDBACK
Ubuntu Here We Come! - Java Finally To Become 100% Open Source
Reader wrote: Since November 206, wow! that is a long process.
SOA World Conference
Virtualization Conference
$200 Savings Expire May 16, 2008... – Register Today!


2007 West
GOLD SPONSORS:
Active Endpoints
Your SOA Needs BPEL for Orchestration
BEA
Virtualized SOA: Adaptive Infrastructure for Demanding Applications
Nexaweb
Overcoming Bandwidth Challenges with Nexaweb
TIBCO
What is Service Virtualization?
SILVER SPONSORS:
WSO2
Using Web Services Technologies and FOSS Solutions
Click For 2007 East
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
TOP LINKS YOU MUST CLICK ON


Modeling Web Services Choreography with New Eclipse Tool
Dancing with BPMN and new Eclipse tool pi4soa

Digg This!

Page 1 of 2   next page »

Choreography is the dark continent of Web services: few onlookers have traveled there, and many question whether there are any riches to be brought home from the trip. In the first place, choreographies bear such a striking resemblance to business processes that the novice might think that the two types of artifacts are indistinguishable.

After all, isn't choreography just a way to describe what a business process does (i.e., it choreographs the actions of its participants)? And then there is the dearth of choreography tools; until recently choreography was a topic learned by reading, not by hands-on experimentation. This article takes the trip. It describes how, in the ideal set of design tools, not only are choreographies and processes treated as entirely different artifacts (with different development life cycles), but that special modeling techniques are available to fully accentuate the nuances of choreographies.

Choreography and Process
Contrary to what many Web services and business process people think, it is terminologically incorrect to say that a process choreographs its services. Choreography describes the global protocol that governs how individual processes interact with one another. Each process offers its own services and uses services of partner processes. It is correct to say that a process orchestrates these services, but the view from one process is only the behavior of that process in terms of its partners. Choreography presents the unified global view, depicting all of the processes and their required interactions.

Web Services Choreography Description Language (WS-CDL) is the leading choreography language, and Business Process Execution Language (BPEL) is the dominant process orchestration language. Though both XML-based languages feature a similar flow-oriented design style, only BPEL is meant to have an actual run-time platform: BPEL processes run, and WS-CDL choreographies are formal specifications documenting rules to guide interprocess exchange. There are no traffic cops in this laissez faire world, only traffic laws and law-abiding drivers.

Figure 1 shows the development life cycle for both choreographies and processes. In part (a) of the figure, the work to build a choreography begins with the gathering of requirements from representative participants, whereupon a software designer, using a business process modeling tool, draws the choreography in a notation language, preferably Business Process Modeling Notation (BPMN) or UML. The tool generates from the diagram WS-CDL XML code, which in turn is input to a choreography code editor, such as pi4soa (discussed in detail shortly), which enables a software developer to refine the choreography into a form that is suitable for rigorous testing. A good way to test the choreography is to create stub processes (preferably in BPEL) that represent each participant, and have these processes exchange messages with each other. An endpoint monitor watches the message traffic and checks for compliance to the choreography. When testing completes, the WS-CDL choreography and its reference BPEL stubs are ready for release.

Part (b) shows the life cycle for a particular participant process that intends to follow the choreography. The software designer bases the formal process design on the choreography itself as well as requirements specific to the participant organization. As in (a), the modeling tool should support BPMN or UML and be able to export BPEL code (as a bonus, it should also be able to import the BPEL stubs provided with the choreography), which can then be fed into a BPEL code-level editor, where the process can be refined and be made test-worthy. The test cycle requires a BPEL platform and scripts to test for both private and public requirements, and the endpoint monitor introduced in (a) can be used to verify choreography compliance.

This article focuses on two parts of the choreography cycle: modeling and code refinement. In the modeling area, there are plenty of good business process tools supporting UML and BPMN from which to choose, but none of them can generate WS-CDL output directly. Many can export models in a canonical form (e.g., XML metamodel interchange, or XMI), but there are no third-party tools that can generate WS-CDL code from that form. An open-source version of the proposed code editor, to our delight, is now available in alpha form. The tool, known as Pi Calculus for Service-Oriented Architecture (pi4soa, developed by the company Pi 4 Technologies), is an Eclipse plugin that provides a graphical editor to compose WS-CDL choreographies and generate from them compliant BPEL.

Example: Open Energy Market
To demonstrate the tools described above, we will model and then manipulate the WS-CDL source code of a simple energy market choreography, which describes how, in a competitive, deregulated market, retailers work with a single distributor to enroll customers. The energy example is inspired by the Ontario Energy Board Electronic Business Transaction standard (good examples come from the most improbable places), which was published in 2001 before choreography came along, but was influenced by the B2B ideas of the day. The standard uses UML-like collaboration diagrams, rather than choreography, to depict message exchanges between customers, retailers, and distributors.

The rules of the choreography can be stated in English as follows:

  • When a customer decides to enroll with a retailer, the retailer sends an enrollment request message to the distributor to sign up the customer.
  • If there is a problem with the enrollment, the distributor sends an enrollment reject message to the retailer. Problems include:
    - The customer is already enrolled with that retailer
    - The customer has an enrollment in progress with another retailer
    - There is a problem with the customer's account
  • Otherwise, if the customer is not currently enrolled with a retailer, the distributor sends an enrollment accept message to the retailer. The customer now has 10 business days to cancel the enrollment. If the customer decides to cancel, the retailer sends a cancellation message to the distributor; otherwise, at the end of the 10 days, the distributor sends an enrollment complete message to the retailer. The customer is now enrolled with the retailer.
  • Otherwise, if the customer is currently enrolled with a different retailer (i.e., the "current" retailer), the distributor notifies both retailers by sending to each a pending switch message. The customer now has 10 business days to cancel the switch. If the customer decides to cancel, the new retailer sends a cancellation message to the distributor, who sends a message to the current retailer indicating that the switch has been cancelled. Otherwise, at the end of the 10 days, the distributor sends to both retailers a message indicating that switch has completed, and the customer is now enrolled with the new retailer.
The Choreography Model
In BPMN, two possible ways to model choreography are:
  • Imaginary Hub: Although choreography is fundamentally decentralized, we imagine there is a central hub through which all messages pass, and model the choreography as the process of that hub.
  • Sum of Parts: The process of each participant is drawn in a separate pool. The steps in each process are the public steps - the ones required by the choreography. Message flow depicts the passing of messages from a step in the process of one participant to the step in a process of another.

    Figure 2 shows the imaginary hub process, which oversees all messages exchanged among retailer, current retailer, and distributor participants. There are two types of interactions in this process:

  • Receives (circles with enclosed mail envelopes), representing messages sent by the participant indicated in parentheses
  • Sends (rounded boxes), representing messages sent to the participant or participants indicated in parentheses
The diagram also makes use of the exclusive-OR event gateway (delimited by a diamond with an enclosed star and a plain diamond), which waits for exactly one of multiple messages to be received, and executes the logic on the path for that event.

The logic resembles the English description above, identical but for the inclusion of the hub. When an enrollment request is received from the retailer, the hub sends it to the distributor, and then waits for the one of three events to arrive from the distributor: an enrollment reject, an enrollment accept, or a pending switch notification. In each case, the hub forwards the message to the retailer and, in the pending switch case, to the current retailer too. In the accept and switch cases, the hub waits for either a cancel from the retailer (which it routes to the distributor, and, for a switch, to the current retailer) or a notice of completion (i.e., an enrollment complete or switch period over event) from the distributor, which the hub forwards to the retailer (and current retailer for a switch).

As we will discover in the next section, the imaginary hub approach maps nicely to the WS-CDL representation of the choreography.


Page 1 of 2   next page »

About Michael Havey
Michael Havey is a Chordiant consultant with 10 years of industry experience, mostly with application integration. Michael's book Essential Business Process Modeling was published by O'Reilly in August 2005.

Steve Ross-Talbot wrote: Great article. It was a surprise to see our CDL tools displayed. Just to ground this in business terms it is useful to consider what one migth use WS-CDL for. At the moment there are two distinct uses of WS-CDL that are activly being pursued based on the Pi4 Tech tools (www.pi4soa.org) by real projects. These are: 1) As a means of describing the overall architecture of a SOA that involves several services that need to collaborate. The description is created in the tools and then service generation to Java - which creates state machines for each service into which business logic can be placed. When this has been done monitoring is used to determine what the services are actually doing based on the WS-CDL description. It makes life much better for developers and architects because it enforces be...
read & respond »
SYS-CON Italy News Desk wrote: Choreography is the dark continent of Web services: few onlookers have traveled there, and many question whether there are any riches to be brought home from the trip. In the first place, choreographies bear such a striking resemblance to business processes that the novice might think that the two types of artifacts are indistinguishable.
read & respond »
LATEST ECLIPSE STORIES . . .
Borland Finally Dumps CodeGear Tools Division
It's only taken Borland two years but it's finally dumped its CodeGear tools division, responsible for Borland's hereditary JBuilder, Delphi and C++ Builder lines as well as its new web ventures into PHP and Ruby, said to be used by 7.5 million developers. Embarcadero Technologies is b
AJAX World - Skyway Software Announces RIA Developer Contest
According to Sean Walsh, President and CEO of Skyway Software, 'Our Skyway Community is thriving and our members are very talented. We truly look forward to their RIAs submittals and Skyway Builder extensions and are excited that all of the contributions will benefit the entire Skyway
Skyway Software Releases Eclipse Plug-In at JavaOne
Skyway Software announced a strategic partnership with SpringSource. In this technology partnership, Skyway Software becomes an application-delivery ISV certified by SpringSource and integrates Spring into Skyway Visual Perspectives, its end-to-end application development and delivery
Virtualization Conference Keynote Webcast Live on SYS-CON.TV
Brian Stevens, the Chief Technology Officer and Vice President of Engineering of Red Hat, delivered his Virtualization Keynote 'The Future of the Virtual Enterprise' at SYS-CON's Virtualization Conference & Expo 2007 West in San Francisco. 'Virtualization is the hottest subject today,
3rd International Virtualization Conference & Expo: Themes & Topics
From Application Virtualization to Xen, a round-up of the virtualization themes & topics being discussed in NYC June 23-24, 2008 by the world-class speaker faculty at the 3rd International Virtualization Conference & Expo being held by SYS-CON Events in The Roosevelt Hotel, in midtown
Red Hat Named "Platinum Sponsor" of Virtualization Conference & Expo
Red Hat is a trusted open source provider. Red Hat offers enterprise customers a long-term plan for building infrastructures on the quality and innovation of open source. Combining open source operating system platform, Red Hat Enterprise Linux, together with applications, management
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE