Create file via process on different SFTP location other than provided as service with Broadcom SaaS
search cancel

Create file via process on different SFTP location other than provided as service with Broadcom SaaS

book

Article ID: 278286

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

You have a requirement to create a process which creates a file on a Vendor SFTP location. 
You know that you can create a file on Clarity SFTP Location via process. However, is there also a way to place a file on an external SFTP site?

Environment

Clarity 16.2

Resolution

Clarity GEL scripts cannot upload to an SFTP site. The "FTPTagLibrary" does not support secure ftp.

However, It is possible to pull or put files to an external FTP site via a GEL script.

Here is a basic example:


--

<gel:script

xmlns:ftp="jelly:com.niku.union.gel.FTPTagLibrary"

xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"

xmlns:file="jelly:com.niku.union.gel.FileTagLibrary"

xmlns:core="jelly:core"

xmlns:sql="jelly:sql">

<ftp:open hostName="hostname here" user="ftpuser" password="password">

<gel:out>"Logged In"</gel:out>

<core:catch var="exception">

<ftp:get fileName="test.sh" remoteDir="/data" localDir="/data/upload"/>

<gel:out>"Accessed the file"</gel:out>

<file:readFile delimiter="~" embedded="false" inputVar="${fileRecd}" var="v_csvInMem"/>

</core:catch>

<core:if test="${exception != null}">

<gel:out>Caught Exception was:

${exception}</gel:out>

</core:if>

</ftp:open>

</gel:script>

Additional Information

Broadcom hosted Clarity SaaS blocks outbound ports other than 80 or 443.

This solution will not work on Broadcom GCP Clarity SaaS.

Please refer to the Service Description for considerations with Clarity SaaS.