Chapter 9. Integration into business processes 281
3. Specify the name in the Description tab of the BPEL editor, for example
receiveEISReply. Figure 9-24 depicts the resulting BPEL process.
Figure 9-24 Integration of the EIS component into the BPEL system process using JMS
4. For the Invoke activity, specify the partner link, port type, and operation in the
Implementation tab of the Attributes view. Figure 9-25 on page 282 shows the
selected operation and the created input and out variables for the
SendEISRequest activity.
282 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
Figure 9-25 Invoke activity specification for calling the JMS sender bean
5. Set up the input variable for the sender bean invocation using an Assign
activity. Figure 9-26 shows the mapping of the process input variable to the
input for the sender bean call .
Figure 9-26 Mapping of the sender bean input variable
Introducing a Pick activity means that the process must stop until the reply
message is received. You specify that a process is interruptible and long-running
in the Server tab of the Attributes view for the process. Make sure to select the
process by highlighting the icon with the process name on the top of the BPEL
editor panel. Go to the Server tab and checkmark the Process is long-running
option, as depicted in Figure 9-27 on page 283.
Chapter 9. Integration into business processes 283
Figure 9-27 Setting the long-running option for the process
The BPEL process receives the messages that gets processed in the branches
of a Pick node by a method call at the process interface, meaning that you also
have to define a specific operation at the interface. Later the MDB that receives
the reply message from the EIS component calls this message.
To define a specific operation at the interface:
1. Open the WSDL interface definition for the process. In our example the name
of the file is TraderSPInterface.wsdl.
2. Go to the Port Types section and highlight the port type already defined, for
example TraderSPInterface.
3. Right-click and select Add Child
operation. Enter the name of the
operation, for example receiveEISReply, and click OK.
4. Specify an input part for the operation by right-clicking the operation and
selecting Add Child
Input.
5. Set the message type for the part. In our example, we can reuse the response
message that we have already defined (invokeTraderResponse). This is the
reply message that the EIS component sends back to the MDB. Figure 9-28
on page 284 shows the extended process interface definition.
284 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
Figure 9-28 Trader system process interface including the receiveEISReply operation
The operation has now to be selected in the onMessage branch that we
introduced earlier. Highlight the branch in the BPEL editor and go to the
Implementation tab. From the drop-down menu, select the process partner link
and the operation that we defined in the previous steps. A new process variable
is not required in our example. Because we have selected for the same message
type as for the process output, we can select the process output variable from
the drop-down to the right of the Request.
In a BPEL process engine, typically, a number of process instances of a specific
type are active in parallel. They are either running or they are suspended
because they are waiting for a message to arrive. The process engine has to
select the right process instance, if a message is received from a client that
called the receive operation at the process interface. BPEL supports the
correlation of message and process instance by correlation sets. A correlation
set can contain a number of attributes of messages that are sent by service
invocations and that are received at the process interface.
Chapter 9. Integration into business processes 285
To create a correlation set:
1. Click the plus sign (+) to the right of Correlation Sets in the BPEL editor.
2. Rename the correlation set (for example, ReceiveEISReply). You define the
attributes that are contained in the correlation set in the Properties tab of the
Attributes view. In our example, we only use the Account attribute of the
StockOrderBO to correlate the reply message that is sent by the EIS
component and the process instance.
3. Click New in the Properties tab to create a new property.
4. In the Create Message Property window enter the name (for example,
account). Select the Built-in Type option and select xsd:String, because the
Account attribute is a String.
Aliases describe the mapping of the property to message parts that have to be
used for correlation. To create aliases:
1. Click New. Select the WSDL file in which the messages are defined (for
example, the process interface definition TraderSPInterface.wsdl).
2. Select the message and part and click OK. Figure 9-29 shows the Create
Property Alias wizard.
Figure 9-29 Create property alias wizard
Figure 9-30 on page 286 depicts the completed property definition for the
correlation set that we have defined in the sample process.
..................Content has been hidden....................

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