8 Loading ECE Rated Events into BRM
You load rated events from Oracle Communications Elastic Charging Engine (ECE) into the Oracle Communications Billing and Revenue Management (BRM) database by using Rated Event Loader.
Topics in this document:
About Sending Rated Events to the BRM Database
After usage events are rated, ECE sends the rated event data to the BRM database by using Rated Event Loader and updates the customer's balance in both ECE and in the BRM database. The same process is used for loading online charging events and offline charging events.
For more information, see "About Loading Rated Events into the BRM Database" in BRM Loading Rated Events.
Adding a Rated Event Publisher Instance
If you are using Oracle NoSQL Database to store rated events, you must configure Rated Event Publisher. Rated Event Publisher publishes ECE-generated rated events to the Oracle NoSQL database data store.
To add a Rated Event Publisher instance:
-
Access the ECE configuration MBeans in a JMX editor, such as JConsole. See "Accessing ECE Configuration MBeans".
-
Expand the ECE Configuration node.
-
Expand charging.ratedEventPublishers.
-
Expand Operations.
-
Select addRatedEventPublisherConfiguration.
-
Enter a value for the instance name parameter.
-
Click addRatedEventPublisherConfiguration.
-
Use Elastic Charging Controller (ECC) to start the RE Publisher instance.
Configuring Rated Event Publisher
To configure Rated Event Publisher:
-
Access the ECE configuration MBeans in a JMX editor, such as JConsole. See "Accessing ECE Configuration MBeans".
-
Expand the ECE Configuration node.
-
Expand charging.connectionConfiguratons.instance_name.
-
Specify values for the fields in Table 8-1.
Table 8-1 Fields for Configuring Rated Event Publisher Connection
Name Default Description and Guideline dataStoreConnection
localhost:5000
This parameter configures Rated Event Publisher to connect to the Oracle NoSQL database; it configures the data store connection to the Oracle NoSQL database system.
The Oracle NoSQL database connection string uses the format hostname:port for connecting to a preconfigured Oracle NoSQL database system.
The default is localhost:5000 for connecting to a standalone Oracle NoSQL database system (KV-Lite).
dataStoreName
kvstore
This parameter configures the data store name to an Oracle NoSQL database system.
The data store name is for using a preconfigured data store in an Oracle NoSQL database system.
The default is kvstore for using a standalone Oracle NoSQL database system (KV-Lite).
name
noSQLConnection1
This parameter should match the noSQLConnectionName parameter in the charging.ratedEventPublishers.instance_name configuration.
-
Expand the charging.ratedEventPublishers.instance_name node.
-
Expand Attributes.
-
Specify values for the fields in Table 8-2.
Table 8-2 Fields for Configuring Rated Event Publisher
Name Default Description and Guideline noSQLConnectionName
noSQLConnection1
This parameter should match the name parameter in the charging.ratedEventPublishers.instance_name configuration for the correct connection configuration to the Oracle NoSQL database.
threadPoolSize
4
This parameter configures the number of threads in the thread pool.
Multiple threads can be used in a RatedEventPublisher module where each thread can publish rated events to an Oracle NoSQL database system independently.
The valid number is greater than zero. For best performance, Oracle recommends that you set this parameter to the number of Oracle NoSQL database partitions. Setting the number of threads higher than the number of partitions does not increase performance. Threads that you configure higher than the number of partitions are not used.
-
Use ECC to stop and restart Rated Event Publisher.
Configuring Item Assignment for Rated Events
You configure item assignments in ECE so that customer balance impacts can be tracked appropriately. Typically, the default configuration is sufficient. If you have custom item assignments, you might need to change the configuration for item assignments.
The item-type field maps to BRM items; this mapping is required for loading rated events from ECE to the BRM database. Each rated event record has an item_type field derived from the mapping specified in the itemType MBean attribute. The itemType MBean attribute lists the ECE service/event combinations used in event definitions.
For example, usage events are typically applied to the /item/misc object, also known as the misc item type. To map voice and data events to the misc item, ECE maps itemType="misc" to itemTag="VOICE_DATA_misc". The XML file that stores this configuration shows how the mapping works.
<itemTypeDetail itemType="misc" itemTag="VOICE_DATA_misc"> <itemTagDetail productType="VOICE" eventType="USAGE"> </itemTagDetail> <itemTagDetail productType="DATA" eventType="DATA_USAGE"> </itemTagDetail> </itemTypeDetail>
In this example, the VOICE_DATA_misc item tag includes two ECE service/event mappings: VOICE/USAGE and DATA/DATA_USAGE. When a usage request is created, the item mapping specifies that the misc item type will be assigned to the events.
If you configured delayed billing in BRM, you must configure item assignment in ECE to process delayed usage requests in the appropriate accounting cycle.
To configure item assignment for rated events:
-
Access the ECE configuration MBeans in a JMX editor, such as JConsole. See "Accessing ECE Configuration MBeans".
-
Expand the ECE Configuration node.
-
Expand charging.itemAssignmentConfig.
-
Expand Attributes.
-
Review the following attributes:
-
itemAssignmentEnabled: Enter true to turn on item assignment or false to turn it off.
-
poidQuantityPerSchema: Double-click the Value field. A list of schemas and the quantity of POID IDs reserved at ECE startup for each schema appears.
-
delayToleranceIntervalInDays: Enter the number of days during which delayed usage requests are processed for the current accounting cycle. This interval must be less than the delayed billing interval.
The delayed billing interval is set in the ConfigBillingDelay business parameter. See "Configuring Delayed Billing" in BRM Configuring and Running Billing.
-
-
To add a schema to the poidQuantityPerSchema list or to change the quantity of POID IDs for a schema in the list:
-
Expand Operations.
-
Select setPoidQuantity.
-
Specify values for the following parameters:
-
schema: Enter the BRM schema number for which the POID IDs must be reserved. For example, in a multischema environment, enter 1 for the primary schema, 2 for the secondary schema, and so on.
-
quantity: Enter the number of POID IDs reserved at ECE startup for the specified schema.
-
-
Click the setPoidQuantity button.
-
Configuring Life Cycle States in ECE for BRM
ECE supports the BRM subscriber life cycle state feature. If the subscriber life cycle state feature is disabled in BRM, ECE supports only the default subscriber life cycle, which has the following states: Active, Inactive, and Closed. If the subscriber life cycle state feature is enabled in BRM, ECE supports custom subscriber life cycles, which has the following states: Preactive, Active, Recharge Only, Credit Expired, Fraud Investigated, Dormant, Suspended, and Closed. See "Creating Custom Service Life Cycles" in BRM Managing Customers for more information.
You must configure the life cycle states in ECE, so they stay synchronized with life cycle states you add in BRM.
Note:
2024-09-11 16:58:58.328 JST ERROR - - - - Failed Response - [ResponseLetterImpl{content=UpdateResponseImpl{msgId='2:pjpaw-brmapp-03:UnknownProgramName:0:inquiryThreads8:14:1726041537:0:root.0.0.0.1:::', updateType=LIFECYCLE_STATE_UPDATE, errorMsg=null, status=FAILED, {reasons=[]}}}{trackingContext=[TrackingContextImpl{chronicler=null}]}]
----------------------------------------------- <lifecycleState config-class="oracle.communication.brm.charging.appconfiguration.beans.productstate.LifecycleState" state="10100" stateName="ACTIVE"/> <lifecycleState config-class="oracle.communication.brm.charging.appconfiguration.beans.productstate.LifecycleState" state="10102" stateName="SUSPENDED"/> <lifecycleState config-class="oracle.communication.brm.charging.appconfiguration.beans.productstate.LifecycleState" state="10103" stateName="CLOSED"/> ------------------------------------------------
You can configure the lifecycle state values using a JMX editor (See "Configuring Lifecycle States During Runtime" for more information) or the charging-settings.xml file (See "Configuring Lifecycle States At Installation" for more information). However, you need to perform a rolling upgrade or restart the ECS nodes to initialize these configuration changes. Validate the cache after the restart to check whether the correct lifecycle states are loaded. Any state that flows into the payload to ECE should be available in ECE. If not, an exception is thrown in ECE due to the same.
Configuring Lifecycle States At Installation
-
Open your charging-settings.xml file.
-
Define your states in the <lifecycleStateMappingConfiguration> element. For example, this defines the PREACTIVE lifecycle state:
<lifecycleStateMappingConfiguration config-class="oracle.communication.brm.charging.appconfiguration.beans.productstate.LifecycleStateMapper"> <lifecycleStateMappingGroup config-class="java.util.ArrayList"> <lifecycleState config-class="oracle.communication.brm.charging.appconfiguration.beans.productstate.LifecycleState" state="101" stateName="PREACTIVE"/> </lifecycleStateMappingGroup> </lifecycleStateMappingConfiguration>
-
Define the product type to which the rule applies in the <productLifecycleConfiguration> element. For example, this specifies the VOICE product type:
<productLifecycleConfiguration config-class="oracle.communication.brm.charging.appconfiguration.beans.lifecycle.ProductLifecycleConfiguration" productType="VOICE">
-
Define the rules in the <productLifecycleConfiguration> element. You can configure the rule based on:
-
Items within the payload. For example:
getObject("oracle.communication.brm.charging.rating.RatingContext#request/payload/attribute?USAGE_DIRECTION/toString")
-
The default aliases. For example:
DEFAULT_ALIASES.put("@birthday", GET_OBJECT + CTX + "#getCustomerBdayMmdd?Birthday\")");
-
The business profile of the customer. For example:
(business_profile([name:"PREPAID"])} == "true" )
-
The request attribute. For example:
getObject("oracle.communication.brm.charging.rating.RatingContext#request/eventType") == "EventSessionTelcoGsmVoice")
-
The attributes from the payload, using getObject/getInteger/getBigDecimal/getBoolean method calls for relevant attributes.
-
-
The rules defined can be used to define transitions. For example,
-
(business_profile([name:"PREPAID"])} == "true")
The above condition causes the state transition to take place only for the PREPAID profile and can be used in the transition:<transitionConfiguration config-class="oracle.communication.brm.charging.appconfiguration.beans.lifecycle.TransitionConfiguration" transition="(((@productState == "PREACTIVE") && (@usageDirection == "0")) && ({business_profile([name:"PREPAID"])} == "true")) => [state:"ACTIVE",expiration:"2",duration:"days"]"/>
-
(business_profile([name:"POSTPAID"])} == "true")
The above condition causes the state transition to take place only for the POSTPAID profile and can be used in the transition:<transitionConfiguration config-class="oracle.communication.brm.charging.appconfiguration.beans.lifecycle.TransitionConfiguration" transition="(((@productState == "PREACTIVE") && (@usageDirection == "0")) && ({business_profile([name:"POSTPAID"])} == "true")) => [state:"ACTIVE",expiration:"2",duration:"days"]"/
-
Configuring Lifecycle States During Runtime
To configure lifecycle states in ECE for BRM during runtime:
-
Access the ECE configuration MBeans in a JMX editor, such as JConsole. See "Accessing ECE Configuration MBeans".
-
Expand the ECE Configuration node.
-
Expand charging.lifecycleConfiguration.
-
Expand Operations.
-
Select addLifecycleDetails.
-
Enter values for these parameters:
-
ProductType: (String value) The product type for which you want to configure the rule and transition, such as VOICE, DATA, or SMS.
-
Rule: (String value) The rule for the specified product type to allow or disallow usage. The characters need to be escaped while provided the same input field.
-
Transition: (String value) The state transitions for the specified product type.
-
IsUsage: (Boolean value) True specifies that the rule and transition is for USAGE. False specifies that the rule and transition is for EXTERNAL_TOP_UP.
-
-
Click the addLifecycleDetails button.
Including or Excluding a Customer’s Remaining Balance in Rated Events
Starting in Patch Set 7, ECE can send the current balance and loan balance information with rated events. This allows your custom client application to display balance data with rated events. These balances can be either currency or non-currency, depending on the type of resource impacted by the transaction.
By default, this value is set to true, so that the balances are sent with events. You can change the value to false, if you would like to retain the older event format.
To configure whether ECE sends balance data on rated events:
-
Access the ECE configuration MBeans in a JMX editor, such as JConsole. See "Accessing ECE Configuration MBeans".
-
Expand the ECE Configuration node.
-
Expand charging.server.
-
Set the populateCurrentLoanAmountsOnRef attribute to either true or false as desired.
Accessing ECE Configuration MBeans
For all configurations, start by accessing the ECE configuration MBeans:
- Log on to the driver machine.
- Start the ECE charging servers (if they are not started).
- Connect to the ECE charging server node enabled for JMX management.
This is the charging server node set to start CohMgt = true in the ECE_home/config/eceTopology.conf file, where ECE_home is the directory in which ECE is installed.
- Start a JMX editor that enables you to edit MBean attributes, such as JConsole.
- In the editor's MBean hierarchy, find the ECE configuration MBeans.