on 07-15-2014 11:42 PM
The source file name (AAAA.BBBB.D1234.T1234) need to be renamed to SourceFileName.zip (AAAA.BBBB.D1234.T1234.zip). What would be file schema for this in the receiver channel. I tried various combinations but still not working. I would appreciate any help. Thank you in advance.
Hi, the simplest way is through ASMA using an UDF. Write an UDF to get source file name and modify it as per your need, later assign this modified file name to receiver file name using dynamic configuration,
check below blogs -
Combining three different aspects of PI in one shot - Process Integration - SCN Wiki
Regards,
Amol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lee, It's still doable. Check the second link I provided before. Using that you can acheive it for pass through scenario as well. Instead of step 1 (UDF) use ASMA checkbox in sender channel to retain the file name.
Combining three different aspects of PI in one shot - Process Integration - SCN Wiki
Yes, that's always my to go solution for such requirements.
Here is what you need to do -
1) What parameters you have put in for module "AF_Modules/DynamicConfigurationBean" ?, it should be same as what is there in step 2 of the wiki.
2) I see in variable substitution you have used a wrong reference value %f, it should be same as in step 3 of the wiki. (you may use FileName instead of order_no)
3) Don't check ASMA in receiver channel the reason is if you check ASMA in receuver channel the interface will apply source file name as it is to the receiver file name. Thus, leave it uncheck as also mentioned in the wiki.
If you follow the 2) and 3) step of the wiki as it is it should work for you, let me know otherwise.
- Amol
No Lee, The solution will work for filename.
What parameters did you put in adapter module. If you have provided the FileName there then it should work, Also ensure that sender file channel has ASMA checked for filename.
Can you attach screenshot of module section and also your sender comm. channel ASMA
Amol,
Here are the screen shots. As I wrote previously, system produces the file name as InterfaceName.zip, not SourceFileName.zip. Isn't below configuration indicates InterfaceName as file name? Where in this configuration says to create file name with source file name? What need to be changed to get the Target FileName as SourceFileName.zip. All I need to do is add .zip to the SourceFileName. Thanks.
Dont know why it's not working for you, You are getting interface name as your filename which looks to me that your interface name is not getting overwritten by source filename (this should have been taken care by module AF_Modules/DynamicConfigurationBean). Check in your rcvr channel logs entry do you see this module is being called there
Hi Lee,
I guess you can achieve your requirement by using shell script to rename the file.
configure your sender and receiver CC to create filename same as source file name. And create the shell script to rename the file with same source filename with extension ".zip" (sourcefilename.zip), call that script in Run operating system command after message processing in Receiver CC.
Regards,
Praveen
Praveen,
Sorry for the late reply. Yes, I had to create Unix script to rename the file after realizing that what Amol suggested is not working. I have created unix script and calling the script in comm channel about 4 years ago in another project. I was trying to avoid creating Unix script but that's what I end up doing.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.