Friday, October 31, 2014

How to Set MEC Outbound File Name Using Code

This article describes how to apply a unique name to the out-bound file that is generated from the MEC.

My requirement was to generate it as :


<SpecCode> +  [yyyyMMddhhmmss]

Retrieving the time spam inside the mapper has been described in this blog post.

First, the system date and time have to be generated and assigned to a string variable (as described in this blog post). Then call the below built in method inside a user-defined function (make sure that it's not inside a block that is controlled by logic). 


 setManifestInfo("map:M3_MEC_001", fileName);  

Then go to Partner Admin à Manage à Communication à Send Tab and select your channel configurations and click on edit. 




Now set the File name equally to what you have mentioned inside setManifestInfo method of your code, but with brackets. Set file extension to " - " (no spaces or quotation marks). Set the value of "Class to make file name unique" to MEC_InfixManifest.


Now trigger your inbound channel and check the output.

No comments:

Post a Comment