Usually in our projects we get the requirement for sending the notifications for all success and failures . But in my MFT we don’t have direct option or event available to achieve this requirement.
When the transfer is successful user needs to be notified via email so that they can take further action.
User can set filter criteria for file name and file size for which notification needs to be sent.
Follow the below steps for running this sample :
1. Import the transfer(mytransfer_export.zip). This will automatically add the callout definition to the repository. You can also download the callout definition XML(postTransferNotification.xml), if you manually want to create the callout definition.
2. Download the callout jar (postTransferNotification.jar) and source code (PostTransferNotification.java)
3. Download the email template (template.eml) (don’t forget to change the email address in the template) file and place it under template location specified in the notification callout associated with the target.
4. Go to MFT Console -> Administration tab -> Server Properties -> General Configuration . Check for the custom callout directory setting and place the jar,xml and eml template in that folder.
Installing Callout with WLST command:-
a. Run WLST using: $ $MW_HOME/mft/common/bin/wlst.sh
b. Connect to MFT server using the below command :
connect(“admin user”, “password”, “t3://localhost:mftport”)
d. createCallouts(‘ $DOMAIN_HOME/mft/callouts/postTransferNotification.xml’)
Login to MFT console :-
5. Deploy the transfer from the MFT console
Go To Design Page and Open the Transfers – > in target -> Post Process Actions:
Click “add post-processing actions” and you will see a drop down list with newly created callout, select it and click on add to list .
Provide the location of the “Email Template File location” as step 4 .
6. Please make sure that the ums email drivers for the mft server is configured properly.
7. Send the sample file to embedded ftp server in the /mymart.
To Download the files ClickHere