Search Results process_mobile_queries
Overview
ASG_APPLY is an Oracle E-Business Suite PL/SQL package owned by APPS and classified under the ETRM classification OTHER. In the EBS 12.1.1 and 12.2.2 releases it functions as the core apply-engine for the ASG (Application Synchronization / mobile user sync) subsystem. Its stated purpose in the source header is to "process upload data" and it additionally supplies a large collection of helper routines intended to apply changes efficiently. The package is compiled with AUTHID DEFINER, meaning it executes with the privileges of its owning schema (APPS) rather than the calling user.
The functional scope centres on reconciling client-side or mobile-collected data with the EBS database. It determines which publication items and inquiry records are dirty or deferred, processes upload and sequence streams in bulk, and performs the transactional bookkeeping that surrounds each apply cycle. The header history indicates the package was created in February 2002 and subsequently extended with sequence processing, deferred transaction support, concurrent-program context globals, and delivery notification.
Key Procedures and Functions
The package exposes 25 documented procedures and functions:
- LOG — internal diagnostic logging routine accepting a debug message and a log level defaulting to FND_LOG.LEVEL_STATEMENT.
- SORT_BY_WEIGHT — orders a publication item list based on the weight stored in ASG_PUB_ITEM, ensuring dependent items are applied in the correct sequence.
- GET_ALL_CLIENTS — returns the list of clients having new (dirty) or deferred records for the specified inquiry record types.
- GET_ALL_TRANIDS, GET_FIRST_TRANID, GET_NEXT_TRANID, GET_COMPACTED_TRANID — manage the auto-sync transaction identifier set used to drive apply batches.
- GET_ALL_PUB_ITEMS, GET_ALL_DIRTY_PUB_ITEMS — enumerate the full or dirty-only set of publication items requiring application.
- PURGE_PUBITEMS, DELETE_ROW — clean up processed publication items and individual staging rows.
- BEGIN_CLIENT_APPLY, END_CLIENT_APPLY, BEGIN_APPLY, END_APPLY — bracket the apply transaction, establishing and releasing the transactional context per client and for the overall run.
- SETUP_INQ_INFO — initialises inquiry information needed before processing.
- PROCESS_MOBILE_QUERIES, PROCESS_SEQUENCES, PROCESS_UPLOAD — the principal processing drivers for mobile query refresh, sequence synchronisation, and upload data.
- IS_CONC_PROGRAM_RUNNING — concurrency guard preventing overlapping concurrent program executions.
Global variables (g_conc_userid, g_conc_respid, g_conc_appid) store the concurrent program's user, responsibility, and application context, along with g_current_tranid and g_only_deferred_trans.
Tables Accessed
The package reads and writes a defined set of APPS synonyms:
- ASG_AUTO_SYNC_TRANIDS — drives transaction-id retrieval and compaction.
- ASG_DEFERRED_TRANINFO — holds deferred transaction information.
- ASG_EVENTS_S — sequence-backed event tracking.
- ASG_PUB_ITEM — supplies publication item definitions and weights for sorting.
- ASG_USER, ASG_USER_PUB_RESPS, ASG_USERS_INQINFO, ASG_USERS_INQARCHIVE — user, responsibility, and inquiry state data used to identify dirty and deferred clients.
- DBMS_LOB, DBMS_SQL, DBMS_XMLQUERY, DUAL, PLITBLM — Oracle-supplied packages and utility objects supporting LOB, dynamic SQL, XML query generation, and PL/SQL index-by table management.
Usage Notes
ASG_APPLY is typically invoked from ASG concurrent programs that perform the periodic apply of mobile user uploads and inquiry synchronisation; IS_CONC_PROGRAM_RUNNING prevents conflicting runs, and the *_APPLY procedures delimit each apply transaction. It is referenced by six other packages in the EBS schema and should not be treated as a public API for custom development, as it is internally consumed and its behaviour is tied to the ASG subsystem's own metadata. Administrators should consult ETRM and the ASG functional documentation before diagnosing failures, since most error conditions surface through the log routine and the return status of the get_* routines.