DocumentBurster can be configured to send ad hoc emails during the report bursting flow (e.g. when bursting is finished).
A common scenario would be to configure DocumentBurster to email an administrator and/or a defined user when a job is completed successfully. It is easy to configure DocumentBurster to support this scenario and in fact DocumentBurster can send ad hoc emails during any of the following report bursting phases:
- startBursting
- startParsePage
- endParsePage
- startExtractDocument
- endExtractDocument
- startDistributeDocument
- endDistributeDocument
- quarantineDocument
- endBursting
ant_mail.groovy
This script can be used to send ad hoc emails during the report bursting flow. Based on your needs, the script can be executed in any of the existing report bursting life-cycle phases (e.g. endBursting, endExtractDocument, etc.).
For example, this sample script can be used almost out of the box for sending an email notification when the bursting is successfully finished. To achieve this, please copy and paste the content of this sample script into the existing scripts/burst/endBursting.groovy script.
Currently the script is configured to send various information about the current burst job (e.g. Input file, Number of pages, Number of files extracted). The script can be totally adapted to your own needs.
How to customize the script
- Change the first uncommented line of the script (def to = “your.address@here.com”) with the email address where you need the email to be sent
- Optionally, the subject and the message of the notification email can be also changed
Complete documentation about ant_mail.groovy script can be found in Chapter 1. Using scripts to achieve more -> Sample scripts -> ant_mail.groovy from the DocumentBurster – Advanced report delivery scenarios document.
Feel free to download DocumentBurster and see for yourself how this software can be easily adapted to send ad hoc emails during the report bursting and report distribution flow.