on 2019 Jan 16 4:35 AM
Hi Experts,
We have a scenario where a CSV file is picked up and sent to target SFTP server (pass through). Now the customer is requested to generate the notification once the file is sent. We had thought for below options
1. Add one more receiver component and trigger the email channel - Issue (The data is sent as an email attachment which is not required)
2. call email channel from receiver SFTP channel modules (Module process bean etc.) - It is also passing the message data (file data) which is not required
3. Pick the file from source and move to some temp folder, then create another scenario to move the to complete folder and trigger the notification.
Can you please suggest which is the best way among this or any other option to send the notification.
Thanks
Hi Harish,
I would prefer multi-mapping with two receivers as overall this simplifies a complex scenario. This will be easy to understand in future and easier to troubleshoot. Receiver1 will be SFTP adapter . Receiver 2 will be mail adapter. The message to mail adapter will be of below format
Set the following mail adapter attributes from,to and subject using a java mapping. You do not need to provide any attachment or body of the email. The subject will contain the name of the file and target SFTP server is up and running. In the java mapping you need to verify if the SFTP server used for receiver1 is up and running. You can check this code reference.
This ensures not only file has been sent but also sftp server is up and running to the business.
This multi-mapping will be through java mapping. You can follow this blog for reference.
The java mapping will write the payload to receiver1 (SFTP) and set attributes (from,to and subject) for receiver2 (mail).
If you do not want java mapping then you need custom adapter module doing the same purpose but it will be a complex code to do as you need to call the mail commuication channel or write entire code of mailing in java.
Point 3 (mentioned by you) is not a good option because it does not guarantee SFTP server is up and running or not , secondly troubleshooting of two phase scenario will be difficult.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
12 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.