Background
Manipulating the out file name generated by the middle ware is a common scenario. By default file names are generated with a GUID (13a7a838-a706-4273-b190-9d58a79bf04e). It is more practical if the file name is human readable.
Solution
- In the Mapper add User function to change the file name. (Note: this function should the last function in the map)
- Add similar code to the function. This code set file name to the manifest information of the map.
1 2 3 4 5 6
String date = new java.text.SimpleDateFormat("yyMMdd").format(new java.util.GregorianCalendar().getTime()); String time = new java.text.SimpleDateFormat("HHmmss").format(new java.util.GregorianCalendar().getTime()); String fileName = "EDI_832_OUT_"+ date+time; setManifestInfo("map:FileName", fileName);
- Then, configure the relevant Send (in partner agreement) object to take the given file name.
- And you are done. !!!
No comments:
Post a Comment