This chapter describes the User Messaging Preferences that are packaged with Oracle User Messaging Service. It describes how to work with messaging channels and to create contact rules using messaging filters.
Note:
To learn about the architecture and components of Oracle User Messaging Service, see Oracle Fusion Middleware Getting Started with Oracle SOA Suite.
This chapter includes the following sections:
User Messaging Preferences allows a user who has access to multiple channels (delivery types) to control how, when, and where they receive messages. Users define filters, or delivery preferences, that specify which channel a message should be delivered to, and under what circumstances. Information about a user's devices and filters are stored in any database supported for use with Oracle Fusion Middleware.
For an application developer, User Messaging Preferences provide increased flexibility. Rather than an application needing business logic to decide whether to send an email or SMS message, the application can just send to the user, and the message is delivered according to the user's preferences.
Since preferences are stored in a database, this information is shared across all instances of User Messaging Preferences in a domain.
The oracle.sdp.messaging.userprefs
package contains the User Messaging Preferences API classes. For more information, refer to the Javadoc.
User Messaging Preferences defines the following terminology:
Channel: the transport type, for example, email, voice, or SMS. Also, generally, a physical channel, such as a phone, or PDA.
Channel address: one of the addresses that a channel can communicate with.
Filters: a set of notification delivery preferences.
System term: a pre-defined business term that cannot be extended by the administrator.
Business term: a rule term defined and managed by the system administrator through Enterprise Manager. Business terms can be added, defined, or deleted.
Rule term: a system term or a business term.
Operators: comparison operators equals, does not equal, contains, or does not contain.
Facts: data passed in from the message to be evaluated, such as time sent, or sender.
Rules Engine: the User Messaging Preferences component that processes and evaluates filters.
Comparison: a rule term and the associated comparison operator.
Action: the action to be taken if the specified conditions in a rule are true, such as Broadcast to All, Failover, or Do not Send to Any Channel.
User Messaging Preferences allows configuration of notification delivery preferences based on the following:
a set of well-defined rule terms (system terms or business terms)
a set of channel and the corresponding addresses supported by Oracle User Messaging Service
a set of User Messaging Preferences filters that are transparently handled by a rules engine
One use case for notification delivery preference is for bugs entered into a bug tracking system. For example, user Alex wants to be notified through SMS and EMAIL channels for bugs filed against his product with priority = 1 by a customer type = Premium. For all other bugs with priority > 1, he only wants to be notified by EMAIL. Alex's preferences can be stated as follows:
Example 67-1 Notification Delivery Preferences
Rule (1): if (Customer Type = Premium) AND (priority = 1) then notify [Alex] using SMS and EMAIL. Rule (2): if (Customer Type = Premium) AND (priority > 1) then notify [Alex] using EMAIL.
A runtime service, the Oracle Rules Engine, evaluates the filters to process the notification delivery of user requests.
A delivery preference rule consists of rule comparisons and rule actions. A rule comparison consists of a rule term (a system term or a business term) and the associated comparison operators. A rule action is the action to be taken if the specified conditions in a rule are true.
Table 67-2 lists data types supported by User Messaging Preferences. Each system term and business term must have an associated data type, and each data type has a set of pre-defined comparison operators. Administrators cannot extend these operators.
Table 67-1 Data Types Supported by User Messaging Preferences
Data Type | Comparison Operators | Supported Values |
---|---|---|
Date |
isEqual, isNotEqual, isGreaterThan, isGreaterThanOrEqual, isLessThan, isLessThanOrEqual, Between, isWeekday, isWeekend |
Date is accepted as a |
Time |
isEqual, isNotEqual, Between |
A 4-digit integer to represent time of the day in HHMM format. First 2-digit is the hour in 24-hour format. Last 2-digit is minutes. |
Number (Decimal) |
isEqual, isNotEqual, Between, isGreaterThan, isGreaterThanOrEqual, isLessThan, isLessThanOrEqual, isMultipleOf, isNotMultipleOf |
A |
String |
isEqual, isNotEqual, Contains, NotContains |
Any arbitrary string. |
Note:
The String data type does not support regular expressions.
The Time data type is only available to System Terms.
Table 67-2 lists system terms, which are pre-defined business terms. Administrators cannot extend the system terms.
Table 67-2 System Terms Supported by User Messaging Preferences
System Term | Data Type | Supported Values |
---|---|---|
Date |
Date |
Date is accepted as a |
Time |
Time |
A 4-digit integer to represent time of the day in HHMM format. First 2-digit is the hour in 24-hour format. Last 2-digit is minutes. |
Business terms are rule terms defined and managed by the system administrator through Oracle Application Server 11g Enterprise Manager. For more information on adding, defining, and deleting business terms, refer to Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle Business Process Management Suite. A business term consists of a key, a data type, an optional description, and an optional List of Values (LOV).
Table 67-3 lists the pre-defined business terms supported by User Messaging Preferences.
Table 67-3 Pre-defined Business Terms for User Messaging Preferences
Business Term | Data Type |
---|---|
Service Name |
String |
Process Name |
String |
System Code |
String |
Error Code |
String |
Occurrence Count |
Number (Decimal) |
Organization |
String |
Priority |
String |
Application |
String |
Application Type |
String |
Expiration Date |
Date |
From |
String |
To |
String |
Customer Name |
String |
Customer Type |
String |
Status |
String |
Amount |
Number (Decimal) |
Due Date |
Date |
Process Type |
String |
Expense Type |
String |
Total Cost |
Number (Decimal) |
Processing Time |
Number (Decimal) |
Order Type |
String |
Service Request Type |
String |
Group Name |
String |
Source |
String |
Classification |
String |
Duration |
Number (Decimal) |
User |
String |
Role |
String |
For a given rule, a User Messaging Preferences user can define one of the following actions:
Broadcast to All: send a broadcast message to all channels in the broadcast address list.
Failover: Send a message serially to channels in the address list until one successful message is sent. This action means performing a send to the next channel when the current channel returns a failure status. User Messaging Preferences does not allow a user to specify a channel-specific status code or expiration time.
Do not send to Any Channel: Do not send a message to any channel.
Tip:
User Messaging Preferences does not provide a filter action that instructs "do not send to a specified channel." A best practice is to specify only positive actions, and not negative actions in rules.
Default address: if no action is defined, a message is sent to a default address or addresses, as defined in the Messaging Channels page in Enterprise Manager.
A communication channel defines an address (such as a phone number) and a type (such as a short message service or SMS) for message delivery.
User Messaging Preferences creates a few channels automatically for a user based on the user profile settings in the Identity Store. These channels, called as IDM channels, can be used for message delivery. A POPUP or WORKLIST channel is automatically created when you deploy the corresponding driver. This channel will be removed when the driver is undeployed. The address value for this channel is the user's login ID. Users cannot modify these channels by using the User Messaging Preferences UI.
Note:
For messaging drivers you cannot specify a channel address with spaces. As the channel address value is the login ID, do not use spaces when you create the login ID for the user.
Any channel that a user creates is associated with that user's system ID. In Oracle User Messaging Service, channels represent both physical channels, such as mobile phones, and also email client applications running on desktops, and are configurable on the The Messaging Channels tab (Figure 67-1).
The Messaging Channels tab enables users to perform the following tasks:
To create a channel:
Click Create (Figure 67-2).
Enter a name for the channel in the Name field (Figure 67-3).
Select the channel's transport type from the Type dropdown menu.
Enter the number or address appropriate to the transport type you selected.
Select the Default checkbox to set the channel as a default channel. You can have multiple default channels.
Click OK to create the channel. The channel appears on the Channels page. The Channels page enables you to edit or delete the channel.
To edit a channel, select it from the Channels list and click Edit (Figure 67-4). The editing page appears for the channel, which enables you to change the channel properties described in Section 67.2.1, "Creating a Channel"
.
Certain channels are based on information retrieved from your user profile in the identity store, and this address cannot be modified by User Messaging Preferences (Figure 67-5). The only operation that can be performed on such as channel is to make it the default.
Figure 67-5 Edit a Identity Store-Backed Channel
You can configure one or more channels as default channels. You can add or remove a channel as a default channel.
To set an additional channel as a default, select it, click Edit, and then click Set as default channel. A checkmark (Figure 67-7) appears next to the selected channel, designating it as a default means of receiving notifications. Repeat this procedure to add additional default channels, if required.
Note:
The Business Email channel that is automatically created from the Identity Store attribute is set as a default channel. You cannot remove the default setting of the Business Email channel unless another default channel is set.
For more information about configuring LDAP settings, see "Configuring User Messaging Service Access to LDAP User Profile" in Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle Business Process Management Suite
.
The Messaging Filters tab (Figure 67-8) enables users to build filters that specify not only the type of notifications they want to receive, but also the channel through which to receive these notifications through a combination of comparison operators (such as is equal to, is not equal to), business terms that describe the notification type, content or source, and finally, the notification actions, which send the notifications to all channels, block channels from receiving notifications, or send notifications to the first available channel.
Figure 67-9 illustrates the creation of a filter called Travel Filter, by a user named weblogic, for handling notifications regarding Customers during his travel. Notifications that match all of the filter conditions are first directed to his "Business Mobile" channel. Should this channel become unavailable, Oracle User Messaging Service transmits the notifications as e-mails since the next available channel selected is Business Email.
To create a filter:
Click Create (Figure 67-2). The Create Filter page appears (Figure 67-9
).
Enter a name for the filter in the Filter Name field.
If needed, enter a description of the filter in the Description field.
Select whether notifications must meet all of the conditions or any of the conditions by selecting either the All of the following conditions or Any of the following conditions options.
Define the filter conditions using the lists and fields of the Condition section as follows:
Select the notification's attributes. Refer to Table 67-3 for a list of these attributes.
Combine the selected condition type with one of the comparison operators described in Table 67-1.
Add appropriate values describing the attributes or operators.
For instance, if you select the Date attribute, select one of the comparison operators and then select the appropriate dates from the date chooser.
Click Add (Figure 67-6) to add the attribute and the comparison operators to the table.
Repeat these steps to add more filter conditions. To delete a filter condition, click Delete (Figure 67-6).
Select one of the following delivery rules:
Send Messages to all Selected Channels -- Select this option to send messages to every listed channel.
Send to the First Available Channel (Failover in the order) -- Select this option to send messages matching the filter criteria to a preferred channel (set using the up and down arrows) or to the next available channel.
Send No Messages -- Select this option to block the receipt of any messages that meet the filter conditions.
To set the delivery channels, select a channel from the Add Notification Channel list and then click Add (Figure 67-6). To delete a channel, click Delete (Figure 67-6
).
If needed, use the up and down arrows to prioritize channels. If available, the top-most channel receives messages meeting the filter criteria if you select Send to the First Available Channel.
Click OK to create the filter. Clicking Cancel discards the filter.
To edit a filter, first select it and then click Edit (Figure 67-9). The editing page appears for the filter, which enables you to add or change the filter properties described in Section 67.3.1, "Creating Filters"
.
The Settings tab (Figure 67-10), accessed from the upper right area, enables users to set the following parameters:
Accessibility Mode: select Standard or Screen Reader.
Locale Source: select From Identity Store or From Your Browser.