cancel
Showing results for 
Search instead for 
Did you mean: 

UDF to fill in Conversationid and RefToMessageId in XI Message header

Former Member
0 Kudos

Hi ,

Currently I am using BPM and correlation to get the same conversation id in response message.

Understand that we can get the MessageID in Message mapping using UDF. Is there a way for us to UDF to fill in the conversationID and RefToMessageID during message mapping?

Please help.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Refer the foll link for getting\setting the RefToMessageId and conversationID paremeters.

http://help.sap.com/saphelp_nw70/helpdata/en/17/50d440e14f8431e10000000a1550b0/content.htm

Regards

Former Member
0 Kudos

Thanks Mark and Shiladitya,

I only know how to retrieve the Conversation id and message id. Not sure how to use the Message.setCorrelationId(). Can you share with me some sample code on how to fill in those value into Message Header?

String ConversationID;

String MessageID;

java.util.Map param = container.getTransformationParameters();

ConversationID = (String) param.get(StreamTransformationConstants.CONVERSATION_ID);

MessageID = (String) param.get(StreamTransformationConstants.MESSAGE_ID);

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Getting the reftomessageID should be the same


RefToMessID= (String) param.get(StreamTransformationConstants.REF_TO_MESSAGE_ID);

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark,

I am able to get the value from message header. I am looking for a way to fill in those value into response message header so that

I can to trace the message base on reference messageid or link all messages with same conversation id.

best Regards,

Philip

Former Member
0 Kudos

Hi Philip,

I have used the set property from an adapter module and it worked fine for me. However, I have not used this from a UDF.

The code that you yourself have mentioned, try using it in the request message mapping, in a UDF to see if gets set as per the requirement.

Regards

Former Member
0 Kudos

Hi Shiladitya,

The code i have is only getting the value but not setting the value. I do try Adapter module as well but not success.

I added AF_Modules/DynamicConfigurationBean before the adapter module.

Parameter Name Parameter Value

key.0 write http://sap.com/xi/XI/System/Messaging messageId

value.0 message.refToMessageId

write property message.refToMessageId from key (http://sap.com/xi/XI/System/Messaging)message.messageId with value null;

Other than above, i tried various options. None working.

write property message.messageId from key (http://sap.com/xi/XI/System/Messaging)messageId with value null;

read property message.messageId into key (http://sap.com/xi/XI/System/Messaging)message.refToMessageId with value 4e3a7fc0-b7c9-6efd-e100-00008939f399;

Appriciate if you can give some advise on how to perform the config.

Former Member
0 Kudos

Hi,

We had used the set method in a custom adapter module.

However, with the dynamic configuration module now available, think we can use it to set the value.

suppose your sender is file and you have filename property in ASMA checked, try using this configuration in your adapter to check if the value is set

key.0 write http://sap.com/xi/XI/System/File FileName

value.0 message.correlationId

key.1 read http://sap.com/xi/XI/System/Messaging refToMessageId

value.0 message.correlationId

check if the correlationId is populated with the sender filename to check if the configuration works.

Also, refer the foll link for the dynamicConfiguration module

https://help.sap.com/saphelp_nwpi711/helpdata/EN/44/748d595dab6fb5e10000000a155369/frameset.htm

Regards

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Here are the additional runtime constants which you can access via UDF

http://help.sap.com/saphelp_nwpi711/helpdata/en/78/b4ea10263c404599ec6edabf59aa6c/frameset.htm which includes reftomessageid and conversation id

Hope this helps,

Mark

Edited by: Mark Dihiansan on Aug 4, 2011 1:08 PM