Search Results okc_time_res_pvt




Overview

OKC_TIME_RES_PVT is a private PL/SQL package in the Oracle E-Business Suite Contracts (OKC) module that supports the time-based resolution of contract events against service and subscription lines. It is the working engine behind the "Time Resolver" functionality: given a set of time values captured on a contract (for example the start date, end date, or renewal dates associated with a contract line), the package evaluates the applicable rules and produces resolved time values that determine when downstream events, tasks, and billing actions should occur. The package name embeds the header revision "$Header: OKCCRESS.pls 120.2" and is classified as a private (PVT) API, meaning it is intended for internal invocation by the Contracts application and other OKC packages rather than as a direct integration point for external callers. The single dependent package recorded in the ETRM metadata confirms this internal orientation. Persistent state is not held at the session level beyond the package constants and global variables defined in the specification.

Key Procedures and Functions

The package exposes nine documented procedures and functions, each tied to a specific stage of the resolution lifecycle:

  • TIME_RESOLVER — the core resolver routine that computes resolved time values from input time values and the applicable rules. This is the entry point implied by the "time_resolver" search term.
  • RES_TIME_EVENTS — drives resolution of time values in the context of the events associated with a contract or line.
  • RES_TIME_NEW_K — handles resolution when a new contract (K header) is created.
  • RES_TIME_EXTND_K — handles resolution when an existing contract is extended, recalculating affected time values.
  • RES_TIME_TERMNT_K — handles resolution when a contract is terminated, adjusting or clearing time values accordingly.
  • CHECK_RES_TIME_N_TASKS — validates the resolved-time tasks that exist for a contract, supporting error detection before further processing.
  • DELETE_RES_TIME_N_TASKS — removes resolved-time tasks, typically during amendment or rollback.
  • CREATE_RES_TIME_N_TASKS — creates the tasks generated by the resolution process.
  • BATCH_RESOLVE_TIME_N_TASKS — a bulk driver that processes resolved-time tasks across many records, suitable for concurrent execution.

The package spec also defines global constants for message tokens, error handling (G_UNEXPECTED_ERROR, G_SQLERRM_TOKEN, G_SQLCODE_TOKEN), and a configuration variable PICKUP_UPTO_MONTHS initialised to 12, which governs the horizon over which pending time values are considered.

Tables Accessed

The documented tables reflect a focused read/write pattern:

  • OKC_TIMEVALUES — stores the raw, user-entered time values for a contract; read as input to resolution.
  • OKC_RESOLVED_TIMEVALUES — stores the output of resolution; written by the resolver routines.
  • OKC_SPAN — defines the spans or periods against which time values are positioned.
  • OKC_K_HEADERS_B and OKC_K_LINES_B — the contract header and line base tables, read to establish the contract context for each resolution.
  • JTF_TASKS_B — the task base table, written when resolved-time tasks are created and read when they are checked or deleted.
  • PLITBLM — the standard PL/SQL index-by table used for message handling in the OKC API stack.

Usage Notes

OKC_TIME_RES_PVT is not a public API. It is invoked from within the Contracts business logic — from the contract authoring forms and from other OKC packages — whenever contract dates are created, extended, or terminated, and when time values must be converted into concrete task and event dates. The presence of BATCH_RESOLVE_TIME_N_TASKS indicates that resolution can also be driven in bulk, typically through a concurrent program or a scheduled batch job that picks up contracts within the PICKUP_UPTO_MONTHS window. Custom code should not call this package directly; the supported route is through the OKC public APIs and the standard Contracts UI, which call OKC_TIME_RES_PVT on the caller's behalf.