How to generate BusinessConnect error advisories for SSH Connection Errors as well as general FTP connection errors?

How to generate BusinessConnect error advisories for SSH Connection Errors as well as general FTP connection errors?

book

Article ID: KB0084931

calendar_today

Updated On:

Products Versions
TIBCO BusinessConnect EDI Protocol Powered by Instream -
Not Applicable -

Description

Description:
In its normal operation BC may encounter connection error when connecting via FTP or SSHFTP to trading partners. How can BC be configured to generate error advisories when these connection errors occur? 
Symptoms:
N/A
Cause:
N/A

Issue/Introduction

How to generate BusinessConnect error advisories for SSH Connection Errors as well as general FTP connection errors?

Resolution

If using an FTP or SSHFTP customer script, do the following:

If you need to specify an error, you specify a statusCode other than 200, and an error will be logged and an advisory message on the Error subject will be sent. To do this, set the variable inside the scripts via the job slot variable. 

Example:
_________
job.put("userStatusCode", 553); 

job.put("userStatusMsg", "Permission denied when storing the file on the FTP Server");

________


For SSHFTP connections, the Connect() explicitly is not called from the the script, so the statusCode cannot be set. in this case, use UserLogAccess object to set the status to ERROR whenever you encounter a general error. It by default generates and RV error signal on the following subject. 
___
"AX.BC.BC-INSTANCENAME.PROTOCOL.ERROR.TRANSPORT.SCRIPT" 
____

Additional Information

BusinessConnect Interior Service API Reference Guide