Skip to content

Maintain reference data

Maintains lookup, page, and user-to-group reference rows.

Field Value
Operation ID OP-MENU-004
Trigger Caller maintains lookup or membership data.
Inputs IDataPortalInfo plus natural or surrogate keys
Outputs Persisted lookup and membership rows
Primary components clsApplicationCode, clsMenuCategoryCode, clsMenuPage, clsMenuSecurityUser
Entry point SAIF.Business.Menu\clsApplicationCode.vb

Steps

  1. Use SQL-MENU-001-SQL-MENU-006 to maintain BUSONLINE_APPS_CODE.
  2. Use SQL-MENU-007-SQL-MENU-011 to maintain MENU_CATEGORY_CODE.
  3. Use SQL-MENU-018-SQL-MENU-023 to maintain MENU_PAGE.
  4. Use SQL-MENU-031, SQL-MENU-032, SQL-MENU-033, and SQL-MENU-034 to maintain MENU_SECURITY_USER user-to-security-group membership rows. The user-scoped retrieval, SQL-MENU-035, is documented separately below because its :MenuUser bind variable is not supplied by the code and the retrieval fails rather than return a user's memberships.
  5. After every write, rely on the common row-count enforcement in BR-MENU-001 to detect contention or unexpected failures.
  6. The maintained lookup and membership rows later participate in SQL-MENU-043 and SQL-MENU-044.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Caller maintains reference data]) --> Choose{Which reference set?}
    Choose --> App[Application codes]
    Choose --> Cat[Menu categories]
    Choose --> Page[Menu pages]
    Choose --> User[Security users]
    App --> Verify[Verify row count on writes]
    Cat --> Verify
    Page --> Verify
    User --> Verify
    Verify --> Done([Reference data available to menu workflows])

Failure and edge-case behavior

  • The library reads and writes these tables through direct Oracle SQL.
  • Row-count mismatches surface through BR-MENU-001 instead of silently committing inconsistent state.
  • The user-scoped security-user retrieval (clsMenuSecurityUserCollection.GetMenuSecurityUserForUser, SQL-MENU-035) has a source-level defect: BeforeRetrieve selects the retrieveForUserSQL statement, whose :MenuUser bind variable is never supplied by the code. As written, this retrieval fails at execution time (e.g., a missing-bind-variable error) rather than return the intended per-user membership rows; only the unfiltered GetMenuSecurityUserAll retrieval (SQL-MENU-034) is unaffected.

Note: Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Business.Menu\clsApplicationCode.vb