Notifications can be set to alert you if a job is successful, unsuccessful, or either result. Additionally, a notification can also indicate if a job was launched from the Workbench or from a command line, and can produce a report in a number of different file formats.
You can select the following options and option parameters using the job notification plugin:
Notification Option | Option Parameters |
---|---|
Notify When Run From |
|
Attached Report |
|
Send Notification |
|
Notification parameters are set independently on each job configured in DB Change Manager. Additionally, each set of notification options apply individually per job selected.
The notification plugin must be defined in Eclipse and then activated in DB Change Manager. The following tasks provide a high-level overview of defining and implementing the notification plugin:
In order to start building a plugin, you need to create a new plugin platform in Eclipse.
To create a plugin project
The target platform for the plugin development process needs to be identified in DB Change Manager. This indicates to the new plugin for what product it extends, and grants the plugin access to the system.
To configure the target platform
The new plugin requires a pair of dependency definitions on the DB Change Manager Notification plugin:
com.idera.change.notifications
org.eclipse.ui.forms
com.idera.change.notifications
, and then click OK.org.eclipse.ui.forms
, and then click OK.Each notification plugin requires a Notifier class that must implement the interface com.idera.change.notifications.api.INotifier
. To do this, you subclass com.idera.change.notifications.api.AbstractNotifier
and customize it.
If |
To implement a notifier class
Once you have defined the DirectoryNotifier
class, two methods require implementation:
isReportSupported
returns a Boolean value indicating if the notification can include a report. The directory notifier returns true, because reports can be replaced in a directory, but a notification may not support reports. This method is called when creating job editors to determine if the reporting section is shown for this type of notification.sendNotification
is called after a job runs and is responsible for the notification. The three parameters are as follows:
Parameter | Type | Description |
---|---|---|
notifierData | iNotifierData | This instance contains the configuration for the notification of the job just run. |
jobMetaData | Map<String, String> | This map contains information about the job execution. The keys in the map correspond to entries in the NotificationPropertyEnum. For example, to get the data and time of the execution, you would code: “jobMetaData.get(NotificationPropertyEnum.DATE_TIME.getTag()) |
notificationInfo | iReportGenerator |
| | | | | | | |