Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Computing
Conference & Expo
November 2-4, 2009 NYC
Register Today and SAVE !..

2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
In many cases, the end of the year gives you time to step back and take stock of the last 12 months. This is when many of us take a hard look at what worked and what did not, complete performance reviews, and formulate plans for the coming year. For me, it is all of those things plus a time when I u...
SYS-CON.TV
Chopping Down Trees: How To Build Flatter BPEL Processes?
The natural visualization of a business process is of boxes and arrows arranged in a tree-like formation

The natural visualization of a business process is of boxes and arrows arranged in a tree-like formation. A large process with numerous conditional paths forms a rather expansive tree that can't fir on a computer screen or printed page. If the process has loops, these are often represented as arrows pointing back to earlier boxes, resulting in an untidy graph structure. Although BPEL isn't a visual process language, its XML representation can form code trees that are no less cumbersome. A receive inside a sequence inside a flow inside a switch inside a pick, even if properly indented, can make a coder see double.

This technique article shows how to model BPEL 1.1 processes in a special flat form that represents even the most onerous processes in just a few levels of structure. A process modeled in this form, represented visually, more closely resembles a neat pile of sticks than a tree. Aesthetics aside, the flat approach is fundamentally better suited to SOA orchestration than the tree approach. Flat BPEL is good SOA.

Flat Credit Card Dispute
To demonstrate the flat technique, let's consider the (deliberately complicated) example of how a bank processes credit card disputes raised by its customers. The following is an English description of ACMEBank's business process for disputes on its personal Visa cards:

  • The Capture Stage: The customer submits a dispute over one of various channels (call center, Web, e-mail, mail, or fax) to ACMEBank. The bank makes a quick determination whether to reject the dispute outright (e.g., because it wasn't submitted within 60 days of its posted date), write it off (e.g., because the dollar amount of the transaction is below a certain threshold), request from the customer supporting documentation (e.g., receipts), or pass it to one of the bank's dispute specialists for further investigation. At any time at this stage the customer may cancel the dispute. The goal of this stage is either to capture the dispute completely or to dispense with it.
  • The Investigation Stage: The dispute specialist examines the fully captured dispute, and may reject it, write it off, proceed with a chargeback (i.e., take the disputed amount back from the merchant), or request a sales draft from the merchant to investigate its validity (and ask the customer for clarification if the draft appears valid). The happy path culminates in a chargeback decision.
  • The Chargeback Stage: ACMEBank charges back the transaction and credits the customer's account. The merchant bank may, in turn, accept the chargeback or represent the transaction (i.e., present the charge again), at which point an ACMEBank dispute specialist determines whether to charge back a second time, write off, or reject. In rare cases, the dispute is brought to arbitration before the Visa association.
Figure 1 is the natural, naïve tree representation of this process. (The figure is a box-and-arrows diagram that matches the XML structure of BPEL code. For simplicity's sake, sequences are omitted from the diagram. Events are shaded.) The top-level structure is straightforward: the logic for each stage is enclosed in a large outer block (a scope in the Capture stage, picks for Investigation and Chargeback). The process begins when it gets a dispute submitted over a customer channel (receive CustChannel Submitted), and then enters into the scope for the Capturing stage, whereupon it assigns the dispute for investigation to operations (invoke Ops pickup), which leads into the Investigating pick. The last steps are to submit the chargeback to the merchant bank (invoke DisputeNet Chargeback ) and handle the subsequent exchange with the merchant (the Chargeback pick).

The complexity is in the internals of the three stages. In the Capturing stage, for instance, the logic to wait for documentation from the customer is a pick within a pick within a while within a scope. The scope defines a message handler that checks for a cancellation event (onMessage CustChannel Cancelled) from the customer, which terminates the flow outright. The while loop that forms the body of the scope iterates until the dispute has been completely captured. The loop first assigns the dispute for assessment to an operations person (invoke ops pickup), and then waits for the operator's response in a pick. The operator can respond in one of four ways, modeled as four onMessage handlers in the pick. Of the four, one handler completes the loop (onMessage Ops ChargedBack) and leads into the next stage, two terminate the process with immediate outcomes (onMessage Ops Rejected, onMessage Ops WrittenOff), and the final (onMessage Ops DocsRequested) sends a request to the customer for documentation (invoke CustChannel UpdateRequested) before transitioning to the innermost pick, which gets the customer's documentation (onMessage CustChannel Updated), thereby completing the loop's current iteration; next time around, the operator might decide that enough information exists for the dispute to be considered completely captured. The other two stages are no less onerous, each defining five levels of picks.

The process is designed in the style of a procedural program. The flow is deep and meandering. Activities are lost in the machinery of control structures. The most important steps in a BPEL process are its partner interactions (receives, onMessage handlers and invokes), but in this process they are scattered about the flow. Consequently, it's hard to determine how faithfully this process honors its contract with its partners; it's hard to see the orchestration in this process. Is ACME communicating properly with its customers and with merchants? It's hard to answer this question without shaking the tree.

The tree version of the disputes process is no straw man. Most business processes today are constructed in this fashion, largely because process designers lack process design sophistication. Business analysts, not surprisingly, understand the business problem domain but don't draw rigorous flowcharts. Technical designers, who are handed business analyst process diagrams in the transition from the requirements to the development stage, work mainly at hardening the process and plugging holes. They don't reshape or introduce patterns; processes remain procedural. Technical design perpetuates the bad practices of business analysis. Ironically, many of these designers write beautiful state-of-the-art services: their Java or C# is impeccable, but they aren't strong at designing processes around these services.

The flat style of process design recommended in this article kills two birds with one stone. On the one hand, it encourages flat processes organized around partner interactions rather than procedural control structures. On the other hand, the emphasis on partner interactions is a purer expression of SOA orchestration than the alternative tree approach.

The trick is to conceive of the process as the state machine of some entity, observed from the point of view of the participant that manages the process - e.g., a credit card dispute for ACMEBank, a claim for an insurance company, a purchase order for a supplier. Transitions between states are triggered by inbound events from other partners: receives, picks, and handlers. The process performs actions either during a transition or when a state is entered or exited. The most significant actions from an SOA perspective are invokes in which the current participant calls other participants, possibly triggering state changes in them too. Once the states, transitions, and actions of the state machine are understood, the BPEL process flow is easy to develop.


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.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

SOA World Latest Stories
Yahoo’s critical negotiations with Alibaba to sell part of its stake in Alibaba back to the Chinese company have collapsed according to All Things Digital, a report later confirmed by CNBC. Apparently the collapse includes Yahoo’s parallel and intertwined negotiations with Softbank t...
Can you bring services from the cloud to your customers faster and have them adopt it with ease of use or bring the power of bundled services to the fingertips of your clients without creating new rigid ‘apps stove pipes'? Do you want to prevent your business running away to public and...
The Internet highway may start looking like a proverbial New York traffic jam at rush hour soon. Feel free to substitute any town you like because Cisco says there’s going to be a faster-than-expected 18x surge in worldwide mobile data traffic between 2011 and 2016. That’s when mob...
OCZ Technology Group, a provider of high-performance solid-state drives (SSDs) for computing devices and systems, on Tuesday announced the Z-Drive R4 CloudServ PCI Express (PCIe) flash storage solution, designed to accelerate cloud computing applications and reduce operating expenses i...
Many organizations have embraced, or are considering, the benefits of cloud computing – speed, flexibility, increased expertise, shared workload, reduced costs, etc. The benefits are many – but so are the risks. What are the threats to cloud security? Which parties assume responsibilit...
SoftLayer Technologies on Tuesday announced the immediate worldwide availability of SoftLayer Object Storage, a redundant and highly scalable cloud storage service that allows users to easily store, search and retrieve data across the Internet, with optional CDN connectivity, or across...
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