231: /* use MAX to get the latest notification sent for the wf item */
232:
233: CURSOR getcurrnotif is
234: SELECT NVL(MAX(wf.notification_id), -9995)
235: FROM WF_NOTIFICATIONS WF,
236: WF_ITEM_ACTIVITY_STATUSES WIAS
237: WHERE WIAS.ITEM_TYPE = x_itemtype AND
238: WIAS.ITEM_KEY = x_itemkey AND
239: WIAS.NOTIFICATION_ID = WF.group_id;
267: SELECT FND_GLOBAL.USER_NAME AS granter_key
268: FROM dual;
269:
270: -- Bug 4633202: Temp variables
271: l_notification_key wf_notifications.ACCESS_KEY%TYPE;
272: l_granter_key FND_GRANTS.PARAMETER1%TYPE;
273: l_has_access BOOLEAN;
274:
275:
272: l_granter_key FND_GRANTS.PARAMETER1%TYPE;
273: l_has_access BOOLEAN;
274:
275:
276: l_notification_id WF_NOTIFICATIONS.notification_id%type;
277: l_responder WF_NOTIFICATIONS.responder%type;
278: l_original_recipient_id wf_users.orig_system_id%type;
279: l_recipient_id wf_users.orig_system_id%type;
280: l_recipient_role WF_NOTIFICATIONS.recipient_role%type;
273: l_has_access BOOLEAN;
274:
275:
276: l_notification_id WF_NOTIFICATIONS.notification_id%type;
277: l_responder WF_NOTIFICATIONS.responder%type;
278: l_original_recipient_id wf_users.orig_system_id%type;
279: l_recipient_id wf_users.orig_system_id%type;
280: l_recipient_role WF_NOTIFICATIONS.recipient_role%type;
281: l_original_recipient WF_NOTIFICATIONS.ORIGINAL_RECIPIENT%type;
276: l_notification_id WF_NOTIFICATIONS.notification_id%type;
277: l_responder WF_NOTIFICATIONS.responder%type;
278: l_original_recipient_id wf_users.orig_system_id%type;
279: l_recipient_id wf_users.orig_system_id%type;
280: l_recipient_role WF_NOTIFICATIONS.recipient_role%type;
281: l_original_recipient WF_NOTIFICATIONS.ORIGINAL_RECIPIENT%type;
282:
283: Begin
284: Open getcurrnotif;
277: l_responder WF_NOTIFICATIONS.responder%type;
278: l_original_recipient_id wf_users.orig_system_id%type;
279: l_recipient_id wf_users.orig_system_id%type;
280: l_recipient_role WF_NOTIFICATIONS.recipient_role%type;
281: l_original_recipient WF_NOTIFICATIONS.ORIGINAL_RECIPIENT%type;
282:
283: Begin
284: Open getcurrnotif;
285: fetch getcurrnotif into l_notification_id;
318: This check is not required. WF API itself
319: will take care of all these checks.
320: SELECT wfn.recipient_role, wfn.original_recipient
321: INTO l_recipient_role, l_original_recipient
322: FROM wf_notifications wfn
323: WHERE wfn.notification_id = l_notification_id;
324:
325: OPEN c_responderid(l_recipient_role);
326: FETCH c_responderid INTO l_recipient_id;