The putencrypted.txt script uses PGP API to process messages, and then puts them on the FTP server.
The getdecrypted.txt script receives files and then processes them using the PGP API. These files match a particular search filter, which in this example is the trading host name.
This script gets the FTPClient object from the job variable that is created at runtime by BusinessConnect. The
FTPClient object is used to connect to the FTP server. (This works only in non-proxy mode.) It checks if the
BCFTP/in directory is available. If it is, it puts the file created by the Initiator's outbound process and processed by PGP API. If the
BCFTP/in directory is not present, that directory is created before the file is actually stored in the FTP server.
If there are connection failures, a flag called retryScripts is set to
true and passed on to TIBCO BusinessConnect to retry the execution when retry of the outbound process occurs.
This script gets the FTPClient object from the job variable that is created at runtime by TIBCO BusinessConnect.
FTPClient object is used to connect to the FTP server. It checks if the
testBC/out/BC directory is available. If it is, the script calls
executeMgetCmd to get all the files from the FTP Server.
Once the files are successfully retrieved and then processed by PGP API, the files from the testBC/out/BC directory is deleted. If the files could not be retrieved for some reason, for example, if a put is happening at the same time and the file descriptor is being locked by another process, then the files from the
testBC/out/BC directory is not removed.