Advertisement

Oracle BRM and Custom Fields - Part 1

Oracle Communications Billing and Revenue Management (Oracle BRM formally known as Portal Infranet) provides two ways for creating, editing, and deleting custom fields and storable classes.

Contributed article

Key takeaways

  1. 01Oracle BRM provides two methods for managing custom fields: Storable Class Editor and SDK opcodes.
  2. 02SDK opcodes offer more flexibility for developers to create, edit, and delete custom fields.
  3. 03To enable field manipulation, the data dictionary must be made writable by setting 'dm dd_write_enable_fields' to 1.
  4. 04The pin_deploy utility uses PODL for exporting and importing field definitions, useful at the administrative level.

Oracle Communications Billing and Revenue Management (Oracle BRM \ formally known as Portal Infranet) provides two ways for creating, editing, and deleting custom fields and storable classes. One way is by using Storable Class Editor, part of the Developer Center application, or the alternative approach, by using SDK opcodes. Personally, I prefer the latter choice and in this post I will cover manipulating custom fields with SDK opcodes.

Before we begin, there is one change we need to apply first. It is necessary to make the data dictionary writable. Here's how it's done:

1. Open the Oracle DM or Microsoft SQL Server DM configuration file

  (BRM_HOME/sys/dm_oracle/pin.conf or BRM_HOME/sys/dm_odbc/pin.conf) in a text editor.

2. Enable field manipulation in the data dictionary by setting the following entry to 1:

  - dm dd_write_enable_fields 1

Our objectives are as follows:

    1. Create a custom field

    2. Edit the custom field description

    3. Delete the custom field from the database

    4. Make the custom fields available to BRM

Create a New Custom Field

Creating a new custom field and committing it to the database can be done with SDK opcodes or with a pin_deploy utility. As developers, SDK opcodes provide a more flexible way to create, edit, delete custom fields at the development stage. The pin_deploy

utility, on the other hand, uses PODL (Portal Object Definition Language) to export and import field and storable class definitions, which is more useful at the administrative level because we can streamline the process by putting field definitions into source code management and therevy reduce the possibility of damaging the Oracle BRM production database data dictionary.

We can use the following SDK opcodes to manage field specifications:

1. PCM_OP_SDK_SET_FLD_SPECS - create or modify a field,

2. PCM_OP_SDK_GET_FLD_SPECS - retrieve a field specs,

3. PCM_OP_SDK_DEL_FLD_SPECS - delete a field.

To create a field, I need to write an input flist for PCM_OP_SDK_SET_FLD_SPECS opcode:

0 PIN_FLD_POID          POID [0] 0.0.0.1 /dd/fields 0 0

0 PIN_FLD_FIELD      ARRAY [0]

1    PIN_FLD_DESCR          STR [0] "custom field for holding a VAT number"

1    PIN_FLD_FIELD_NAME      STR [0] "C_FLD_VAT_NUMBER"

1    PIN_FLD_FIELD_NUM      ENUM [0] 10000

1    PIN_FLD_FIELD_TYPE      INT [0] 5

Let's verify the field we created exists in the database data dictionary by feeding the following input flist to PCM_OP_SDK_GET_FLD_SPECS opcode:

0 PIN_FLD_POID      POID [0] 0.0.0.1 /dd/objects 0 0

0 PIN_FLD_FIELD    ARRAY [0]

1    PIN_FLD_FIELD_NAME    STR [0] "C_FLD_VAT_NUMBER"

Editing the Custom Field Description

Now that we have confirmed that the new custom field exists, we can change the description,by calling PCM_OP_SDK_SET_FLD_SPECS opcode with the following input flist:

0 PIN_FLD_POID          POID [0] 0.0.0.1 /dd/fields 0 0

0 PIN_FLD_FIELD      ARRAY [0]

1    PIN_FLD_DESCR          STR [0] "custom field - VAT number"

1    PIN_FLD_FIELD_NAME      STR [0] "C_FLD_VAT_NUMBER"

1    PIN_FLD_FIELD_NUM      ENUM [0] 10000

1    PIN_FLD_FIELD_TYPE      INT [0] 5

Again, we can retrieve the field's specifications to verify the change has been made.

To get know how to delete and make the custom fields, please read part 2: “Oracle BRM and Custom Fields- Part 2".

Common questions

How can I create a custom field in Oracle BRM?

You can create a custom field using SDK opcodes or the pin_deploy utility.

What is the purpose of the pin_deploy utility?

The pin_deploy utility uses PODL to export and import field and storable class definitions, streamlining the process at the administrative level.

How do I verify a custom field exists in the database?

You can verify a custom field by using the PCM_OP_SDK_GET_FLD_SPECS opcode with the appropriate input flist.

Written by Miha All articles →
Back to Technology →