Search Results message_init




Overview

FND_FLEX_WF_PROCESSES is an Oracle E-Business Suite package body owned by the APPS schema. It provides the programmatic infrastructure that binds key flexfield structures to Oracle Workflow item types and workflow processes, allowing the Flexfields architecture to participate in workflow-driven approvals, notifications, and process orchestration. The package exposes a small, focused API surface used primarily for administrative maintenance of the relationship between a flexfield structure definition and the workflow artifacts that reference it.

In the EBS 12.1.1 and 12.2.2 releases, key flexfields frequently need to drive workflow behavior—for example, when a new accounting structure, item structure, or category structure is validated and must be associated with an item type and process. This package encapsulates the create, change, and delete operations against that mapping, together with session-context and diagnostic helper routines. Its source header (AFFFWFPB.pls 120.1.12010000.1) confirms it is a long-standing Core Flexfields component.

Key Procedures and Functions

  • VALIDATE_ON / VALIDATE_OFF — Toggle validation behavior within the package. These are used to enable or disable validation logic, typically so bulk maintenance operations can bypass checks such as flexfield structure existence or application-level constraints.
  • MESSAGE — Appends a caller-supplied string to the package's internal message buffer (g_internal_messages). Messages accumulate across a call so that a complete diagnostic log can be returned or inspected after a batch of operations.
  • SET_SESSION_MODE — Establishes the session mode used by the package. The source shows two recognized values, seed_data and customer_data, which control who-column population via the private GET_WHO function (seed data uses a fixed historical stamp; customer data uses the current user and SYSDATE).
  • ADD_WORKFLOW_ITEM_TYPE — Registers an association between a flexfield structure and a workflow item type, creating the supporting record used by Workflow when the flexfield participates in a process.
  • DELETE_WORKFLOW_ITEM_TYPE — Removes a previously established item type association, reversing ADD_WORKFLOW_ITEM_TYPE.
  • CHANGE_WORKFLOW_PROCESS — Modifies the workflow process associated with an existing flexfield/item type mapping, supporting process version changes or corrections without a full delete/re-add cycle.
  • ADD_NEW_WORKFLOW_ITEM_TYPE — Creates a new item type definition and its linkage for use with flexfield-driven workflow, distinct from ADD_WORKFLOW_ITEM_TYPE, which associates an already-defined type.

Tables Accessed

  • FND_FLEX_WORKFLOW_PROCESSES — The primary repository for the flexfield-to-workflow associations maintained by the add, delete, and change routines.
  • FND_ID_FLEX_STRUCTURES — Read by validation logic to confirm that the referenced application, flexfield code, and structure number form a valid key flexfield structure before any workflow mapping is written.
  • FND_APPLICATION — Supplies application context, used to resolve and validate the application owning the flexfield definition.

Usage Notes

The package is not referenced by other PL/SQL packages (documented reference count: zero), which indicates it is invoked either directly from EBS forms, from concurrent or administrative programs, or from custom extension code rather than from within the standard package dependency chain. Typical invocation patterns include administrator-driven maintenance of workflow-enabled flexfields and migration or setup scripts that load workflow definitions.

Because the routines depend on the g_session_mode context, callers should invoke SET_SESSION_MODE before performing maintenance. Custom code should also call MESSAGE_INIT (the message_init routine visible in the source) to reset the message buffer before executing a sequence of operations, then inspect the accumulated buffer for diagnostic output.