Cloud Computing Conference
March 30 - April 1, New York
Register Today and SAVE !..


2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
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

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.

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.

YOUR FEEDBACK
ISSJ News Desk wrote: Forum Systems Integrates Web Services Firewall Forum XWall with CA's eTrust TransactionMinder. Forum XWall Web Services Firewall Service-Oriented Architecture security solution integrates market-leading Web services security policy enforcement with CA's eTrust TransactionMinder for transactional identity management; CA's eTrust Antivirus for virus management; and CA's Web Services Distributed Management for service provisioning.
SOA Web Services Journal News Desk wrote: Forum Systems Integrates Web Services Firewall Forum XWall with CA's eTrust TransactionMinder. Forum XWall Web Services Firewall Service-Oriented Architecture security solution integrates market-leading Web services security policy enforcement with CA's eTrust TransactionMinder for transactional identity management; CA's eTrust Antivirus for virus management; and CA's Web Services Distributed Management for service provisioning.
Mary wrote: Forum XWall Web Services Firewall Service-Oriented Architecture security solution integrates market-leading Web services security policy enforcement with CA's eTrust TransactionMinder for transactional identity management; CA's eTrust Antivirus for virus management; and CA's Web Services Distributed Management for service provisioning.
ENTERPRISE OPEN SOURCE MAGAZINE LATEST STORIES . . .
Oracle threw some data integrity protection code over the wall and it's been accepted into the 2.6.27 Linux kernel. It reportedly lets the Linux kernel utilize key data protection information for the first time in its life. It's also the first implementation of the T10 Protection Infor...
Zoho, the prolific Microsoft wannabe that has already proven it can knock off a web app at the drop of a buzzword, is branching out into middleware. It’s come up with some widgetry – aimed at developers this time, not end users – called CloudSQL that’s supposed to let people in...
Aside from low prices, it's also cash flow and up-front loading of risk and money of traditional, on-premise projects that are driving more buyers to SaaS offerings. In an economic downturn, "do more with less" and quick ROI behavior become the norms. But wait, isn't that what open sou...
Thanks to a sketchy notice in the Official Journal of the European Union we now know a tad more about why Intel has taken the European Commission to court. Seems Intel is accusing the EC of making it the butt of a "discriminatory and partial" antitrust investigation because the EC won'...
AMD sent out a short sharp message Thursday morning saying that the way things are going it expects revenues from continuing operations this quarter to be ~25% lower than they were last quarter and that was only $1.585 billion. Its calculations do not include process technology license...
IBM is taking another shot at blowing Microsoft off the desktop and this time it’s got the foul economic winds at its back. In the name of cost cutting, IBM is proposing that companies virtualize their desktops and turn them into thin clients using Virtual Bridges' Virtual Enterprise...
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