How to add await() function to a custom sshftp or FTP script in BusinessConnect?

How to add await() function to a custom sshftp or FTP script in BusinessConnect?

book

Article ID: KB0087135

calendar_today

Updated On:

Products Versions
TIBCO BusinessConnect -
Not Applicable -

Description

Resolution:
Description:
============
Some customer applications require the use of a delay a custom FTP script (For example, copying file and renaming it on a target system). However, the script performance should not impact the BusinessConnect engines overall performance.

Environment:
==========
All platforms.

Solution
===========
Utilize the following function in ECMAscript:

java.lang.Thread.sleep(n);

where  n  is the number of milliseconds to sleep.

BC is multithreaded, so the thread that handles the FTP transfer will hold until the sleep function returns. From BC 5.3.3 forward, the inbound FTP transfers are done on individual threads, so it should not impact overall BC engine performance.

Issue/Introduction

How to add await() function to a custom sshftp or FTP script in BusinessConnect?