Designing the process of a service-oriented solution really just comes down to properly interpreting the business process requirements you have collected and then implementing them accurately. The trick, though, is to also account for all possible variations of process activity. This means understanding not just what can go wrong, but how the process will respond to unexpected or abnormal conditions.
Historically, business processes were designed by analysts using modeling tools that produced diagrams handed over to architects and developers for implementation. The workflow diagram and its accompanying documentation were the sole means of communicating how this logic should be realized within an automated solution. While diligent analysis and documentation, coupled with open minded and business-aware technical expertise, can lead to a successful collaboration of business and technical team members, this approach does leave significant room for error.
This gap is being addressed by operational business modeling languages, such as WS-BPEL. Modeling tools exist, allowing technical analysts and architects to graphically create business process diagrams that represent their workflow logic requirements, all the while auto-generating WS-BPEL syntax in the background.
These tools typically require that the user possess significant knowledge of the WS-BPEL language. However, more sophisticated tools, geared directly at business analysts, already are emerging, removing the prerequisite of having to understand WS-BPEL to create WS-BPEL process definitions.
The result is a diagram on the front-end that expresses the analysts' vision of the process and a computer executable process definition on the back-end that can be handed over to architects and developers for immediate (and not-open-to-interpretation) implementation (Figure 16.2).
Figure 16.2. A concrete definition of a process service designed using a process modeling tool.
When operational, the WS-BPEL process is appropriately represented and expressed through a process service within the service interface layer. This process service effectively establishes the orchestration service sub-layer, responsible for governing and composing business and application layers.
16.3.1. Process description
The following step-by-step design process (Figure 16.3) provides some high-level guidance for how to approach the creation of a WS-BPEL process definition. The steps are similar to those used by the Task-centric business service design process described in Chapter 15, except for one important detail.
Figure 16.3. A high-level process for designing business processes.
When we designed a task-centric service, we simply produced a service interface capable of handling anticipated message exchanges. The details of the workflow logic were deferred to the design and development of the underlying application logic. When designing a WS-BPEL process, this workflow logic is abstracted into a separate process definition. Therefore, the design of workflow details is addressed at this stage, along with the definition of the process service interface.
The examples used to demonstrate each step are intentionally simple so that the basic WS-BPEL element descriptions we just covered in the previous section can be easily understood. When designing more complex workflow logic, a more detailed and elaborate design process is required.
Business process design is the last step in our overall service-oriented design process. This means that, for the most part, the application and business services required to carry out the process logic will have already been modeled and designed as we begin.
Step 1: Map out interaction scenarios
By using the following information gathered so far, we can define the message exchange requirements of our process service:
This information now is used to form the basis of an analysis during which all possible interaction scenarios between process and partner services are mapped out. The result is a series of processing requirements that will form the basis of the process service design we proceed to in Step 2.
Step 2: Design the process service interface
Now that we understand the message exchange requirements, we can proceed to define a service definition for the process service. When working with process modeling tools, the process service WSDL definition will typically be auto-generated for you. However, you also should be able to edit the source markup code or even import your own WSDL definition.
Either way, it is best to review the WSDL definition being used and revise it as necessary. Here are some suggestions:
There is less opportunity to incorporate the other steps from the service design processes described in Chapter 15. For example, applying the service-orientation principle of statelessness is difficult, given that process services maintain state so that other services don't have to.
Step 3: Formalize partner service conversations
We now begin our WS-BPEL process definition by establishing details about the services with which our process service will be interacting.
The following steps are suggested:
This information essentially documents the possible conversation flows that can occur within the course of the process execution. Depending on the process modeling tool used, completing these steps may simply require interaction with the user-interface provided by the modeling tool.
Step 4: Define process logic
Finally, everything is in place for us to complete the process definition. This step is a process in itself, as it requires that all existing workflow intelligence be transposed and implemented via a WS-BPEL process definition.
Step 5: Align interaction scenarios and refine process (optional)
This final, optional step encourages you to perform two specific tasks: revisit the original interaction scenarios created in Step 1 and review the WS-BPEL process definition to look for optimization opportunities.
Let's start with the first task. Bringing the interaction scenarios in alignment with the process logic expressed in the WS-BPEL process definition provides a number of benefits, including:
Secondly, spending some extra time to review your WS-BPEL process definition is well worth the effort. WS-BPEL is a multi-feature language that provides different approaches for accomplishing and structuring the same overall activities. By refining your process definition, you may be able to:
SUMMARY OF KEY POINTS |
---|
|
Introduction
Case Studies
Part I: SOA and Web Services Fundamentals
Introducing SOA
The Evolution of SOA
Web Services and Primitive SOA
Part II: SOA and WS-* Extensions
Web Services and Contemporary SOA (Part I: Activity Management and Composition)
Web Services and Contemporary SOA (Part II: Advanced Messaging, Metadata, and Security)
Part III: SOA and Service-Orientation
Principles of Service-Orientation
Service Layers
Part IV: Building SOA (Planning and Analysis)
SOA Delivery Strategies
Service-Oriented Analysis (Part I: Introduction)
Service-Oriented Analysis (Part II: Service Modeling)
Part V: Building SOA (Technology and Design)
Service-Oriented Design (Part I: Introduction)
Service-Oriented Design (Part II: SOA Composition Guidelines)
Service-Oriented Design (Part III: Service Design)
Service-Oriented Design (Part IV: Business Process Design)
Fundamental WS-* Extensions
SOA Platforms
Appendix A. Case Studies: Conclusion