Search Results g_status_scoring




Overview

AMS_DM_SCORE_PVT is the private PL/SQL package body that implements the core scoring engine for Oracle Marketing (AMS) within Oracle E-Business Suite 12.1.1 and 12.2.2. It governs the creation, maintenance, scheduling, and execution of data-miner "scores" — definitions that apply a predictive model against a source population and produce scored result sets for campaign targeting, list selection, and segmentation. The package encapsulates the business logic behind the AMS_DM_SCORES entity, including validation of foreign keys and lookup values, optimistic locking through object_version_number, workflow integration for asynchronous process execution, and support for preview requests and scheduled runs. It is classified as a Private (PVT) API, meaning it is intended for internal consumption by other AMS packages and the marketing application layer rather than as a public integration interface. The current header indicates version 120.3, last updated 2006/07/17, with an extensive change history documenting the evolution of the scoring model from its initial creation in November 2000.

Key Procedures and Functions

The package exposes sixteen documented procedures and functions. CHECK_SCORE_ITEMS validates the items associated with a score definition. LOCK_SCORE acquires a lock on the score record to serialize concurrent updates. The lifecycle CRUD operations are performed by CREATE_SCORE, UPDATE_SCORE, and DELETE_SCORE, which together manage insert, modification (including object version increment), and removal of score definitions along with their name, description, and status attributes. VALIDATE_SCORE_REC and VALIDATE_SCORE perform record-level and full validation, including foreign-key and lookup checks against model and setup data.

Workflow and asynchronous execution are handled by WF_SCORE, WF_REVERT, PROCESS_SCORE_SUCCESS, and WF_CHECKMODELSTATUS, which start the scoring workflow, revert state on failure, process successful completion callbacks, and interrogate model readiness. Scheduling and preview behavior are managed by CANCEL_RUN_REQUEST, HANDLE_PREVIEW_REQUEST, and HANDLE_DATA_SELECTION_CHANGES, the last of which responds to changes in the underlying data selection by cancelling or rescheduling runs. COPY_SCORE duplicates an existing score definition, and CHECK_SCORE_ITEMS supports item integrity verification.

Tables Accessed

The package reads and writes the base score tables AMS_DM_SCORES_ALL_B, its translation table AMS_DM_SCORES_ALL_TL, and the sequence AMS_DM_SCORES_ALL_B_S. It validates against AMS_DM_MODELS_ALL_B (the predictive model definitions), AMS_CUSTOM_SETUPS_B (custom setup identifiers), and AMS_USER_STATUSES_B (status codes). Scoring output is persisted in AMS_DM_SCORE_RESULTS and AMS_DM_SCORE_PCT_RESULTS. Source and target population references are resolved through AMS_DM_SOURCE, AMS_DM_TARGETS_B, and AMS_LIST_SELECT_ACTIONS. DUAL is used for utility evaluations.

Usage Notes

Because this is a private package, it is normally invoked indirectly — from the Oracle Marketing forms that maintain score definitions, from concurrent programs that execute scheduled scoring runs, or from other AMS packages such as those that orchestrate list selection. The package is referenced by four other packages, reflecting its role as a shared internal service. Workflow callouts (startprocess, revert, success callbacks) mean that direct invocation outside the supported AMS flow may bypass state transitions. Custom code should generally prefer public APIs; any reliance on AMS_DM_SCORE_PVT should be treated as version-sensitive and revalidated across 12.1.1 and 12.2.2 upgrades.