Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Appendix B Scripts : FTP Inbound

FTP Inbound
For FTP inbound operations, the script that is uploaded is executed instead of running pre-defined get or mget operations.
During script execution, files are placed in a temporary directory.
To access this property in TIBCO Administrator:
1.
Expand Application Management > BusinessConnect > Configuration.
2.
Click BusinessConnect.
3.
Select the Component Settings tab.
4.
Click the Intercomponent Advanced link.
5.
If the value is C:\temp\local, the files are temporarily stored in C:\temp\local\protocol\tpName.
Job Variables
A client interface is available for developing the script and the object implementing the interface is available in the job slot variable.
ftpObj  The slot to retrieve the FTP client object.
Example: var ftpClient = job.get("ftpObj");
In addition, you can use the following job variables in scripts:
getTmpDir  The variable for the temporary directory on the local machine to retrieve files from the FTP server.
Example: var getdir = job.get("getTmpDir");
hostName  The variable containing the trading host name from whom the file came.
Example: var hostName = job.get("hostName");
logObj  The slot variable to retrieve the UserLogAccess object that does audit logging.
tpName  The variable containing trading partner for whom the file is intended to be stored.
Example: var tpName = job.get("tpName");
ibPGPHandler   The variable to be used for inbound PGP un-packaging in an FTP session. Users can use the handler to set the inbound PGP processing policy.
Example:
var ibPGPHandler = job.get("ibPGPHandler");
var policy = ... //options: "None", "Must Encrypt", "Must Sign", "Must Sign and Encrypt", "Pass-through"
ibPGPHandler.setPGPPolicy(policy);
You might also need to set the operation id for the current inbound message:
ibPGPHandler.setOperationID(...);
and then to un-package the received file:
ibPGPHandler.unpackageMessage(filefullname);
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved