Top Banner
7/29/2019 Correlate JMS Messages http://slidepdf.com/reader/full/correlate-jms-messages 1/33 11 How-to Guide SAP NetWeaver ‘04s How To… Correlate JMS Messages  Version 1.20 – Dec 2006  Applicable Releases: SAP NetWeaver ’04s SPS10 End-to-End Process Integration Enabling Application-to-Application Processes
33

Correlate JMS Messages

Apr 14, 2018

Download

Documents

Ashok Reddy
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 1/33

11

How-to Guide

SAP NetWeaver ‘04s 

How To…Correlate JMSMessages

 Version 1.20 – Dec 2006

 Applicable Releases:SAP NetWeaver ’04s SPS10End-to-End Process IntegrationEnabling Application-to-Application Processes

Page 2: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 2/33

 

© Copyright 2006 SAP AG. All rights reserved.

No part of this publication may be reproduced ortransmitted in any form or for any purpose without the

express permission of SAP AG. The information

contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its

distributors contain proprietary software components of 

other software vendors.

Microsoft, Windows, Outlook, and PowerPoint

 are

registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, OS/2, Parallel

Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400,

iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent

Miner, WebSphere, Netfinity, Tivoli, and Informix are

trademarks or registered trademarks of IBM Corporation

in the United States and/or other countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered 

trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame,

WinFrame, VideoFrame, and MultiWin are trademarks

or registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or

registered trademarks of W3C®, World Wide Web

Consortium, Massachusetts Institute of Technology.

 Java is a registered trademark of Sun Microsystems, Inc.

 JavaScript is a registered trademark of Sun Microsystems,Inc., used under license for technology invented and 

implemented by Netscape.

MaxDB is a trademark of MySQL AB, Sweden.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, and other

SAP products and services mentioned herein as well as

their respective logos are trademarks or registered 

trademarks of SAP AG in Germany and in several other

countries all over the world. All other product and 

service names mentioned are the trademarks of theirrespective companies. Data

contained in this document serves informational

purposes only. National product specifications may vary.

These materials are subject to change without notice.

These materials are provided by SAP AG and its affiliated 

companies ("SAP Group") for informational purposes

only, without representation or warranty of any

kind, and SAP Group shall not be liable for errors or

omissions with respect to the materials. The only

warranties for SAP Group products and services are those

that are set forth in the express warranty statements

accompanying such products and services, if any.

Nothing herein should be construed as constituting an

additional warranty.

These materials are provided “as is” without a warranty

of any kind, either express or implied, including but not

limited to, the implied warranties of merchantability,

fitness for a particular purpose, or non-infringement.

SAP shall not be liable for damages of any kind including

without limitation direct, special, indirect, or

consequential damages that may result from the use of 

these materials.

SAP does not warrant the accuracy or completeness of 

the information, text, graphics, links or other items

contained within these materials. SAP has no control

over the information that you may access through the

use of hot links contained in these materials and does not

endorse your use of third party web pages nor provide

any warranty whatsoever relating to third party web

pages.

SAP NetWeaver “How-to” Guides are intended to

simplify the product implementation. While specific

product features and procedures typically are explained 

in a practical business context, it is not implied that those

features and procedures are the only approach in solving

a specific business problem using SAP NetWeaver. Should you wish to receive additional information, clarification

or support, please refer to SAP Consulting.

Any software coding and/or code lines / strings (“Code”)

included in this documentation are only examples and 

are not intended to be used in a productive system

environment. The Code is only intended better explain

and visualize the syntax and phrasing rules of certain

coding. SAP does not warrant the correctness and 

completeness of the Code given herein, and SAP shall

not be liable for errors or damages caused by the usage of 

the Code, except if such damages were caused by SAPintentionally or grossly negligent.

Page 3: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 3/33

 

Table of Contents1  Introduction...............................................................................................1  

2  Scenarios..................................................................................................2 

2.1  BPM Sync/Async Bridge ..............................................................................2 2.2  BPM Async/Sync Bridge ..............................................................................4 

2.3  Sync/Async Bridge in the Receiver J MS Adapter ........................................6 2.4  Async/Sync Bridge in the Sender JMS Adapter...........................................6 

3   The Step-By-Step Solution .......................................................................7 

3.1  BPM Header-Based Sync/Async Bridge – J MS Response Referencing XIMessage ID of Request............................................................................................7 3.2  BPM Header-Based Sync/Async Bridge – J MS Response Referencing

 J MS Message ID of Request, prior to SPS07........................................................12 3.3  BPM Header-Based Sync/Async Bridge – J MS Response Referencing

 J MS Message ID of Request, as of SPS07...........................................................15 3.4  BPM Payload-Based Sync/Async Bridge...................................................16 3.5  BPM Header-Based Async/Sync Bridge – Correlation by using the XIConversation ID .....................................................................................................17 3.6  BPM Payload-Based Async/Sync Bridge – Correlation by using the XIConversation ID .....................................................................................................20 3.7  BPM Header-Based Async/Sync Bridge – Correlation by using the XIMessage ID............................................................................................................21 3.8  Sync/Async Bridge in Receiver J MS Adapter ............................................24 3.9  Async/Sync Bridge in Sender J MS Adapter...............................................27 

Page 4: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 4/33

 

1 Introduction

 The J ava Message Service (J MS) supports asynchronous communication only.

However, a request/response model similar to synchronous communication can beimplemented using a reply queue mechanism and JMS Correlation ID/JMS Message ID.

According to the J MS specification, the usage of the JMS Correlation ID is notmandatory. In the following scenarios the JMS Correlation ID is used. Therefore, as aprerequisite the J MS Provider has to support it.

 This guide shows how to map asynchronous J MS messages to synchronouscommunication. In general, two scenarios are considered:

• Sync/async

• Async/sync The purely asynchronous case is not addressed here. For SAP NetWeaver ’04s SPS09

and below, Business Process Management (BPM) as part of SAP NetWeaver ’04sExchange Infrastructure (SAP XI) has to be used, see chapters 2.1and 2.2. For SAPNetWeaver ’04s SPS10 and above, the J MS adapter provides modules that supportasync/sync and sync/async communication, see chapters 2.3and 2.4. In this case, BPMis not necessary.

 J MS header data can be assigned to XI header data, and the other way around, asfollows:

• In the J MS sender adapter, the XI Message ID can be defined as GUID, JMSMessage ID, JMS Correlation ID, orJMS Property. The resulting ID must complywith ISO-11578. Furthermore, the J MS Provider has to ensure that the ID isunique, otherwise message processing will fail. The XI Conversation ID can bedefined as JMS Message ID, JMS Correlation ID, JMS Property, or keptundefined (no value).

• In the J MS receiver adapter, the JMS Correlation ID can be defined as XIMessage ID, XI Reference ID (RefToMessageID), XI Conversation ID, or keptundefined.

In SAP NetWeaver ’04s SPS06 and higher, the send step within BPM has beenenhanced. While sending a message, it is possible to set the Conversation ID using XIheader fields, payload data, or constants.

In BPM, you can correlate the asynchronous J MS request and response messages by

referencing either the payload data or the header fields. Header field correlation uses theenhanced send step, as mentioned above, so it is supported in SAP NetWeaver ’04sSPS06 and higher only.

For the async/sync case, the J MS response message is correlated to the J MS requestmessage using header-based correlation, i.e. using the JMS Correlation ID. In theCommunication Channel, it is only possible to assign XI header fields to the JMSCorrelation ID, but no payload data (see below). However, if you want to put payloaddata into the JMS Correlation ID, you can do so by using the XI Conversation ID. Thereare two general mechanisms to configure the correlation within SAP XI, either using theXI Message ID or using the XI Conversation ID. The former is subject to restrictions withrespect to the XI Message ID, as mentioned above. The latter is supported in SAP

NetWeaver ’04s SPS06 and higher. See also SAP Note 838894.

Page 5: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 5/33

 

2 Scenarios

2.1 BPM Sync/Async Bridge

A synchronous request message is mapped to an asynchronous J MS request messageby means of the sync/async bridge functionality of BPM. The synchronous call waits untilthe J MS provider sends a reply that is mapped to the corresponding synchronousresponse.

 The J MS response message must be correlated to the J MS request message in order toassign both messages to the same BPM process instance. As stated above, thecorrelation can be established using either payload data or header fields. In general, theheader-based approach uses the XI Message ID to create a unique correlation. Sincethe Business Process Engine (BPE) works with different message instances, the XIMessage ID of the outbound message does not correspond to the XI Message ID thatdefines the correlation. Therefore, the approach does not work with the XI Message ID 

only, it requires the XI Conversation ID to be set within BPM.

Regarding the correlation on the J MS side, two possibilities are considered, eitherreferencing the XI Message ID or the JMS Message ID of the request message.

In SAP NetWeaver ’04s SPS07 and higher, the configuration of how to map theJMS Message ID to the XI Conversation ID has been changed. There is no needto use additional parameters, instead standard parameters are provided in thecommunication channels. However, the configuration settings made prior toSPS07 will still be supported. For further details, refer to SAP Note 838894.

For the payload-based correlation, the following settings have to be made (see

chapter 3.4):

• Define appropriate correlations in a BPM integration process.

For the header-based correlation with J MS response message referencing the XIMessage ID of the request, the following settings have to be made (see chapter 3.1):

• Define a correlation for the response’s message interface using the XIConversation ID as the correlation key.

• BPM integration process, send step (send J MS request):Activate the correlation using XI Message ID and set XI Conversation ID to XIMessage ID.

• BPM integration process, receive step (receive J MS response):Use the correlation that you activated in the send step.

• J MS receiver communication channel (to send J MS request to J MS Provider):SetJMS Correlation ID to the XI Conversation ID.

• J MS sender communication channel (to send JMS response to SAP XI):SetXI Message ID to GUID, and XI Conversation ID to JMS Correlation ID.

For the header-based correlation with J MS response message referencing the JMSMessage ID of the request, the following settings have to be made if using SAPNetWeaver ’04s SPS06 and below (see chapter 3.2):

• Define a correlation for the message interface of the response using XIConversation ID as correlation key.

• BPM integration process, send step (send J MS request):

Page 6: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 6/33

 

Activate the correlation using XI Message ID, and set XI Conversation ID to XIMessage ID.

• BPM integration process, receive step (receive J MS response):Use the correlation that you activated in the send step.

• J MS receiver communication channel, correlation settings:

SetJMS Correlation ID to XI Conversation ID.• J MS receiver communication channel, additional J MS parameters:

Maintain additional J MS parameter with Name XI MapConver sat i onI Dand

Value t rue to store a mapping between the request’s JMS Message ID and XI

Conversation ID.

• J MS sender communication channel, correlation settings:SetXI Message ID to GUID, and XI Conversation ID to JMS Correlation ID.

• J MS sender communication channel, additional J MS parameters:Maintain additional J MS parameter with Name XI Conver sat i onI D, and Value 

XI _ COR_XI J MSMAP to map the response’s JMS Correlation ID (referencing therequest’s JMS Message ID) to the original XI Conversation ID.

For the header-based correlation with J MS response message referencing the JMSMessage ID of the request, the following settings have to be made if using SAPNetWeaver ’04s SPS07 and above (see chapter 3.3):

• Define a correlation for the message interface of the response using XIConversation ID as correlation key.

• BPM integration process, send step (send J MS request):Activate the correlation using XI Message ID, and set XI Conversation ID to XIMessage ID.

• BPM integration process, receive step (receive J MS response):Use the correlation that you activated in the send step.

• J MS receiver communication channel, correlation settings:

SetJMS Correlation ID to XI Conversation ID, and tick the StoreJMSCorrelationId of request indicator in order to save the JMS Correlation ID of the request.

• J MS sender communication channel, correlation settings:SetXI Message ID to GUID, and XI Conversation ID to Stored JMSCorrelationIdof request.

Page 7: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 7/33

 

2.2 BPM Async/Sync Bridge

An asynchronous J MS request message is mapped to a synchronous request message.Within the BPM integration process, a synchronous call is executed. The return of thesynchronous call is mapped to an asynchronous J MS response message.

Here, no correlation within the BPM integration process is required. Correlation isestablished by means of the JMS Correlation ID header field of the J MS responsemessage that references the J MS request message.

As mentioned above, there are two general approaches for configuring the correlation

within SAP XI, either using the XI Message ID or using the XI Conversation ID.

For the header-based configuration via XI Message ID, the following settings have to bemade (see chapter 3.7):

• J MS sender communication channel (to send J MS request to SAP XI):Set the XI Message ID to JMS Message ID (or optionally to JMS Correlation ID).

• BPM integration process:Set the receiver from mode of asynchronous send step (to send J MS response)to Response to Message, and reference the request message.

• J MS receiver communication channel (to send J MS response to JMS Provider):SetJMS Correlation ID to XI Reference ID.

Page 8: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 8/33

 

For the header-based configuration using the XI Conversation ID, the following settingshave to be made (see chapter 3.5):

• J MS sender communication channel (to send J MS request to SAP XI):Set the XI Message ID to GUID and XI Conversation ID to JMS Message ID (oroptionally to JMS Correlation ID).

BPM integration process:Set the XI Conversation ID of send step (to send J MS response) to the XIConversation ID of request message.

• J MS receiver communication channel (to send J MS response to J MS provider):SetJMS Correlation ID to XI Conversation ID.

 To assign payload data of the request message to the JMS Correlation ID, the followingsettings have to be made (see chapter 3.6):

• In BPM integration process:Set the XI Conversation ID of send step (to send J MS response) to equal theappropriate payload field of request message.

• J MS receiver communication channel (to send J MS response to JMS Provider):

SetJMS Correlation ID to XI Conversation ID.

In the case of the purely asynchronous case, a J MS request message is sentasynchronously to a receiver by using SAP XI. The reply has to be correlated to the J MSrequest. The implementation is similar to the async/sync case above. Even in this case,BPM is mandatory for the same reason as stated above: currently, it is not possible toassign payload data to the JMS Correlation ID within a communication channel.

Page 9: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 9/33

 

2.3 Sync/Async Bridge in the Receiver JMS Adapter 

A synchronous call is mapped to asynchronous J MS request/response messages bymeans of the module processor in the J MS adapter. In the module processor of the JMS

receiver adapter, the synchronous message is converted to an asynchronous requestmessage and sent to a J MS queue. The synchronous call waits until the J MS providersends a reply. In the module processor of the J MS sender adapter, the asynchronousresponse message is passed to the module processor of the receiver adapter, and sentas synchronous response of the waiting synchronous request.

 The following settings have to be made (only supported as of SAP NetWeaver ’04sSPS10 and above, see chapter 3.8):

• J MS receiver communication channel, correlation settings:SetJMS Correlation ID to XI Message ID, and tick the Store JMSCorrelationId of request indicator in order to save the JMS Correlation ID of the request.

• J MS receiver communication channel, module settings:Add module RequestOnewayBean to convert the synchronous request messageto an asynchronous request message. Add module WaitResponseBean to waitfor response message.

• J MS sender communication channel, correlation settings:SetXI Message ID to GUID, and XI Conversation ID to Stored JMSCorrelationIdof request.

• J MS sender communication channel, module settings:Add module NotifyResponseBean to pass response message to the moduleprocessor of the receiver adapter.

2.4 Async/Sync Bridge in the Sender JMS Adapter 

Asynchronous J MS request/response messages are mapped to a synchronous call bymeans of the module processor in the J MS adapter. In the module processor of thesender J MS adapter, the asynchronous request message is converted to a synchronousrequest message. The synchronous response message is converted to an asynchronousresponse message, and sent to the receiver J MS adapter.

 The following settings have to be made (only supported as of SAP NetWeaver ’04sSPS10 and above, see chapter 3.9):

• J MS sender communication channel, correlation settings:

SetXI Message ID to GUID, and XI Conversation ID to JMS Message ID.• J MS sender communication channel, module settings:

Add module RequestResponseBean to convert the asynchronous requestmessage to a synchronous request message. Add moduleResponseOnewayBean to convert the synchronous response message to anasynchronous response message, and to send response to the receiver adapter.

• J MS receiver communication channel, correlation settings:SetJMS Correlation ID to XI Conversation ID.

Page 10: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 10/33

 

3 The Step-By-Step Solut ion

3.1 BPM Header-Based Sync/Async Bridge – JMS Response ReferencingXI Message ID of Request

1. Start the Integration Process Editorin the Integration Builder (Design).

Create a receive step of modeOpens S/A Bridge to open thebridge.

2.  Create a Correlation.

 Assign the XI Conversation ID of the J MS response message to thiscorrelation.

3.  Create an asynchronous send step

to send the J MS request message.

 Assign the XI Message ID of the J MS request to both theConversation ID and the correlation.

Page 11: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 11/33

 

4.  Create a receive step to fetch the J MS response message.

Use the correlation createdbeforehand. It is filled by the XI

Conversation ID of the J MSresponse message.

5.  Create a send step of mode ClosesS/A Bridge to close the bridge, andrefer to the receive step that openedthe bridge.

6. Start the Integration Builder (Configuration).

In the receiver communicationchannel, set the JMS Correlation ID to the XI Conversation ID.

Page 12: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 12/33

 

7. In the sender communicationchannel, set the XI Conversation IDto the JMS Correlation ID.

8. In the following, the settings areverified using different monitoringtools.

Run the scenario by calling theprocess synchronously.

Enter the Business Process Engine(BPE) Monitoring (transactionSXMB_MONI_BPE), and check the

correlation. It must contain the XIMessage ID of the J MS requestmessage.

9. In the BPE Monitoring, check theConversation ID of the J MS requestmessage.

Page 13: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 13/33

 

10. Start the Runtime Workbench (RWB) and navigate to MessageMonitoring for the J 2EE AdapterEngine.

In the Audit Log of the J MS requestmessage, the correlation-relatedinformation is displayed.

11. Start the J MS Broker. Here,SonicMQ is used.

For the received message in thequeue, the JMS Correlation ID contains the XI Message ID of the

 J MS request message.

12. Before sending the J MS responsemessage to the reply queue,maintain the JMS Correlation ID accordingly. Here, the JMSCorrelation ID of the J MS requestmessage is used (references the XIMessage ID).

10 

Page 14: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 14/33

 

13. In BPE Monitoring you can see thatthe J MS response message iscorrelated to the appropriatebusiness process instance.

11 

Page 15: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 15/33

Page 16: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 16/33

 

16. Maintain the Sender CommunicationChannel as follows:

Set the XI Conversation ID to theJMS Correlation ID.

Select the Set Additional JMSParameters or Replace DefaultSettings indicator and maintain theparameter with Name XI Conver sat i onI D, and Value 

XI _ COR_XI J MSMAP.

17. Run the scenario as describedabove.

For the outbound J MS requestmessage, the J MS Adapter storesthe mapping between the XIConversation ID and the JMSMessage ID.

18. Before sending the responsemessage to the reply queue,maintain the JMS Correlation ID accordingly. Here, the JMS MessageID of the J MS request message isused.

13 

Page 17: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 17/33

 

19. For the incoming J MS responsemessage, the JMS Adapter mapsthe JMS Correlation ID (referencingthe request’s JMS Message ID) tothe XI Conversation ID using the

stored mapping.

As can be seen in MessageMonitoring (transactionSXMB_MONI), the XI ConversationID contains the request’s XIMessage ID that is used for thecorrelation within BPM.

20. If the J MS application sends back a

response in which the J MScorrelation ID is not set to the J MSmessage ID of the original request,the XI conversation ID cannot bedetermined. Instead, the J MScorrelation ID is set as the XIconversation ID; however, the BPMprocess is then not able to assignthe response correctly.

14 

Page 18: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 18/33

 

3.3 BPM Header-Based Sync/Async Bridge – JMS Response ReferencingJMS Message ID of Request, as of SPS07

Apart from the configuration of the receiver and sender communication channels, all

settings keep unchanged compared to variant 3.2.

21. Start the Integration Builder (Configuration).

Maintain the ReceiverCommunication Channel as follows:

Set the JMS Correlation ID to the XIConversation ID.

Set the Store JMSCorrelationId of request indicator in order to save theJMS Correlation ID of the requestmessage.

22. Maintain the Sender CommunicationChannel as follows:

Set the XI Conversation ID to StoredJMSCorrelationId of requestreferring to the saved JMSCorrelation ID of the requestmessage.

15 

Page 19: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 19/33

 

3.4 BPM Payload-Based Sync/Async Bridge

23. Start the Integration Process Editor

within the Integration Builder (Design).

For the send step of the J MSrequest message, maintain a BPMcorrelation using appropriatepayload data.

24. For the JMS response message,maintain the BPM correlation usingappropriate payload data.

16 

Page 20: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 20/33

 

3.5 BPM Header-Based Async/Sync Bridge – Correlation by using the XIConversation ID

25. Start the Integration Process Editorin the Integration Builder (Design).

For the send step of the J MSresponse message, set theConversation ID to equal theConversation ID of the J MS requestmessage.

26. Start the Integration Builder (Configuration).

In the sender communicationchannel, set the XI Conversation ID to the JMS Message ID.

(Alternatively, you can set the XI

Conversation ID to the JMSCorrelation ID).

17 

Page 21: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 21/33

 

27. In the Receiver CommunicationChannel, set the JMS Correlation ID to the XI Conversation ID.

28. Send a request message to thesender queue.

(Alternatively, if you have chosenJMS Correlation ID in the SenderCommunication Channel above,maintain a unique J MS CorrelationID before sending the requestmessage to the sender queue)

18 

Page 22: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 22/33

 

29. The XI Conversation ID referencesthe JMS Message ID of the JMSrequest message.

30. For the message in the receiverqueue, the JMS Correlation ID references the JMS Message ID of the J MS request message.

19 

Page 23: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 23/33

 

3.6 BPM Payload-Based Async/Sync Bridge – Correlation by using the XIConversation ID

31. Start the Integration Process Editorin the Integration Builder (Design).

For the send step of the J MSresponse message, set theConversation ID to equal anypayload field of the J MS requestmessage.

32. Start the Integration Builder (Configuration).

In the Sender CommunicationChannel, you don’t need to map any

 J MS header fields to the XIConversation ID. Choose No Value.

33. In the Receiver CommunicationChannel, set the JMS Correlation ID to the XI Conversation ID.

20 

Page 24: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 24/33

 

3.7 BPM Header-Based Async/Sync Bridge – Correlation by using the XIMessage ID

34. Start the Integration Process Editorin the Integration Builder (Design).

For the send step of the J MSresponse message, set the mode toResponse to Message and refer tothe J MS request message.

35. Start the Integration Builder (Configuration).

In the Sender CommunicationChannel, set the XI Message ID tothe JMS Correlation ID.

(Alternatively, you can set the XIMessage ID to the JMS Message ID) In any case, you have to ensure thatthe XI Message ID is unique andcomplies with ISO-11578. Otherwisemessaging fails.

21 

Page 25: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 25/33

 

36. In the Receiver CommunicationChannel, set the JMS Correlation ID to the XI Reference ID (RefToMessageID).

37. For the message in the senderqueue, enter a valid GUID (seeabove) in the JMS Correlation ID.

38. Start the RWB and navigate toMessage Monitoring for the J 2EEAdapter Engine.

In the Audit Log of the J MS

response message, you can see thecorrelation rule, the correlatedproperty, and the correlation value.

22 

Page 26: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 26/33

 

39. For the message in the receiverqueue, the JMS Correlation ID references the XI Message ID, andthe JMS Correlation ID of the J MSrequest message, respectively.

23 

Page 27: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 27/33

 

3.8 Sync/Async Bridge in Receiver JMS Adapter 

40. Start the Integration Builder 

(Configuration).

Maintain the ReceiverCommunication Channel as follows:

Set the JMS Correlation ID to the XIMessage ID.

Set the Store JMSCorrelationId of request indicator in order to save theJMS Correlation ID of the requestmessage.

41. Switch to tab Module to addrespective modules in the moduleprocessor in the sequence as shownin figure on the right side.

AddAF_Modul es/ Request OnewayBean module first in the modulesequence.

For theAF_Modul es/ Request OnewayBean, maintain parameter with name

passThr ough, and value t rue.

 The synchronous request messageis converted to an asynchronousrequest message, and passed to thenext module in sequence.

AddAF_Modul es/ Wai t ResponseBean module last in the module sequence. 

 The module waits for a responsemessage.

24 

Page 28: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 28/33

 

42. Maintain the Sender CommunicationChannel as follows:

Set the XI Conversation ID to StoredJMSCorrelationId of request

referring to the saved JMSCorrelation ID of the requestmessage.

43. Switch to tab Module to addrespective modules in the moduleprocessor in the sequence as shownin figure on the right side.

Replace the Cal l SapAdapt er  module by theAF_Modul es/ Not i f yResponseBe

an module.

 The asynchronous responsemessage is passed to theWaitResponseBean of the receiverchannel.

44. Start the RWB, and navigate to the

Message Monitoring for the J 2EEAdapter Engine.

According to the Audit Log for thesynchronous request message, themessage processing is as follows:

• In the RequestOnewayBean module the synchronous requestmessage is converted to anasynchronous message.

• The asynchronous J MS request

message is correlated to therespective XI message.

• The WaitResponseBean moduleis called to wait for theasynchronous responsemessage. Upon receipt, themessage is sent as synchronousresponse to the waitingsynchronous request message.

25 

Page 29: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 29/33

 

45. The Audit Log for the asynchronousresponse message indicates that theNotifyResponseBean module hasbeen called to pass the message tothe module processor of therespective receiver channel.

26 

Page 30: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 30/33

 

3.9 Async/Sync Bridge in Sender JMS Adapter 

46. Start the Integration Builder 

(Configuration).

In the J MS Sender CommunicationChannel, set the XI Conversation ID to the JMS Message ID.

47. Switch to tab Module to addrespective modules in the moduleprocessor in the sequence as shownin figure on the right side.

AddAF_Modul es/ Request ResponseBean module before the

Cal l SapAdapt er module.

For theAF_Modul es/ Request ResponseBean, maintain parameter with name

passThr ough, and value t rue.

 The asynchronous request messageis converted to a synchronousrequest message, and passed to thenext module in sequence, hereCal l SapAdapt er .

AddAF_Modul es / ResponseOnewayBean module after the

Cal l SapAdapt er module.

For theAF_Modul es / ResponseOnewayBe

an, maintain parameters as follows:

• name r ecei ver Par t y with

value <name of r ecei verpar t y> 

• name r ecei ver Servi ce withvalue <name of r ecei ver

27 

Page 31: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 31/33

 

ser vi ce> 

• name r ecei verChannel with

value <name of J MSr ecei ver channel > 

 The synchronous responsemessage is converted to anasynchronous message, and passedto the specified receiver channel.

48. In the J MS Receiver CommunicationChannel, set the JMS Correlation ID to the XI Conversation ID.

49. Start the RWB, and navigate to theMessage Monitoring for the J 2EEAdapter Engine.

 The Audit Log for the requestmessage indicates that the

RequestResponseBean module hasbeen called, and a synchronousmessage has been passed to themessaging system.

50. The Audit Log for the responsemessage indicates that theResponseOnewayBean module hasbeen called.

28 

Page 32: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 32/33

 

29 

Page 33: Correlate JMS Messages

7/29/2019 Correlate JMS Messages

http://slidepdf.com/reader/full/correlate-jms-messages 33/33

 

http://service.sap.com/nw2004s-howtoguides