Sunday, 11 November 2018

API to Send Workflow Notifications in Oracle Apps: wf_notification.send Example

API to Send Workflow Notifications in Oracle Apps: wf_notification.send Example

In this post , we will discuss about the API to send the Workflow Notifications to Oracle Users in Oracle apps r12. Usually we send Workflow Notifications through Workflow Builder in Oracle apps but Oracle has also given us the API to send Workflow Notifications directly from the Data base through PLSQL code. Here below I am sharing the Example and Package of sending Workflow Notifications
 

wf_notification.send Example

 
This function sends the specified message to a user/role and returns a
notification ID if successful. The specification of the function is shown below.
 
Important : Before Using this API The message template that needs to be sent has to be defined within a workflow item type .
 
When you will do right click on PO Approval Item type you can go to its properties.
wf_notification.send Example
 
 
function SEND
 (role in varchar2, 
  msg_type in varchar2, 
  msg_name in varchar2,
  due_date in date default null,
  callback in varchar2 default null,
  context in varchar2 default null,
  send_comment in varchar2 default null
  priority in number default null)
 return number;

Example: 
declare
  nid number;
  msg_type varchar2(100) := 'WFTESTS';
  msg_name varchar2(100) := 'PLSQL_MSG';
  role varchar2(320) := 'TESTUSER';
begin
   nid := wf_notification.send(role, msg_type, msg_name);  
   commit;
end;
 

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *