cancel
Showing results for 
Search instead for 
Did you mean: 

file receive adapter command line error handling

Former Member
0 Kudos

Hi,

This is our requirement - After the file receive adapter, we need to run a script. Based on the return code of the script, we need to handle the error handling of the interface (i.e. send an email about the error).

I have looked at the operating system command line in the file adapter. How does XI handle return codes for the command line? If the command line has a error return code, how to send an email from XI?

If anyone has ideas on this topic, please respond!!

thanks,

lasya

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

Hi,

I don't think so, it is possible directly. You can not get the Response back to XI pipeline from the shell script.

But you can think, if you are able to call this from Mapping.

And one more option is using Transport Acknowledgement ( with BPM) if the file is not able to write into the target directory you can raise an alert-

Blog on this-

/people/michal.krawczyk2/blog/2006/06/22/xi-playing-with-the-file-adapters-acknowledgments

Regards,

moorthy

Answers (2)

Answers (2)

udo_martens
Active Contributor
0 Kudos

Hi Lasya,

your script itselv should send a message (for example http) in case of errors. At XI its very easy to trigger a mail by incoming http message.

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

Can you send me a snippet of code for the script? How can the script itself trigger the HTTP client?

thanks,

Lasya

Former Member
0 Kudos

Hi,

I am not sure if the return code of a shell script could be returned back to XI;

An alternative would be to write a java code, and call it during interface mapping.

This code would do the necessary processing and return a value.

You could check this value during receiver determination and depending on the value call the email service or send the message to the intended target.

Regards,

Smitha.