Search Results rel_color_tbl
Overview
APPS.CSI_II_RELATIONSHIPS_PVT is a private (PVT) PL/SQL package belonging to the Oracle E-Business Suite Installed Base (CSI) product family. It provides the core relationship-navigation and maintenance engine for the Item Instance model, allowing callers to traverse, create, update, expire and analyse the hierarchical and non-hierarchical links that connect item instances, parties and accounts. Because the API classification is PVT, the package is not intended as a public integration surface; it is consumed internally by the CSI public APIs and by sibling private packages that expose higher-level functionality such as the Installed Base instance relationship UI and the relationship purge/validation concurrent processes.
The package header carries the revision string $Header: csiviirs.pls 120.2 2008/03/08 01:03:51 fli ship $, indicating a long-stable code line carried forward into 12.1.1 and 12.2.2. Its principal data structures are the PL/SQL record types INSTANCE_REC/INSTANCE_TBL (carrying an instance identifier and a hop counter) and REL_COLOR_REC/REL_COLOR_TBL, which implement the node-colouring technique used for cycle detection in graphs of instance relationships. A default fetch size of 30 records is declared for bulk retrieval.
Key Procedures and Functions
The package exposes 22 documented procedures and functions. The graph-navigation family includes DFS (depth-first search over the relationship graph), GET_NEXT_LEVEL (advances one level from the current node set and returns the next tier of related instances), GET_NEIGHBORS_FOR_INSTANCE (returns instances within a given hop/depth horizon), GET_CHILDREN (immediate or transitive descendants), GET_IMMEDIATE_PARENTS, PARENT_OF, GET_TOP_MOST_PARENT and GET_ROOT_PARENT (upward traversal to the apex of a hierarchy).
Cycle handling is implemented by GET_CYCLIC_NODE and GET_CYCLIC_RELATIONSHIPS, which detect and report loops in the instance graph using the REL_COLOR_TBL colouring structures, and by CHECK_FOR_OBJECT.
Relationship retrieval and maintenance are covered by GET_RELATIONSHIPS, GET_REL_FOR_INSTANCE, GET_INST_RELATIONSHIP_HIST (history rows), CREATE_RELATIONSHIP, UPDATE_RELATIONSHIP and EXPIRE_RELATIONSHIP. Supporting utilities include RESOLVE_ID_COLUMNS, IS_LINK_TYPE and RELATIONSHIP_FOR_LINK, which resolve polymorphic identifier columns and classify link semantics. The API follows Oracle AOL conventions: GET_CYCLIC_RELATIONSHIPS, for example, accepts p_api_version, p_commit, p_init_msg_list and p_validation_level, and returns x_return_status, x_msg_count and x_msg_data.
Tables Accessed
The package reads and writes the core CSI relationship tables: CSI_II_RELATIONSHIPS (live links between item instances) and its history/audit twin CSI_II_RELATIONSHIPS_H, together with CSI_II_RELATION_TYPES, which supplies the permitted relationship type definitions used by IS_LINK_TYPE and RELATIONSHIP_FOR_LINK. Instance master data is read from CSI_ITEM_INSTANCES and MTL_SYSTEM_ITEMS/MTL_SYSTEM_ITEMS_B; concurrency and ownership context comes from CSI_ITEM_INSTANCE_LOCKS, CSI_I_PARTIES and CSI_IP_ACCOUNTS. Transactional context is supplied by CSI_TRANSACTIONS. Utility objects referenced include DBMS_SQL (dynamic SQL for RESOLVE_ID_COLUMNS), DUAL and PLITBLM.
Usage Notes
The package is normally invoked from the Installed Base relationship forms, from CSI public APIs that delegate to it, and from custom extensions that must traverse instance hierarchies. Ten other packages reference it, so direct calls should be treated as internal. Callers should rely on the public CSI wrappers where available, respect the AOL message-handling pattern, and note that GET_NEXT_LEVEL and the DFS/cycle routines operate in a level-by-level and colour-marked manner designed to prevent infinite recursion in malformed instance graphs.