on 06-18-2019 1:14 PM
Hi all,
In CPI we connect to an SFTP environment with folders input, output and error. The files needed processing are set in the input folder and upon succesful processing we replace them to the output folder. However, in case of an exception we would like move the file to the error folder.
My question is whether this is possible: the SFTP adapter only has a post-processing action and lacks a post-exception action.
The only solution I can come up with is to load the file with a separate flow in a datastore,remove it from the input folder and output it again based on the processing results. But I'd rather move the original file so that the system behind the SFTP environment can check that there is a locked file in the input folder.
Thanks for helping out!
Bram
The path where file is moved Post-Processing can have dynamic constituents. Using this you can determine where file is moved based on property, let's call the property "archiveDirectory". You can set property "archiveDirectory" initially for successful processing to 'output'. For failed processing, set the property "archiveDirectory" in Exception Subprocess ending with Message End.
Your path to move the file post processing could be \${property.archiveDirectory}\${file:name}.
The solution is explained in the blog: Dynamic Setting of Archive Directory for Post Processing in SFTP Sender Adapter
Hope it helps,
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for helping out! This is what we were looking for.
Great blog as wel!
Best,
Bram
> the SFTP adapter only has a post-processing action and lacks a post-exception action.
I feel that this is a serious flaw and should be patched by SAP. I've seen multiple people, myself included, dancing around this problem. In my opinion, the "Error end" -process step should have a checkbox for "Trigger adapter post-processing". I need to see failed messages in CPI monitoring but I also need the erroneous file to go away after the first failed attempt to prevent a flood of error messages.
Does the CPI dev team have a suggestion box?
Hi,
Has anyone found a better way to do this? I believe in PI you can sent a separate post processing to run on the SFTP connector as a result of an exception as opposed to a normal run but this isn't available in CPI.
We want to move the file to an archive folder if successful and exception folder if unsuccessful as the process will be a scheduled process and we don't want the same file processed twice. We also need to finish the flow with an error end point as we want ALM to be able to identify interface runs that have run in error and if you use an error end point no post processing currently runs.
Does anyone have a solution to the above (or is anyone aware of any CPI developments to allow separate post processing of FTP files on exception like in PI?)
Many Thanks
Rich
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Did anyone found a better way to delete source file through existing adapter. I am also facing the same issue where my schedule keeps picking the same file and keeps erroring out continuously as my polling frequency is every 5 minutes and my file size is usually huge with 10k CSV records.
Regards,
Appasab
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bram,
Hope you are doing good.
Could you please explain how did you solve this scenario.I am facing same issue.Below is my iflow.
Able to move files to success,archive and error directories but unable to delete file from source when iflow is failed.
Thanks,
Avinash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bram,
Did you figure this out? I have the same requirement and am looking at some different options. I would love to know what your solution was. I believe the delete can be done using a Groovy script but am wondering if there is another way or design that would accomplish this.
Thank you,
Doug
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Bram,
Below might help you.
1) Copy the content of file and file into Properties ( Say P_FileContent and P_FileName).
2) In case of exception use Send Step inside Exception with SFTP receiver adapter and set the file name & filecontent stored in property.
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.