on 05-01-2012 2:09 AM
Hello All,
We have a File to Proxy Scenario. The Expected File name Pattern is <ABC>_<DDMMYYYY>.txt.
Can we provide specific Date Pattern in the File Name instead of * ? The Placeholder * can consist of anything and hence the file in any case will be picked up by the channel.
This means ABC_DEF.txt or <ABC>_H01012010 will also be picked.
The Requirement is to fail the scenario in the channel itself and trigger a standard alert instead of handling in Integration engine by other possible ways.
Please suggest.
Thanks,
Piyusha
currently, I dont think the file adapter is flexible enough to recognize patterns. So the only place-holder you can use is *
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks All.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Standard file adapter wont support this functionality,if you want to achive this requirement you have two options
1)Check condition in PI mapping level and read sender file name using dynamic configurtaion then compare name with your standard based on the result you can trigger email/send same file to FTP once again(if you want).
2)Using OS command srcipts can be achieve(not sure about stability).
Best Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>Can we provide specific Date Pattern in the File Name instead of * ?
Yes. It is possible. One possible approach is use UDF and create filename with the desired timestamp and write the filename using dynamic configuration.
Sample code for dynamic configuration.
import java.text.*;
import java.util.*;
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
Format formatter;
Date date = new Date();
formatter = new SimpleDateFormat('ddMMyyyy");
String fileName = formatter.format(date);
conf.put(key, "ABC_"+fileName);
You might also want to glance this sample link for further help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes you can put placeholder. In addition , You might also want to check exclusion list option in the file channel configuration and configure based on that to avoid the wild char pattern issues. Refer sap help link for the file channel. Please refer below
http://help.sap.com/saphelp_nw73ehp1/helpdata/en/44/556e3899c93677e10000000a114a6b/content.htm
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.