Search Results ff_route_context_usages




Overview

The FF_ROUTE_CONTEXT_USAGES table is a core data dictionary object within the Oracle E-Business Suite FastFormula (FF) module. It functions as a junction table that records the specific usage of FastFormula contexts as bind variables within the SQL statement of a Formula Route. A Formula Route defines the logic for retrieving and processing data during payroll or other FastFormula executions. This table is essential for the system's metadata management, ensuring that the runtime engine correctly identifies and supplies the necessary context values (such as assignment ID, effective date, or legislative parameters) to the associated SQL query before execution. Its role is administrative and foundational, linking the definition of a route to the contexts it requires.

Key Information Stored

The table's structure is designed to map a single context to a single route, capturing the order and relationship of bind variables. The primary columns, as defined by its constraints, are ROUTE_ID and CONTEXT_ID, which together form the table's primary key (FF_ROUTE_CONTEXT_USAGES_PK). This ensures a unique combination of a route and a context within this usage table. The SEQUENCE_NO column, which participates in a unique key (FF_ROUTE_CONTEXT_USAGES_UK2) with ROUTE_ID, dictates the positional order in which the context bind variables are applied within the route's SQL statement. This sequence is critical for the correct binding of values at runtime.

Common Use Cases and Queries

This table is primarily queried for diagnostic, impact analysis, and development purposes within the FastFormula engine. A common use case is identifying all contexts required by a specific route, which is vital when debugging formula execution errors or understanding dependencies before modifying a context. Database administrators or technical consultants may run queries to audit context usage across the system. A sample query to list all contexts used by a route, in the correct binding order, would be:

  • SELECT rcu.sequence_no, ctx.context_name FROM ff_route_context_usages rcu, ff_contexts ctx WHERE rcu.context_id = ctx.context_id AND rcu.route_id = :route_id ORDER BY rcu.sequence_no;

Another practical scenario involves impact analysis: determining which routes would be affected by a planned change to a specific context definition by querying for all ROUTE_ID values linked to a given CONTEXT_ID.

Related Objects

The FF_ROUTE_CONTEXT_USAGES table maintains strict referential integrity with two key parent tables via foreign key constraints, as documented in the ETRM metadata:

  • FF_ROUTES: The foreign key from FF_ROUTE_CONTEXT_USAGES.ROUTE_ID references the FF_ROUTES table. This defines the parent route for which the context is used.
  • FF_CONTEXTS: The foreign key from FF_ROUTE_CONTEXT_USAGES.CONTEXT_ID references the FF_CONTEXTS table. This defines the specific context variable being utilized as a bind parameter.

These relationships are fundamental. Any valid record in FF_ROUTE_CONTEXT_USAGES must correspond to an existing definition in both FF_ROUTES and FF_CONTEXTS. The table is therefore central to the metadata relationship between routes and the contexts they consume.