Search Results send_to_email




Overview

MSC_WS_NOTIFICATION_BPEL is an Oracle Applications (APPS) PL/SQL package body that belongs to the MSC (Advanced Supply Chain Planning) product family. Its core purpose is to support the workflow notification infrastructure used by Oracle Advanced Supply Chain Planning, specifically for notifications that are routed through Oracle Workflow and the BPEL (Business Process Execution Language) notification framework. The package resolves recipient identities, builds ad hoc workflow roles on demand, and dispatches "For Your Information" (FYI) notifications to planning users. It bridges the planning data model (plans, saved queries) with the Oracle Workflow engine, allowing planners and administrators to be notified of plan-related events through email or the Workflow notification worklist.

The package is classified as OTHER in the ETRM metadata because it is an internal utility/plumbing package rather than a public, documented application programming interface. It is referenced by one other package, indicating it operates as a lower-level service consumed by higher-level supply chain planning notification logic.

Key Procedures and Functions

  • SET_WF_APPROVER_ROLE — A Workflow-standard function activity callback. It reads the SEND_TO_EMAIL item attribute, checks WF_LOCAL_ROLES for an existing role with that name, and, if none exists, creates an ad hoc role via WF_DIRECTORY.CREATEADHOCROLE with MAILHTML notification preference. It then writes the resolved role back to the item attribute SEND_TO_ROLE and returns "complete:y", "complete:n", or "UNKNOWN_ERROR".
  • LOOKUP — A generic lookup routine, presumably used to resolve notification-related configuration or recipient values.
  • LOOKUP_PLAN — Resolves plan-related information, most likely translating a plan identifier or name into the values needed for a notification (for example, the plan associated with a saved query or a notification event). This is the object most commonly referenced when users search for "lookup_plan".
  • LOOKUP_ESCALATION — Resolves escalation information, supporting the escalation of notifications to additional recipients or higher-level approvers.
  • SENDFYINOTIFICATION — The primary notification dispatcher. It accepts a sender user ID and responsibility ID, the receiver, language, workflow name and process name, and a list of token values. It first validates the user and responsibility via MSC_WS_COMMON.VALIDATE_USER_RESP and returns the status if validation fails; otherwise it proceeds to build and send the FYI notification.
  • SENDFYINOTIFICATIONPUBLIC — A public wrapper exposing the FYI notification function to external callers.

Tables Accessed

  • MSC_PLANS — The planning plan definitions; used by the LOOKUP_PLAN logic to validate and resolve plan context.
  • MSC_FORM_QUERY_S — Stored form queries, used to associate saved planning queries with notification recipients or events.
  • FND_USER — Resolves the sender/user identity and email information for notification routing.
  • WF_LOCAL_ROLES — Checked by SET_WF_APPROVER_ROLE to determine whether the target email role already exists before creating an ad hoc role.
  • DUAL — Standard single-row utility access.
  • PLITBLM — A PL/SQL index-by/table type support object, used internally to hold collections (such as token value pairs) during notification processing.

Usage Notes

This package is invoked from Oracle Workflow function activities (SET_WF_APPROVER_ROLE is called by the Workflow engine during a notification process) and from planning notification logic that calls SENDFYINOTIFICATION or its public counterpart. It is not intended to be run as a standalone concurrent program. Because it depends on WF_ENGINE, WF_DIRECTORY, and FND_GLOBAL.APPS_INITIALIZE, it must execute within an initialized Oracle EBS session with the correct user and responsibility context. Customizations that hook into planning notifications should call the public function rather than the private procedures, and any changes to recipient resolution (for example, plan or escalation lookups) are best made by extending the LOOKUP_PLAN and LOOKUP_ESCALATION logic. The version header indicates the package body is at 120.4 and has remained stable since 2008, so it is compatible with both EBS 12.1.1 and 12.2.2.