Examples of Event Configurations and Actions
Let us configure a scheduled event, ParamEvent which finds a set of files that match the filter invoice* in a remote server and copies the files to another remote server after renaming the files. Let us parameterize the source URL and the destination URL in the event actions.
1. Create a new scheduled event, ParamEvent.
2. Set the event criteria Execute actions to Manual.
3. Configure a find action in the event and parameterize the Find URL field as follows:
![*](bullet.gif)
Select the
Remote File Path option.
![*](bullet.gif)
Type in
[sourceURL] in the field.
![*](bullet.gif)
Specify
invoice* in the
File Name field.
4. Configure a copy action after the find action and parameterize the Destination URL as follows:
![*](bullet.gif)
Select the
Remote File Path option.
![*](bullet.gif)
Type in
[destinationURL] in the field.
![*](bullet.gif)
Configure the
Rename file to option as
{stem}_processed{ext}5. Execute the service wm.mft.schedule:executeEvent as follows:
![*](bullet.gif)
Create an
eventParams entry for each parameterized event setting, type in the
name of the setting and specify a
value to the parameterized setting.
scheduleName =
ParamEvent
eventParams[0]\name =
[sourceURL]
eventParams[0]\value =
ftp://enterprise.ftp.server/invoices/partner1/
eventParams[1]\name =
[destinationURL]
eventParams[1]\value =
ftp://partner1.ftp.server:21/incoming/invoices/Let us consider the following files in the source folder, ftp://enterprise.ftp.server/invoices/partner1/:
P1-currentmonth-invoice.xml
P1-currentmonth-invoice.pdf
P1-currentmonth-details.xml
P1-currentmonth-ack.xml
Result: After the successful execution of the event, ParamEvent the /incoming/invoices/ folder on the ftp://partner1.ftp.server server contains the following files:
P1-currentmonth-invoice_processed.xml P1-currentmonth-invoice_processed.pdf