Chapter 9. Integration into business processes 287
5. Define the correlation settings for onMessage branches of the Pick activity.
Set initialization to No. Figure 9-32 shows the settings for the
receiveEISReply branch of the Pick activity.
Figure 9-32 Correlation settings for the Pick activity
6. The reply message from the EIS component has to be forwarded to the
process by calling the appropriate operation at the process interface. We
have instrumented the MDB that receives the EIS reply with code to call the
process. Example 9-3 shows that code.
Example 9-3 Calling the receive operation at the process interface
public void onMessage(javax.jms.Message msg) {
StockOrderConfirmation confirmation;
try {
ObjectMessage m = (ObjectMessage) msg;
confirmation = (StockOrderConfirmation) m.getObject();
TraderSPInterfaceProxy tproxy = new TraderSPInterfaceProxy();
tproxy.receiveEISReply(confirmation);
} catch (JMSException e) {
e.printStackTrace();
} catch (WSIFException e) {
e.printStackTrace();
}
}
7. Deploy the process by selecting Enterprise Services → Generate Deploy
Code, JMS bindings for the process interface are generated. You can
generate the TraderSPInterfaceProxy class from these service descriptions.
8. Copy the XML schema definitions for the data types and the process WSDL
files to the project containing the MDB. In our example, the following files
have been selected:
– StockOrderBO.xsd, StockOrderConfirmation.xsd, StockOrderRequest.xsd
– TraderSPInterface.wsdl
– TraderSystemProcess_TraderSPInterface_JMS.wsdl