cancel
Showing results for 
Search instead for 
Did you mean: 

Create empty file with same name to send to receiver for each file from sender

Tyler_Tondevold
Discoverer
0 Kudos
216

Using BTP CI, I want to generate an empty file for each file picked up from the SFTP sender and sent to the receiver. These files will need to be sent to the receiver as well. These files will have the same name as the original file with a prefix of "CHK_". How can this be accomplished?

nageshrao
Product and Topic Expert
Product and Topic Expert

You can take inspiration from the below design. 

nageshrao_2-1722829855105.png

Steps
1 - Standard SAP Message Header - "CamelFileName" is set by sender SFTP adapter which contains the source filename.
2 - Use a Sequential Multicast.
2a - 1st Branch - Write the target actual file to receiver with mapping if required. 
2b - 2nd Branch - Use this to write the Flag(Empty) file. Use a content modifier and set the body blank and overwrite message Header "CamelFileName" with an expression value - CHK_${header.CamelFileName} as below

nageshrao_1-1722829708863.png

3 - Target SFTP Receiver Adapter must not have anything update in Filename section as target filename would be dynamically derived from header - "CamelFileName".

Accepted Solutions (0)

Answers (1)

Answers (1)

Tyler_Tondevold
Discoverer
0 Kudos

Thanks for the instructions. This worked perfectly.