Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

File Operations Activity

  • Last UpdatedJul 01, 2024
  • 5 minute read

Activity Description

The File Operation Activity can be used to perform file transfers from within the workflow. It can be used to transfer files within local networks as well as using HTTP and FTP protocols.

File Transfers Supported

The list of supported file transfers:

  • UNC — HTTP - Example: \\computername\sharename\filename — Http://computername/ WebFolder /filename

  • File — HTTP - Example: \\DriveName\foldername\filename — Http://computername/ WebFolder /filename

  • File — FTP - Example: \\Drivename\ftpFolder\FileName — Ftp://computername/Sharename/filename

  • FTP — Filen - Example: Ftp://computername/Sharename/filename — Drivename\FolderName\

  • HTTP — UNC - Example: Http://computername/WebFolder /filename — \\computername\sharename\filename

  • UNC — UNC - Example: \\computername\sharename\filename — \\computername\sharename\filename

  • File — File Example: \\DriveName\foldername\filename — DriveName\foldername\filename

  • UNC — HTTP (Directory Transfer) Example: \\Computername\sharename\filename — Http://ComputerName/WebFolder

  • File — HTTP (Directory Transfer) Example: \\Drivename\FolderName — Http://computername/WebFolder

  • File — FTP (Directory Transfer) Example: Drivename\FolderName — Ftp://computername/ftpFolder

    Note: The above examples are in the following format: Source Details — Destination Details

The File Operation activity is not supported if the Source and Destination paths are in the combinations given below:

  • FTP and HTTP

  • FTP and FTP

  • HTTP and FTP

  • HTTP and HTTP

Variable for getting the list of files that were transferred

The list of files that were transferred using the File Operations activity can be retrieved using a variable of type array, with the following syntax:

^'+CurrentActivity.Name+ 'FilesUploaded'

For example, ^TransferFileOperationFilesUploaded

Variable for getting the list of files that were not transferred

The list of files that were not transferred using the File Operations activity can be retrieved using a variable of type array, with the following syntax:

'^'+CurrentActivity.Name+ 'FilesNotUploaded'

For example, ^TransferFileOperationFilesNotUploaded

Activity Properties

The File Operation activity has to be configured by specifying appropriate values for the different properties in the Activity Properties area. The Activity Properties can be accessed by clicking on the Activity Properties tool in the Tool Bar or by selecting the appropriate option from the right click menu for the File Operation activity. The Activity Properties are organized under the following groups of related properties. The properties under each group are described in this topic.

Name & Description

The properties in the Name & Description group have been described below. You can use these properties to specify the name and description for the activity.

Name - This property can be used to specify a name for the activity.

Property Type: Optional (This property needs to be set only if necessary.)

Description - This property specifies a brief description to be displayed for the activity.

Property Type: Optional (This property needs to be set only if necessary.)

Configuration

The properties in the Configuration group have been described below. You can use these properties to configure the functionality of the activity.

SourceDetails - This property allows the user to specify the details of the file source, like its location, the transfer protocol, etc.

Property Type: Mandatory (This property must be set if the action is to be executed.)

Steps to set the SourceDetails property

  1. To specify the details of the file source, click on the button for the 'SourceDetails' property to open the property window.

  2. In this window specify the file operation (transfer) protocol by selecting an option from the drop down for the Protocol field.

  3. Next assign the URI/UNC of the source file or directory as the value for the Location field. Build an expression to assign the location details by selecting the operator, type of value (Value, Variable, Content, XMLVariables), and the value for the property from the corresponding drop downs.

  4. In the same way, you can assign a search pattern to filter the type of file to be copied or transferred as the value for the Pattern field. For example, you can specify "*.doc" as the filter pattern. This will select only files with the extension .doc for copying or transferring.

  5. You can also assign the user name and password of the source file/directory in the User Name and Password fields respectively, by following the same procedure that is used in step 3.

  6. In addition, you can assign the domain name and port number of the source in the DomainName and PortNumber fields respectively, by following the same procedure that is used in step 3.

  7. After adding the parameter, click Submit to save it.

See File Operations: Source Details for a detailed description of the Source Details property window.

DestinationDetails - This property allows the user to specify the details of the file destination.

Property Type: Mandatory (This property must be set if the action is to be executed.)

Steps to set the Destination Details property

  1. To specify the details of the file destination, click the button for the 'DestinationDetails' property to open the property window.

  2. In this window specify the file operation (transfer) protocol by selecting an option from the drop down for the Protocol field.

  3. Next assign the URI/UNC of the destination file or directory as the value for the Location field. Build an expression to assign the location details by selecting the operator, type of value (Value, Variable, Content, XMLVariables), and the value for the property from the corresponding drop downs.

  4. In the same way, you can assign a search pattern to filter the type of file to be copied or transferred as the value for the Pattern field. For example, you can specify "*.doc" as the filter pattern. This will select only files with the extension .doc for copying or transferring.

  5. You can also assign the user name and password of the source file/directory in the User Name and Password fields respectively, by following the same procedure that is used in step 3.

  6. In addition, you can assign the domain name and port number of the source in the DomainName and PortNumber fields respectively, by following the same procedure that is used in step 3.

  7. After adding the parameter, click Submit to save it.

    See File Operations: Destination Details for a detailed description of the Destination Details property window.

    Looping Behavior

    The property in the Looping Behavior group has been described below. You can use this property to specify the looping behavior of the activity.

    Loop through this action if output is - This property is used to specify the condition for looping the activity by selecting an activity output from the drop down.

    Property Type: Optional (This property needs to be set only if necessary.)

    Action outputs

    The File Operations Activity returns the following values -

    Successful: Displayed when the file transfer is successful.

    Failure: Displayed when the file transfer is unsuccessful.

    Exception Behavior

    Each activity has the Raise Error on Unhandled Linked Output property on click of which, it shows all the default configured mapped error outputs in red with their check boxes selected.

    See Mapped Error Outputs for more details.

    TitleResults for “How to create a CRG?”Also Available in