173: x_buyer_name;
174:
175: WHILE qri%found LOOP
176:
177: x_nid_user := wf_notification.send
178: (x_user_name,
179: itemtype ,
180: 'FAILURE_DETECTED_TO_USER');
181: set_message_attr(x_nid_user);
178: (x_user_name,
179: itemtype ,
180: 'FAILURE_DETECTED_TO_USER');
181: set_message_attr(x_nid_user);
182: x_nid_supervisor := wf_notification.send
183: (x_last_updated_name,
184: itemtype,
185: 'FAILURE_DETECTED_TO_SUPERVISOR');
186: set_message_attr(x_nid_supervisor);
185: 'FAILURE_DETECTED_TO_SUPERVISOR');
186: set_message_attr(x_nid_supervisor);
187:
188: IF x_buyer_name IS NOT NULL THEN
189: x_nid_buyer := wf_notification.send
190: (x_buyer_name,
191: itemtype,
192: 'FAILURE_DETECTED_TO_BUYER');
193: set_message_attr(x_nid_buyer);
214: --
215:
216: PROCEDURE set_message_attr(id IN NUMBER) IS
217: BEGIN
218: wf_notification.setattrdate(id, 'CREATION_DATE', x_creation_date);
219: wf_notification.setattrtext(id, 'PLAN_NAME', x_plan_name);
220: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
221: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
222: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
215:
216: PROCEDURE set_message_attr(id IN NUMBER) IS
217: BEGIN
218: wf_notification.setattrdate(id, 'CREATION_DATE', x_creation_date);
219: wf_notification.setattrtext(id, 'PLAN_NAME', x_plan_name);
220: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
221: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
222: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
223: wf_notification.setattrtext(id, 'ORGANIZATION_CODE', x_organization_code);
216: PROCEDURE set_message_attr(id IN NUMBER) IS
217: BEGIN
218: wf_notification.setattrdate(id, 'CREATION_DATE', x_creation_date);
219: wf_notification.setattrtext(id, 'PLAN_NAME', x_plan_name);
220: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
221: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
222: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
223: wf_notification.setattrtext(id, 'ORGANIZATION_CODE', x_organization_code);
224: wf_notification.setattrtext(id, 'LAST_UPDATE_LOGIN', x_last_updated_name);
217: BEGIN
218: wf_notification.setattrdate(id, 'CREATION_DATE', x_creation_date);
219: wf_notification.setattrtext(id, 'PLAN_NAME', x_plan_name);
220: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
221: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
222: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
223: wf_notification.setattrtext(id, 'ORGANIZATION_CODE', x_organization_code);
224: wf_notification.setattrtext(id, 'LAST_UPDATE_LOGIN', x_last_updated_name);
225: END set_message_attr;
218: wf_notification.setattrdate(id, 'CREATION_DATE', x_creation_date);
219: wf_notification.setattrtext(id, 'PLAN_NAME', x_plan_name);
220: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
221: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
222: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
223: wf_notification.setattrtext(id, 'ORGANIZATION_CODE', x_organization_code);
224: wf_notification.setattrtext(id, 'LAST_UPDATE_LOGIN', x_last_updated_name);
225: END set_message_attr;
226:
219: wf_notification.setattrtext(id, 'PLAN_NAME', x_plan_name);
220: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
221: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
222: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
223: wf_notification.setattrtext(id, 'ORGANIZATION_CODE', x_organization_code);
224: wf_notification.setattrtext(id, 'LAST_UPDATE_LOGIN', x_last_updated_name);
225: END set_message_attr;
226:
227:
220: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
221: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
222: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
223: wf_notification.setattrtext(id, 'ORGANIZATION_CODE', x_organization_code);
224: wf_notification.setattrtext(id, 'LAST_UPDATE_LOGIN', x_last_updated_name);
225: END set_message_attr;
226:
227:
228: --
507:
508: --
509: --Its not enough if the item level attributes are set.
510: --We also have to set the message attributes, for each message
511: --sent using wf_notification.send
512: --
513:
514: x_nid := wf_notification.send(x_buyer_name, itemtype, 'RESULTS_SAVED_TO_BUYER');
515: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
510: --We also have to set the message attributes, for each message
511: --sent using wf_notification.send
512: --
513:
514: x_nid := wf_notification.send(x_buyer_name, itemtype, 'RESULTS_SAVED_TO_BUYER');
515: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
516: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
517: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
518: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
511: --sent using wf_notification.send
512: --
513:
514: x_nid := wf_notification.send(x_buyer_name, itemtype, 'RESULTS_SAVED_TO_BUYER');
515: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
516: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
517: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
518: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
519: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
512: --
513:
514: x_nid := wf_notification.send(x_buyer_name, itemtype, 'RESULTS_SAVED_TO_BUYER');
515: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
516: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
517: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
518: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
519: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
520: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
513:
514: x_nid := wf_notification.send(x_buyer_name, itemtype, 'RESULTS_SAVED_TO_BUYER');
515: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
516: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
517: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
518: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
519: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
520: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
521: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
514: x_nid := wf_notification.send(x_buyer_name, itemtype, 'RESULTS_SAVED_TO_BUYER');
515: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
516: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
517: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
518: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
519: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
520: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
521: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
522: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
515: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
516: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
517: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
518: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
519: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
520: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
521: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
522: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
523: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
516: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
517: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
518: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
519: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
520: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
521: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
522: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
523: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
524: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
517: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
518: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
519: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
520: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
521: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
522: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
523: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
524: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
525: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
518: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
519: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
520: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
521: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
522: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
523: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
524: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
525: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
526: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
519: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
520: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
521: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
522: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
523: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
524: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
525: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
526: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
527: wf_notification.setattrtext(x_nid, 'OPEN_RSINF_COMMAND', x_rsinf);
520: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
521: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
522: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
523: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
524: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
525: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
526: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
527: wf_notification.setattrtext(x_nid, 'OPEN_RSINF_COMMAND', x_rsinf);
528: -- Bug 8678616.FP to 8560872.Added this statement to update the subject
521: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
522: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
523: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
524: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
525: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
526: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
527: wf_notification.setattrtext(x_nid, 'OPEN_RSINF_COMMAND', x_rsinf);
528: -- Bug 8678616.FP to 8560872.Added this statement to update the subject
529: -- with plan name.pdube Thu Jun 18 00:29:40 PDT 2009
522: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
523: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
524: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
525: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
526: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
527: wf_notification.setattrtext(x_nid, 'OPEN_RSINF_COMMAND', x_rsinf);
528: -- Bug 8678616.FP to 8560872.Added this statement to update the subject
529: -- with plan name.pdube Thu Jun 18 00:29:40 PDT 2009
530: wf_notification.denormalize_notification(x_nid);
523: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
524: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
525: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
526: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
527: wf_notification.setattrtext(x_nid, 'OPEN_RSINF_COMMAND', x_rsinf);
528: -- Bug 8678616.FP to 8560872.Added this statement to update the subject
529: -- with plan name.pdube Thu Jun 18 00:29:40 PDT 2009
530: wf_notification.denormalize_notification(x_nid);
531:
526: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
527: wf_notification.setattrtext(x_nid, 'OPEN_RSINF_COMMAND', x_rsinf);
528: -- Bug 8678616.FP to 8560872.Added this statement to update the subject
529: -- with plan name.pdube Thu Jun 18 00:29:40 PDT 2009
530: wf_notification.denormalize_notification(x_nid);
531:
532: END IF;
533:
534: END send;