Skip Headers
Oracle® Communications Billing and Revenue Management Setting Up Pricing and Rating
Release 7.5

E16711-09
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

25 About Rerating Pipeline-Rated Events

This chapter provides an overview of how you can rerate events that were originally rated in batch by Oracle Communications Billing and Revenue Management (BRM) Pipeline Manager.

For information about rerating events rated in real time, see "About Comprehensive Rerating Using pin_rerate".

Overview of Rerating Events

It is possible to discover pricing or rating configuration errors after events have been rated. For example, a sample review of invoices might reveal a price configuration error. In addition to correcting the price configuration, you might need to rerate events that were rated with the incorrect configuration.

Use the following components to rerate events that were originally rated by Pipeline Manager:

  1. Use the Event Extraction utility to obtain data from the BRM database about the events you must rerate. This utility writes event data to a file.

  2. Use Pipeline Manager to process the file that was created by the Event Extraction utility. There are two steps:

    1. Restore discount and aggregation data to the state it was in before rating the events. For example, if you use volume discounting based on calls made, you can adjust the number of calls made.

    2. Rerate the events using the new rating data. This process creates an output file.

  3. Use the Rated Event Loader (RE Loader) to load the output file generated by Pipeline Manager into the BRM database.

Pipeline Manager only rerates events that it has previously processed. When you use pipeline rerating, there might be events that are not rerated. For example, if you retrieve events for rerating based on the account, any events belonging to the account that were generated in BRM and not previously processed by Pipeline Manager are not rerated. Ensure that all events are rerated by also running the BRM rerating utility (pin_rerate). See "About Comprehensive Rerating Using pin_rerate".

Important:

When you rerate wireless events by using Pipeline Manager, you rerate only EDRs that have been rated by Pipeline Manager. Events that have been rated in real time are rerated by using the pin_rerate utility.

Figure 25-1 shows the rerating process:

Figure 25-1 Rerating Process

Description of Figure 25-1 follows
Description of "Figure 25-1 Rerating Process"

About Extracting Events from the BRM Database

The Event Extraction Manager searches for and extracts events meeting a specified search criteria and writes the results to an output file. It does not modify or process any of the events, nor does it lock accounts in your database. This enables BRM and other applications to safely access accounts in the database while you are extracting events.

To extract events, you perform the following steps:

  1. Edit the event search file to specify which events to extract. You can specify events based on many different event attributes, for example, date, account, product, rate plan, and service. See "Event Search Criteria".

  2. Configure and run the pin_event_extract utility to create the event extract output file. This file contains the list of events to rerate in EDR (event data record) format, and is used as the input for the Pipeline Manager rerating process.

For more information about extracting events for rerating, see "Using Event Extraction Manager".

About Rerating Events with Pipeline Manager

To rerate events with Pipeline Manager, you perform the following steps:

  1. Correct the rating configuration that caused the non-valid rating.

  2. Configure the back-out pipeline. This pipeline uses the event extract output file as input. It backs out the existing balance impacts from discount accounts, aggregates the results, and outputs a back-out file.

  3. Configure the rerating pipeline. This pipeline uses the back-out file as input. It rerates the events using the corrected rating configuration. The rerating process is the same as the rating process, however, the output file also includes the delta of the old and new balance impacts. Rated Event Loader loads the file into the BRM database.

Figure 25-2 shows the rerating steps described.

Figure 25-2 Pipeline Manager Rerating Process

Description of Figure 25-2 follows
Description of "Figure 25-2 Pipeline Manager Rerating Process"

For more information, see "Configuring Rerating in Pipeline Manager".

About Loading Rerated Events into the BRM Database

You load rerated events into the BRM database by running the Rated Event Loader (RE Loader). RE Loader identifies events that have already been billed, ensuring that account balances are accurately updated. See "Adjusting Account Balances".

To load rerated events into the BRM database, you perform the following steps:

  1. Set up the RE Loader processing directories.

  2. Configure RE Loader to load the rerated event types by configuring the RELoader_home/Infranet.properties file.

  3. Run RE Loader.

For more information about RE Loader, see "Understanding Rated Event Loader" in BRM Configuring Pipeline Rating and Discounting.

Adjusting Account Balances

RE Loader determines if each event has been billed. For events that have been billed, RE Loader creates an adjustment event (/item/adjustment) with the appropriate balance impact and sets the event type to /event/billing/adjustment/event. It then loads the events and updates the account balances. RE Loader updates the event as having been rerated and keeps a history of each update.

About Back-Out-Only Rerating

You use back-out-only rerating to reprocess events that were originally rated by Pipeline Manager. It enables you to back out only the event balance impacts without rerating the events.

For example, you might want to use back-out-only rerating when you find that call detail records (CDRs) rated and recorded in the BRM database contain incorrect values. In such cases, you can use back-out-only rerating to back out the event balance impacts without rerating the event.

The output file created by backout-only rerating is loaded into the BRM database by the Rated Event (RE) Loader.

To process events for back-out-only rerating:

  1. Use the Event Extraction Manager to extract the events from the BRM database. See "About Extracting Events for Back-Out-Only Rerating".

  2. Use the backout pipeline to process the output file generated by the Event Extraction Manager. See "About Configuring the Backout Pipeline for Back-Out-Only Rerating".

  3. Use the Rated Event Loader to load the output file generated by the backout pipeline into the BRM database. See "About Loading Rerated Events into the BRM Database".

Figure 25-3 shows the back-out-only rerating process:

Figure 25-3 Back-Out-Only Rerating Process

Description of Figure 25-3 follows
Description of "Figure 25-3 Back-Out-Only Rerating Process"

About Extracting Events for Back-Out-Only Rerating

Use the Event Extraction Manager to find and extract events from the BRM database for backout-only processing. The Event Extract Tool (pin_event_extract) generates an output file containing the events in EDR format.

To extract events for back-out-only rerating, run pin_event_extract with the -e parameter.

Important:

If you do not use the -e parameter, Pipeline Manager sends the EDRs in the output file to the rerating pipeline for rerating.

For detailed information about specifying the search criteria and running the pin_event_extract utility, see "Using Event Extraction Manager".

About Configuring the Backout Pipeline for Back-Out-Only Rerating

You use the backout pipeline to process the EDRs extracted by the Event Extraction Manager. The backout pipeline backs out the event balance impacts and writes the events to an output file.

The backout pipeline generates output files for both normal rerating and back-out-only rerating:

  • In normal rerating, the output file is processed by the batch-rerating pipeline.

  • In back-out-only rerating, the output file is processed by RE Loader.

Both types of rerating require different file formats and output grammar.

RE Loader loads events of different types from separate directories. For this reason, with back-out-only rerating, the backout pipeline sends the EDRs to different output streams based on the event type. For example, the backout pipeline writes all GSM events in one file, and all GPRS events in another file, and sends them to separate output directories.

To configure back-out-only rerating:

  1. Configure the OUT_GenericStream module to generate the output file using the output grammar for back-out-only rerating and to send the output files to different directories based on the event type. See "Configuring the OUT_GenericStream Module".

  2. Configure RE Loader to load the back-out output file into the BRM database. See "About Loading Rerated Events into the BRM Database".

Configuring the OUT_GenericStream Module

The OUT_GenericStream module formats the output for back-out-only rerating based on the grammar file specified in its registry. The EXT_OutFileManager sends the data to the output directories based on the event type specified in its registry. You configure the EXT_OutFileManager module inside the OUT_GenericStream module.

To configure the OUT_GenericStream and EXT_OutFileManager modules:

  • Set the Grammar entry to

    ./formatDesc/Formats/Solution42/V670_EVENT_LOADER_OutGrammar.dsc.
    
  • Set the OutputPath entry to specify the output directory. For example, for GSM events, set OutputPath to

    ./data/backout/out/gsm/telephony.
    

Sample OUT_GenericStream registry for GSM events:

BackOutOnlyTELOutput
{
     ModuleName = OUT_GenericStream
     ProcessType = ALL_BCKOUT
     EventType = /event/delayed/session/telco/gsm
     Module
     {
          Grammar = ./formatDesc/Formats/Solution42/V670_EVENT_LOADER_OutGrammar.dsc
          DeleteEmptyStream = True
          OutputStream
          {
               ModuleName = EXT_OutFileManager
               Module
               {
                    OutputPath = ./data/backout/out/gsm/telephony
                    OutputPrefix = test_TEL
                    OutputSuffix = .out
                    TempPrefix   = .
                    TempDataPath    = ./data/backout/out/gsm/telephony
                    TempDataPrefix  = tel.tmp.
                    TempDataSuffix  = .data
                    Replace = TRUE
               }
          }
     }
}

Sample OUT_GenericStream registry for GPRS event:

BackOutOnlyGPRSOutput
{
     ModuleName = OUT_GenericStream
     ProcessType = ALL_BCKOUT
     EventType = /event/delayed/session/gprs
     Module
     {
          Grammar = ./formatDesc/Formats/Solution42/V670_EVENT_LOADER_OutGrammar.dsc
          DeleteEmptyStream = True #defaults to true
          OutputStream
          {
               ModuleName = EXT_OutFileManager
               Module
               {
                    OutputPath = ./samples/wireless/data/backout/out/gprs
                    OutputPrefix = test_GPRS
                    OutputSuffix = .out
                    TempPrefix   = .
                    TempDataPath    = ./samples/wireless/data/backout/out/gprs
                    TempDataPrefix  = gprs.tmp.
                    TempDataSuffix  = .data
                    Replace = TRUE
               }
          }
     }
} # end of BackOutOnlyGPRSOutput 

Important:

To ensure output file integrity, specify a unique combination of OutputPath, OutputSuffix, and OutputPrefix values for each output stream defined in the registry.

About Synchronizing Rating and Loading Applications

When you use Pipeline Manager to rerate wireless events and load those events using RE Loader, you must synchronize the following applications:

  • Pipeline Manager

  • Event Extraction

  • Rated Event Loader

You must synchronize these applications for two reasons:

  • RE Loader locks the BRM database tables that it loads into, making them inaccessible to other applications during the loading process. Event Extraction Manager returns an error if it cannot access the database tables.

  • If any events have not been rated and loaded before Pipeline Manager starts rerating, the account balances can be incorrectly updated when those events are processed after rerating is complete.

You must synchronize these applications manually by stopping and restarting them in a specific order:

  1. Ensure that all events have been rated by Pipeline Manager.

  2. Ensure that all rated events have been loaded by RE Loader.

    There should be no remaining unrated files in the pipeline output directories. If errors occurred during loading that require you to reload events, perform those tasks before continuing.

  3. Stop the rerating pipeline.

  4. Stop the Batch Controller, thereby disabling any scheduled RE Loader processes.

  5. Run the Event Extraction utility.

  6. Start the backout pipeline to remove all the erroneous impact balances from the discount accounts.

  7. Stop the backout pipeline and restart the rerating pipeline to rerate the events. The rerating pipeline can be restarted using the Pipeline Manager EventHandler.

  8. If you configured RE Loader to run manually, run the RE Loader "pin_rel" utility. If errors occur during loading, correct them and reload the events before continuing.

  9. If you configured RE Loader to run automatically, enable the REL handler that runs pin_rel in the Batch Controller configuration file by doing the following:

    • Stop and restart the Batch Controller to run "pin_rel" and load the rerated events. If errors occur during loading, correct them and reload the events before continuing.

    • Disable the REL handler that runs pin_rerel in the Batch Controller configuration file.

  10. Enable RE Loader in the Batch Controller configuration file.