How the Notification is Sent
The email notification object must be associated with an Action trigger type. If a notification needs to be sent and there is no associated trigger event, custom code can be written to call the method directly and pass the name of the notification object. All notification objects must be stored in the eService Administration vault. These sections describe how to work with Notification objects: Generic Email UtilityemxNotificationUtil is a generic email utility that accepts input arguments (as entered as the attribute values of the Notification object), and constructs and sends an email message to the defined distributions lists. This JPO contains these methods:
These methods operate on all revisions of the notification object and formulate the input to lower level utility methods that actually send the email. The methods use the Filter attribute to determine whether or not the email should be sent, evaluate select clauses to populate the recipient fields (From Agent, Static and Dynamic To, Cc, and Bcc Lists), and builds the ID lists to be sent as attachments. The email messages make use of the preferred language functionality defined in About Internationalizing. Execution of the emxNotificationUtil is queued until the outermost transaction surrounding the event is committed. If the transaction is aborted, the JPO does not execute and the notification is not sent. If errors occur during the email process, they are written to the system log file (mxtrace.log). If notifications are not being sent, the system administrator can scan the log file to diagnose the problem. If the problem cannot be diagnosed using the log file, the system administrator can turn on SMTP tracing. Notification Object AttributesThis section lists the attributes for the Notification object. All attributes are optional except: The Body Text attribute is required if the notification is triggered by a subscription event. In addition, these attributes can specify a JPO to calculate the value of these attributes at run time: filter, recipients of the To, Cc, or Bcc list, subject and body text. When used, the format for specifying the JPO and method is: JPO jponame:methodname When used with subscriptions, the notifications can use provided JSPs to process distribution lists and the body of the message as listed in the Accepted Values/Examples column of the table below. If you specify a JPO as the value for an attribute, you cannot combine it with other values for that attribute.See Sample JPO Code for Notification Attributes for a sample JPO that can be used for several of the notification object attributes. If a value is provided for both the Body Text and Body HTML attributes, the body will be constructed as a multipart message of MIME Content-type multipart/alternative. The email client can be configured to show either format, if both are supported. This table defines the attributes used to configure a Notification object:
Internationalizing Text Strings in NotificationsTo internationalize the email notification, you can use string keys for the Subject Text, Body Text, and Body HTML attributes, then provide the Registered Suite name so that the strings can be looked up. See Internationalizing Business Process Services Products for details. After testing a notification object, any strings used for the Subject Text, Body Text, or Body HTML attributes should be moved into the appropriate property file to support internationalization of the notifications. For example, you might add these strings to the emxFrameworkStringResource.properties file: emxFramework.Notification.NotifyRouteOwner.Subject=Completion: Route Name $<frm[Route Task].to.name>, Task Name $<name> emxFramework.Ntofication.NotifyRouteOwner.Body=Task Instructions: $<attribute[Route Instructions]> \nTaskResponse: $<attribute[Comments]> Then, update the following attribute fields to reference these property strings:
|