7813:
7814:
7815: if username is not null and doc is not null then
7816:
7817: /* l_nid := wf_notification.Send(username,
7818: itemtype,
7819: 'PLSQL_ERROR_OCCURS',
7820: null, null, null, null);
7821:
7818: itemtype,
7819: 'PLSQL_ERROR_OCCURS',
7820: null, null, null, null);
7821:
7822: wf_Notification.SetAttrText(l_nid, 'PLSQL_ERROR_DOC', doc);
7823: wf_Notification.SetAttrText(l_nid, 'PLSQL_ERROR_LOC', loc);
7824: wf_Notification.SetAttrText(l_nid, 'PLSQL_ERROR_MSG', msg);
7825: */
7826:
7819: 'PLSQL_ERROR_OCCURS',
7820: null, null, null, null);
7821:
7822: wf_Notification.SetAttrText(l_nid, 'PLSQL_ERROR_DOC', doc);
7823: wf_Notification.SetAttrText(l_nid, 'PLSQL_ERROR_LOC', loc);
7824: wf_Notification.SetAttrText(l_nid, 'PLSQL_ERROR_MSG', msg);
7825: */
7826:
7827: -- Get Document Id for the Errored Item.
7820: null, null, null, null);
7821:
7822: wf_Notification.SetAttrText(l_nid, 'PLSQL_ERROR_DOC', doc);
7823: wf_Notification.SetAttrText(l_nid, 'PLSQL_ERROR_LOC', loc);
7824: wf_Notification.SetAttrText(l_nid, 'PLSQL_ERROR_MSG', msg);
7825: */
7826:
7827: -- Get Document Id for the Errored Item.
7828:
7916: itemkey in varchar2) is
7917: pragma AUTONOMOUS_TRANSACTION;
7918: begin
7919:
7920: update wf_notifications set status = 'CLOSED'
7921: where notification_id in (
7922: select ias.notification_id
7923: from wf_item_activity_statuses ias,
7924: wf_notifications ntf
7920: update wf_notifications set status = 'CLOSED'
7921: where notification_id in (
7922: select ias.notification_id
7923: from wf_item_activity_statuses ias,
7924: wf_notifications ntf
7925: where ias.item_type = itemtype
7926: and ias.item_key = itemkey
7927: and ntf.notification_id = ias.notification_id);
7928:
8481: --dbms_output.put_line('For std pos');
8482: begin
8483: select a.notification_id, a.recipient_role
8484: INTO l_nid, l_ntf_role_name
8485: from wf_notifications a,
8486: wf_item_activity_statuses wa
8487: where itemkey=wa.item_key
8488: and itemtype=wa.item_type
8489: and a.message_name in ('PO_EMAIL_PO_WITH_RESPONSE', 'PO_EMAIL_PO_PDF_WITH_RESPONSE')
8496: begin
8497: --dbms_output.put_line('For Releases');
8498: select a.notification_id, a.recipient_role
8499: INTO l_nid, l_ntf_role_name
8500: from wf_notifications a,
8501: wf_item_activity_statuses wa
8502: where itemkey=wa.item_key
8503: and itemtype=wa.item_type
8504: and a.message_name in ('PO_EMAIL_PO_WITH_RESPONSE', 'PO_EMAIL_PO_PDF_WITH_RESPONSE')
8511: if (l_nid is null) then
8512: --we do not want to continue if the notification is not closed.
8513: return;
8514: else
8515: x_supp_user_name := wf_notification.responder(l_nid);
8516: end if;
8517:
8518:
8519: PO_WF_UTIL_PKG.SetItemAttrText (itemtype => itemtype,
8676: --dbms_output.put_line('For std pos');
8677: begin
8678: select a.notification_id, a.recipient_role
8679: INTO l_nid, l_ntf_role_name
8680: from wf_notifications a,
8681: wf_item_activity_statuses wa
8682: where itemkey=wa.item_key
8683: and itemtype=wa.item_type
8684: and a.message_name in ('PO_EMAIL_PO_WITH_RESPONSE', 'PO_EMAIL_PO_PDF_WITH_RESPONSE')
8691: begin
8692: --dbms_output.put_line('For Releases');
8693: select a.notification_id, a.recipient_role
8694: INTO l_nid, l_ntf_role_name
8695: from wf_notifications a,
8696: wf_item_activity_statuses wa
8697: where itemkey=wa.item_key
8698: and itemtype=wa.item_type
8699: and a.message_name in ('PO_EMAIL_PO_WITH_RESPONSE', 'PO_EMAIL_PO_PDF_WITH_RESPONSE')
8706: if (l_nid is null) then
8707: --We do not want to continue if the notification is not closed.
8708: return;
8709: else
8710: x_supp_user_name := wf_notification.responder(l_nid);
8711: end if;
8712:
8713:
8714: PO_WF_UTIL_PKG.SetItemAttrText ( itemtype => itemtype,