Oracle BRM (OBRM) Data Model & Useful Queries .. | Close |
The following diagram is a high-level view of key tables and fields of BRM Database. For complete list of fields please refer BRM documentation:

Queries for reference which are useful in all BRM projects: View
|
|
|
|
Oracle BRM Base Opcodes .. | Close |
In Oracle BRM (Billing and Revenue Management), a base opcode is a fundamental operation or API used to perform actions such as creating, retrieving, updating, or deleting (CRUD) data in the system. These opcodes are predefined and serve as the building blocks for implementing business logic and processes within the BRM framework.
Base opcodes examples:
Opcode Name | Details |
PCM_OP_CREATE_OBJ | Used to create new objects or entities in the BRM database. |
PCM_OP_DELETE_OBJ | Used to delete existing objects or entities from the BRM database. |
PCM_OP_READ_OBJ | Used to retrieve information or data from existing objects in the BRM database. |
PCM_OP_WRITE_FLDS | Used to update existing objects or entities in the BRM database. |
PCM_OP_SEARCH | Widely used opcode to search for objects or entities based on specified criteria. Data can be retrieved from two or more entities by specifying link between the objects. |
Note: PCM_OP_BULK_WRITE_FLDS opcode is also used to update fields like PCM_OP_WRITE_FLDS opcode. This opcode is useful when we need to update the same set of fields across a large number of objects efficiently in a single operation.
|
|
|
|
Oracle BRM Standard/Policy/Custom Opcodes .. | Close |
In Oracle BRM (Billing and Revenue Management), standard opcodes are predefined APIs used to handle tasks such as subscription management, balance adjustments, and service provisioning etc. They ensure consistency and reliability in processing business rules and transactions.
Standard opcodes are BRM APIs which are part of BRM Function Modules (FM). Standard and Custom opcodes can be exposed as REST APIs to integrate with different applications. Below are some examples of Standard opcodes provided by Oracle Out-of-the-box from different modules:
Standard Opcode Name | Details |
PCM_OP_CUST_COMMIT_CUSTOMER | Used to create or modify customer accounts, purchase products & discounts. |
PCM_OP_ACT_USAGE | This opcode rates and records an event. |
PCM_OP_BILL_MAKE_BILL | This is a main opcode which provides billing for the specified billinfo object. |
PCM_OP_PYMT_COLLECT | Performs payment collections and refunds. |
PCM_OP_COLLECTIONS_PROCESS_BILLINFO | Determines whether bill units enters or exit collections and performs collections actions. |
OBRM Opcode Interface Diagram:

Policy Opcodes are hooks provided in standard opcodes to implement customizations. They facilitate a wide range of functions, allowing for achieving custom requirements of billing and revenue processes. BRM provide a ".c" file for every policy opcode where developers can implement changes as per the business needs. Below are some examples of policy opcodes from different modules:
Policy Modules | Example with Details |
Subscription FM Policies | PCM_OP_SUBSCRIPTION_POL_SPEC_CYCLE_FEE_INTERVAL: Specify a different start, end, scale for cycle fee events |
Rate FM Policies | PCM_OP_RATE_POL_PRE_RATING: Modify the input flist being sent for rating, PCM_OP_RATE_POL_POST_RATING: To perform any update after rating the event |
Bill FM Policies | PCM_OP_BILL_POL_SPEC_BILLNO: To customize the bill no generated by billing, PCM_OP_BILL_POL_POST_BILLING: To perform any operation immediately after billing |
Invoice FM Policies | PCM_OP_INV_POL_PREP_INVOICE: To enrich the invoice with additional information |
Collections FM Policies | PCM_OP_COLLECTIONS_POL_EXEC_POLICY_ACTION: Perform specific tasks on collection actions, PCM_OP_COLLECTIONS_POL_EXIT_SCENARIO: Execute actions like resume service when billinfo leaves collections scenario |
In order to invoke BRM API/opcode, Input payload needs to be prepared as per opcode specifications. Input Flists for Opcodes for Reference in all BRM Projects:
View
BRM also provides support for custom opcodes in order to fulfill business specific requirements in the project. Custom opcodes are designed with the input/output specifications and new library to meet such requirements.
|
|
|
|
Inbuilt OBRM functions and macros .. | Close |
Below are some important functions which are frequently used in BRM code to implement different functionalities.
FM Function Name | Details |
fm_utils_trans_open() | Opens a transaction and locks the given object in read/write mode to maintain data integrity |
fm_utils_trans_commit(), fm_utils_trans_abort() | Commit or Abort a transaction which was opened using fm_utils_trans_open() function if the whole transaction is success or failure respectively |
fm_utils_is_subtype() | Determines if the type passed is the subtype of the poid_type passed. Returns 1 if the type passed is the subtype, 0 otherwise |
fm_utils_add_n_days() | Add specific number of days to the given time variable |
fm_utils_op_is_ancestor() | Determines whether the given opcode is an ancestor of the current opcode using the given op stack. Returns 1 is opcode is an ancestor, 0 otherwise |
fm_utils_time_round_to_midnight() | Rounds the given time variable to midnight |
CM_FM_SET_NAMED_TRANS_FLIST(), CM_FM_GET_NAMED_TRANS_FLIST(), CM_FM_DROP_NAMED_TRANS_FLIST | After opening a transaction, CM_FM_SET_NAMED_TRANS_FLIST sets an flist in one opcode and this flist can be retrieved using CM_FM_GET_NAMED_TRANS_FLIST in another opcode. The drop macro is executed to remove flist from memory. |
Flist Management Macro | Details |
PIN_FLIST_CREATE() | Allocates memory and creates new flist |
PIN_FLIST_FLD_GET(), PIN_FLIST_FLD_TAKE() | Retrieve a field value from an flist. GET is a readonly get whereas TAKE is taking removing field from flist and taking ownership |
PIN_FLIST_FLD_SET(), PIN_FLIST_FLD_PUT() | Sets a field value to an flist. PUT is giving ownership of the field to the flist |
PCM_OP() | Invokes an flist with the given input flist,flags and sets the response in the output flist |
PIN_FLIST_DESTROY_EX() | Removes allocated memory to flist, should be invoked once flist is no longer in use |
PIN_FLIST_ELEM_GET() | Retrieve an array field from flist |
PIN_FLIST_ELEM_GET_NEXT() | Loop through an array field in the flist |
PIN_FLIST_SUBSTR_GET() | Retrieve a substruct field from flist |
PIN_FLIST_ELEM_ADD() | Sets a new array in flist |
Other Macros-
Macro | Details |
PIN_POID_CREATE() | Allocates memory and creates new poid |
PIN_POID_COMPARE() | Compares two poids if they are identical |
PIN_POID_IS_NULL() | Determines if the given poid is null |
PIN_POID_DESTROY() | Removes allocated memory to poid |
PIN_BEID_IS_CURRENCY() | Returns 1 if the passed integer is a currency resource, 0 for non currency resource |
PIN_ERR_LOG_FLIST() | Logs flist value to the cm.pinlog for troubleshooting |
PIN_ERR_LOG_MSG() | Logs a string value to the cm.pinlog for debugging. Other data types can be converted to string and then logged |
pbo_decimal_from_str() | Create a new decimal variable from a string value |
pbo_decimal_is_zero() | Returns 1 if the passed decimal has a value of zero, else 0 |
pbo_decimal_add(), pbo_decimal_subtract() | Performs add/subtraction of two given decimal values |
pbo_decimal_compare() | Compares two given decimal values if they are less,equal,greater than each other. Returns -1,0,1 if first parameter is less,equal or greater correspondingly. |
pbo_decimal_destroy() | Removes allocated memory to decimal, should be invoked once it is no longer in use |
|
|
|
|
|
Debug OBRM CNE deployments on Kubernetes .. | Close |
Deployment and monitoring of applications running as pods in Kubernetes(k8s) environment is done using helm & kubectl respectively.
- Helm is a package manager that includes helm charts which help in deploying k8s objects. Using one YAML helm configuration file, entire application can be deployed on k8s.
- Kubectl is a commad line tool to execute operations on Kubernetes cluster in order to monitor/analyze pods and other services running on k8s.
Some useful helm commands:
Helm Command | Details |
helm install <brm-release-name> oc-cn-helm-chart --namespace <brm-namespace> --values oc-cn-helm-chart/override-values.yaml | To perform initial install to deploy new pods/services e.g. BRM pods |
helm upgrade <brm-release-name> oc-cn-helm-chart --values oc-cn-helm-chart/override_values.yaml -n <brm-namespace> | To deploy changes done in config YAML file "override_values.yaml" |
helm status <brm-release-name> -n <brm-namespace> | To check the helm status after install |
helm history <brm-release-name> -n <brm-namespace> | To check the history of helm commands executed |
Important kubectl commands:
Kubectl Command | Details |
kubectl get nodes -o wide | To view the k8s nodes running in cluster with details |
kubectl -n <brm-namespace> get pods -o wide | To check all the running pods status |
kubectl -n <brm-namespace> exec -it <pod-name> bash | To login to the BRM pod instance |
kubectl -n <brm-namespace> describe pod <pod-name> | To check details about a particular pod |
kubectl -n <brm-namespace> get svc | To check the services type and status |
kubectl -n <brm-namespace> logs -–since=1h -f <pod-name> | To view time bound logs of a specific pod |
kubectl -n <brm-namespace> get hpa | To check horizontal pod autoscaler (HPA) |
kubectl describe pvc --namespace <brm-namespace> | To retrieve details of persistent volume claim |
|
|
|
|
|
Oracle ECE Architecture .. | Close |
Below diagram shows Oracle Elastic Charging Engine (ECE) and supported integrations with different systems like PDC, BRM, Mediation System etc.:
|
|
|