Notification Mailers

The notification mailer program performs e-mail send and response processing for the Oracle Workflow Notification System, using the JavaMail API. You need to implement a notification mailer only if you want to have your workflow users receive their notifications by e-mail, as well as from the Worklist web pages.

Managing Notification Mailers

The notification mailer program is defined as a service component type in the Generic Service Component Framework. This framework helps to simplify and automate the management of background Java services.

Oracle Workflow provides one seeded notification mailer service component, called Workflow Notification Mailer. Most of the configuration parameters for this mailer are set to default values. You can enter several of the remaining required parameters using AutoConfig. After installation, you then only need to enter the e-mail inbox password in order to complete the configuration of this mailer. If the mail servers and Business Event System components used by the notification mailers are set up, and the Workflow Mailer Service container to which the Workflow Notification Mailer belongs is started, the seeded notification mailer automatically starts running once its configuration is complete.

You can also optionally modify some of the default values for the seeded Workflow Notification Mailer or create additional notification mailer service components. For example, you can create a notification mailer that processes only messages that belong to a particular workflow item type. You can also configure any notification mailer service component to process only inbound messages, or only outbound messages.

You can associate inbound and outbound mailers with each other by assigning them the same mailer node name. You can optionally assign the same node name to multiple outbound mailers, but you must not assign the same node name to more than one mailer that performs inbound processing.

Setting Up a Notification Mailer

Currently, Oracle Workflow supports the Simple Mail Transfer Protocol (SMTP) for outbound messages and the Internet Message Access Protocol (IMAP) for inbound messages. You must have an SMTP server and an IMAP server set up in order to send and receive Oracle Workflow notification e-mail messages. Users can receive e-mail notifications using various e-mail clients, though notifications may be displayed differently in different clients, depending on the features each client supports.

Note: If you have certain types of software installed, you may already have the necessary mail server functionality available. For example, products such as Oracle Email, Microsoft Exchange, or Lotus Notes include IMAP services. On UNIX, you can use the Sendmail program as your SMTP server.

Additionally, you can choose to use IMAP server software that is available for free download from some sources. For example, the University of Washington offers IMAP software as a public service. You might choose this option if your enterprise uses UNIX Sendmail e-mail accounts, for instance. For more information, see: http://www.washington.edu/imap/ and http://www.imap.org/.

To set up a notification mailer, you must perform the following steps.

  1. Set up an SMTP mail server to send outbound messages.

  2. Set up an IMAP mail server to receive inbound messages.

  3. Set up an e-mail account for the notification mailer on your IMAP mail server, and set up three folders within that account: one to use as an inbox, one to store processed messages, and one to store discarded messages. The default values for these folders in the notification mailer configuration wizard are INBOX, PROCESS, and DISCARD. To avoid having to change these configuration parameters, name the folders within your account with these default names. Note that the values for the processed message folder and discard message folder are case-sensitive, while the name of the inbox folder is not case-sensitive.

  4. You can use AutoConfig to enter the following configuration parameters for the seeded notification mailer service component during installation. For more information about running AutoConfig, see MetaLink Note 165195.1 and AutoConfig, Oracle Applications AD Utilities Reference Guide.

  5. Ensure that the Business Event System status is set to Enabled in the Global Workflow Preferences page, and that the JOB_QUEUE_PROCESSES and AQ_TM_PROCESSES database initialization parameters, which are required for the Business Event System, are set to appropriate values. The Business Event System status is set to Enabled by default, and usually you do not need to change the status. If notification processing is not being completed, however, you should check this preference value.

  6. Before a service component can run, the container which manages it must first be started. Notification mailer service components belong to a container named Workflow Mailer Service, while the agent listener service components that are also required for notification mailer processing belong to a container named Workflow Agent Listener Service. You should ensure that these two containers are running. Use the Service Instances page to start the containers as service instances in Generic Service Management (GSM).

  7. When the Workflow Agent Listener Service container is running, it automatically starts agent listener service components for the standard WF_DEFERRED, WF_ERROR, and WF_NOTIFICATION_IN agents in the Business Event System, which are required for notification mailer processing. Ensure that these agent listeners are running.

  8. Use the notification mailer configuration wizard to configure the notification mailer service component you want. If you entered configuration parameters for the seeded Workflow Notification Mailer through AutoConfig, you only need to enter the password for the e-mail inbox in order to complete the configuration for that mailer and begin running it. If you did not enter parameters for the seeded mailer through AutoConfig, then in order to complete the configuration for that mailer you need to enter only the IMAP server, SMTP server, e-mail inbox username, e-mail inbox password, reply to e-mail address, and HTML agent name. All other configuration parameters for the seeded Workflow Notification Mailer are initially set to default values and do not need to be changed, although you can optionally do so if you choose.

  9. (Optional) By default, the seeded Workflow Notification Mailer has a Launch Summary Notifications event scheduled to send summary notifications once a day. You can optionally use the notification mailer configuration wizard to modify the start time and interval for this event's schedule, or to schedule the Launch Summary Notifications event at the interval you choose for any notification mailer service component. When this event is processed, a summary notification is sent to each role with a notification preference of SUMMARY, listing all the notifications that are currently open for that role.

  10. (Optional) You can optionally use the WF: Mailer Cancellation Email profile option to determine whether notification mailers send Workflow Canceled Mail messages when previously sent notifications are canceled. Set this profile option to Enabled if you want to send cancellation messages, or to Disabled if you do not want to send cancellation messages. The WF: Mailer Cancellation Email profile option must be set at site level. The default value is Enabled. See: Overview of Setting User Profiles, Oracle Applications System Administrator's Guide.

  11. (Optional) The seeded Workflow Notification Mailer uses the Automatic startup mode by default and will be started automatically when you complete its configuration. If you select the Manual startup mode for a notification mailer service component, use the Service Components page or the Component Details page to start that notification mailer. You can also use these pages to manage any notification mailer service component.

 

Outbound Notification Mailer Processing

When the Workflow Engine determines that a notification message must be sent, it raises an event in the Business Event System called oracle.apps.wf.notification.send. Oracle Workflow provides a seeded subscription to this event, which is defined to be deferred immediately so that the workflow process that owns the notification can continue. The event is placed on the standard WF_DEFERRED agent. Oracle Workflow provides a seeded agent listener named Workflow Deferred Agent Listener that runs on this agent to continue notification processing.

When the event is dequeued from WF_DEFERRED and the subscription is processed, the subscription requires the event data for the event, causing the Generate function for the event to be executed. The Generate function for this event performs the following actions:

Finally, the subscription places the event message on the standard WF_NOTIFICATION_OUT agent.

A notification mailer service component polls the WF_NOTIFICATION_OUT agent for messages that must be sent by e-mail. When the notification mailer dequeues a message from this agent, it uses a Java-based notification formatter to convert the XML representation of the notification into a MIME (Multi-purpose Internet Mail Extensions) encoded message and sends the message by the Simple Mail Transfer Protocol (SMTP).

The e-mail notifications are based on message templates defined in Oracle Workflow Builder. Oracle Workflow provides a set of standard templates in the System: Mailer item type, which are used by default. It is not recommended to modify the standard templates. However, you can customize the message templates used to send your e-mail notifications by creating your own custom message templates in the System: Mailer item type using the Workflow Builder, and assigning these templates to a particular notification mailer service component in the mailer configuration parameters. The templates assigned to a mailer override the default System: Mailer templates.

Additionally, you can create your own custom message templates in a custom item type using the Workflow Builder, and assign these templates to a particular notification in a workflow process by defining special message attributes. In this case the templates assigned to the notification override both the templates assigned to a mailer and the default System: Mailer templates.

Inbound Notification Mailer Processing

A notification mailer can also processes e-mail responses from users, using the Internet Message Access Protocol (IMAP). The notification mailer uses a Java-based e-mail parser to interpret the text of each message and create an XML representation of it.

A notification mailer uses three folders in your response mail account for response processing: one to receive incoming messages, one to store processed messages, and one to store discarded messages.

A notification mailer does the following to process response messages:

The notification mailer performs the following steps for messages that belong to its node.

Finally, if there are no more unprocessed messages in the inbox, the notification mailer logs out of the mail and database accounts.

Oracle Workflow provides a seeded agent listener named Workflow Inbound Notifications Agent Listener that runs on the WF_NOTIFICATION_IN agent to continue notification processing for the valid response messages placed on that agent. When an event message is dequeued from WF_NOTIFICATION_IN, Oracle Workflow executes a seeded subscription that calls the appropriate notification response function to record the response and complete the notification.

Notification Mailer Configuration Wizard

The notification mailer configuration wizard lets you configure a notification mailer service component by defining general and detail attributes, defining e-mail server and message generation parameters, scheduling control events, defining tags to assign statuses to unusual messages, and sending a test message. You can use the configuration wizard to configure a new notification mailer service component, or to edit the configuration of an existing notification mailer service component.

Note: If you are configuring the seeded Workflow Notification Mailer and you entered configuration parameters for this mailer through AutoConfig, then you only need to enter the password for the e-mail inbox in order to complete the configuration for that mailer. If you did not enter parameters for the seeded mailer through AutoConfig, then in order to complete the configuration for that mailer you need to enter only the IMAP server, SMTP server, e-mail inbox username, e-mail inbox password, reply to e-mail address, and HTML agent name. If you did enter an Applications Web Agent parameter in AutoConfig, the HTML agent name defaults to that value. All other configuration parameters for the seeded Workflow Notification Mailer are initially set to default values and do not need to be changed, although you can optionally do so if you choose.

Navigation: Applications Dashboard > (pull-down menu) Workflow Manager > (B) Go > Notification Mailer status icon > (B) Create > (B) Create Service Component

Navigation: Applications Dashboard > (pull-down menu) Workflow Manager > (B) Go > Notification Mailer status icon > (B) Edit

Define

This page lets you define general service component attributes for a notification mailer. Some attributes are already set to required values and cannot be modified. You must set attributes marked with an asterisk (*) to appropriate values for your environment before you can run the notification mailer.

To cancel the configuration without saving any changes, click the Cancel button.

To save these settings and proceed to the next step of the notification mailer configuration wizard, click the Next button.

To save these settings and proceed to the last step of the notification mailer configuration wizard, click the Finish button.

Details

This page lets you define detail attributes for the notification mailer.

To cancel any changes on this page, click the Cancel button.

To return to the previous step of the notification mailer configuration wizard, click the Back button.

To save these settings and proceed to the next step of the notification mailer configuration wizard, click the Next button.

To save these settings and proceed to the last step of the notification mailer configuration wizard, click the Finish button.

E-mail Servers

This page lets you define e-mail server parameters for the notification mailer. Some parameters are already set to required values and cannot be modified. You must set parameters marked with an asterisk (*) to appropriate values for your environment before you can run the notification mailer. If the notification mailer is currently running, then parameters marked with a refresh icon will be refreshed immediately when you select the Next button or the Finish button.

General

Inbound E-mail Account

Outbound E-mail Account

E-mail Processing

To cancel any changes on this page, click the Cancel button.

To return to the previous step of the notification mailer configuration wizard, click the Back button.

To save these settings and proceed to the next step of the notification mailer configuration wizard, click the Next button.

To save these settings and proceed to the last step of the notification mailer configuration wizard, click the Finish button.

Note: When you click the Next or Finish button, the configuration wizard validates the parameters you entered, including verifying that it can connect to the e-mail account on the specified inbound mail server with the specified user name and password, and that the folders specified in the Processed Folder and Discard Folder exist in that e-mail account. If the parameters are successfully validated, and the notification mailer is currently running, then Workflow Manager immediately refreshes the notification mailer with the new parameters.

Message Generation

This page lets you define message generation parameters for the notification mailer. Some parameters are already set to required values and cannot be modified. You must set parameters marked with an asterisk (*) to appropriate values for your environment before you can run the notification mailer. If the notification mailer is currently running, parameters marked with a refresh icon will be refreshed immediately when you select the Next button or the Finish button.

Send

Templates

This region lets you specify the message templates you want to use to generate e-mail notifications. The template for a particular type of e-mail notification determines the basic format of the notification, including what header information to include, and whether and where to include details such as the message due date and priority.

Oracle Workflow provides a set of standard templates in the System: Mailer item type, which are used by default. It is not recommended to modify the standard templates. However, you can customize the message templates used to send your e-mail notifications by creating your own custom message templates in the System: Mailer item type using the Workflow Builder, and assigning these templates to a particular notification mailer service component in this region. The templates assigned to a mailer override the default System: Mailer templates.

Additionally, you can create your own custom message templates in a custom item type using the Workflow Builder, and assign these templates to a particular notification in a workflow process by defining special message attributes. In this case the templates assigned to the notification override both the templates assigned to a mailer and the default System: Mailer templates.

To cancel any changes on this page, click the Cancel button.

To return to the previous step of the notification mailer configuration wizard, click the Back button.

To save these settings and proceed to the next step of the notification mailer configuration wizard, click the Next button.

To save these settings and proceed to the last step of the notification mailer configuration wizard, click the Finish button.

Note: When you click the Next or Finish button, the configuration wizard validates the parameters you entered. If the parameters are successfully validated, and the notification mailer is currently running, then Workflow Manager immediately refreshes the notification mailer with the new parameters.

Scheduling Events

This page lets you schedule events to control the running of the notification mailer service component. The events are raised at the scheduled time by DBMS jobs. For a notification mailer service component, you can schedule the following events:

For each event, the list displays the event name, date and time when the event is first scheduled to be raised, the interval in minutes at which the event is reraised, and, for a Refresh event, any parameters to be refreshed. You can specify the following refreshable parameters, using the parameters' internal names, when you refresh the notification mailer.

To cancel any changes on this page, click the Cancel button.

To return to the previous step of the notification mailer configuration wizard, click the Back button.

To save these settings and proceed to the next step of the notification mailer configuration wizard, click the Next button.

To save these settings and proceed to the last step of the notification mailer configuration wizard, click the Finish button.

Note: The configuration wizard verifies that an event is specified for every row in the list when you click the Next or Finish button. If you do not want to schedule another event, you should remove any empty rows before proceeding.

Tags

This page lets you enter strings of text found in unusual messages and the status you want to assign to an inbound message if it contains any of those strings. For example, unusual messages include bounced or returned messages and auto-reply messages such as those sent by vacation daemons, mass mailing lists, and so on. Since different mail systems vary in how they identify bounced, undeliverable, or otherwise invalid messages, you can use notification mailer tags to specify how your mail system identifies those stray messages and how you want the notification mailer to handle those messages should it come across them.

Oracle Workflow provides several predefined tags for text commonly found in undeliverable or auto-reply messages. For each tag, the list displays the pattern, which is the string of text to look for in the From line, Subject line, or body of the message, and the action, which is the status to assign to the message if that pattern is found. The notification mailer handles messages according to these status values, as follows:

You can define additional tags for other patterns you want the notification mailer to handle automatically.

Attention: Only a message response that contains a notification ID is checked against the tags. If the notification mailer receives a message response that does not contain a notification ID, it moves the message response to the discard folder and sends a 'Warning' message to the sender that it received unsolicited mail.

Attention: It is important that you uniquely identify bounced messages and auto-replies by defining tags to distinguish them from normal responses. If you do not identify bounced and auto-reply messages, the notification mailer can mistake these as invalid responses, send an 'Invalid' message, and continue to wait for a reply. In both cases a perpetual loop would occur where the notification mailer continues sending out an 'Invalid' message and the 'Invalid' message bounces back or is auto-replied each time.

Attention: If a message response matches more than one string in the list of tags, the message is tagged with the status of the first tag it matches. That is, the notification mailer performs a top to bottom comparison against the tag list. Due to this behavior, you should prioritize your strings listing the ERROR tags first, followed by the UNAVAIL and then IGNORE tags.

To cancel any changes on this page, click the Cancel button.

To return to the previous step of the notification mailer configuration wizard, click the Back button.

To save these settings and proceed to the next step of the notification mailer configuration wizard, click the Next button.

To save these settings and proceed to the last step of the notification mailer configuration wizard, click the Finish button.

Test

This page lets you test the notification mailer configuration by sending a sample notification message. Select the recipient role to which the message should be sent, and click the Send Test Message button. Then check the Worklist page or the e-mail account for the recipient role, depending on the role's notification preference, to verify that the test message was received. The test message does not require a response, so you can close it after reviewing it. However, you can optionally respond with a comment to acknowledge the message.

To successfully send a test message, you must select a recipient role that either has a valid e-mail address defined, or that has members with valid e-mail addresses defined.

Note: The settings you define for previous configuration parameters determine how the test message is sent. For example, if you specify an e-mail address in the Test Address parameter, that address overrides the e-mail address of the recipient role and the test message is sent to the test address instead. Also, if you select the Autoclose FYI parameter, the test message is automatically closed and does not appear in the Worklist unless you display your closed messages.

To return to the page from which you accessed the notification mailer configuration wizard, click the Cancel button.

To return to the previous step of the notification mailer configuration wizard, click the Back button.

To proceed to the next step of the notification mailer configuration wizard, click the Next button.

To proceed to the last step of the notification mailer configuration wizard, click the Finish button.

Review

This page lets you review the configuration parameter values that you set, the events that you scheduled, and the tags that you defined for this notification mailer service component.

Reviewing Notification Mailer Component Details

The Component Details page lets you review the configuration and control the running of a notification mailer service component.

Navigation: Applications Dashboard > (pull-down menu) Workflow Manager > (B) Go > Notification Mailer status icon > (B) View Details

The Component Details page displays the configuration attributes and parameters defined for the notification mailer. If you want to change the value of any parameter, edit the configuration using the notification mailer configuration wizard.

The Component Details page also displays the control events that are currently scheduled for the notification mailer. For each event, the list shows the event name, initial start time, whether the event is currently running, the next scheduled execution time for a repeating event, the last previous execution time for a repeating event, the interval in minutes between executions of a repeating event, the number of times the event has failed, the job ID of the DBMS job used to schedule the event, and the PL/SQL API that DBMS job runs.