171: x_buyer_name;
172:
173: WHILE qri%found LOOP
174:
175: x_nid_user := wf_notification.send
176: (x_user_name,
177: itemtype ,
178: 'FAILURE_DETECTED_TO_USER');
179: set_message_attr(x_nid_user);
176: (x_user_name,
177: itemtype ,
178: 'FAILURE_DETECTED_TO_USER');
179: set_message_attr(x_nid_user);
180: x_nid_supervisor := wf_notification.send
181: (x_last_updated_name,
182: itemtype,
183: 'FAILURE_DETECTED_TO_SUPERVISOR');
184: set_message_attr(x_nid_supervisor);
183: 'FAILURE_DETECTED_TO_SUPERVISOR');
184: set_message_attr(x_nid_supervisor);
185:
186: IF x_buyer_name IS NOT NULL THEN
187: x_nid_buyer := wf_notification.send
188: (x_buyer_name,
189: itemtype,
190: 'FAILURE_DETECTED_TO_BUYER');
191: set_message_attr(x_nid_buyer);
212: --
213:
214: PROCEDURE set_message_attr(id IN NUMBER) IS
215: BEGIN
216: wf_notification.setattrdate(id, 'CREATION_DATE', x_creation_date);
217: wf_notification.setattrtext(id, 'PLAN_NAME', x_plan_name);
218: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
219: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
220: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
213:
214: PROCEDURE set_message_attr(id IN NUMBER) IS
215: BEGIN
216: wf_notification.setattrdate(id, 'CREATION_DATE', x_creation_date);
217: wf_notification.setattrtext(id, 'PLAN_NAME', x_plan_name);
218: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
219: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
220: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
221: wf_notification.setattrtext(id, 'ORGANIZATION_CODE', x_organization_code);
214: PROCEDURE set_message_attr(id IN NUMBER) IS
215: BEGIN
216: wf_notification.setattrdate(id, 'CREATION_DATE', x_creation_date);
217: wf_notification.setattrtext(id, 'PLAN_NAME', x_plan_name);
218: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
219: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
220: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
221: wf_notification.setattrtext(id, 'ORGANIZATION_CODE', x_organization_code);
222: wf_notification.setattrtext(id, 'LAST_UPDATE_LOGIN', x_last_updated_name);
215: BEGIN
216: wf_notification.setattrdate(id, 'CREATION_DATE', x_creation_date);
217: wf_notification.setattrtext(id, 'PLAN_NAME', x_plan_name);
218: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
219: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
220: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
221: wf_notification.setattrtext(id, 'ORGANIZATION_CODE', x_organization_code);
222: wf_notification.setattrtext(id, 'LAST_UPDATE_LOGIN', x_last_updated_name);
223: END set_message_attr;
216: wf_notification.setattrdate(id, 'CREATION_DATE', x_creation_date);
217: wf_notification.setattrtext(id, 'PLAN_NAME', x_plan_name);
218: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
219: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
220: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
221: wf_notification.setattrtext(id, 'ORGANIZATION_CODE', x_organization_code);
222: wf_notification.setattrtext(id, 'LAST_UPDATE_LOGIN', x_last_updated_name);
223: END set_message_attr;
224:
217: wf_notification.setattrtext(id, 'PLAN_NAME', x_plan_name);
218: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
219: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
220: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
221: wf_notification.setattrtext(id, 'ORGANIZATION_CODE', x_organization_code);
222: wf_notification.setattrtext(id, 'LAST_UPDATE_LOGIN', x_last_updated_name);
223: END set_message_attr;
224:
225:
218: wf_notification.setattrnumber(id, 'ERROR_ROWS', x_error_rows);
219: wf_notification.setattrtext(id, 'USER_NAME', x_user_name);
220: wf_notification.setattrtext(id, 'BUYER_NAME', x_buyer_name);
221: wf_notification.setattrtext(id, 'ORGANIZATION_CODE', x_organization_code);
222: wf_notification.setattrtext(id, 'LAST_UPDATE_LOGIN', x_last_updated_name);
223: END set_message_attr;
224:
225:
226: --
485:
486: --
487: --Its not enough if the item level attributes are set.
488: --We also have to set the message attributes, for each message
489: --sent using wf_notification.send
490: --
491:
492: x_nid := wf_notification.send(x_buyer_name, itemtype, 'RESULTS_SAVED_TO_BUYER');
493: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
488: --We also have to set the message attributes, for each message
489: --sent using wf_notification.send
490: --
491:
492: x_nid := wf_notification.send(x_buyer_name, itemtype, 'RESULTS_SAVED_TO_BUYER');
493: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
494: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
495: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
496: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
489: --sent using wf_notification.send
490: --
491:
492: x_nid := wf_notification.send(x_buyer_name, itemtype, 'RESULTS_SAVED_TO_BUYER');
493: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
494: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
495: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
496: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
497: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
490: --
491:
492: x_nid := wf_notification.send(x_buyer_name, itemtype, 'RESULTS_SAVED_TO_BUYER');
493: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
494: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
495: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
496: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
497: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
498: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
491:
492: x_nid := wf_notification.send(x_buyer_name, itemtype, 'RESULTS_SAVED_TO_BUYER');
493: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
494: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
495: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
496: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
497: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
498: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
499: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
492: x_nid := wf_notification.send(x_buyer_name, itemtype, 'RESULTS_SAVED_TO_BUYER');
493: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
494: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
495: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
496: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
497: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
498: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
499: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
500: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
493: wf_notification.setattrtext(x_nid, 'BUYER_NAME', x_buyer_name);
494: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
495: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
496: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
497: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
498: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
499: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
500: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
501: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
494: wf_notification.setattrtext(x_nid, 'PLAN_NAME', x_plan_name);
495: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
496: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
497: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
498: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
499: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
500: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
501: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
502: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
495: wf_notification.setattrtext(x_nid, 'USER_NAME', x_user_name);
496: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
497: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
498: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
499: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
500: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
501: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
502: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
503: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
496: wf_notification.setattrtext(x_nid, 'ITEM', x_item);
497: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
498: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
499: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
500: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
501: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
502: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
503: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
504: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
497: wf_notification.setattrtext(x_nid, 'SUPPLIER_NAME', x_supplier_name);
498: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
499: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
500: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
501: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
502: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
503: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
504: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
505: wf_notification.setattrtext(x_nid, 'OPEN_RSINF_COMMAND', x_rsinf);
498: wf_notification.setattrtext(x_nid, 'CONTACT_NAME', x_contact_name);
499: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
500: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
501: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
502: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
503: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
504: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
505: wf_notification.setattrtext(x_nid, 'OPEN_RSINF_COMMAND', x_rsinf);
506:
499: wf_notification.setattrtext(x_nid, 'CONTACT_PHONE', x_contact_phone);
500: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
501: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
502: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
503: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
504: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
505: wf_notification.setattrtext(x_nid, 'OPEN_RSINF_COMMAND', x_rsinf);
506:
507: END IF;
500: wf_notification.setattrtext(x_nid, 'PO_NUMBER', x_po_number);
501: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
502: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
503: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
504: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
505: wf_notification.setattrtext(x_nid, 'OPEN_RSINF_COMMAND', x_rsinf);
506:
507: END IF;
508:
501: wf_notification.setattrnumber(x_nid, 'ORGANIZATION_ID', x_org_id);
502: wf_notification.setattrtext(x_nid, 'ORGANIZATION_CODE', x_org_code);
503: wf_notification.setattrtext(x_nid, 'ORGANIZATION_NAME', x_org_name);
504: wf_notification.setattrtext(x_nid, 'OPEN_CIMDF_COMMAND', x_cimdf);
505: wf_notification.setattrtext(x_nid, 'OPEN_RSINF_COMMAND', x_rsinf);
506:
507: END IF;
508:
509: END send;