cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Email When FTP Adapter Errors Out

Former Member
0 Kudos

Hello everyone,

I am developing a very simple interface to grab a file from a directory and ftp it to a partner's server. Now I want to be able to check if an error occurs when I send the file so I can send a notification e-mail to the administrator and move the file to an Error-Archive directory.

Some of the errors that could happen are:

1. Partner server is down

2. FTP Username or password is wrong

3. FTP account does not have permissions to write to the Partner server

4. ...etc

I have defined an Integration process and for the block where I ftp my file, I defined an exception which I catch in an exception branch. In the Exception branch, I have then defined steps to send notification emails and move the file to an error-archive directory. But unfortunately all the steps of the Integration Process seems to pass, although the FTP Adapter throughs an error.

I'm not sure how can I get the FTP adapter errors to be passed back to my integration process. I already searched in the service market place for OSS notes and also searched the SDN but I can't find any helpful information.

There is one OSS note, 821267, that mentions the use of System Acknowledgements. I'm not sure if this will help me and I don't know how to set it up.

Does anyone have any ideas on how to handle this particular scenario? Did anyone implement System Acknowledgements with the File/FTP adapter?

Any help is greatly appreciated

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

HI,

You can use Inbuilt Alert Mechanism for the same. prvided your XI should be in SP14... In SP14 we have Alert for Adapter engine also.

And if you are in below SPs, then workaround solution will be writing a script and executing the same..

Regards,

Moorthy

Former Member
0 Kudos

Thank you both Bhavesh and Moorthy for replying. I haven't thought about Alerts before and it's a good work around but I'm still wondering, is there anyway to pass back the adapter error to the Integration Process to act upon it.

The alerts will help me send a notification e-mail but I also would like, if possible, to move the file that couldn't be sent to a different folder. Also in the future, I might need to develop other processes that follow an error path implementing multiple steps if an error occured. Is that at all possible?

bhavesh_kantilal
Active Contributor
0 Kudos

hi,

Fro such complex error handling, I guess BPM is one solution too look at

Regards,

Bhavesh

Former Member
0 Kudos

Hey Bhavesh,

I'm already using the BPM. I have defined all my steps in an integration process.

How would you define the integration process so that it accepts errors from the ftp adapter??

Please refer back to my first post in this thread to see how I'm implementing this scenario using the BPM.

Thanks

Former Member
0 Kudos

Hi Qasem,

Well , if you check the note 821267 you have mentioned , it clearly exlains. When you do a send from your integration process to file/ftp adapter , at the most you can ask for a System Ack. And you get a System ack once ur message reaches the file adapter, so it wont serve ur requirement. You cannot request for an application acknowledgement from a file system , and your communication is inherently ASYNCHRONOUS, so there is no way you can get a response(!!) in your Integration process if your end receiver is a file system.

You may have to handle this error in the adapter framework using alerts and not in the ccBPM.

Regards

Saravana

Former Member
0 Kudos

Thanks Saravana,

I understand that my ftp step is Asynchronous and I'm not expecting a response if the file was received. However, I would expect the adapter framework to be able to pass any errors back to the process to act upon them.

I guess, this is not being implemented right now on XI and I will need to handle it, as you guys mentioned have mentioned, using only an alert. Thanks for the feedback

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Just to add to what Saravna has told, your error can be handled using only alerts. So, if you want to have a further processing, <b>one work around would be to create a sender mail adapter, that would pick up the mails that your alert trigger</b> and then, you can handle further processing as you neeed.

If you are on SP14, then the note 913858 for alerts is very essential.

Regards,

Bhavesh

Former Member
0 Kudos

Thank you everyone for spending the time to answer my question.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

To do the alert configuration as suggested, please go through the information below.

From SP 14 on PMI-free alerting was introduced. That means before SP 14 one has to configure and activate the End-to-End Monitoring, and to schedule the report SXMSALERT_PROCESS_DATA_GET in order to extract the alerts from the PMI data. For SP 14 and higher, that's not longer necessary.

If no alerts are being delivered, please check if "Suppress multiple alerts of this rule" is checked for your rule.

For SP 14 and higher you could also have a look at the report sxmsalert_logreader. This report shows some information about alerts being created or not.

You'll find more information about trouble shooting the alerting in SAP Note 913858.

Also just check if this batch program (RSALERTPROC) is running or not.

The links below on Alert Management (ALM) will be of good help to you:

http://help.sap.com/saphelp_nw04/helpdata/en/3f/567ddea69d3d4c93a6aedabd08899e/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/3f/81023cfa699508e10000000a11402f/frameset.htm

Meanwhile look at these forum threads also:

Also, In ALRTCATDEF, go to SETTINGS--> CONFIGURATION. By default, the option selected is INTERNAL PROCESSING. Select the option SMTP FORWARDING AS XML and give the email id. This will enable you to send an email alert whenever an error occurs in XI.

I hope I have answered your queries. If u want help with anything else please do reply back.

Regards,

abhy

PS: AWARD POINTS FOR HELPFUL ANSWERS.

Former Member
0 Kudos

Thanks Abhy, that's a lot of helpful information but please refer back to my response to Bhavesh and Moorthy. I would like to know if it is possible to return back an adapter error to the integration process that called the adapter so I can run an error path.

bhavesh_kantilal
Active Contributor
0 Kudos

hi,

Have you thought about configuring ALERTS. In your ALERT RULE, you can specify the origin of your ALERT on your ADAPTER engine.

So, when an error occurs when your XI is trying to push the file into FTP, the corresponding ALERT will be triggered and as you require an EMAIL can also be sent.

IF you need to know how to configure an ALERT , I would suggest this Blog, <a href="/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step">Alerts Step by STep</a>.

Also, if you are on SP14, I would suggest that you go through the note 913858.

Regards,

Bhavesh