KB Article #157985
Flow output - File name is not preserved
Problem
- When running an inbound or outbound flow, the file name is not preserved in the output
- File name preservation option is correctly set in the partner delivery exchange
- File name appears to be correctly preserved in the Interchange message tracker
- In the output, file name appears as modified
Resolution
Interchange correctly applies file name preservation, but Integrator does not propose options to preserve file names: files are renamed during the Integrator processing, and original file name is not preserved.
It is possible to override the internal file name used by Integrator and to force the use of the original file name, resulting in file name preservation.
Prerequisite
The steps below will only work for "application delivery" and "application pickup" of FTP type.
For application delivery and application pickup of File System type, it is not possible to preserve the file name through the Integrator processing.
Steps for Inbound flow
- In Mapping Services, in the appropriate flow, add a "set" object that will modify the file attributes as follows :
setAttribute("FTPSendMethodOverride", "RemoteFileName", getAttribute("B2BXGIReceive_ProductionFilename"));
setAttribute("FTPSendMethodOverride", "Use_RemoteFileName", 1)
- Save and re-deploy the flow
Steps for Outbound flow
- In Mapping Services, in the appropriate flow, add a "set" object that will modify the file attributes as follows:
setAttribute( "B2BXGISend_ProductionFilename", getStringAttribute( "FTPReceiveInfo", "RemoteFileName" ))
- Save and re-deploy the flow.
Additional notes
The DML functions of the resolution steps use the "ProductionFilename" attribute: it contains the file name value just before the Integrator step and will reflect any modification made by the Message Handler or any other step before that.
A similar attribute is "ConsumptionFilename": it contains the file name value just before the Interchange step meaning that even if the file name is modified by the Message Handler or any other step, the "ConsumptionFilename" will not reflect those modifications.
If the "ConsumptionFilename" attribute needs to be used, please refer to the following articles:
For DML function use: https://support.axway.com/kb/158005
For MBC or JMC use: https://support.axway.com/kb/158165
In both cases, the file extension will be preserved. In case the file format is transformed, the string manipulation DML functions can be used to modify the file extension as desired.