Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle SOA Suite
11g Release 1 (11.1.1.4.0)

Part Number E10224-07
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

64 User Messaging Preferences

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:

64.1 Introduction to User Messaging Preferences

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.

64.1.1 Terminology

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.

64.1.2 Configuration of Notification Delivery Preferences

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 64-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.

64.1.3 Delivery Preference Rules

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.

64.1.3.1 Data Types

Table 64-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 64-1 Data Types Supported by User Messaging Preferences

Data Type Comparison Operators Supported Values

Date

<, >, between, <=, >=

Date is accepted as a java.util.Date object or string representing the number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT (in essence, the value from java.util.Date.getTime() or java.util.Calendar.getTime()).

Time

==, !=, 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)

<, >, between, <=, >=, isMultipleOf, isNotMultipleOf

A java.lang.Double object or a string representing a floating decimal point number with double precision.

String

==, !=, contains, not contains

Any arbitrary string.


Note:

The String data type does not support regular expressions.

The Time data type is only available to System Terms.

64.1.3.2 System Terms

Table 64-2 lists system terms, which are pre-defined business terms. Administrators cannot extend the system terms.

Table 64-2 System Terms Supported by User Messaging Preferences

System Term Data Type Supported Values

Date

Date

Date is accepted as a java.util.Date object or string representing the number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT (in essence, the value from java.util.Date.getTime() or java.util.Calendar.getTime()).

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.


64.1.3.3 Business Terms

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 BPM Suite. A business term consists of a key, a data type, an optional description, and an optional List of Values (LOV).

Table 64-3 lists the pre-defined business terms supported by User Messaging Preferences.

Table 64-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

Time

Number (Decimal)

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


64.1.4 Rule Actions

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 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.

64.2 How to Manage Messaging Channels

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 64-1).

Figure 64-1 Messaging Channels Tab

Description of Figure 64-1 follows
Description of "Figure 64-1 Messaging Channels Tab"

The Messaging Channels tab enables users to perform the following tasks:

64.2.1 Creating a Channel

To create a channel:

  1. Click Create (Figure 64-2).

    Figure 64-2 The Create Icon

    Description of Figure 64-2 follows
    Description of "Figure 64-2 The Create Icon"

  2. Enter a name for the channel in the Name field (Figure 64-3).

  3. Select the channel's transport type from the Type dropdown menu.

  4. Enter the number or address appropriate to the transport type you selected.

  5. Select the Default checkbox to set the channel as a default channel. You can have multiple default channels.

    Figure 64-3 Creating a Channel

    Description of Figure 64-3 follows
    Description of "Figure 64-3 Creating a Channel"

  6. Click OK to create the channel. The channel appears on the Channels page. The Channels page enables you to edit or delete the channel.

64.2.2 Editing a Channel

To edit a channel, select it from the Channels list and click Edit (Figure 64-4). The editing page appears for the channel, which enables you to change the channel properties described in Section 64.2.1, "Creating a Channel".

Figure 64-4 Edit a Channel

Description of Figure 64-4 follows
Description of "Figure 64-4 Edit 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 64-5). The only operation that can be performed on such as channel is to make it the default.

Figure 64-5 Edit a Identity Store-Backed Channel

Description of Figure 64-5 follows
Description of "Figure 64-5 Edit a Identity Store-Backed Channel"

64.2.3 Deleting a Channel

To delete a channel, select it and click Delete (Figure 64-6).

Figure 64-6 The Delete Icon

Description of Figure 64-6 follows
Description of "Figure 64-6 The Delete Icon"

64.2.4 Setting a Default Channel

You can configure one or more channels as default channels. Email is preconfigured as a default for receiving notifications. 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 64-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.

Figure 64-7 The Default Icon

Description of Figure 64-7 follows
Description of "Figure 64-7 The Default Icon"

64.3 Creating Contact Rules using Filters

The Messaging Filters tab (Figure 64-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 64-8 Messaging Filters Tab

Description of Figure 64-8 follows
Description of "Figure 64-8 Messaging Filters Tab"

Figure 64-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.

Figure 64-9 Creating a Filter

Description of Figure 64-9 follows
Description of "Figure 64-9 Creating a Filter"

64.3.1 Creating Filters

To create a filter:

  1. Click Create (Figure 64-2). The Create Filter page appears (Figure 64-9).

  2. Enter a name for the filter in the Filter Name field.

  3. If needed, enter a description of the filter in the Description field.

  4. 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.

  5. Define the filter conditions using the lists and fields of the Condition section as follows:

    1. Select the notification's attributes. Refer to Table 64-3 for a list of these attributes.

    2. Combine the selected condition type with one of the comparison operators described in Table 64-1.

    3. 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.

  6. Click Add (Figure 64-6) to add the attribute and the comparison operators to the table.

  7. Repeat these steps to add more filter conditions. To delete a filter condition, click Delete (Figure 64-6).

  8. 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.

  9. To set the delivery channels, select a channel from the Add Notification Channel list and then click Add (Figure 64-6). To delete a channel, click Delete (Figure 64-6).

  10. 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.

  11. Click OK to create the filter. Clicking Cancel discards the filter.

64.3.2 Editing a Filter

To edit a filter, first select it and then click Edit (Figure 64-9). The editing page appears for the filter, which enables you to add or change the filter properties described in Section 64.3.1, "Creating Filters".

64.3.3 Deleting a Filter

To delete a filter, first select it and then click Delete (Figure 64-6).

64.4 Configuring Settings

The Settings tab (Figure 64-10), accessed from the upper right area, enables users to set the following parameters:

Figure 64-10 Configuring Settings

Description of Figure 64-10 follows
Description of "Figure 64-10 Configuring Settings"