on 07-24-2008 3:36 AM
Hi
I want to use the JMS CorrelationID and MessageID in my mapping
Can anyone suggest me the UDF which i can use for the this
I want to get the DynamicConfiguration Values and then map it to the target structure
Rgds
Aditya
Hi Aditya,
Accessing the Runtime Constants by Using Keys (Special Case)
In certain exceptional and unavoidable cases, it may be necessary to use the keys to access the fields in the message header. This is always the case when you want to access the contents of the map by means of a variable. In the example below, a variable key key, which is to be used to read a field in the message header, is transferred to a user-defined function of a message mapping. You can only use a variable to access the map if the variable has the name of the key as its value and not the name of the string constant.
String headerField;
java.util.Map map;
// get runtime constant map
map = container.getTransformationParameters();
// get value of header field by using variable key
headerField = (String) map.get(key);
For example, to read the message ID from the message header, the variable key must have the value MessageId and not MESSAGE_ID.
Use the below link:
http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
Thanks
Farooq
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Farook,
Thnks for ure answer but there are only a specific keys avaliable.
I want to acess the DynamicParameters like the DCJMSMessageProperty0, DCJMSMessageID, DCJMSCorreleationID
i tried using the following code:
DynamicConfiguration conf = null;
DynamicConfigurationKey key = null;
String strNameSpace = "http:/"+"/sap.com/xi/XI/System/JMS";
String strParamName = "DCJMSCorreleationID";
conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
key = DynamicConfigurationKey.create(strNameSpace, strParamName);
String strRetVal = conf.get(key);
return strRetVal;
returns a null value all the time
This doesnt work.. it works for File Dynamic config i'm able to get the filename but it doesnt seems to be working for the JMS thing
i also used the
int iSize = conf.size();
int iSize2 = conf.size(strNameSpace);
to get the values present for dynamic config it gives 0
Rgds
Aditya
Try it this way:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS","DCJMSMessageProperty0");
String str = conf.get(key, fileName);
return str;
Dont forget to set the Adapter Specific Message Attributes in the Sender Channel
I thougth this problem was due to the patch level as well
But its not that way
in normal mapping mapping i'm using the same funtions as mentioned before and retriving the value but inside the BPM i hve a transformation step for which we are not able to access these parameters
i tried the method size(strNamespace) and it retured 0
Very strange whn we have set the Adapter specific attribute from Sender channel
Rgds
Aditya
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.