Search Results get_task_dec_bgcolor




Overview

JTF_TASK_CUSTOM_COLORS_PUB is a public PL/SQL package in the Oracle E-Business Suite Applications (APPS) schema that supplies customized color-coding information for tasks managed within the Oracle Task Management / Resource Manager (JTF) framework. Its declared purpose, as stated in the package header, is "to get the color for a task." The package resolves the combination of task attributes — task type, priority, assignment status, and escalation flag — against a user-defined color setup, and returns a display color that a client, typically a Java or Forms-based task calendar or task list, can use to visually distinguish tasks.

The package is defined with AUTHID CURRENT_USER, meaning its unqualified references resolve under the privileges of the invoking user rather than the defining owner, and it exposes public (PUB) APIs intended for external consumption by other EBS components and by customer extensions. The package source header dates the original creation to October 2002 and records iterative enhancement through December 2002, including the addition of background color retrieval entry points and the resolution of Bug 2696521. In the 12.1.1 and 12.2.2 releases the package remains a stable, published interface, referenced by two other packages in the application.

Key Procedures and Functions

The documented public interface comprises three functions:

  • GET_TASK_RGB_BGCOLOR — Returns the background color for a task expressed in RGB notation, matching the background_col_rgb column of the package's internal custom_color_rec record type. This is the form consumed by rendering layers that require explicit red/green/blue color values.
  • GET_TASK_DEC_BGCOLOR — Returns the background color for a task in decimal notation, corresponding to the background_col_dec column of the color record. This entry point was added on 06-Dec-2002 to resolve Bug 2696521 and is the function most commonly referenced by callers searching for color retrieval by decimal value, including queries such as "get_task_dec_bgcolor".
  • GET_TASK_BGCOLORS — Returns the set of background colors applicable to tasks, operating over the package's PL/SQL table type (custom_color_tbl) rather than a single scalar value. This is the bulk or collection-oriented access path, added on 31-Oct-2002 to support multiple color resolutions in a single call.

The package internally defines custom_color_rec and custom_color_tbl to model the color setup data, including task type, task priority, assignment status, escalation indicator, and the decimal and RGB background color representations.

Tables Accessed

The package operates against the following tables through APPS synonyms:

  • JTF_TASK_CUSTOM_COLORS — The primary configuration table holding the user-defined mapping of task attributes to colors. This is the source from which the decimal and RGB background color values are derived.
  • JTF_TASKS_B — The base task table, providing task identity and attributes used to match a task to its applicable color rule.
  • JTF_TASK_REFERENCES_B — Supplies task reference information used in the resolution logic.
  • JTF_TASK_STATUSES_B — Provides task status and assignment status definitions that participate in the color matching criteria.
  • PLITBLM — The standard Oracle PL/SQL table maintenance package, used for collection management of the package's internal PL/SQL tables.

Usage Notes

JTF_TASK_CUSTOM_COLORS_PUB is generally not invoked directly by end users. It is called programmatically by task-oriented UI components — task lists, calendars, and Resource Manager screens — that must paint tasks with administrator-configured colors. Typical invocation patterns include:

  • Forms and Java clients where the task display logic calls GET_TASK_DEC_BGCOLOR or GET_TASK_RGB_BGCOLOR for each task row passing through the result set, choosing the decimal or RGB variant according to the rendering technology.
  • Other PL/SQL packages, consistent with the metadata indicating the package is referenced by two other packages, where color resolution is required as part of a broader task processing routine.
  • Custom extensions and reports that replicate task color-coding behavior, calling the public functions to remain consistent with seeded color configuration.

Because the color setup is data-driven through JTF_TASK_CUSTOM_COLORS, administrators can change task coloring without code modification; the package simply reflects the current configuration at call time. When extending or diagnosing color behavior, the decimal function GET_TASK_DEC_BGCOLOR is the recommended single-row entry point, while GET_TASK_BGCOLORS is appropriate when many tasks must be resolved in one pass.