Displaying an OAF Page through Workflow Notification


Introduction
This blog post explains the process of firing/ Opening a Page through workflow notifications. This can be used for implementing a feed back form which is to be filled by the group of users who ever have gone under training. This Process generates link (URL) in a notification through which a Page gets opened through the link.


Pre Requisites
Need to have Knowledge on Workflows, Pl/Sql and AOL

Process 
  • Need to Create an OA Page which is supposed to be sent through notification
  • Register the OA Page as a function in any of the (Menu/Responsibility)
  • Generation of URL for the OA Page Created
  • Sending the URL through notification to all users
Registration of OA Page
Defining a function for the page
Attaching the function to menu

Generation of URL for the Page
We use some standard Package for generating URL

Declare
l_resp_appl_id  NUMBER;
l_resp_id       NUMBER;
l_function_id   NUMBER := fnd_function.get_function_id
(p_function_name => 'LRNG_IMP_EVALUATION'/* Function Name */
);
BEGIN
    SELECT responsibility_id, application_id
      INTO l_resp_id, l_resp_appl_id
      FROM fnd_responsibility_tl
     WHERE responsibility_name = 'Employee Self Service';--Responsibility Name to which we attach the function

 l_url := fnd_run_function.get_run_function_url
(p_function_id             => l_function_id, 
 p_resp_appl_id      => l_resp_appl_id,
 p_resp_id           => l_resp_id,
 p_security_group_id => 0,
 p_parameters        => NULL,
p_override_agent     => NULL,
 p_org_id            => NULL,
 p_lang_code         => NULL,
 p_encryptparameters => FALSE);

end;

Setting Notification with URL
Need to create and start the desired Workflow and then setup the notification as mentioned below
wf_engine.setitemattrtext(itemtype => 'XXMHPLRN', /*WFItem name*/
                          itemkey  => l_item_key, /*WFItem Key*/
                          aname    => 'PAGE_LINK', /*Attribute name*/
                          avalue   => l_url  /* Generated URL Path*/
);

Once Workflow starts the process it sent the notification with URL embedded to all of the concern users.

We can trigger the new process by we submit the page which has been sent through notification for performing further operations if required.