|
SYS-CON.TV Webcasts
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Top Links You Must Click On
Web Services Automating Business Processes with WSFL and BPEL4WS
Automating Business Processes with WSFL and BPEL4WS
By: Granville Miller
Feb. 3, 2003 12:00 AM
As we strive to add more value to the business as computing professionals, the marriage of business processes and Web services provides opportunities to get closer to our business colleagues. The business process scripting languages, Web Services Flow Language (WSFL) and Business Process Execution Language (BPEL), provide a mechanism for integrating Web services to form cohesive business processes. The first step is to create models of your business. This is followed by a combination of development and business process engineering activities. Simulation of the business process can be used to "try out" the new process. Finally, J2EE technology can be used to roll out scalable, enterprise-level applications. The real value behind any new technology comes from its ability to help us solve real problems. Technology provides its greatest value when it can be used to solve whole classes of problems across many diverse areas. One of the recent additions to our technology repertoire is Web services. The technology behind Web services is a set of XML-based access and description languages. However, the idea behind Web services is much more than description and access technologies. The intent is that they are coarse-grained services that provide tangible business value. Originally, Web services were desired as a method to make business services available externally. Certainly Web services could be made available via a universal directory where people could discover and utilize these services over the Internet. However, Web services are more likely to be found internally as initial applications of this technology tend to focus on automating business processes. Much of the automation of today's business processes can be found in a combination of systems. Some may be legacy systems, written using outdated software technology. Packaged solutions that provide interfaces to generic business services may automate another part of a business process. Finally, there may be areas of a business process for which existing systems cannot provide automation. These areas must be written as part of new business initiatives. Web service technology can provide a ubiquitous interface to all of these systems. As a result, Web service technology provides the ultimate "glue" for integrating legacy systems, packaged solutions, and new technologies into solutions that automate or partially automate business processes. The concept of assembling a set of Web services to provide a solution that meets a business process need is called Web service orchestration. Web service orchestration knits together a series of Web services to provide support for a business process. Each Web service provides support for an activity within the workflow. As each activity is completed, the flow provided moves the user to the next activity. A path through a set of activities is followed until the business process is completed. Multiple paths may reflect exceptions that can occur and the remedies for those exceptions if an activity is not completed successfully. This sequence of activities can be depicted using a UML activity diagram (see Figure 1). In the activity diagram, the boxes represent the activities, while the links between the activities represent the flow between them. Activity diagrams are commonly used to represent flow between activities in business processes. Activity diagrams are a visual representation of a business process that is easy to understand and communicate.
Flow Languages Of course, WSFL becomes Java when it is deployed to WebSphere, but the implementation details are unimportant to those seeking to rapidly deliver business solutions in this fashion. Instead, WSFL can be used to quickly prototype the business process changes necessary to continually engineer business processes. New Web services can be written to fill out these new processes in high-level languages such as Java, supporting the newly engineered activities. A succeeding language to WSFL is Business Process Execution Language for Web Services (BPEL4WS). This new flow language is a joint collaboration between IBM, BEA, and Microsoft. The basic ideas behind BPEL4WS are similar to those behind WSFL and the Microsoft flow language, XLANG. Though both WSFL and BPEL4WS are XML-based, their syntax is slightly different.
Flow Language Concepts
In WSFL, the roles are called service providers (partners in BPEL4WS). Service providers are the class of people responsible for performing the given activity. The activities in the business process are called activities in WSFL, and we always associate a role with each activity to show who performs it. The initial WSFL for the simple loan processing process is shown in Listing 1. In our implement section, we would specify the name of the Web service that implements the activity. This flow definition defines the service providers and the activities, but it does not define the flow of activities within the process. Control flow is determined by WSFL structures called control links and data flow is determined by data links. A control link specifies a source and a target activity and links the two activities together. The control flows from the source to the target, setting up a sequential flow of control across the activities.
<controlLink source="submitLoanRequest" Data links show how data moves from activity to another. For example, the loan application is clearly used in all of the activities. The application is created in the first activity and is propagated to the next. The WSFL would look like:
<dataLink source="submitLoanRequest" Conditional control and data links allow multiple flows across the activities. This handles the many exception conditions that arise in normal business processes.
Implementation In BPEL4WS, there are three ways that things can be done inside a flow. A flow can invoke a Web service, send a message (called a reply), or receive a message. Invoking a Web service corresponds to performing an activity. Sending messages and receiving replies allows activities to be performed concurrently or asynchronously. The send and receive behavior also allows multiple roles to be coordinated. As loan requests are submitted by customers, credit references can be validated by the clerks. The process moves this way through its transitions until the final loan information is replied back to the customer. The corresponding BPEL4WS code looks like that in Listing 2.
Turning Into Java A subprocess can then be rewritten in Java and exposed as a Web service for the flow language to call. The idea is that you break Web service flows into granular pieces and if performance becomes an issue, build them into the coarse-grained flows that perform best on the server side. Finally, business process simulation is always a good idea when engineering your business process. Web services can quickly be made in Java and "stubbed" into a new business process to "try it out." In this way, we can prototype new business processes without a whole lot of investment. Rapid application development products such as WebSphere Studio Application Developer IE and Together WebSphere Edition can help you model and build business process prototypes quickly and easily.
Conclusion
References Reader Feedback: Page 1 of 1
Enterprise Open Source Magazine Latest Stories . . .
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||