24 About Real-Time Rerating Pipelines

This chapter describes:

  • How events are processed by Oracle Communications Billing and Revenue Management (BRM) real-time rerating pipelines.

  • How to configure real-time rerating pipelines.

Before reading this chapter, you should be familiar with the Pipeline Manager architecture. See BRM Configuring Pipeline Rating and Discounting.

About Real-Time Rerating Pipelines

When you run the "pin_rerate" utility to rerate events rated in real-time and events rated in a batch pipeline, you run the pin_rerate utility to send pipeline-rated events to a real-time rerating pipeline to be rerated. See "About Comprehensive Rerating Using pin_rerate".

The Connection Manager (CM) sends pipeline-rated events in the form of an flist to the NET_EM pipeline module. The NET_EM module transfers the event to a real-time rerating pipeline for rerating.

The real-time rating opcodes add to the flist all the enrichment data needed by the real-time rerating pipeline to rate the event. For example, if the real-time rating opcodes determine that a discount should be applied, it adds the discount information to the flist.

Similar to a batch rerating pipeline, a real-time rerating pipeline performs both rating and discounting functions.

To rerate events, the real-time rerating pipeline gets the new pricing information from the Pipeline Manager database. Certain configuration data, such as currency and non-currency resource information, are obtained from the BRM database.

Overview of Event Processing in the Real-Time Rerating Pipeline

  1. The INP_Realtime input module converts the flist received from the NET_EM module to event data record (EDR) format and creates an EDR container.

    Tip:

    You can also create and run an iScript to manipulate data in the EDR container before it is sent to the pipeline modules.
  2. The pipeline function modules calculate the new balance impacts by using the new pricing and discounting information and then add the balance impacts to the EDR container.

  3. The OUT_Realtime module converts the EDR back into flist format and sends the flist to NET_EM.

  4. NET_EM sends the flist with the new balance impacts back to the CM.

  5. BRM updates the account's balances and records the event in the BRM database.

For detailed information about configuring the real-time rerating pipeline, see "Configuring Rerating of Pipeline-Rated Events in the Real-Time Rerating Pipeline".

Figure 24-1 shows the data flow for rerating pipeline-rated events by using the real-time rerating pipeline:

Figure 24-1 Rerating Data Flow for Pipeline-Rated Events

Description of Figure 24-1 follows
Description of ''Figure 24-1 Rerating Data Flow for Pipeline-Rated Events''

About Transaction Management for the Real-Time Rerating Pipeline

The real-time rerating pipeline does not use the Transaction Manager (TAM) module. Instead, transaction handling is provided by the CM. When a rerating transaction fails, the CM rolls back the transaction and restores all the account balances in the BRM database. For this reason, function modules and iScripts used by the real-time rerating pipeline are stateless.

Important:

If you use iScripts for custom processing, ensure that the iScripts are stateless.

Configuring Rerating of Pipeline-Rated Events in the Real-Time Rerating Pipeline

To configure rerating of pipeline-rated events in the real-time rerating pipeline, perform the following tasks:

Configuring a Real-Time Rerating Pipeline

A real-time rerating pipeline is configured similarly to a batch rerating pipeline, but with fewer preprocessing and post-rating modules. This is because most of the enrichment data is provided in the input flist received from the CM.

You typically create a separate instance of Pipeline Manager for real-time rerating. The default registry file is Pipeline_home/conf/wirelessRealtime.reg.

Figure 24-2 shows the real-time rerating pipeline architecture:

Figure 24-2 Real-Time Rerating Pipeline Architecture

Description of Figure 24-2 follows
Description of ''Figure 24-2 Real-Time Rerating Pipeline Architecture''

Configuring Multiple Real-Time Rerating Pipelines

To improve performance or scalability, you configure multiple instances of real-time rerating pipelines. For example, you can increase performance by configuring multiple pipelines to process rerate requests in parallel or by configuring multiple real-time rerating pipelines to process different rerate requests: for example, by configuring one pipeline that rerates only GPRS events and another that rerates only GSM events.

Configuring the Real-Time Rerating Data Pool

Configure the following data modules:

  • DAT_Zone

  • Rateplan

  • DAT_Calendar

  • DAT_TimeModel

  • DAT_PriceModel

  • Dayrate

  • DAT_Currency

  • DAT_USC_Map

See "Configuring the data pool" in BRM System Administrator's Guide.

Configuring the Modules in the Real-Time Rerating Pipeline

To configure the modules in the real-time rerating pipelines, perform the following tasks:

  • Configure the input module to use the XML file containing the flist-to-EDR mappings.

    Use this entry for the OpcodeMapping entry:

    OpcodeMapping = ./formatDesc/Formats/Realtime/rate_event.xml
    
  • Configure NET_EM to manage data between the CM and Pipeline Manager.

  • Configure the output module to add any customizations to the output flist.

  • Configure these function modules to perform rerating:

    • FCT_ServiceCodeMap

    • FCT_CustomerRating

    • FCT_PreRating

    • FCT_IRules

    • FCT_USC_Map

    • FCT_RSC_Map

    • FCT_MainRating

    • FCT_Dayrate

    • FCT_RateAdjust

    • FCT_Rounding

    • FCT_DiscountAnalysis

    • FCT_Discount

Configuring the Real-Time Rerating Pipeline to Set Product Validity Periods

If your products are configured to start when they are first used, configure the ISC_FirstProductRealtime iScript in the real-time rerating pipeline.

For information about first-usage start times, see 12io12,lw-023p, and "About Balance Impacts That Become Valid on First Usage".

When products start on first usage, the real-time rerating pipeline adds the account's first-usage product and discount information to the EDR. ISC_FirstProductRealtime sets the validity period in the BRM database for those products that were used to rate the event and that start on first usage. This triggers any purchase and cycle fees.

Configuring the Real-Time Rerating Pipelines in the IFW_PIPELINE Table

Pipeline Manager stores information about pipelines in the IFW_PIPELINE table. The pipelines that are preconfigured in the Pipelines section of the default registry file (Pipeline_home/conf/wirelessRealtime.reg) are inserted into the IFW_PIPELINE table during Pipeline Manager installation.

Important:

  • If you are not using the default registry file, and you have configured new real-time rerating pipelines, you must manually insert the pipelines into the IFW_PIPELINE table by using SQL commands. Otherwise, you will receive an error at system startup.

  • If you are using the default registry file and have changed the default pipeline names or you have configured additional pipelines, you must manually insert the new pipelines into the IFW_PIPELINE table.

The following example shows SQL commands to insert RealtimeReratingGSM and RealtimeReratingGPRS pipelines into the IFW_PIPELINE table:

% sqlplus pin/password@databaseAlias

SQL>INSERT INTO IFW_PIPELINE ( PIPELINE, NAME, EDRC_DESC ) VALUES ( 'RealtimeReratingGSM', 'GSM Realtime Rerating Pipeline', 'ALL_RATE'); 

SQL>INSERT INTO IFW_PIPELINE ( PIPELINE, NAME, EDRC_DESC ) VALUES ( 'RealtimeReratingGPRS', 'GPRS Realtime Rerating Pipeline', 'ALL_RATE'); 

SQL>commit;

Configuring NET_EM to Route Rerate Requests Based on the Event Field Value

To configure NET_EM to route rerate requests to multiple real-time rerating pipelines based on the type of event, you set the FieldName and FieldValue NET_EM module registry entries.

Important:

If you use event routing based on the event field value, ensure that the input events contain the expected field name and field values specified in the NET_EM module registry. Otherwise, NET_EM will not be able to route the events.

By using the ”.” notation, you can specify a field at any level in the input event flist to be used to route the event. For example, this substruct and field:

PIN_FLD_EVENT
     PIN_FLD_POID

is represented like this:

PIN_FLD_EVENT.PIN_FLD_POID

In the NET_EM registry below, if PIN_FLD_EVENT.PIN_FLD_POID is a GSM event, the rerate request is routed to any one of the two instances of the GSM rerating pipeline (RealtimeReratingGSM). If the event is a GPRS event, the rerate request is routed to any one of the two instances of the GPRS rerating pipeline (RealtimeReratingGPRS).

DataPool 
{
     RealtimePipeline
     {
          ModuleName = NET_EM
          Module
          {
               ThreadPool 
               { 
                   Port = 14579
                   Threads = 4
               }

               ReratingOpcode
               {
                   OpcodeName = PCM_OP_RATE_PIPELINE_EVENT
                   FieldName = PIN_FLD_EVENT.PIN_FLD_POID
                   GSMEvent
                   {
                     FieldValue = /event/delayed/session/telco/gsm
                     PipelineName = RealtimeReratingGSM
                     NumberOfRTPipelines = 2
                   }
                   GPRSEvent
                   {
                     FieldValue = /event/delayed/session/gprs
                     PipelineName = RealtimeReratingGPRS
                     NumberOfRTPipelines = 2
                   }
               }
               
          }
     }
}