8 Customizing Rated Event Loader

Learn how to customize Oracle Communications Billing and Revenue Management (BRM) Rated Event Loader (RE Loader) to load events from the Pipeline Manager. This information applies only to the original processing method.

Topics in this chapter:

See also:

Customizing RE Loader

Some of the steps required to customize RE Loader should be performed by a programmer and database administrator. To customize RE Loader, you should be familiar with the following topics:

You can customize RE Loader using the following steps:

  • Adding New Types of Events for RE Loader to Load

  • Creating Custom Error Codes

    Note:

    Do not modify the rel_updater_sp.sql stored procedure or any other stored procedure. Modifying a stored procedure can corrupt data and cause maintenance and upgrade problems. Stored procedures are delivered in source code format due to database limitations and are not designed to be modified. To modify a stored procedure, you must obtain permission to do so from Oracle.

    Note:

    Sub-balances are stored in events in an internal format that optimizes performance and storage efficiency. As a result, the table that stores sub-balances is not visible in the data dictionary. You should not base your customizations on this specific internal format. All sub-balance data is accessible by using the BRM API. To access this internal format, contact Oracle.

Adding New Types of Events for RE Loader to Load

When you offer a new service, you create a new storable class for the service event.

To use RE Loader to load events from a new service or new service subclass, you must create a delayed event for your new service and configure RE Loader to load it.

It is possible to load a subclass of a preconfigured service event without configuring that subclass. However, BRM will be unaware of the subclass because the subclass event is inserted into the parent class table. To track the activity of the subclass events, configure RE Loader to load the specific subclass.

You must create a new delayed event for RE Loader pre-rated events. The name of the new event storable class must start with /event/delayed so that BRM can distinguish it from real-time events. For example, /event/delayed/session/new_event_type.

Note:

Avoid loading prerated events by using RE Loader and another application such as an optional component.

To add an event for RE Loader to load:

  1. If necessary, add the new event storable class to BRM by using Storable Class Editor. See the Storable Class Editor Help. For information about storable classes, see "About Storable Classes and Objects" in BRM Developer's Guide.

    Note:

    If you installed GSM Manager, the /telephony, /fax, /data, and /sms subclasses of /event/delayed/session/telco/gsm already exist in the BRM database and do not need to be created. However, if you want to track activity specific to one of these subclasses, you must perform this entire procedure.

  2. Create partitions for the event by running the partition_utils utility from the BRM_home/apps/partition_utils directory.

    For example, the following command creates partitions for /event/delayed/session/telco/gsm delayed events:

    partition_utils -o enable -t delayed -c /event/session/telco/gsm 

    Note:

    You must create partitions for all subclasses of a specific event that you want to load.

    See "Enabling Delayed-Event Partitioning" and "partition_utils" in BRM System Administrator's Guide.

  3. Create a control file for the new event. A control file or format file specifies the format for a single database table (array or substruct). If you added new fields to an existing array or substruct, modify the control or format file for that table. If you added a new array or substruct, create a new control or format file for the new table. For instructions on creating a control or format file, see your Oracle documentation.

  4. If you created or modified any control files, modify the RE Loader preprocess script (BRM_home/apps/pin_rel/pin_rel_preprocess_cdr.pl) to read the new event fields from the event record data and write the fields to the files loaded by SQL Loader. You can follow the steps used for /event/session/telco/gsm in the pin_rel_preprocess_cdr.pl file as a guide.

  5. Create a new RE Loader directory corresponding to the RE Formatter output directory.

  6. Add the following entries to the RE Loader Infranet.properties file in each directory:

    • The new event

    • A new service record type corresponding to the new event

    • The new control file that loads the new event

    • The new event tables that hold the new event

  7. If you are running RE Loader automatically, you must also do the following:

    1. Configure the RE Loader batch handler in the new directory to load the new event.

    2. Add entries for the new RE Loader batch handler in the Batch Controller configuration file. See "Handler Identification" in BRM System Administrator's Guide.

Creating Custom Error Codes

You can create custom error codes for RE Loader scripts and utilities by using the RE Loader CustomErrorCodes.properties file. You use this file to list your custom error codes and messages. All entries should follow the FQEC scheme and be grouped with the correct component. See "Checking the RE Loader Log Files for Error Codes".

To create custom error codes:

  1. Modify the RE Loader script or utility to report the error. For more information, see the comments in the appropriate script or utility.

  2. Open the BRM_home/apps/pin_rel/CustomErrorCodes.properties file in a text editor.

  3. Add your custom error code to the file, making sure you use a minor code in the customer-reserved range.

    For example, the following entry creates a custom error code for the load utility:

    5100 = Sample load utility error message for a custom return code of 100.
    
  4. Save and close the file.