Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Managing File Transfers with ActiveTransfer | Managing Events | Executing File Operations | Zipping Files
 
Zipping Files
After you create a basic file zip action as described in Creating a Basic File Operation Action, use this procedure to set the properties of the action.
*To set the properties for a file zip action
1. In the Source Filter box, enter the name of the file whose transfer will trigger this event. By default, ActiveTransfer Server considers all files.
Note:
You can use wildcard characters to filter the file names. For example, enter *.zip to trigger the event only when zip files are uploaded or downloaded. To trigger an event based on a name string in the zip files, use the name string in the Source Filter box, preceded and followed by wildcard characters. For example, enter *invoice*.zip to trigger the event based on the file URLs, when zip files containing the character string invoice in their file names are uploaded or downloaded. If you define a Source Filter for an action, the action acts only on the files that are filtered out.
For information on the use of wildcards in ActiveTransfer Server, see Use of Special Characters in Search.
2. If you want to use regular expression in the source filter, specify a valid regular expression in Source Filter and select Use regular expression.
Examples for regular expressions:
(.(?!purchaseorder))*
Excludes files with the file URL containing purchaseorder
.*/out/.*
Include files with the file URL containing the folder out
^abc(.*)123$
Includes anything that starts with abc and ends with 123. Matches abc123, abcxyz123, but not abcxyz123def
NEW-((*.doc)|(*_backup_*))
Includes anything starting with NEW- that either ends in .doc, or is followed by the string _backup_
3. Select the Zip File Path where the file will be zipped by doing one of the following:
Important:
When you enter file path locations, be sure to end the path with a slash character (“/”) to identify the location as a folder and not a file.
*If the path is on your local machine or network, select File Path and browse to or enter the location.
Note:
To specify a file URL for a shared location, use the following syntax: FILE:////<host>/SharedFolder/. Make sure that the OS user running the ActiveTransfer Server instance has full access to the shared location.
*If the path is on a remote machine or network, select Remote File Path and browse to or enter the location in the format: protocol://<host>:<port>/DestinationFolder/
*If the path is a virtual folder in the ActiveTransfer VFS, do the following:
1. Select Virtual Folder
2. Type in the virtual folder details in the text box or use the browse option.
If you use the browse button, the Select virtual folder look up window opens.
3. In the Select virtual folder window, select the virtual folder by highlighting the element and click on Select.
4. If you want to point to a subfolder in the virtual folder, append the URL in the text box with the details of the subfolder.
Note:
The virtual folder that you select should be configured on the same ActiveTransfer Server instance on which the event is configured.
Tip:
If you want to connect to a remote server using a secure protocol (FTPES, FTPS, HTTPS or SFTP) and want to configure authentication using secure key exchange, create a virtual folder for the remote server in the VFS and configure the Keystore, Keystore Password, and Key Password parameters. You can then use the Virtual folder that you configured in the Virtual Folder option of the File Path in the event action. For additional details see Associating a Virtual Folder with a Physical Folder Location.
4. Select Create Directory to enable ActiveTransfer to create the destination folder if the folder specified in Destination URL is not present.
If Zip File Path path does not include a folder, ActiveTransfer zips the file directly to the specified directory path.
5. Type a User Name and Password for the remote system.
6. If you want to route file transfers to remote servers through a proxy server, select the appropriate proxy server options:
a. Select Use Proxy.
b. Select one of these options:
*Global proxy settings. If you want ActiveTransfer to use the default proxy server alias set up in Integration Server or ActiveTransfer.
*Select proxy alias. If you want to use a specific proxy server alias for the event. Then select the appropriate proxy server alias to use from the available list.
7. To check the connection to the remote server with or without a proxy server, click Test Connection.
8. To assign partners for the event, do the following:
Note:
For virtual folders, use this option only if you want to override the partners configured for the virtual folders.
a. Select Assign partner.
b. Click in the text box and do one of the following:
*Select the partner to assign from the list of configured partners in ActiveTransfer.
*Type a parameterized value for the partner using the following format:
[partner_name],[remote_partner_name]
9. In the Zip File Name box, enter a name for the zip file. Alternatively, you can provide a variable name such as {stem}.zip for the zip file name.
For more information about specifying variables, see Server Configuration Parameters and Variables.
10. If you want to execute an error action if the file operation fails, select Execute error action.
11. Click Save.
12. If you selected the Execute error action check box, define an error action as described in Defining an Error Action.
13. If you are finished defining actions for this event, activate the event as described in Activating an Event.
Result:
The “Zip” action compresses a specified file or a set of files and copies the compressed file to the location specified in Zip File Path. After the successful execution of the zip action, the original source file(s) and the target zip file are available to the subsequent action. If the input path is that of a folder, ActiveTransfer does not compress the files/contents of the specified folder.
In single-thread, sequential processing, each event results in a single zip file. However, if the "Zip" action occurs after parallel processing starts, each thread results in a separate zip file.