cancel
Showing results for 
Search instead for 
Did you mean: 

JMSCorrelationID

Former Member
0 Kudos

Hi,

I have created communication channel called

CLIX_JMSQueue_Sync_In with a JMSCorrelationID "XI-Message- ID".

So, the existing mapping convert idoc to xml and the JMS-CorrelationID should also exist in the xml-file.

How can I get access to JMSCorrelationID in the mapping?

Is it possible??

Thanks.

Regards

Stefan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Stefan,

I believe what you want to do is possible with SP14. From there on you can access the DCJMSCorreleationID (that's the technical name in XI) in a mapping via the Adapter-specific properties of the JMS Adapter.

You can access this value in either a User-defined function...

DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create(
    "JMS",
    "DCJMSCorreleationID");

String value = conf.get(key);

the value will then contain the JMS Correlation ID with prefix 'ID:'

or in a Java Mapping (this is not sufficiently documented in the Online Help, but it basically works the same way)

we implemented a similar scenario to yours where we receive an XML message via JMS message queue and call a RFC and send the response back via JMS with the same correlation ID (this is done in an Integration Process).

hope that helps,

regards,

Peter

Former Member
0 Kudos

I think what you're asking is possible, but the way it was worded was hard for me to understand. Do you mean that you have created a channel to receive messages from a JMS adapter? And that the messages here should go through some sort of mapping? And that at a given point in the mapping you want to access a certain field in the message?

-Steve

-


If you find a post useful, please help keep the community going by setting a good example and rewarding the poster with points.

Former Member
0 Kudos

Hi Steve,

we have a learning management clix.

We send a message from clix to XI and we use the JMS-Adapter.

We use the IDoc-Adapter to send this message to a R3/System.

So, we want a reply message that goes from the R3/System to clix and that comprised the correlationID.

the messages also go through some mapping and I want correlation ID in the target structure field.

Thanks.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

I have just done some similar, e.g.

MQ -> XI -> BPM -> BAPI -> BPM -> XI -> MQ

It was very hard to convince XI to use the JMSMessageID for correlation and capture it to provide it back to MQ, as this is needed for MQ correlation.

Take a look at OSS Note 838894 second case. Is that what you want to do?

I guess you do not use a BPM as the IDOC is async.

Let me know if that is a similar issue.

Stefan

Former Member
0 Kudos

Hi Stefan,

thanks for your help.

but the note is not enabled, so I can't say if that is a similar sissue.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

as you firstname sounds like German, I still have a version of that OSS Note, it seems like they are working on it:

________________________________________________________________________

SAP-Hinweis Nr. 838894

________________________________________________________________________

Nummer 838894

Version 2 vom 09.05.2005

Status Für Kunden freigegeben

Gesetzt am 09.05.2005

Sprache DE

Mastersprache EN

Kurztext J2EE JMSAdapter: Korrelation, Sync/Async,

Async/Sync-Bridges

Verantwortlich SAP AG

Komponente BC-XI-CON-AFW-TAD

Technical Adapter (JMS, JDBC, RFC, SOAP,

________________________________________________________________________

Langtext

Symptom

Der Java Message Service (JMS) stellt eine asynchrone

Messaging-Infrastruktur dar. Er legt zwei Kommunikationsmodelle fest,

'publish&subscribe' und 'queueing'. Allerdings gibt er kein synchrones

Kommunikations-Pattern an. Er empfiehlt aber ein bestimmtes Verhalten

für die Implementierung eines Request/Response-Patterns durch die

Verwendung von 'ReplyQueue' und 'JMSCorrelationId'.

Es stellt sich die folgende Frage:

Wie kann dieses asynchrone Request/Response-JMS-Modell einem synchronen

Kommunikations-Pattern in XI zugeordnet werden?

Ein typisches Anwendungsszenario ist das Verbinden von SAP RFC mit JMS,

eine andere Methode wäre die Zuordnung von JMS zu einem WebService via

SOAP.

Es müssen grundsätzlich zwei Fälle unterschieden werden:

Fall 1. Sync/Async-Bridge: Eine synchrone Nachricht wird einer

asynchronen JMS-Request-Message zugeordnet und blockiert. Danach wird

die asynchrone JMS-Response-Message empfangen. Die Bridge ordnet diese

asynchrone Response der Rückgabestruktur des blockierenden synchronen

Aufrufs zu und kehrt zurück.

Fall 2. Async/Sync-Bridge: Eine asynchrone JMS-Request-Message wird

einem synchronen Aufruf zugeordnet. Wenn dieser zurückkehrt, werden die

Rückgabewerte einer asynchronen JMS-Response-Message zugeordnet.

Weitere Begriffe

XI Adapter Framework, BPE, BPM, ccBPM, AF, IS, Integration Server

Ursache und Voraussetzungen

Beratungsfrage

Lösung

Die Hauptaufgabe solcher Bridges besteht in der Korrelation (Fall 1)

oder im Setzen der Korrelationsdaten (Fall 2) der asynchronen

JMS-Message.

Wenn die Korrelationsdaten (ein Informationsteil innerhalb der Message,

der es ermöglicht, dass einem blockierenden synchronen Request eine

asynchrone Response zugeordnet wird) Teil der Applikations-Payload sind,

kann XI BPE für die Korrelation (Fall 1) und das Mapping verwendet

werden und/oder BPE kann zum Setzen der Korrelationsdaten verwendet

werden. Sowohl die auf der Sync/Async-BPE-Bridge basierte Payload als

auch das Mapping sind Standardfunktionen, die seit XI 3.0 SP4 und SP0

zur Verfügung stehen.

Dokumentation:

BPE-Sync/Asnyc-Bridge:

SAP Support Portal (help.sap.com) unter Documentation -> SAP NetWeaver

-> SAP Library -> SAP NetWeaver -> Process Integration -> SAP Exchange

Infrastruture -> Overview -> Connectivity -> Sync/Async Communication

Mapping:

SAP Help Portal (help.sap.com) unter Documentation -> SAP NetWeaver ->

SAP Library -> SAP NetWeaver -> Process Integration -> SAP Exchange

Infrastruture -> Design and Configuration Time -> Design -> Design

Mappings

Für einige Anwendungsszenarien müssen die Korrelationsdaten nicht in der

Payload sondern als Kopfinformation des verwendeten Protokolls (JMS und

XI in diesem Fall) gespeichert werden. In diesen Fällen ist es

notwendig, dass die JMS-Kopf-Korrelationsdaten den

XI-Kopf-Korrelationsdaten und umgekehrt zugeordnet werden.

Mit dem XI 3.0 SP12 wird dieses Korrelationsdaten-Mapping mit dem

XI-JMS-Adapter eingeführt:

JMS-Senderkanal: JMSMessageId, JMSCorrelationId oder ein Wert einer

spezifizierten JMS-String-Eigenschaft können der XI ConversationId oder

der XI MessageId zugeordnet werden. Der XI MessageId kann dies nur

zugeordnet werden, wenn die ID eine ISO-konforme GUID ist.

JMS-Empfängerkanal: Die XI MessageId, ConversationId oder RefToMessageId

kann der JMSCorrelationId oder einer spezifizierten JMS-String-

Eigenschaft zugeordnet werden.

Dokumentation:

JMS-Adapter:

SAP Help Portal (help.sap.com) unter Documentation -> SAP NetWeaver ->

SAP Library -> SAP NetWeaver -> Process Integration -> SAP Exchange

Infrastruture -> Runtime -> Connectivity -> Adapters -> JMS Adapter

Zusätzlich müssen Sie auf die empfangenen Korrelationsdaten reagieren

(Fall 1) oder die Korrelationsdaten in XI setzen (Fall 2).

Der Fall 1 "Kopf-basierte Sync/Asnyc Bridge" wird mit SP12 freigegeben

und kann mit Hilfe der standardmäßigen BPE-Sync/Async-Bridge

konfiguriert werden. Die einzige Änderung besteht in der Verwendung der

XI ConversationId für die Korrelation.

Der Fall 2 "Kopf-basierte Async/Sync Bridge" ist momentan noch nicht

freigegeben, da die XI ConversationId weder vom XI BPE noch vom Mapping

gesetzt werden kann.

________________________________________________________________________

Hinweis ist releaseunabhängig

________________________________________________________________________

Cheers

Stefan

Former Member
0 Kudos

Hi Stefan,

we have installed sp12 and I think on this weblog, iti is described how to solve my problem.

I'll try it.

/people/michal.krawczyk2/blog/2005/06/11/xi-how-to-retrieve-messageid-from-a-bpm

Regards

Stefan

Former Member
0 Kudos

I think you are looking for the message ID, if yes here is michal's blog.

/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions

write a simple java function and map it to target field.

Code:

String constant;

java.util.Map map;

map = container.getTransformationParameters();

constant = (String) map.get(StreamTransformationConstants.MESSAGE_ID);

return constant;

regards

Shravan