|By Jim Webber||
|July 24, 2003 12:00 AM EDT||
In July 2002, BEA, IBM, and Microsoft released a trio of specifications designed to support business transactions over Web services. These specifications, BPEL4WS, WS-Transaction, and WS-Coordination (see WSJ, Vol. 3, issues 5-7), form the bedrock for reliably choreographing Web services-based applications, providing business process management, transactional integrity, and generic coordination facilities, respectively.
The value of BPEL4WS is that if a business is the sum of its processes, the orchestration and refinement of those processes is critical to an enterprise's continued viability in the marketplace. Those businesses whose processes are agile and flexible will be able to adapt rapidly to and exploit new market conditions. This article introduces the key features of Business Process Execution Language for Web Services, and shows how it builds on the features offered by WS-Coordination and WS-Transaction.
The BPEL4WS Stack
The BPEL4WS model is built on a number of layers, each one building on the facilities of the previous. Figure 1 shows the fundamental components of the BPEL4WS architecture, which consists of the following:
We'll explore the features of this stack, starting with the static aspects of the application - capturing the relationship between the Web services participating in workflows - and on to the creation of workflows using the BPEL4WS activities.
Mapping Interenterprise Relations
To create workflows that span enterprises, we must understand how those enterprises are related. BPEL4WS provides a means of capturing the roles played by business partners in a Web services-based workflow through service linking, partners, and service references.
Figure 2 shows the relationship between service links, partners, and service references. Service links are the most abstract relationship supported in BPEL4WS, and link two parties by specifying the roles of each party and the (abstract) interface that each provides. serviceLinkType definitions can either be part of a service's WSDL interface, or defined separately and referenced by the WSDL. Embedding this definition directly in a WSDL description leverages WSDL's extensibility mechanism, allowing serviceLinkType elements to become a direct child of the wsdl:definitions element.
The actual content of a serviceLinkType is straightforward. It usually defines a link between two services, qualified by the targetNamespace of the WSDL document; and then exposes that relationship as two roles. In some cases, a serviceLinkType may specify a single role, which indicates that the workflow is willing to bind to any other service, without placing any requirements on that service.
In Listing 1, two sample serviceLinkType elements are defined. The first defines a link between a WidgetSeller and a WidgetBuyer service. When a WidgetBuyerSellerLinkType is used in a workflow, it will implicitly associate a WidgetSellerPortType with a WidgetBuyerPortType, and enforce the appropriate operation and message constraints. The second defines an EnquiryLinkType that is used to model the link between the widget manufacturer and a third party making widget-related enquiries. Note that in this case, there is only one role specified, WidgetAuthority, which indicates that the widget manufacturing service is willing to link to any other service without placing any further constraints on the interface exposed by that service.
A BPEL4WS partner refines a serviceLinkType declaration by defining the roles played by actual partners at the endpoints of the relationship. A partner is declared within the workflow script because it forms part of the behavior of that workflow. Partnerships only make sense within the scope of the workflow where business partners interact. A sample partner declaration for a user authentication system is presented in Listing 2.
Inside the partners element we have individual partner declarations that specify the role of our enterprise and its partners on a per-serviceLinkType basis. Of the two partners defined in Listing 2, a customer specifies roles for both ends of the corresponding serviceLinkType declaration, in preparation for the bilateral exchanges that purchasing widgets necessitates. However, while enquiring about widgets the manufacturer is not fussy about who binds to and uses it, and so the partner declaration is unilateral, specifying only the myRole attribute as WidgetAuthority.
The final step in cementing our business interrelationships is to specify the network locations of our partners so that we can discover and consume their Web services.
Of course, physical network address locations change over time (and indeed sometimes change very rapidly over time), and WSDL has a means of supporting this through a separation of portType (abstract network interface) and port (physical, protocol-bound interface on the network), which are mapped through bindings and later exposed as services. The service consumer must understand the portType section of a WSDL document before it can consume a service, though the binding to an actual port can be delayed right up until that client needs to invoke that service at runtime. The information needed to create the runtime binding can be accessed in a number of ways, including out-of-band communication between users and directory services like UDDI. The point is, given the distinction between abstract and concrete in WSDL, BPEL4WS needs a means of bridging the same gap between abstract partner declarations and exchanging messages over the network with real services at runtime. This is addressed by ServiceReference elements, which are part of a workflow that acts as typed references to a specific service. ServiceReferences allow consuming services to bind abstractly defined partners to physical network endpoints, and expose those endpoints (along with other useful data) to workflow activities.
Listing 3 shows a minimal ServiceReference declaration where the service provided by a particular partner is statically embedded. In this case, the wsdl:service element defined in a service's WSDL interface is used to create a "Web pointer" that can be used within the activities of a single workflow and passed amongst collaborating services as part of their message exchanges.
However, the real potency of ServiceReference comes to light when we dynamically compute or discover the endpoint or business process instance that we want to communicate with. We can thus augment the minimal ServiceReference shown in Listing 3 with specific instance information such as the ws:existingCustomer shown in Listing 4.
The ServiceReference shown in Listing 4 has additional information held by property elements within the referenceProperties element that identifies a specific resource hosted by a service. In BPEL4WS, that resource is likely to be an instance of a workflow. However, it may be a process or object identifier, or other identifier that has significance to both ends of the interaction. It is important to understand that while the computational aspects of BPEL4WS provide the ability to be able to obtain and utilize such properties, BPEL4WS does not place any semantics on them.
Message Properties and Property Aliases
Once we've captured the relationships between our enterprise and its partners, we can begin to exchange messages through the conduits defined by those relationships. Whether we are dealing with an invoice or a dispatch note, there is often a field or set of fields within that note that can be used to unambiguously differentiate that note from piles of other similar looking ones. For instance, an invoice number is usually used in correspondence rather than the date and address of the sender of the invoice since it is both simpler and more likely to resolve to a unique result. This notion of "distinguished" data is supported through message properties. Put simply, a message property is a unique name (within the workflow) that has a specific type from XML Schema (e.g., xs:postive Integer) and whose name has significance to the workflow (e.g., invoice number; see Listing 5).
Having a friendly name and type information for our property is akin to having object references in traditional programming languages. However, just like object references need to be bound to objects before we can use them, we need to bind properties to values before workflow scripts can access those values. In BPEL4WS we have a way of binding typed friendly names to values that we can use within our workflows - property aliases. A property alias binds the value of a property to the value of an element in a message using an XPath query. For instance, we may be interested in the invoice number from a purchase order and want to expose that value to the workflow.
Listing 6 shows you how to bind properties to values through propertyAlias declarations. The attributes in the element declare the property name that we are binding to (InvoiceNumber), the message (PurchaseOrderMessage), and the specific message part (invoice) where the value that we wish to bind to is located. The final step to complete the binding is to specify the XPath query (specified in the query attribute) that returns the value from the specified message part. In Listing 6 this is calculated by the expression/invoice number, which evaluates the contents of the first invoice-number element from the root context, where context is provided by the preceding messageType and part attributes. Now when PurchaseOrderMessage messages are processed, the property InvoiceNumber will be assigned the value of the corresponding invoice - number in the message, or conversely may be used to assign such a value to the invoice-number element, just like an object reference.
Once properties have been defined, they can be used to correlate messages. Using a property like an invoice number allows the underlying BPEL4WS implementation to route messages to particular workflow instances at the application level without relying on sophisticated conversational transports to manage that mapping. As we shall see, the BPEL4WS communication activities encapsulate this behavior to further simplify matters
Containers and Data Handling
In dealing with Web services-based workflows we encounter a significant philosophical difference between the two technologies: workflows are inherently stateful applications, whereas Web services are inherently stateless. Of course many Web services do actually maintain state between invocations, but do so in a proprietary manner in databases, files, statically allocated program variables, and so on, all of which requires programmer effort and is likely to be inaccessible to the business analyst. BPEL4WS has abstracted these proprietary approaches and replaced them with a generic state management facility based on containers.
A BPEL4WS container is a typed data structure that stores messages associated with a workflow instance. The underlying notion of containers is that in a workflow the state of the application is simply a function of the messages that have been exchanged. Containers begin their lives uninitialized, and are populated over time by the arrival of messages, or computations being executed that populate them.
Listing 7 shows a simple container declaration that could be used by a cable operator to store requests for package updates. This container is used for holding incoming channel addition requests from customers while our workflow process goes about the business of updating the customer's billing details and set-top box software accordingly.
Declaring a container is straightforward. It consists of a name for the container that is unique within the scope of the workflow process definition, and the type of the message as defined in the corresponding WSDL document. For this example the WSDL interface identified by the coprefix resolves to http://cableoperator.example.org/wsdl which is the address at which our fictitious cable operator resides.
Generally, the messages stored in containers are the same messages that are exchanged with partners. However, there is nothing to prevent a programmer from concocting a message type purely to store local variables during computations. Such messages are never exchanged with partners, and are usually declared in-line with their associated containers (see Listing 8).
BPEL4WS defines a set of communication activities that deal with the sending and receiving of messages so that a workflow process instance can communicate with partners' Web services. BPEL4WS provides three activities - invoke, receive, and reply - each of which handles a different type of interaction between partners in a workflow.
The invoke activity allows a workflow instance to call a synchronous or asynchronous operation on a remote Web service. An asynchronous one-way operation is the simplest form of invoke since it only requires a single input container to send messages. Look at the example shown in Listing 9 where a request for additional cable TV channels is sent from a set-top box to a cable operator's system. The invoke activity calls the addChannel operation from the ChannelManagementPortType portType exposed by its CableOperator partner, sending a message from the Re-quested Channels container to request additions to the subscriber's package.
Web service operations are exposed to the outside world by a receive activity. The receive activity is the workflow entity that a WSDL operation maps onto. In Listing 10 we show the receive activity that the cable operator exposes as its addChannel operation (the operation invoked by customers in Listing 9). The cable operator uses a container called addChannelOrders to hold incoming AddChannelMessage messages from customers. When the receive activity is activated by the arrival of an AddChannelMessage from a customer, a new instance of the cable operator's channel adding workflow is created and executed.
A receive activity is blocking, which does not allow the workflow graph it precedes to progress until the messages it requires have been received. Such activities may be used to trigger the creation of a new workflow instance in response to an incoming message, or they may deal with the message delivery to an existing instance.
A reply activity sends synchronous responses to messages received through a receive activity. Correlation between a receive and a reply is handled by the underlying BPEL4WS implementation.
Listing 11 shows an example reply activity, where a message from CustomerSubscriptionDetails is sent back to a customer partner in response to a prior incoming message to a receive activity.
In order to execute a process, we need a means of describing its behavior. We have to understand the features that the workflow language provides to manipulate data, iterate, call external functions, and so on; and how to compose these primitives into meaningful workflows. To support this, the BPEL4WS specification defines a number of fundamental activities that are the basic building blocks of the workflow. It is beyond the scope of this article to look at every facet of each language construct defined by BPEL4WS, but we will give you an idea of what kinds of things are possible.
BPEL4WS control flow activities are responsible for serializing and parallelizing activities, choosing from alternative paths in a workflow, iterating commands, and so on. The simplest construct is the sequence activity that executes subactivities serially, as shown in Listing 12.
Parallelizing activities that have no dependencies is achieved by enclosing the parallel activities within a flow element. For example, a customer's computing system, which initiated a hotel reservation, may also have been organizing flights and car rentals simultaneously. If we assume these activities are independent, we can execute them in parallel with a flow activity like that shown in Listing 13.
A scope is a means of explicitly packaging activities together so that they can share common error handling and compensation routines. The full structure for a scope is shown in Figure 3 and consists of a set of optional fault handlers, a single optional compensation handler, and the primary activity of the scope, which defines its behavior.
In the absence of a scope declaration, each activity is implicitly associated with its own scope with the same name as, and delimited by, the activity. An example scope that captures the booking process for a ticket is shown in Listing 14.
The normal behavior for the scope shown in Listing 14 is for the booking activity near the bottom of the example to be executed and for flight tickets to be reserved. However, this scope declares a number of exception handlers with catch activities that allow a variety of faults that might occur while booking tickets to be rectified before they cause further problems. For instance, these catch activities deal with such matters as a flight number being incorrectly specified, a flight already being fully booked, or a fault in the payment method used to purchase the tickets. We can assume here that these fault handlers are able to correct any problems so that the scope can complete normally. The catchAll handler is a little different in that it handles any faults other than those that are explicitly handled by the preceding catch activities. Since the nature of the fault is unknown, the designer of this scope has decided that the safest thing to do is to compensate the inner scopes by calling the logic held in their compensationHandler activities to restore the system to the same state (or a logically equivalent state) as it was before the top-level scope executed. The skeleton for a compensationHandler is shown in Listing 15.
Compensation handlers are a fundamental component of BPEL4WS workflows to support reliable long-lived business processes. During the execution of a workflow, data in the various systems that the workflow encompasses changes. Since we have no knowledge of the underlying computing systems (databases, queues, etc.) that the workflow is utilizing, we must compensate at the application level by performing the logical reverse of each scope that was executed as part of our workflow, from the most recently executed scope back to the earliest executed scope.
Where fault handlers provide alternative forward execution paths through a scope, compensation handlers, when invoked, undo the work performed by a scope. Since a compensationHandler for a specific scope reverses that scope's work, the handler can potentially be as complex and intricate as the scope's normal original activity.
A compensationHandler can also be set to compensate an entire business process after its normal completion (instead of individual scopes).
As we saw in an earlier article in this series, the BPEL4WS specification suggests WS-Transaction as the protocol of choice for coordinating distributed transactions across workflow instances. Thus, when a scope containing invocations on a partner's Web services is compensated, the underlying BPEL4WS engine should ensure that the appropriate WS-Transaction messages are sent to the transaction coordinator so that any partner's systems can be informed of the need to compensate the invoked activities.
BPEL4WS is at the top of the WS-Transaction stack and utilizes WS-Transaction to ensure reliable execution of business processes over multiple workflows, which BPEL4WS logically divides into two distinct aspects. The first is a process description language with support for performing computation, synchronous and asynchronous operation invocations, control-flow patterns, structured error handling, and saga-based long-running business transactions. The second is an infrastructure layer that builds on WSDL to capture the relationships between enterprises and processes within a Web services-based environment.
Taken together, these two aspects support the orchestration of Web services in a business process, where the infrastructure layer exposes Web services to the process layer, which then drives that Web services infrastructure as part of its workflow activities.
The ultimate goal of business process languages like BPEL4WS is to abstract underlying Web services so that the business process language effectively becomes the Web services API. While such an abstract language may not be suitable for every possible Web services-based scenario it will certainly be useful for many, and if tool support evolves it will be able to deliver on its ambition to provide a business analyst-friendly interface to choreographing enterprise systems.
BPEL4WS 1.1 and OASIS WSBPEL
The original BPEL4WS 1.0 specification that we considered in this article has been superceded as part of the original vendors' efforts to standardize the technology. IBM, Microsoft, BEA, and their partners have submitted a version 1.1 BPEL to OASIS under the WSBPEL (Web Services Business Process Execution Language) Technical Committee. The most obvious changes in BPEL4WS 1.1 are that the term "container" has been replaced with the more traditional term "variable," although its type is still considered in terms of messages. These variables are now supported at arbitrary scope, unlike BPEL4WS, which only supported containers at the global process scope.
In addition to variables, the specification authors have added event handlers into the activity set by introducing the <eventHandlers> activity. An eventHandlers activity is similar to a pick activity insofar as it contains a number of onMessage or onAlarm activities, but it differs from the standard pick activity in that an eventHandler can be executed concurrently with the currently running scope. This allows concurrent processing within a single scope where previously concurrent "threads" of control were not permitted. Of course, there are some standard caveats with the use of an eventHandler, like the fact that one cannot be used to call a compensate activity, but these are minor and will easily be handled by tool support.
The Software Defined Data Center (SDDC), which enables organizations to seamlessly run in a hybrid cloud model (public + private cloud), is here to stay. IDC estimates that the software-defined networking market will be valued at $3.7 billion by 2016. Security is a key component and benefit of the SDDC, and offers an opportunity to build security 'from the ground up' and weave it into the environment from day one. In his session at 16th Cloud Expo, Reuven Harrison, CTO and Co-Founder of Tufin, ...
Mar. 27, 2017 11:30 AM EDT Reads: 6,666
By now, every company in the world is on the lookout for the digital disruption that will threaten their existence. In study after study, executives believe that technology has either already disrupted their industry, is in the process of disrupting it or will disrupt it in the near future. As a result, every organization is taking steps to prepare for or mitigate unforeseen disruptions. Yet in almost every industry, the disruption trend continues unabated.
Mar. 27, 2017 11:23 AM EDT Reads: 144
SYS-CON Events announced today that HTBase will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. HTBase (Gartner 2016 Cool Vendor) delivers a Composable IT infrastructure solution architected for agility and increased efficiency. It turns compute, storage, and fabric into fluid pools of resources that are easily composed and re-composed to meet each application’s needs. With HTBase, companies can quickly prov...
Mar. 27, 2017 10:30 AM EDT Reads: 2,982
Building custom add-ons does not need to be limited to the ideas you see on a marketplace. In his session at 20th Cloud Expo, Sukhbir Dhillon, CEO and founder of Addteq, will go over some adventures they faced in developing integrations using Atlassian SDK and other technologies/platforms and how it has enabled development teams to experiment with newer paradigms like Serverless and newer features of Atlassian SDKs. In this presentation, you will be taken on a journey of Add-On and Integration ...
Mar. 27, 2017 08:15 AM EDT Reads: 3,151
Culture is the most important ingredient of DevOps. The challenge for most organizations is defining and communicating a vision of beneficial DevOps culture for their organizations, and then facilitating the changes needed to achieve that. Often this comes down to an ability to provide true leadership. As a CIO, are your direct reports IT managers or are they IT leaders? The hard truth is that many IT managers have risen through the ranks based on their technical skills, not their leadership abi...
Mar. 27, 2017 05:00 AM EDT Reads: 11,128
The essence of cloud computing is that all consumable IT resources are delivered as services. In his session at 15th Cloud Expo, Yung Chou, Technology Evangelist at Microsoft, demonstrated the concepts and implementations of two important cloud computing deliveries: Infrastructure as a Service (IaaS) and Platform as a Service (PaaS). He discussed from business and technical viewpoints what exactly they are, why we care, how they are different and in what ways, and the strategies for IT to transi...
Mar. 27, 2017 05:00 AM EDT Reads: 6,258
Without a clear strategy for cost control and an architecture designed with cloud services in mind, costs and operational performance can quickly get out of control. To avoid multiple architectural redesigns requires extensive thought and planning. Boundary (now part of BMC) launched a new public-facing multi-tenant high resolution monitoring service on Amazon AWS two years ago, facing challenges and learning best practices in the early days of the new service.
Mar. 27, 2017 03:45 AM EDT Reads: 3,054
All organizations that did not originate this moment have a pre-existing culture as well as legacy technology and processes that can be more or less amenable to DevOps implementation. That organizational culture is influenced by the personalities and management styles of Executive Management, the wider culture in which the organization is situated, and the personalities of key team members at all levels of the organization. This culture and entrenched interests usually throw a wrench in the work...
Mar. 27, 2017 03:00 AM EDT Reads: 3,089
DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm.
Mar. 27, 2017 12:45 AM EDT Reads: 2,231
As software becomes more and more complex, we, as software developers, have been splitting up our code into smaller and smaller components. This is also true for the environment in which we run our code: going from bare metal, to VMs to the modern-day Cloud Native world of containers, schedulers and micro services. While we have figured out how to run containerized applications in the cloud using schedulers, we've yet to come up with a good solution to bridge the gap between getting your contain...
Mar. 26, 2017 09:45 PM EDT Reads: 7,740
As organizations realize the scope of the Internet of Things, gaining key insights from Big Data, through the use of advanced analytics, becomes crucial. However, IoT also creates the need for petabyte scale storage of data from millions of devices. A new type of Storage is required which seamlessly integrates robust data analytics with massive scale. These storage systems will act as “smart systems” provide in-place analytics that speed discovery and enable businesses to quickly derive meaningf...
Mar. 26, 2017 07:45 PM EDT Reads: 9,684
DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm. In his Day 3 Keynote at 20th Cloud Expo, Chris Brown, a Solutions Marketing Manager at Nutanix, will explore t...
Mar. 26, 2017 03:15 PM EDT Reads: 2,930
DevOps has often been described in terms of CAMS: Culture, Automation, Measuring, Sharing. While we’ve seen a lot of focus on the “A” and even on the “M”, there are very few examples of why the “C" is equally important in the DevOps equation. In her session at @DevOps Summit, Lori MacVittie, of F5 Networks, explored HTTP/1 and HTTP/2 along with Microservices to illustrate why a collaborative culture between Dev, Ops, and the Network is critical to ensuring success.
Mar. 26, 2017 03:00 PM EDT Reads: 10,666
With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend @CloudExpo | @ThingsExpo, June 6-8, 2017, at the Javits Center in New York City, NY and October 31 - November 2, 2017, Santa Clara Convention Center, CA. Learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
Mar. 26, 2017 01:45 PM EDT Reads: 8,668
Everyone wants to use containers, but monitoring containers is hard. New ephemeral architecture introduces new challenges in how monitoring tools need to monitor and visualize containers, so your team can make sense of everything. In his session at @DevOpsSummit, David Gildeh, co-founder and CEO of Outlyer, will go through the challenges and show there is light at the end of the tunnel if you use the right tools and understand what you need to be monitoring to successfully use containers in your...
Mar. 26, 2017 01:00 PM EDT Reads: 1,689
What if you could build a web application that could support true web-scale traffic without having to ever provision or manage a single server? Sounds magical, and it is! In his session at 20th Cloud Expo, Chris Munns, Senior Developer Advocate for Serverless Applications at Amazon Web Services, will show how to build a serverless website that scales automatically using services like AWS Lambda, Amazon API Gateway, and Amazon S3. We will review several frameworks that can help you build serverle...
Mar. 26, 2017 12:45 PM EDT Reads: 2,019
The IT industry is undergoing a significant evolution to keep up with cloud application demand. We see this happening as a mindset shift, from traditional IT teams to more well-rounded, cloud-focused job roles. The IT industry has become so cloud-minded that Gartner predicts that by 2020, this cloud shift will impact more than $1 trillion of global IT spending. This shift, however, has left some IT professionals feeling a little anxious about what lies ahead. The good news is that cloud computin...
Mar. 26, 2017 10:30 AM EDT Reads: 1,334
An overall theme of Cloud computing and the specific practices within it is fundamentally one of automation. The core value of technology is to continually automate low level procedures to free up people to work on more value add activities, ultimately leading to the utopian goal of full Autonomic Computing. For example a great way to define your plan for DevOps tool chain adoption is through this lens. In this TechTarget article they outline a simple maturity model for planning this.
Mar. 26, 2017 06:00 AM EDT Reads: 4,307
While DevOps most critically and famously fosters collaboration, communication, and integration through cultural change, culture is more of an output than an input. In order to actively drive cultural evolution, organizations must make substantial organizational and process changes, and adopt new technologies, to encourage a DevOps culture. Moderated by Andi Mann, panelists discussed how to balance these three pillars of DevOps, where to focus attention (and resources), where organizations might...
Mar. 26, 2017 05:15 AM EDT Reads: 6,200
The rise of containers and microservices has skyrocketed the rate at which new applications are moved into production environments today. While developers have been deploying containers to speed up the development processes for some time, there still remain challenges with running microservices efficiently. Most existing IT monitoring tools don’t actually maintain visibility into the containers that make up microservices. As those container applications move into production, some IT operations t...
Mar. 26, 2017 01:00 AM EDT Reads: 3,001