Scripts

TIBCO BusinessConnect Container Edition supports the use of scripts to manage file processing for FTP inbound and outbound transport and File outbound transport.

See FTP/S Inbound, FTP/S Outbound, and Configuring Outbound File Transport for a Partner for information on how to specify scripts in transport configuration dialogs. Script activities can be captured as audit trails using the logging object available in the context of the script. See Audit Logging in Scripts. In addition, an error advisory is also published when error is logged using the Java object.

Scripts should use Java methods to throw exceptions for script failures. If no exceptions are thrown, TIBCO BusinessConnect Container Edition considers the scripts as having completed successfully.

TIBCO BusinessConnect Container Edition provides a Java API for use within scripts. For information on this API, see the Viewing the Java API Reference Pages.

This appendix also explains how to use the file specification dialog, which is used to specify DTD, guideline, and script files.

FTP Scripts

FTP scripts allow you to control the retrieval of files from and the storage of files on an FTP server. When FTP scripts are used, the normal file retrieval from or file storage to an FTP server is bypassed. Instead, the designated FTP script is called and the FTP script is responsible for retrieving or storing the files. It is also possible to perform pre- and post-processing, as appropriate for your application, from within your script.

For reference, see FTPClient, FTPReply, and UserLogAccess scripts on Viewing the Java API Reference Pages.

Secure FTP

Secure FTP (FTPS) is supported within FTP scripts by using the FTPClient API in secure mode. Secure mode is activated by providing the certificate specified for the trading partner to the setSSLCertificate(java.lang.String) method. If the FTP server supports SSL with client authentication, then the host private key should also be set with setSSLHostKey(java.lang.String).

The default secure transport version is obtained from the FTPS configuration settings, see Selecting and Configuring FTP/S Inbound and Configuring FTP/S Outbound. You can modify the transport version with the method setTransportType(java.lang.String).

SSHFTP Scripts

For reference, see FileAttr, SSHFTPClient, SSHFTPReply, and IFTPFlavorReply scripts on Viewing the Java API Reference Pages.

Document Security through PGP

PGP (Pretty Good Privacy) packaging and un-packaging is also supported through FTP/FTPS/SSHFTP scripts to provide document security. PGP is supported within FTP/FTPS/SSHFTP script also by using FTP/FTPS/SSHFTP Client API. You can set up PGP options (sign, encrypt, compress, format, and so on) by using methods defined in the FTP/FTPS/SSHFTP Client object; however, PGP keys and cipher algorithms used in PGP packaging or un-packaging still need to be configured in the business agreements's Document Exchange. For more details, see, Document EXchange tab in the protocol specific documentation.

File Scripts

File scripts allow you to control the storage of files on the file system when using File outbound transport. When scripts are used, the normal file storage to the file system is bypassed. Instead, the designated script is called and the script is responsible for storing the files. You can also perform pre- and post-processing, as appropriate for your application, from within your script.