266 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
Figure 9-13 depicts the WSDL editor showing the interface definition for the
Trader system process.
Figure 9-13 WSDL editor showing the Trader system process interface
9.3 Developing business processes
This section describes how to develop a BPEL process using WebSphere Studio
Application Developer Integration Edition. It first describes the design of the
process and then explains in detail how the BPEL editor of Integration Edition
was used to visually construct the process. Finally, it discusses process
deployment and configuration of WebSphere Business Integration Server
Foundation.
9.3.1 EIS integration into BPEL processes
In our approach for EIS integration, EIS services are invoked from system
processes. In the system process, the decision is made regarding how the
service is called. If the service invocation requires data transformation, an EIS
Chapter 9. Integration into business processes 267
component might be called. In case a remote service has to be invoked, a JMS
binding can be used to communicate with the service.
The following sections describe how to develop the trader system process that
we designed in 6.4.1, “The stock trade scenario” on page 137.
In this system process we demonstrate the invocation of the EIS functions using
three different integration styles:
???? We directly invoke the EIS service using the IMS bindings that we have
created with the WebSphere Studio Application Developer Integration Edition
tools.
???? We invoke the EIS component that we have developed using direct EJB calls,
meaning that we call a local EIS component.
???? We invoke the EIS component using sender beans and Message Driven
Beans, means that we use JMS technology to call a remote EIS component.
Each of these integration styles has specific characteristics that affect the
development of the process. Calling the IMS service directly requires that data
transformations are performed in the process. Data transformation can be
implemented in the BPEL process either by using Transformation nodes or by
coding Java Snippets.
If the EIS component is invoked by JMS messages, the system process includes
a send activity to send the message. The BPEL process may also include a pick
activity to receive the confirmation message. because the process has to wait for
the message, the process has to be marked as interruptible process. This means
the process itself has to be triggered by using JMS. Introducing a pick activity
also requires the configuration of a correlation set to distinguish the trigger and
initialize messages for the process from reply messages sent by the EIS
component.
9.3.2 Developing the BPEL process
This section describes the steps to create the trader system process in detail. It
first explains how to create a service project and the basic outline of the process.
Then, it describes the creation of service bindings that are used in the BPEL
process. Finally, it demonstrates the use of the BPEL editor by successively
adding the EIS service invocations to the process.
Creating a service project and a BPEL process
When you start WebSphere Studio Application Developer Integration Edition, the
Business Integration perspective opens by default. The Business Integration
268 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
perspective provide all tools that you need to create BPEL processes and service
bindings.
To create a new Service project:
1. Select File
New Service Project form the main menu bar.
The project appears in the Services view on the top-left of the panel. Stacked
behind the Services view, you find a Package Explorer view and a J2EE
hierarchy view that you can use to browse the projects.
2. At this point you might wish to import all XML schemas and WSDL definitions
that you have created when designing the BPEL process and services. Import
files by highlighting the project and selecting File
Import.
To create a new BPEL process:
1. Select File
New Business Process from the menu bar.
2. Enter a package name and the name of the business process and click Next.
3. In the Choose process type window, specify the type of the process.
Selecting the WSAD-IE v5.0 Business Process option leads to the generation
of a business process that is compliant to the previous version of WebSphere
Studio Application Developer Integration Edition. A BPEL-compliant process
is created if you select the Flow-based BPEL Process option or the
Sequence-based BPEL Process option. We prefer to use a flow-based style.
4. Click Finish.
The wizard creates a number of artifacts that appear in the Services and
Package Explorer view and the BPEL editor opens. In Figure 9-14 on page 269
the BPEL editor shows the initial trader system process. Because in most cases
you define a specific interface for process, you can delete the generated partner
link and input variable. Right-click the partner link in the BPEL editor and select
Delete. Then delete the input variable.
We have described how to create the WSDL interface of the trader system
process in 9.2.3, “Designing business processes and services” on page 260. To
specify the process interface, a new partner link has to be created that refers to
the WSDL definition of the process interface.
Chapter 9. Integration into business processes 269
Figure 9-14 BPEL editor
To create a new partner link:
1. Go to the Partner Links section of the BPEL editor panel and click the plus
sign (+).
2. Rename the partner link (for example, enter Process). If you click the new
partner link, the Attributes view for that element appears in the BPEL editor.
3. Go to the Implementation tab of the Attributes view and click New.
4. In the New Partner Link Creation wizard that opens, enter a name for the First
Role (for example, ProcessRole). Make sure that the One Role option is
checkmarked.
5. You can now select the port type for the role. Click Browse and go to the
WSDL definition of the process interface that you have created.
6. Select the port type that is defined in the WSDL file and click OK. Click OK to
finish the New Partner Link Creation wizard.
270 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
7. The port type appears in the Implementation tab. The role that we have
defined is a role that our business process provides to external clients.
Specify this role by clicking <--> in the Implementation tab.
Figure 9-15 shows the partner link for the trader system process.
Figure 9-15 Process partner link for the Trader system process
While the Receive node of the BPEL process represents the inbound operation
for the process, the Reply node represents the outbound operation. We also
have to set operation and message for both nodes to specify the process
interface. To set operation and message:
1. Select the Receive node and go to the Implementation tab.
2. Use the Partner Link drop-down to select the partner link (for example,
Process). Because we have defined only one port type and only one
operation, the fields below the drop-down are set correctly.
3. To create the inbound message in the BPEL process click New to the right of
Request. Enter the name of that variable (for example ProcessInput), and
click OK.
Figure 9-16 shows the resulting Implementation tab for the Receive node.
Figure 9-16 Operation and variable settings for the Trader receive node
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset