18 Running PDC Applications

Learn how to run Oracle Communications Pricing Design Center (PDC) applications, such as ImportExportPricing and SyncPDC, in an Oracle Communications Billing and Revenue Management (BRM) cloud native environment.

Topics in this document:

About Running the PDC Utilities

You can create your pricing and setup components by using these PDC utilities:

  • ImportExportPricing: Use this utility to import, export, display, delete, or publish the pricing and setup components that are defined in PDC.

    See "Importing and Exporting Pricing and Setup Components" in PDC Creating Product Offerings for more information.

  • SyncPDC: Use this utility to synchronize setup components that are defined in BRM with PDC.

    See "Synchronizing Pricing Setup Components" in PDC Creating Product Offerings for more information.

In a BRM cloud native environment, you run these utilities by setting keys in your override-values.yaml file for oc-cn-helm-chart and then running the helm upgrade command.

Importing Pricing and Setup Components with ImportExportPricing

After you deploy PDC, you can create pricing and setup components by defining them in one or more XML files and importing them into the PDC database with the ImportExportPricing utility.

Importing from a Single XML File

You can import data from a single XML file that contains your pricing and setup components.

To import from a single XML file:

  1. Delete the pdc-import-export-job Kubernetes job:

    kubectl delete job pdc-import-export-job
  2. Copy your import XML file to one of these:

    • The HostPath that you specified in ocpdc.volMnt.pdcIEHostPath

    • pdc-ie-pvc

  3. Open your override-values.yaml file for oc-cn-helm-chart.

  4. Under the ocpdc.configEnv.importExport section, set these keys:

    • IE_Operation: Set this to import.

    • IE_Component: Set this to one of the following component and object types to import into the PDC database:

      • config: Imports pricing setup components, such as tax codes, business profiles, and general ledger IDs.

      • pricing: Imports pricing components, such as events, charges, and chargeshares.

      • metadata: Imports event, service, account, and profile attribute specifications.

      • profile: Imports pricing profile data.

      • customfields: Imports custom fields.

      • all: Imports all objects and components.

    • IE_File_OR_Dir_Name: Set this to the name of your import XML file.

    • extraCmdLineArgs: Set this to any extra command-line arguments for ImportExportPricing, apart from operation, component, and file name. The value must be surrounded by quotes. For example: "-n ObjectName".

    For more information about the utility's commands, see "ImportExportPricing" in PDC Creating Product Offerings.

  5. Save and close the file.

  6. Run the helm upgrade command to update the release:

    helm upgrade BrmReleaseName oc-cn-helm-chart --values OverrideValuesFile -n BrmNameSpace

    where:

    • BrmReleaseName is the release name assigned to your existing oc-cn-helm-chart installation.

    • OverrideValuesFile is the file name and path of your override-values.yaml file.

    • BrmNameSpace is the namespace for your existing BRM deployment.

    PDC cloud native runs the ImportExportPricing utility at the command line, and the specified pricing and setup components are imported into the PDC database.

Example: Importing Pricing Setup Components from a Single File

This shows sample YAML settings for importing pricing components, such as charge offers, into the PDC database:

ocpdc: 
   configEnv:
      importExport: 
         IE_Operation: import
         IE_Component: pricing 
         IE_File_OR_Dir_Name: PDC_ChargeOffers.xml 
         extraCmdLineArgs: "-ow -ignoreID" 

In this case, PDC cloud native runs the following command:

./ImportExportPricing -import -pricing PDC_ChargeOffers.xml -ow -ignoreID

Importing Multiple XML Files from a Directory

The ImportExportPricing utility can import pricing components, setup components, or metadata objects from a directory containing multiple import XML files.

Note:

The XML files in the directory must contain only one type of configuration object: only metadata objects, only setup components, or only pricing components.

To import data from multiple XML files in a directory:

  1. Delete the pdc-import-export-job Kubernetes job:

    kubectl delete job pdc-import-export-job
  2. Create your import XML files. Ensure the files contain only one type of configuration object: only pricing components, only setup components, or only metadata objects.

  3. (Optional) Create an import_order.cfg file listing the order in which to import the XML files. For example, you could specify to import chargeRatePlans.xml before chargeOffers.xml.

    Note:

    • Ensure import_order.cfg does not contain empty lines.

    • Without the file, ImportExportPricing imports your XML files in a random order.

  4. Copy your import XML files and import_order.cfg file to one of these:

    • The HostPath that you specified in ocpdc.volMnt.pdcIEHostPath

    • pdc-ie-pvc

    The input directory can include one or more subdirectories, but the import_order.cfg file must be at the top level of your input directory.

  5. Set the ownership and permissions of the input directory, its subdirectories, your import XML files, and import_order.cfg file to chown 1000:0 and chmod 755.

  6. Open your override-values.yaml file for oc-cn-helm-chart.

  7. Under the ocpdc.configEnv.importExport section, set these keys:

    • IE_Operation: Set this to import.

    • IE_Component: Set this to one of the following component and object types to import into the PDC database:

      • config: Imports pricing setup components, such as tax codes, business profiles, and general ledger IDs.

      • pricing: Imports pricing components, such as events, charges, and chargeshares.

      • metadata: Imports event, service, account, and profile attribute specifications.

    • IE_File_OR_Dir_Name: Set this to the path in which your import XML files reside.

    • extraCmdLineArgs: Set this to any extra command-line arguments for ImportExportPricing, apart from operation, component, and file name. The value must be surrounded by quotes. For example: "-n ObjectName".

    For more information about the utility's commands, see "ImportExportPricing" in PDC Creating Product Offerings.

  8. Save and close the file.

  9. Run the helm upgrade command to update the release:

    helm upgrade BrmReleaseName oc-cn-helm-chart --values OverrideValuesFile -n BrmNameSpace

    where:

    • BrmReleaseName is the release name assigned to your existing oc-cn-helm-chart installation.

    • OverrideValuesFile is the file name and path of your override-values.yaml file.

    • BrmNameSpace is the namespace for your existing BRM deployment.

    PDC cloud native runs the ImportExportPricing utility at the command line, and the specified pricing and setup components are imported into the PDC database.

Example: Importing Pricing Setup Components from a Directory

This shows sample YAML settings for importing setup components, such as tax codes, business profiles, and general ledger IDs, into the PDC database:

ocpdc: 
   configEnv:
      importExport: 
         IE_Operation: import
         IE_Component: config 
         IE_File_OR_Dir_Name: MyDirectory 
         extraCmdLineArgs: "-ow -ignoreID" 

In this case, PDC cloud native runs the following command:

./ImportExportPricing -import -config MyDirectory -ow -ignoreID

Exporting Pricing and Setup Components with ImportExportPricing

You can export pricing and setup components from the PDC database into one or more XML files by using the ImportExportPricing utility.

Note:

To export large XML files, increase the WebLogic transaction timeout settings. For more information, see "Customizing WebLogic for PDC" in BRM Cloud Native Deployment Guide.

To export pricing and setup components from the PDC database:

  1. Delete the pdc-import-export-job Kubernetes job:

    kubectl delete job pdc-import-export-job
  2. Open your override-values.yaml file for oc-cn-helm-chart.

  3. Under the ocpdc.configEnv.importExport section, set these keys:

    • IE_Operation: Set this to export.

    • IE_Component: Set this to one of the following component and object types to export from the PDC database into an XML file:

      • config: Exports pricing setup components, such as tax codes, business profiles, and general ledger IDs.

      • pricing: Exports pricing components, such as events, charges, and chargeshares.

      • metadata: Exports event, service, account, and profile attribute specifications.

      • profile: Exports pricing profile data.

      • customfields: Exports custom fields.

      • brmObject: Exports all BRM-mastered setup components from PDC.

      • all: Exports all objects and components.

    • extraCmdLineArgs: Set this to any extra command-line arguments for ImportExportPricing, apart from operation, component, and file name. The value must be surrounded by quotes. For example: "-n ObjectName".

    For more information about the utility's commands, see "ImportExportPricing" in PDC Creating Product Offerings.

  4. Save and close the file.

  5. Run the helm upgrade command to update your Helm release:

    helm upgrade BrmReleaseName oc-cn-helm-chart --values OverrideValuesFile -n BrmNameSpace

    where:

    • BrmReleaseName is the release name assigned to your existing oc-cn-helm-chart installation.

    • OverrideValuesFile is the file name and path of your override-values.yaml file.

    • BrmNameSpace is the namespace for your existing BRM deployment.

    PDC cloud native runs the ImportExportPricing utility, which generates one or more of the following output files to the HostPath specified in the ocpdc.volMnt.pdcIEHostPath key:

    • export_pricing.xml for the file containing pricing components. If this file already exists in PDC, the utility generates the file name as export_pricing_timestamp.xml, where timestamp is the server's local time in the format yyyy-mm-dd_hh-mm-ss.

    • export_config.xml for the file containing setup components. If this file already exists in PDC, the utility generates the file name as export_config_timestamp.xml.

    • export_profile.xml for the file containing pricing profile data. If this file already exists in PDC, the utility generates the file name as export_profile_timestamp.xml.

Example: Exporting Pricing Components

This shows sample YAML settings for exporting pricing components, such as charge offers and discount offers, from the PDC database:

ocpdc: 
   configEnv: 
      importExport:
         IE_Operation: export
         IE_Component: pricing 
         extraCmdLineArgs: "-v"

In this case, PDC cloud native runs the following command and then exports the pricing data from the PDC database to a file named export_pricing.xml.

./ImportExportPricing -export -pricing -v

Using SyncPDC to Synchronize Setup Components

After you define the following setup components in BRM, you can synchronize the components with PDC regularly basis by using the SyncPDC process:

  • Service definitions

  • Event definitions

  • Account definitions

  • General ledger (G/L) IDs

  • Provisioning tags

  • Tax codes

  • Tax suppliers

  • Business profiles

The SyncPDC process determines which BRM components to synchronize with PDC using the ECEEventEnrichmentSpec.xml file. The default file specifies to synchronize all BRM setup components with PDC, but you can edit it at any time to meet your business needs. The ECEEventEnrichmentSpec.xml file is located in the HostPath specified in the ocpdc.volMnt.pdcBrmHostPath key.

You specify the schedule and frequency at which to run the SyncPDC process when you deploy PDC by using these override-values.yaml keys for oc-cn-helm-chart:

  • ocpdc.configEnv.syncPDC.SyncPDCStartAt: Specifies the schedule for running the SyncPDC process, such as when the job was scheduled or at 14:00.

  • ocpdc.configEnv.syncPDC.SyncPDCInterval: Specifies the frequency at which to run the SyncPDC process, such as daily or every 2 hours.

For more information, see "Adding PDC Keys for oc-cn-helm-chart" in BRM Cloud Native Deployment Guide.

After PDC is deployed, you can start or stop the synchronization process by creating or deleting the SyncPDC pod. When the pod is created, it automatically begins the BRM-to-PDC synchronization process. It runs as a server process in the background, continuously checking for data to synchronize from BRM or the rating system with PDC.

To start or stop the synchronization process:

  1. Open your override-values.yaml file for oc-cn-helm-chart.

  2. Under the ocpdc.configEnv.syncPDC section, set the runSyncPDC key to one of the following:

    • true to create the SyncPDC pod and start the synchronization process.

    • false to delete the SyncPDC pod and stop the synchronization process.

  3. Save and close the file.

  4. Run the helm upgrade command to update the release:

    helm upgrade BrmReleaseName oc-cn-helm-chart --values OverrideValuesFile -n BrmNameSpace

    where:

    • BrmReleaseName is the release name assigned to your existing oc-cn-helm-chart installation.

    • OverrideValuesFile is the file name and path of your override-values.yaml file.

    • BrmNameSpace is the namespace for your existing BRM deployment.

Troubleshooting ImportExportPricing Errors

When running the ImportExportPricing utility in a BRM cloud native environment, it may generate the following error:

oracle.communications.brm.pdc.server.transformation.Transformer commitChanges

SEVERE: Error while committing transaction

oracle.communications.brm.pdc.server.transformation.TransformationException: Error in database operation for [committing connection]

To resolve the issue:

  1. Verify the connectivity to the database for both the Cross Reference (XREF) schema and the BRM schema.
  2. Redeploy PDC.

Note:

For an XREF schema error, redeploy PDC. For a BRM schema error, redeploy BRM and PDC both.