16 Job Opcode Workflows

Learn about the Oracle Communications Billing and Revenue Management (BRM) job opcode workflows.

Topics in this document:

Opcodes Described in This Chapter

Table 16-1 lists the opcodes described in this chapter.

Caution:

  • Always use the BRM API to manipulate data. Changing data in the database without using the API can corrupt the data.

  • Do not use SQL commands to change data in the database. Always use the API.

Table 16-1 Opcodes Described in This Chapter

Opcode Topic

PCM_OP_JOB_EXECUTE

Note: The PCM_OP_JOB_EXECUTE opcode is supported only by BRM 12.0.0.3.0 with Interim Patch 31426340 and later releases, and PDC 12.0.0.3.0 with Interim Patch 31426374 and later releases.

Running Business Operation Jobs

Running BRM Applications

PCM_OP_JOB_PROCESS_TEMPLATE

Managing Business Operations Job Templates

Running BRM Applications

Note:

Before calling this opcode, ensure that:

To run pin_virtual_time or another BRM utility, use the PCM_OP_JOB_EXECUTE opcode and pass in the following data:

  • The POID of the account calling the opcode.

  • PIN_FLD_FLAG set to 0, which indicates to run the application in a non-job context.

  • The utility command to run, such as my_custom_utility -f filename -v.

  • The working directory, relative to $PIN_HOME, in which to run the utility command. For example, for a working directory of $PIN_HOME/sys/cm, you would enter sys/cm.

    Note:

    Enter an absolute path to the working directory. Do not include /../ or ./ in the path.

PCM_OP_JOB_EXECUTE then performs these operations:

  1. Opens a non-job context.

  2. Creates an /event/activity/job_request object for auditing purposes.

  3. Validates that the specified utility is located under the $PIN_HOME directory.

  4. Validates that the specified path to the working directory is an absolute path.

  5. Validates that the working directory specified in the PIN_FLD_DIRECTORY input flist field matches one of the allowed directories in the pin_job_executor utility's Infranet.properties file.

  6. Runs the utility commands passed in the opcode's input flist.

  7. Returns the result of the utility's execution in the opcode's output flist.

The following shows a sample PCM_OP_JOB_EXECUTE input flist for running a BRM application in a non-job context:

0 PIN_FLD_POID            POID [0] 0.0.0.1 /account 1 0
0 PIN_FLD_FLAGS            INT [0] 0
0 PIN_FLD_INSTRUCTION      STR [0] "pin_virtual_time -m 2 01010000"
0 PIN_FLD_DIRECTORY        STR [0] "apps/pin_billd"    

In this example, PCM_OP_JOB_EXECUTE would run the following command from the $PIN_HOME/apps/pin_billd directory:

pin_virtual_time -m 2 01010000

Running Business Operation Jobs

Note:

Before calling this opcode, ensure that:

  • The pin_job_executor process is listening for calls from PCM_OP_JOB_EXECUTE. See "Configuring pin_job_executor to Listen for Opcode Calls" in BRM System Administrator's Guide.

  • The pin_job_executor process is running in the background. To start the process, run this command from the BRM_home/bin directory:

    ./start_pje

To run business operations jobs, such as billing, invoicing, and payment collections, use the PCM_OP_JOB_EXECUTE opcode and pass in the following data:

  • The POID of the account calling the opcode.

  • PIN_FLD_FLAG set to 1, which indicates to run applications within a job context.

  • The parameters and values to run, provided as a set of key-value pairs in the PIN_FLD_ARGS array. Table 16-2 lists the supported parameters.

    Table 16-2 PCM_OP_JOB_EXECUTE Parameters for Business Operations Jobs

    Parameter Description Mandatory

    job_template

    Specifies the ID of the job template to run.

    The job template contains information about the utility that is run as well as the database schema numbers.

    Yes

    request_id

    Specifies the job request ID to use.

    Yes

    start

    Specifies the start time of the job.

    The default is immediately.

    No

    end

    Specifies the end time of the job.

    Yes

    job_id

    Re-runs the job with the specified job ID.

    No

This opcode is called by Business Operations Center.

PCM_OP_JOB_EXECUTE then performs these operations:

  1. Opens a job context.

  2. Calls the pin_job_executor utility with the parameters passed in the PIN_FLD_ARGS array.

  3. The pin_job_executor utility does the following:

    1. Extracts the database schema numbers from the specified /job_template object.

    2. Creates a /job/boc object for each database schema.

    3. For each /job/boc object, a separate thread runs the business operations utility specified in the /job_template object:

      • For billing jobs, it runs the pin_bill_accts utility.

      • For payment collections jobs, it runs the pin_collect utility.

      • For invoicing jobs, it runs the pin_inv_accts utility.

      • For general ledger report jobs, it runs the pin_ledger_report utility.

      • For synchronizing pricing data, it runs the pin_export_price utility.

      • For refund jobs, it runs the pin_refund utility.

      • For custom jobs, it runs the utility that you configure.

    4. For each /job/boc object, generates an /event/notification/job_complete event.

  4. Returns the result of the job and the POID of the /job/boc object in the opcode's output flist.

The following shows a sample PCM_OP_JOB_EXECUTE input flist:

0 PIN_FLD_POID              POID [0] 0.0.0.1 /account 1 0
0 PIN_FLD_FLAGS              INT [0] 1
0 PIN_FLD_ARGS             ARRAY [0] allocated 2, used 2
1     PIN_FLD_NAME           STR [0] "job_template"
1     PIN_FLD_VALUE          STR [0] "119188"
0 PIN_FLD_ARGS             ARRAY [1] allocated 2, used 2
1     PIN_FLD_NAME           STR [0] "request_id"
1     PIN_FLD_VALUE          STR [0] "pje_js_1"
0 PIN_FLD_ARGS             ARRAY [2] allocated 2, used 2
1     PIN_FLD_NAME           STR [0] "end"
1     PIN_FLD_VALUE          STR [0] "10/08/2021"

Managing Business Operations Job Templates

To create, modify, or delete a business operations job template, use the PCM_OP_JOB_PROCESS_TEMPLATE opcode and pass in the following data:

  • The POID of the /job_template object.

  • The POID of the /account object that is calling the opcode.

  • The database schema on which to run the business operations job: 0 specifies all schemas, 1 specifies the primary schema, 2 specifies the second schema, and so on.

  • The name of the program that is calling the opcode.

  • The type of business operations job to run such as billing, collections, or invoicing.

  • The action to perform on the job template: create, modify, or delete.

  • The name of the Business Operations Center user.

  • Other optional configuration information.

When called, PCM_OP_JOB_PROCESS_TEMPLATE validates the database schema number passed in the input flist and then creates, modifies, or deletes the specified /job_template object. By default, this opcode is called by Business Operations Center.