on 06-19-2015 7:39 AM
Hi,
I use SAP Netweaver Process Integration 7.31 SP16 Java Only. My problem is to fill Header Properties with variables defined and filled in a routing mapping.
I know, this example isn't practicable for the dynamic Routing. It is only an example to show the problems in combination with dynamic routing, variables and adapter specific message properties.
What do I do step by step:
- Message Mapping defined.
- Operation Mapping defined
- Process Integration Szenario defined
- Process Integration Scenario defined
- Integration flow with dynamic routing defined.
- Receiver channel with file access parameters and adapter spezific message properties defined
- The test is faulty.
What is the problem? Is it generally possible to use the adapter specific message attributes by a receiver-split (Dynamic Routing)? Can anybody help me.
Thanks,
Angelika
Hi Angelika,
For both Directory and FileName you need to use separate UDFs.
For Directory UDF you need to return corresponding Directory parameter, and for FileName UDF you need to return the corresponding FileName parameter at the end.
Note that, per UDF, you need to take only one input string FileName or Directory as input respectively including container (ofcourse).
Reward points if helpful.
Regards,
Souvik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Angelika,
Can you check whether you have enabled the ASMA in sender channel, as in your udf, you have written code first by checking the dynamic configuration object should not be NULL.
Please enable it in the sender channel or else remove the line conf!=null in the udf code if you don't want the first part.
Regards
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Angelika,
Can you please use the below udf and let me know if you still having issues.
DynamicConfiguration dc = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dck = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File",dynConfKey);
dc.put(dck,dynConfValue);
return dynConfValue;
Regards
Vishnu
Hi Angelika,
Can you please let me know why you are validating whether key exists for DynamicConfiguration or not in IF condition?
AFAIK, when we go for dynamicconfiguration mechanism, normally we don't put conditions for validation unless and until if it requires.
Can you just use the below code and check the outcome.
DynamicConfiguration dc = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dck = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File",dynConfKey);
dc.put(dck,dynConfValue);
return dynConfValue;
Please let me know if this doesn't cover your requirement.
Regards
Vishnu
Hi Angelika,
I checked your reply at 23rd, 8:19 AM one, where you said that you have changed the udf and still getting the error.
I can see in that udf, still you have used the below condition:
if(map.containsKey(StreamTransformationConstants.DYNAMIC_CONFIGURATION)
Hence, asking you to remove this line and its parenthesis and just use the below code and check the outcome.
DynamicConfiguration dc = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dck = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File",dynConfKey);
dc.put(dck,dynConfValue);
return dynConfValue;
The only difference in this udf code and your's is that I have removed the IF condition validation.
Please check this udf and let me know if you still having issues.
Regards
Vishnu
Hi Angelika,
One quick thing I can point here is when receiver communication channel is FTP, it does not involve any mapping, since you will have only file as a whole object getting transferred.
However, since the mapping is essential for dynamic configuration setting, so please use SOAP adapter on the receiver side in order to configure your channel. Also if you refer the error log it says "SOAP_http://sap.com/xi/XI/System" as the end point on the receiver side.
So please use SOAP adapter on the receiver side.
Hope this resolves your problem now after such a lengthy discussion
Regards,
Souvik
Do you have the same message id even after the dynamic receiver determination?
if you don't have any mapping needs, just write a java mapping to set the dynamic filename as explained in below wiki.
Dynamic file name for pass-through scenario - Process Integration - SCN Wiki
Hi Angelika,
I am not sure where it is going wrong.
Can you please try this, instead of using two graphical variables in the target side.
Directly Map the dynamic Filename mapping logic to the target node Receivers
Directly Map the dynamic Directory mapping logicto the target node Receiver
After doing this change, Test end to end and check the outcome.
Regards
Vishnu
Hi Angelika,
To trace out the issue, can you please do the following things(this is applicable for PI single stack version):
Enable Receiver Determination(MS) and Mapping Step(AM) LOGGING in the ICO as below:
After doing the above change in the ICO, please do end to end testing. From Message monitoring DataBase tab, open the message and there you can see Message attributes tab, then if the dynamic configuration udf has executed successfully, then you see the filename and directory against the file namespace accordingly. From this, we can trace the issue.
Please try this and let me know the outcome with screen shots, which can help us to narrow down the root cause.
Regards
Vishnu
Hi Angelika,
From this, we can tell that dynamic configuration mechanism did not work in routing mapping.
Not sure, is this a bug in PI.
One final thing, I can tell you to check is that, remove the graphical variables in the target side, and
Directly Map the dynamic Filename mapping logic to the target node Receivers
Directly Map the dynamic Directory mapping logicto the target node Receiver
Please test end to end.
Regards
Vishnu
Hi Angelika
No, what i mean is that remove the graphical variables(Dateiname,Verzeichnis) that you have defined at the target structure in the mapping. And do the mappings of filename logic and directory logic as below:
Map the dynamic Filename mapping logic to the target node Receivers
Map the dynamic Directory mapping logicto the target node Receiver
Can you try this and test end to end.
Regards
Vishnu
Your target structure in mapping is getting the FileName and DirectoryName, but the receiver channel is not able to detect the FileName. You can use Variable Substitution in Receiver FTP channel in Processing tab, but the Directory Name issue will be the next problem
Small mouth, big words from my end, but I feel its a small bug in PI if such a scenario is used.
Regards,
Souvik
Hi Angelika,
If you are okay to try for one final time, then please check as below:
1. I have added trace in the udf code, in this way, we can come to know whether our udf is executing or not in the runtime. Try the below udf in ESR.
AbstractTrace at = container.getTrace();
DynamicConfiguration dc = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey dck = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File",dynConfKey);
at.addInfo("Before putting dynamic" + dynConfKey + "with Value" + dynConfValue);
dc.put(dck,dynConfValue);
at.addInfo("After putting dynamic" + dynConfKey + "with Value" + dynConfValue);
return dynConfValue;
2. I would say to recreate the ICO once again, deleting the existing one...
Not sure, whether this resolves the issue or not, but I could say worth a try...
Regards
Vishnu
Hi Angelika,
Then it might be a bug in PI.
Can you check the message log, whether the trace which we added is coming in the log or not, from this we can come to know, our udf executed or not..
If you need to handle this in routing mapping itself, then go ahead with OSS message to SAP.
Since it is a pass through scenario, can you create a interface mapping having the same structures on both ends, and handle the dynamic configuration in message mapping...
Regards
Vishnu
Hi,
It seems all the settings are correct. Just move the FileName in the target Message Type above Directory, i.e., FileName should come before Directory.
Reason being in ASMA setting it checks the FileName first.
Regards,
Souvik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Angelika,
Can you check whether you have enabled the ASMA in sender channel, as in your udf, you have written code first by checking the dynamic configuration object should not be NULL.
Please enable it in the sender channel or else remove the line conf!=null in the udf code if you don't want the first part.
Regards
Vishnu
Hi Angelika,
In you udf, you have written code first by checking the dynamic configuration object should not be NULL.
Hence I am asking you to enable the ASMA setting in the sender channel.
If you don't want to do this, then please remove the IF condition line(only if(conf!=NULL) & if-parenthesis) in the udf, and do the testing.
Let me know if you still facing issues.
Regards
Vishnu
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.