ActiveTransfer Server 10.5 | webMethods ActiveTransfer Documentation | Administering ActiveTransfer Server | Managing Events | Examples for Configuring an Event
 
Examples for Configuring an Event
The examples specified in this section show how you can configure events with up to two actions.
Scheduled Event:
Let us configure a scheduled event, Payables that consists of two actions - find and copy. The event when triggered, finds the monthly invoice for a specific partner in the Enterprise's server and copies the same to the partners's FTP server on the fourth day of the month. You can configure such an event as follows:
*Create a new scheduled event, Payables.
*Schedule the event to run on the fourth day of every month. Configure a new schedule for the event with the following parameters:
Execute Actions
Monthly
Days of Month
4
Hours
17
*Define a find action in the event with the following parameters:
File URL
Select the Virtual Folder option and browse to a folder in the VFS say, EnterpriseFTP
This virtual folder is mapped to a remote server, ftp://enterprise.ftp.server/invoices/partner1/ in the Virtual Folder Management page.
The folder invoices/partner1 in the enterprise.ftp.server contains the following files before the event is executed:
P1-currentmonth-invoice.xml
P1-currentmonth-invoice.pdf
P1-currentmonth-details.xml
P1-currentmonth-ack.xml
Note:
The virtual folder used in this example should already exist in the Active Transfer VFS.
File name
*invoice*
*Define a copy action in the event after the find action with the following parameters:
Destination URL
Select the Virtual Folder option and browse to a folder in the VFS say, Partner1FTP
This virtual folder is mapped to a remote server, ftp://partner1.ftp.server:21/incoming/invoices/ in the Virtual Folder Management page.
Let us assume that the folder incoming/invoices in the partner’s FTP server has no files.
Retry [ ] times, at intervals of [ ] second(s)
Select the checkbox and input the values, 2 for retry times and 10 for retry interval.
*Activate the event, Payables.
Result -When the event executes successfully, the result is as follows: The incoming/invoices folder in the partner’s FTP server contains the following files:
P1-currentmonth-invoice.xmlP1-currentmonth-invoice.pdf
Note:
If the Copy action fails the first time, ActiveTransfer will retry the copy action two more times at intervals of 10 seconds.
Post-processing Event:
Let us configure a post-processing event, Notify which is triggered when a file is uploaded to the invoices folder corresponding to a specific partner in the enterprise’s server. The event when executed sends an email to the partner with the subject - Invoice for the month - {MM}/{yy} and specifies the URL of the file. You could configure such an event as follows:
*Create a new post-processing event.
*Define the trigger for the event as follows:
Execute the actions below when a user
uploads files
The folder name is
Select the The following name: option and browse to a folder in the VFS say, EnterpriseFTP
This virtual folder is mapped to a remote server ftp://enterprise.ftp.server/invoices/partner1/ in the Virtual Folder Management page.
The folder invoices/partner1 in the enterprise.ftp.server contains the following files:
P1-currentmonth-invoice.xml
P1-currentmonth-invoice.pdf
P1-currentmonth-details.xml
P1-currentmonth-ack.xml
The file transfer status is
Success
The operation is carried out by
Any user
Execute the actions
After the user exits all sessions
*Define a send email action in the event with the following parameters:
Source Filter
*/invoice/*.pdf
For information on the use of wildcards in ActiveTransfer Server, see Use of Special Characters in Search.
From
%user_email%
To
incoming@partner1.com
Subject
Invoice for the month - {MM}/{yy}
Variables / Template
Name to current file
Body
Modify the template as follows: The current invoice is available for download at: ftp://enterprise.ftp.server/invoices/partner1/%the_file_name%
*Activate the event, Notify.
Result - When the event executes successfully, an email is sent to partner1 with the following content: Subject Invoice for this month -12/2014 The current invoice is available for download at:ftp://enterprise.ftp.server/invoices/partner1/P1-currentmonth-invoice.pdf