Skip to content

Is it possible to send a Stream Notification directly from PL/SQL (rather than using a custom event's built-in 'Streams message' action type), so the notification only fires based on custom conditional logic in the code?

Answer

Yes — populate a record matching the FND_STREAM structure (declare it against the FND_STREAM view rather than the underlying table, since non-Application-Owner users generally can't see the raw table directly) with from_user, to_user, header, message, url, and lu_name set, then call Fnd_Stream_API.New_Stream_Item(stream_) to send it — no separate commit is needed, since the stream item commits together with the surrounding transaction. A few important guardrails: always set stream_type to Fnd_Stream_Type_API.DB_GENERAL specifically (other stream types are color-coded for particular purposes and can confuse users if misused; DB_GENERAL displays as a generic Event Message); only one 'to' user and one 'from' user are allowed per call, so call it once per recipient if sending to multiple users; keep the header to roughly 50-75 characters and the message to roughly 200 characters as a practical guideline (the actual database limits are larger, but shorter is more usable); and avoid overusing this — sending too many stream items floods the Streams panel and makes it unusable for its intended purpose. Stream messages also aren't translatable.

← Browse Integrations and APIs questions