Difference between revisions of "FTP Upload"

From PresenceWiki
Jump to: navigation, search
 
Line 10: Line 10:
 
Dragging an FTP Upload Node into your Task launches the FTP Upload editor:
 
Dragging an FTP Upload Node into your Task launches the FTP Upload editor:
  
http://www.international-presence.com/wikidocs/images/ftp_upload_1.gif
+
[[file:ftp_upload_1.gif]]
  
 
The Editor is split into two tabs:
 
The Editor is split into two tabs:
Line 44: Line 44:
 
This is the FTP Connection Resource that the node should use to establish the connection to the remote server. This encapsulates details of the connection such as the server host name, the username and password etc. If you have not already configured the resource you can do so now by right clicking in the selection box and selecting "Create New > FTP Connection" from the pop-up menu. Note that you must first select a valid directory:
 
This is the FTP Connection Resource that the node should use to establish the connection to the remote server. This encapsulates details of the connection such as the server host name, the username and password etc. If you have not already configured the resource you can do so now by right clicking in the selection box and selecting "Create New > FTP Connection" from the pop-up menu. Note that you must first select a valid directory:
  
http://www.international-presence.com/wikidocs/images/ftp_upload_2.gif
+
[[file:ftp_upload_2.gif]]
  
 
This allows you to configure a new [[FTP Connection Resource]].
 
This allows you to configure a new [[FTP Connection Resource]].
Line 54: Line 54:
 
Clicking the "Browse" button will connect to the FTP server and display a tree-view of the remote directory structure to better allow you to select the correct path.
 
Clicking the "Browse" button will connect to the FTP server and display a tree-view of the remote directory structure to better allow you to select the correct path.
  
http://www.international-presence.com/wikidocs/images/ftp_browse.gif
+
[[file:ftp_browse.gif]]
  
 
==== Use Binary Transfer Mode ====
 
==== Use Binary Transfer Mode ====
Line 66: Line 66:
 
The default behaviour is to gracefully ignore any problems encountered. This means that the Task will carry on even though files may not have been successfully transferred.
 
The default behaviour is to gracefully ignore any problems encountered. This means that the Task will carry on even though files may not have been successfully transferred.
  
http://www.international-presence.com/wikidocs/images/ftp_upload_3.gif
+
[[file:ftp_upload_3.gif]]
  
 
==== Raise Exception on File Transfer Failure ====
 
==== Raise Exception on File Transfer Failure ====

Latest revision as of 10:08, 20 August 2015

FTP Upload Node

This Node instructs Presence to transfer one or more files to a remote server via FTP (File Transfer Protocol).

Possible uses include:

  • Synchronizing a remote website with the local filesystem
  • Moving files into a remote "drop folder" where another process handles them

Dragging an FTP Upload Node into your Task launches the FTP Upload editor:

Ftp upload 1.gif

The Editor is split into two tabs:

General Tab

Local File Location

This is the path of the local file that is to be transferred. It can be a static value (e.g. c:\myfiles\document.txt), a variable reference (e.g. ${myfile}) or a data table column reference (e.g. :var{FILENAME}).

If a data table column reference is used and multiple (distinct) rows are present in the data table, each variant value will be used as the basis of forming the filename. For example, consider the following datatable:

FILENAME
c:\myfiles\index.html
c:\myfiles\contact.html
c:\myfiles\aboutus.html
c:\myfiles\products.html
c:\myfiles\services.html
c:\myfiles\images\logo.gif

In this instance, using the reference :var{FILENAME} will cause the FTP Upload Node to attempt to upload each of these files in turn.

FTP Connection

This is the FTP Connection Resource that the node should use to establish the connection to the remote server. This encapsulates details of the connection such as the server host name, the username and password etc. If you have not already configured the resource you can do so now by right clicking in the selection box and selecting "Create New > FTP Connection" from the pop-up menu. Note that you must first select a valid directory:

Ftp upload 2.gif

This allows you to configure a new FTP Connection Resource.

Remote File Location

This is the remote directory that Presence should upload the selected files to. As with the local file location, it can be a static value, a variable reference or a data table column reference.

Clicking the "Browse" button will connect to the FTP server and display a tree-view of the remote directory structure to better allow you to select the correct path.

Ftp browse.gif

Use Binary Transfer Mode

This tells the FTP client that the files being transferred are Binary and prevents the server from attempting to modify newline characters.

Error Handling Tab

This Tab allows you to control how Presence should handle errors that occur during file transfer.

The default behaviour is to gracefully ignore any problems encountered. This means that the Task will carry on even though files may not have been successfully transferred.

Ftp upload 3.gif

Raise Exception on File Transfer Failure

When this option is selected the Task will raise an error if a file fails to transfer and no further upload attempts will be made. This can be caught and handled with an Error Handler Node.

Delete remote files after error

With this option selected Presence will ask the FTP server to delete any files that have already been transferred when an error occurs.

For example, consider the data table described above. Imagine that after transferring the first 3 files successfully, the server gives an error on the 4th file. Ordinarily Presence would either continue to upload the remaining files or, if "Raise Exception on File Transfer Failure" is selected, abandon the batch upload and throw an exception.

However if "Delete remote files after error" is selected, Presence will first attempt to delete the first 3 files on the remote server.

This behaviour is useful for automated processes that monitor the FTP drop folder, but not as useful for synchronizing files.


See Also

Task Elements : Action Task Elements : FTP Upload

Send Email | Send SMS | Send Fax | Broadcast Messages
Read Text File | Read Binary File | Write Text File | Write Binary File | Parse File Action
Rename File | Copy File | Delete File | Parse File Action
Generate Bar Code | Read Bar Code
Dynamic Task Call | Call Native Program | FTP Upload | Scorecard Collector | Create Graph | AS400 Action
Socket Client Action | Socket Server Action
JMS Producer | JMS Consumer


Task Elements | Resources