Notifications¶
The notifications dialog shows generated notifications on contacts.
Refer to the Alert Message Setup and the Contacts sections on how to setup alert messages.
In order to configure automatic notification message generation, a job must be scheduled to run.
The job must contain a Run script task, calling a script making the notifications.
The following script sample shows how a script generating notifications could look.
import System;
from System import *
def GenerateNotifications():
"""
<Script>
<Author>admin</Author>
<Description>Script for generating notifications for contacts with subscriptions.</Description>
</Script>
"""
# Get the module.
realtimeModule = app.Modules.Get('RealtimeModule');
# Load the 'Real time configurations' spreadsheet with the list of available configurations.
realtimeModule.LoadRealtimeConfigurations();
# Loop all the configurations and load the setup of the configuration name in question.
for configuration in realtimeModule.RealtimeConfigurations:
if (configuration.Name == 'Sava5'):
realtimeModule.CurrentConfiguration = configuration;
configuration.LoadConfiguration(False);
# Generate notifications.
realtimeModule.CurrentConfiguration.GenerateNotifications('Notification1' , DateTime.Now);
Notification generated will be written into a spreadsheet, one line per notification. By default, notifications are written into the Notifications spreadsheet found in the real-time configuration folder of MIKE Workbench.
An overloaded method for generating notifications in user defined spreadsheets is available. Please refer to the API documentation.