[Home] [Help]
237:
238:
239: BEGIN
240: IF (funmode = 'RUN') THEN
241: l_event_name := WF_ENGINE.GetItemAttrText(
242: itemtype => itemtype,
243: itemkey => itemkey,
244: aname => 'EVENTNAME' );
245:
242: itemtype => itemtype,
243: itemkey => itemkey,
244: aname => 'EVENTNAME' );
245:
246: l_request_number := WF_ENGINE.GetItemAttrText(
247: itemtype => itemtype,
248: itemkey => itemkey,
249: aname => 'REQUEST_NUMBER' );
250:
247: itemtype => itemtype,
248: itemkey => itemkey,
249: aname => 'REQUEST_NUMBER' );
250:
251: l_wf_manual_launch := WF_ENGINE.GetItemAttrText(
252: itemtype => itemtype,
253: itemkey => itemkey,
254: aname => 'MANUAL_LAUNCH' );
255:
258: */
259: IF(l_event_name = 'oracle.apps.cs.sr.ServiceRequest.relationshipcreated' OR
260: l_event_name = 'oracle.apps.cs.sr.ServiceRequest.relationshipdeleted') THEN
261:
262: l_subject_type := WF_ENGINE.GetItemAttrText(
263: itemtype => itemtype,
264: itemkey => itemkey,
265: aname => 'LINK_SUBJECT_TYPE' );
266:
309: -- Knowledge Base says they are passing OBJECT_ID (incident_id) instead of number, so
310: -- make sure both are instantiated here.
311: IF (l_request_number IS NULL) THEN
312:
313: l_request_id := WF_ENGINE.GetItemAttrNumber(
314: itemtype => itemtype,
315: itemkey => itemkey,
316: aname => 'OBJECT_ID' );
317:
324: IF sel_incident_number_csr%ISOPEN THEN
325: CLOSE sel_incident_number_csr;
326: END IF;
327:
328: WF_ENGINE.SetItemAttrText(
329: itemtype => 'SERVEREQ',
330: itemkey => itemkey,
331: aname => 'REQUEST_NUMBER',
332: avalue => l_request_number);
367: If the query results exceeded the max allowable WF text length, then we
368: set an attribute to indicate that we need to re-query again to obtain
369: the remainder of the results which were not put in the initial list.
370: **********/
371: WF_ENGINE.SetItemAttrText(
372: itemtype => itemtype,
373: itemkey => itemkey,
374: aname => 'MORE_NTFY_ACTION_LIST',
375: avalue => 'Y' );
395: l_update_actions_list := l_update_actions_list || ' ' || sel_action_rec.action_code;
396: END IF;
397:
398: ELSE
399: WF_ENGINE.SetItemAttrText(
400: itemtype => itemtype,
401: itemkey => itemkey,
402: aname => 'MORE_UPDATE_ACTION_LIST',
403: avalue => 'Y' );
409:
410:
411: IF (l_update_conditions_list IS NOT NULL OR l_notify_conditions_list IS NOT NULL) THEN
412:
413: WF_ENGINE.SetItemAttrText(
414: itemtype => itemtype,
415: itemkey => itemkey,
416: aname => 'NTFY_CONDITION_LIST',
417: avalue => l_notify_conditions_list );
414: itemtype => itemtype,
415: itemkey => itemkey,
416: aname => 'NTFY_CONDITION_LIST',
417: avalue => l_notify_conditions_list );
418: WF_ENGINE.SetItemAttrText(
419: itemtype => itemtype,
420: itemkey => itemkey,
421: aname => 'NTFY_ACTION_LIST',
422: avalue => l_notify_actions_list );
419: itemtype => itemtype,
420: itemkey => itemkey,
421: aname => 'NTFY_ACTION_LIST',
422: avalue => l_notify_actions_list );
423: WF_ENGINE.SetItemAttrText(
424: itemtype => itemtype,
425: itemkey => itemkey,
426: aname => 'UPDATE_CONDITION_LIST',
427: avalue => l_update_conditions_list );
424: itemtype => itemtype,
425: itemkey => itemkey,
426: aname => 'UPDATE_CONDITION_LIST',
427: avalue => l_update_conditions_list );
428: WF_ENGINE.SetItemAttrText(
429: itemtype => itemtype,
430: itemkey => itemkey,
431: aname => 'UPDATE_ACTION_LIST',
432: avalue => l_update_actions_list );
431: aname => 'UPDATE_ACTION_LIST',
432: avalue => l_update_actions_list );
433:
434: /*** This will be used later when we convert our message text to PL/SQL docs.
435: WF_ENGINE.SetItemAttrText(
436: itemtype => itemtype,
437: itemkey => itemkey,
438: aname => 'REQUEST_DETAILS',
439: avalue => 'PL/SQL:RMM_TEST_WF_PKG.SR_PLSQL_DOC_ATTR1/'||
496: BEGIN
497:
498: IF (funmode = 'RUN') THEN
499:
500: l_notify_conditions_list := WF_ENGINE.GetItemAttrText(
501: itemtype => itemtype,
502: itemkey => itemkey,
503: aname => 'NTFY_CONDITION_LIST');
504: l_notify_actions_list := WF_ENGINE.GetItemAttrText(
500: l_notify_conditions_list := WF_ENGINE.GetItemAttrText(
501: itemtype => itemtype,
502: itemkey => itemkey,
503: aname => 'NTFY_CONDITION_LIST');
504: l_notify_actions_list := WF_ENGINE.GetItemAttrText(
505: itemtype => itemtype,
506: itemkey => itemkey,
507: aname => 'NTFY_ACTION_LIST');
508:
517: element => l_action_code);
518:
519: IF (l_event_condition_id IS NOT NULL AND l_action_code IS NOT NULL) THEN
520:
521: WF_ENGINE.SetItemAttrText(
522: itemtype => itemtype,
523: itemkey => itemkey,
524: aname => 'NTFY_CONDITION_LIST',
525: avalue => l_notify_conditions_list );
522: itemtype => itemtype,
523: itemkey => itemkey,
524: aname => 'NTFY_CONDITION_LIST',
525: avalue => l_notify_conditions_list );
526: WF_ENGINE.SetItemAttrText(
527: itemtype => itemtype,
528: itemkey => itemkey,
529: aname => 'NTFY_ACTION_LIST',
530: avalue => l_notify_actions_list );
527: itemtype => itemtype,
528: itemkey => itemkey,
529: aname => 'NTFY_ACTION_LIST',
530: avalue => l_notify_actions_list );
531: WF_ENGINE.SetItemAttrNumber(
532: itemtype => itemtype,
533: itemkey => itemkey,
534: aname => 'NTFY_EVENT_CONDITION_ID',
535: avalue => l_event_condition_id );
532: itemtype => itemtype,
533: itemkey => itemkey,
534: aname => 'NTFY_EVENT_CONDITION_ID',
535: avalue => l_event_condition_id );
536: WF_ENGINE.SetItemAttrText(
537: itemtype => itemtype,
538: itemkey => itemkey,
539: aname => 'NTFY_ACTION_CODE',
540: avalue => l_action_code );
713: BEGIN
714:
715: IF (funmode = 'RUN') THEN
716:
717: l_request_number := WF_ENGINE.GetItemAttrText(
718: itemtype => itemtype,
719: itemkey => itemkey,
720: aname => 'REQUEST_NUMBER' );
721:
719: itemkey => itemkey,
720: aname => 'REQUEST_NUMBER' );
721:
722:
723: l_event_name := WF_ENGINE.GetItemAttrText(
724: itemtype => itemtype,
725: itemkey => itemkey,
726: aname => 'EVENTNAME' );
727:
724: itemtype => itemtype,
725: itemkey => itemkey,
726: aname => 'EVENTNAME' );
727:
728: l_event_condition_id := WF_ENGINE.GetItemAttrNumber(
729: itemtype => itemtype,
730: itemkey => itemkey,
731: aname => 'NTFY_EVENT_CONDITION_ID' );
732:
729: itemtype => itemtype,
730: itemkey => itemkey,
731: aname => 'NTFY_EVENT_CONDITION_ID' );
732:
733: l_action_code := WF_ENGINE.GetItemAttrText(
734: itemtype => itemtype,
735: itemkey => itemkey,
736: aname => 'NTFY_ACTION_CODE' );
737:
743: FROM cs_incidents_all_b
744: WHERE INCIDENT_NUMBER = l_request_number;
745: *************/
746:
747: l_request_id := WF_ENGINE.GetItemAttrNumber(
748: itemtype => itemtype,
749: itemkey => itemkey,
750: aname => 'REQUEST_ID' );
751:
752:
753: /*
754: Roopa - begin - bug fix for 2788741
755: */
756: l_user_id := WF_ENGINE.GetItemAttrNumber(
757: itemtype => itemtype,
758: itemkey => itemkey,
759: aname => 'USER_ID' );
760: l_prev_owner_id := WF_ENGINE.GetItemAttrNumber(
756: l_user_id := WF_ENGINE.GetItemAttrNumber(
757: itemtype => itemtype,
758: itemkey => itemkey,
759: aname => 'USER_ID' );
760: l_prev_owner_id := WF_ENGINE.GetItemAttrNumber(
761: itemtype => itemtype,
762: itemkey => itemkey,
763: aname => 'PREV_OWNER_ID' );
764:
791: INTO sel_event_action_rec;
792: CLOSE sel_event_action_csr;
793:
794: -- Set the message template to be used for the notification
795: WF_ENGINE.SetItemAttrText(
796: itemtype => itemtype,
797: itemkey => itemkey,
798: aname => 'NTFY_MESSAGE_NAME',
799: avalue => sel_event_action_rec.notification_template_id );
806:
807: IF (sel_event_action_rec.from_to_status_code IS NOT NULL) THEN
808:
809: IF (sel_event_action_rec.from_to_status_code = 'STATUS_CHANGED_TO') THEN
810: l_request_status := WF_ENGINE.GetItemAttrText(
811: itemtype => itemtype,
812: itemkey => itemkey,
813: aname => 'REQUEST_STATUS' );
814: ELSIF (sel_event_action_rec.from_to_status_code = 'STATUS_CHANGED_FROM') THEN
811: itemtype => itemtype,
812: itemkey => itemkey,
813: aname => 'REQUEST_STATUS' );
814: ELSIF (sel_event_action_rec.from_to_status_code = 'STATUS_CHANGED_FROM') THEN
815: l_request_status := WF_ENGINE.GetItemAttrText(
816: itemtype => itemtype,
817: itemkey => itemkey,
818: aname => 'REQUEST_STATUS_OLD' );
819: END IF;
863: won't fit here. This flag will tell us later to
864: re-query the remainding subject IDs.
865: **************************************/
866:
867: WF_ENGINE.SetItemAttrText(
868: itemtype => itemtype,
869: itemkey => itemkey,
870: aname => 'MORE_NTFY_LINKED_SUBJECT_LIST',
871: avalue => 'Y' );
880: END IF;
881:
882: IF (l_linked_subject_list IS NOT NULL) THEN
883:
884: WF_ENGINE.SetItemAttrText(
885: itemtype => itemtype,
886: itemkey => itemkey,
887: aname => 'NTFY_LINKED_SUBJECT_LIST',
888: avalue => l_linked_subject_list );
933:
934: /********************
935: This section is for relationship created/deleted events
936: ********************/
937: l_trigger_link_type := WF_ENGINE.GetItemAttrText(
938: itemtype => itemtype,
939: itemkey => itemkey,
940: aname => 'NTFY_LINK_TYPE');
941:
946:
947: IF (sel_link_type_id_csr%FOUND) THEN
948: -- LINKED_INCIDENT_ID is mandatory for this rule since we can't get a
949: -- handle of the linked SR when the link has been deleted.
950: l_linked_incident_number := WF_ENGINE.GetItemAttrText(
951: itemtype => itemtype,
952: itemkey => itemkey,
953: aname => 'NTFY_LINKED_INCIDENT_NUMBER' );
954:
1619: IF (funmode = 'RUN') THEN
1620:
1621: l_temp_item_key := itemkey;
1622:
1623: l_action_code := WF_ENGINE.GetItemAttrText(
1624: itemtype => itemtype,
1625: itemkey => itemkey,
1626: aname => 'NTFY_ACTION_CODE' );
1627:
1624: itemtype => itemtype,
1625: itemkey => itemkey,
1626: aname => 'NTFY_ACTION_CODE' );
1627:
1628: l_event_condition_id := WF_ENGINE.GetItemAttrText(
1629: itemtype => itemtype,
1630: itemkey => itemkey,
1631: aname => 'NTFY_EVENT_CONDITION_ID' );
1632:
1629: itemtype => itemtype,
1630: itemkey => itemkey,
1631: aname => 'NTFY_EVENT_CONDITION_ID' );
1632:
1633: l_request_number := WF_ENGINE.GetItemAttrText(
1634: itemtype => itemtype,
1635: itemkey => itemkey,
1636: aname => 'REQUEST_NUMBER' );
1637:
1634: itemtype => itemtype,
1635: itemkey => itemkey,
1636: aname => 'REQUEST_NUMBER' );
1637:
1638: l_request_id := WF_ENGINE.GetItemAttrNumber(
1639: itemtype => itemtype,
1640: itemkey => itemkey,
1641: aname => 'REQUEST_ID' );
1642:
1646: OPEN l_sel_curr_sr_details_csr;
1647: FETCH l_sel_curr_sr_details_csr into l_sel_curr_sr_details_rec;
1648: CLOSE l_sel_curr_sr_details_csr;
1649:
1650: l_prev_type_id := WF_ENGINE.GetItemAttrText(
1651: itemtype => itemtype,
1652: itemkey => itemkey,
1653: aname => 'PREV_TYPE_ID' );
1654:
1651: itemtype => itemtype,
1652: itemkey => itemkey,
1653: aname => 'PREV_TYPE_ID' );
1654:
1655: l_prev_status_id := WF_ENGINE.GetItemAttrText(
1656: itemtype => itemtype,
1657: itemkey => itemkey,
1658: aname => 'PREV_STATUS_ID' );
1659:
1656: itemtype => itemtype,
1657: itemkey => itemkey,
1658: aname => 'PREV_STATUS_ID' );
1659:
1660: l_prev_severity_id := WF_ENGINE.GetItemAttrText(
1661: itemtype => itemtype,
1662: itemkey => itemkey,
1663: aname => 'PREV_SEVERITY_ID' );
1664: l_prev_urgency_id := WF_ENGINE.GetItemAttrText(
1660: l_prev_severity_id := WF_ENGINE.GetItemAttrText(
1661: itemtype => itemtype,
1662: itemkey => itemkey,
1663: aname => 'PREV_SEVERITY_ID' );
1664: l_prev_urgency_id := WF_ENGINE.GetItemAttrText(
1665: itemtype => itemtype,
1666: itemkey => itemkey,
1667: aname => 'PREV_URGENCY_ID' );
1668:
1666: itemkey => itemkey,
1667: aname => 'PREV_URGENCY_ID' );
1668:
1669:
1670: l_prev_summary := WF_ENGINE.GetItemAttrText(
1671: itemtype => itemtype,
1672: itemkey => itemkey,
1673: aname => 'PREV_SUMMARY' );
1674:
1726: END LOOP;
1727:
1728: IF(l_changed_field_list is not null) THEN
1729: l_changed_field_list := l_changed_field_list || ' of ';
1730: WF_ENGINE.SetItemAttrText(
1731: itemtype => itemtype,
1732: itemkey => itemkey,
1733: aname => 'CHANGED_LIST',
1734: avalue => l_changed_field_list );
1740:
1741: l_updated_by := l_get_resource_name_rec.source_first_name || ' '
1742: || l_get_resource_name_rec.source_last_name;
1743:
1744: WF_ENGINE.SetItemAttrText(
1745: itemtype => itemtype,
1746: itemkey => itemkey,
1747: aname => 'UPDATED_BY',
1748: avalue => l_updated_by );
1760:
1761: l_created_by := l_get_resource_name_rec.source_first_name || ' '
1762: || l_get_resource_name_rec.source_last_name;
1763:
1764: WF_ENGINE.SetItemAttrText(
1765: itemtype => itemtype,
1766: itemkey => itemkey,
1767: aname => 'CREATED_BY',
1768: avalue => l_created_by );
1773:
1774: /* Roopa - begin
1775: Fix for bug # 2804495
1776: */
1777: l_solution_number := WF_ENGINE.GetItemAttrText(
1778: itemtype => itemtype,
1779: itemkey => itemkey,
1780: aname => 'SOLUTION_NUMBER');
1781: IF (l_solution_number is not null) THEN
1783: FETCH l_getsoln_summary_csr INTO l_solution_summary;
1784: CLOSE l_getsoln_summary_csr;
1785:
1786: IF(l_solution_summary is not null) THEN
1787: WF_ENGINE.SetItemAttrText(
1788: itemtype => itemtype,
1789: itemkey => itemkey,
1790: aname => 'SOLUTION SUMMARY',
1791: avalue => l_solution_summary);
1799: */
1800:
1801:
1802: IF (l_action_code = 'NOTIFY_OWNER' OR l_action_code = 'NOTIFY_NEW_OWNER') THEN
1803: l_notify_recipient := WF_ENGINE.GetItemAttrText(
1804: itemtype => itemtype,
1805: itemkey => itemkey,
1806: aname => 'OWNER_ROLE');
1807:
1805: itemkey => itemkey,
1806: aname => 'OWNER_ROLE');
1807:
1808: ELSIF (l_action_code = 'NOTIFY_OLD_OWNER') THEN
1809: l_notify_recipient := WF_ENGINE.GetItemAttrText(
1810: itemtype => itemtype,
1811: itemkey => itemkey,
1812: aname => 'PREV_OWNER_ROLE');
1813:
1811: itemkey => itemkey,
1812: aname => 'PREV_OWNER_ROLE');
1813:
1814: ELSIF (l_action_code = 'NOTIFY_OWNER_OF_RELATED_SR') THEN
1815: l_linked_subject_list := WF_ENGINE.GetItemAttrText(
1816: itemtype => itemtype,
1817: itemkey => itemkey,
1818: aname => 'NTFY_LINKED_SUBJECT_LIST');
1819: IF (l_linked_subject_list IS NOT NULL) THEN
1821: element => l_element);
1822:
1823: l_notify_subject_id := TO_NUMBER(l_element);
1824:
1825: WF_ENGINE.SetItemAttrText(
1826: itemtype => itemtype,
1827: itemkey => itemkey,
1828: aname => 'NTFY_LINKED_SUBJECT_LIST',
1829: avalue => l_linked_subject_list );
1827: itemkey => itemkey,
1828: aname => 'NTFY_LINKED_SUBJECT_LIST',
1829: avalue => l_linked_subject_list );
1830:
1831: WF_ENGINE.SetItemAttrNumber(
1832: itemtype => itemtype,
1833: itemkey => itemkey,
1834: aname => 'NTFY_SUBJECT_ID',
1835: avalue => l_notify_subject_id );
1842: /*
1843: Roopa - begin - bug fix for 2788741
1844: */
1845:
1846: l_user_id := WF_ENGINE.GetItemAttrNumber(
1847: itemtype => itemtype,
1848: itemkey => itemkey,
1849: aname => 'USER_ID' );
1850: OPEN sel_resource_id;
1860: /*
1861: Roopa - end - bug fix for 2788741
1862: */
1863:
1864: WF_ENGINE.SetItemAttrText(
1865: itemtype => itemtype,
1866: itemkey => itemkey,
1867: aname => 'NTFY_LINKED_INCIDENT_NUMBER',
1868: avalue => sel_link_rec.incident_number );
1868: avalue => sel_link_rec.incident_number );
1869:
1870: -- Get link Type name from link_type_id
1871:
1872: WF_ENGINE.SetItemAttrText(
1873: itemtype => itemtype,
1874: itemkey => itemkey,
1875: aname => 'NTFY_LINK_TYPE',
1876: avalue => sel_link_rec.link_type_name );
1928: The following block handles notification rules defined for these 2 actions
1929: */
1930: ELSIF (l_action_code = 'NOTIFY_PRIM_CONTACT_OF_REL_SR') THEN
1931:
1932: l_linked_subject_list := WF_ENGINE.GetItemAttrText(
1933: itemtype => itemtype,
1934: itemkey => itemkey,
1935: aname => 'NTFY_LINKED_SUBJECT_LIST');
1936:
1948: element => l_element);
1949:
1950: l_notify_subject_id := TO_NUMBER(l_element);
1951:
1952: WF_ENGINE.SetItemAttrText(
1953: itemtype => itemtype,
1954: itemkey => itemkey,
1955: aname => 'NTFY_LINKED_SUBJECT_LIST',
1956: avalue => l_linked_subject_list );
1954: itemkey => itemkey,
1955: aname => 'NTFY_LINKED_SUBJECT_LIST',
1956: avalue => l_linked_subject_list );
1957:
1958: WF_ENGINE.SetItemAttrNumber(
1959: itemtype => itemtype,
1960: itemkey => itemkey,
1961: aname => 'NTFY_SUBJECT_ID',
1962: avalue => l_notify_subject_id );
1969: FETCH sel_linked_sr_type_csr INTO sel_linked_sr_type_rec;
1970: CLOSE sel_linked_sr_type_csr;
1971:
1972:
1973: l_user_id := WF_ENGINE.GetItemAttrNumber(
1974: itemtype => itemtype,
1975: itemkey => itemkey,
1976: aname => 'USER_ID' );
1977:
1974: itemtype => itemtype,
1975: itemkey => itemkey,
1976: aname => 'USER_ID' );
1977:
1978: WF_ENGINE.SetItemAttrText(
1979: itemtype => itemtype,
1980: itemkey => itemkey,
1981: aname => 'NTFY_LINKED_INCIDENT_NUMBER',
1982: avalue => sel_link_rec.incident_number );
1983:
1984:
1985: -- Get link Type name from link_type_id
1986:
1987: WF_ENGINE.SetItemAttrText(
1988: itemtype => itemtype,
1989: itemkey => itemkey,
1990: aname => 'NTFY_LINK_TYPE',
1991: avalue => sel_linked_sr_type_rec.link_type_name );
1996: OPEN sel_linked_sr_details_csr;
1997: FETCH sel_linked_sr_details_csr into sel_linked_sr_details_rec;
1998: CLOSE sel_linked_sr_details_csr;
1999:
2000: WF_ENGINE.SetItemAttrText(
2001: itemtype => itemtype,
2002: itemkey => itemkey,
2003: aname => 'NTFY_LINKED_SR_STATUS',
2004: avalue => sel_linked_sr_details_rec.name );
2002: itemkey => itemkey,
2003: aname => 'NTFY_LINKED_SR_STATUS',
2004: avalue => sel_linked_sr_details_rec.name );
2005:
2006: WF_ENGINE.SetItemAttrText(
2007: itemtype => itemtype,
2008: itemkey => itemkey,
2009: aname => 'NTFY_LINKED_SR_SUMMARY',
2010: avalue => sel_linked_sr_details_rec.summary );
2109:
2110: l_notify_contact_name := l_contact_first_name|| ' ' ||l_contact_last_name;
2111:
2112:
2113: WF_ENGINE.SetItemAttrText(
2114: itemtype => itemtype,
2115: itemkey => itemkey,
2116: aname => 'NTFY_LINKED_SR_CONTACT',
2117: avalue => l_notify_contact_name );
2123: l_serviceRequest_URL := FND_PROFILE.Value('JTF_BIS_OA_HTML') || '/' || l_jsp_name
2124: || '?srID=' || sel_link_rec.incident_number;
2125:
2126: --l_serviceRequest_URL := FND_PROFILE.Value('JTF_BIS_OA_HTML') || '/ibuSRDetails.jsp?srID=' || sel_link_rec.incident_number;
2127: WF_ENGINE.SetItemAttrText(
2128: itemtype => itemtype,
2129: itemkey => itemkey,
2130: aname => 'NTFY_REQUEST_NUMBER_URL',
2131: avalue => l_serviceRequest_URL);
2246:
2247: END LOOP;
2248: CLOSE get_primary_contact_info;
2249:
2250: l_request_id := WF_ENGINE.GetItemAttrNumber(
2251: itemtype => itemtype,
2252: itemkey => itemkey,
2253: aname => 'REQUEST_ID' );
2254:
2275:
2276:
2277: -- 11.5.10 enhancement to Create Interaction when email to contact sent.
2278: /* Roopa - begin bug 3360069 */
2279: /* Replacing the AddItemAttr() call with WF_Engine add, get and set calls
2280: to factor in the scenario where this attr already exists */
2281:
2282: IF (l_contact_party_id_list IS NOT NULL) THEN
2283:
2286:
2287:
2288: /****
2289: l_temp_contact_id_list := null;
2290: l_temp_contact_id_list := WF_ENGINE.GetItemAttrText( itemtype,
2291: itemkey,
2292: 'CONTACT_PARTY_ID_LIST',
2293: TRUE);
2294:
2296: IF(l_temp_contact_id_list is NULL) THEN
2297: *****/
2298:
2299: IF(check_if_item_attr_exists_csr%NOTFOUND) THEN
2300: WF_ENGINE.AddItemAttr( itemtype,
2301: itemkey,
2302: 'CONTACT_PARTY_ID_LIST',
2303: l_contact_party_id_list);
2304: ELSE
2302: 'CONTACT_PARTY_ID_LIST',
2303: l_contact_party_id_list);
2304: ELSE
2305:
2306: WF_ENGINE.SetItemAttrText(
2307: itemtype => itemtype,
2308: itemkey => itemkey,
2309: aname => 'CONTACT_PARTY_ID_LIST',
2310: avalue => l_contact_party_id_list);
2325:
2326: -- set the item attributes for html notification
2327:
2328: IF l_html_notification_flag = 'Y' THEN
2329: WF_ENGINE.SetItemAttrText(
2330: itemtype => itemtype,
2331: itemkey => itemkey,
2332: AName => 'ADHOC_USER_LIST',
2333: AValue => l_html_adhoc_user_list);
2331: itemkey => itemkey,
2332: AName => 'ADHOC_USER_LIST',
2333: AValue => l_html_adhoc_user_list);
2334:
2335: WF_ENGINE.SetItemAttrText(
2336: itemtype => itemtype,
2337: itemkey => itemkey,
2338: AName => 'CONTACT_ID_LIST',
2339: AValue => l_contact_id_list);
2337: itemkey => itemkey,
2338: AName => 'CONTACT_ID_LIST',
2339: AValue => l_contact_id_list);
2340:
2341: WF_ENGINE.SetItemAttrText(
2342: itemtype => itemtype,
2343: itemkey => itemkey,
2344: AName => 'CONTACT_EMAIL_LIST',
2345: AValue => l_html_contact_email_list);
2343: itemkey => itemkey,
2344: AName => 'CONTACT_EMAIL_LIST',
2345: AValue => l_html_contact_email_list);
2346:
2347: WF_ENGINE.SetItemAttrText(
2348: itemtype => itemtype,
2349: itemkey => itemkey,
2350: AName => 'CONTACT_TYPE_LIST',
2351: AValue => l_contact_type_list);
2349: itemkey => itemkey,
2350: AName => 'CONTACT_TYPE_LIST',
2351: AValue => l_contact_type_list);
2352:
2353: WF_ENGINE.SetItemAttrText(
2354: itemtype => itemtype,
2355: itemkey => itemkey,
2356: AName => 'NOTIFICATION_PREFERENCE_LIST',
2357: AValue => l_notification_pref_list);
2355: itemkey => itemkey,
2356: AName => 'NOTIFICATION_PREFERENCE_LIST',
2357: AValue => l_notification_pref_list);
2358:
2359: WF_ENGINE.SetItemAttrText(
2360: itemtype => itemtype,
2361: itemkey => itemkey,
2362: AName => 'LANGUAGE_LIST',
2363: AValue => l_language_list);
2368: OPEN c_check_html_notification;
2369: FETCH c_check_html_notification INTO l_html_notification_flag ;
2370: CLOSE c_check_html_notification;
2371:
2372: l_linked_subject_list := WF_ENGINE.GetItemAttrText(
2373: itemtype => itemtype,
2374: itemkey => itemkey,
2375: aname => 'NTFY_LINKED_SUBJECT_LIST');
2376:
2381: element => l_element);
2382:
2383: l_notify_subject_id := TO_NUMBER(l_element);
2384:
2385: WF_ENGINE.SetItemAttrText(
2386: itemtype => itemtype,
2387: itemkey => itemkey,
2388: aname => 'NTFY_LINKED_SUBJECT_LIST',
2389: avalue => l_linked_subject_list );
2387: itemkey => itemkey,
2388: aname => 'NTFY_LINKED_SUBJECT_LIST',
2389: avalue => l_linked_subject_list );
2390:
2391: WF_ENGINE.SetItemAttrNumber(
2392: itemtype => itemtype,
2393: itemkey => itemkey,
2394: aname => 'NTFY_SUBJECT_ID',
2395: avalue => l_notify_subject_id );
2401: OPEN sel_linked_sr_type_csr;
2402: FETCH sel_linked_sr_type_csr INTO sel_linked_sr_type_rec;
2403: CLOSE sel_linked_sr_type_csr;
2404:
2405: l_user_id := WF_ENGINE.GetItemAttrNumber(
2406: itemtype => itemtype,
2407: itemkey => itemkey,
2408: aname => 'USER_ID' );
2409:
2406: itemtype => itemtype,
2407: itemkey => itemkey,
2408: aname => 'USER_ID' );
2409:
2410: WF_ENGINE.SetItemAttrText(
2411: itemtype => itemtype,
2412: itemkey => itemkey,
2413: aname => 'NTFY_LINKED_INCIDENT_NUMBER',
2414: avalue => sel_link_rec.incident_number );
2414: avalue => sel_link_rec.incident_number );
2415:
2416: -- Get link Type name from link_type_id
2417:
2418: WF_ENGINE.SetItemAttrText(
2419: itemtype => itemtype,
2420: itemkey => itemkey,
2421: aname => 'NTFY_LINK_TYPE',
2422: avalue => sel_linked_sr_type_rec.link_type_name );
2439: FETCH sel_contact_name_csr INTO sel_contact_name_rec;
2440: CLOSE sel_contact_name_csr;
2441:
2442: l_notify_contact_name := sel_contact_name_rec.first_name || ' ' || sel_contact_name_rec.last_name;
2443: WF_ENGINE.SetItemAttrText(
2444: itemtype => itemtype,
2445: itemkey => itemkey,
2446: aname => 'NTFY_LINKED_SR_CONTACT',
2447: avalue => l_notify_contact_name );
2453: l_serviceRequest_URL := FND_PROFILE.Value('JTF_BIS_OA_HTML') || '/' || l_jsp_name
2454: || '?srID=' || l_request_number;
2455:
2456: --l_serviceRequest_URL := FND_PROFILE.Value('JTF_BIS_OA_HTML') || '/ibuSRDetails.jsp?srID=' || l_request_number;
2457: WF_ENGINE.SetItemAttrText(
2458: itemtype => itemtype,
2459: itemkey => itemkey,
2460: aname => 'NTFY_REQUEST_NUMBER_URL',
2461: avalue => l_serviceRequest_URL);
2592: END IF;
2593: END LOOP;
2594: CLOSE sel_all_contacts_csr;
2595:
2596: l_request_id := WF_ENGINE.GetItemAttrNumber(
2597: itemtype => itemtype,
2598: itemkey => itemkey,
2599: aname => 'REQUEST_ID' );
2600:
2622: END IF;
2623:
2624: -- 11.5.10 enhancement to Create Interaction when email to contact sent.
2625: /* Roopa - begin bug 3360069 */
2626: /* Replacing the AddItemAttr() call with WF_Engine add, get and set calls
2627: to factor in the scenario where this attr already exists */
2628:
2629: IF (l_contact_party_id_list IS NOT NULL) THEN
2630:
2632: FETCH check_if_item_attr_exists_csr into l_temp_contact_id_list;
2633:
2634: /****
2635: l_temp_contact_id_list := null;
2636: l_temp_contact_id_list := WF_ENGINE.GetItemAttrText( itemtype,
2637: itemkey,
2638: 'CONTACT_PARTY_ID_LIST',
2639: TRUE);
2640:
2641: IF(l_temp_contact_id_list is NULL) THEN
2642: *****/
2643:
2644: IF(check_if_item_attr_exists_csr%NOTFOUND) THEN
2645: WF_ENGINE.AddItemAttr( itemtype,
2646: itemkey,
2647: 'CONTACT_PARTY_ID_LIST',
2648: l_contact_party_id_list);
2649: ELSE
2646: itemkey,
2647: 'CONTACT_PARTY_ID_LIST',
2648: l_contact_party_id_list);
2649: ELSE
2650: WF_ENGINE.SetItemAttrText(
2651: itemtype => itemtype,
2652: itemkey => itemkey,
2653: aname => 'CONTACT_PARTY_ID_LIST',
2654: avalue => l_contact_party_id_list);
2668: -- set the item attributes for html notification
2669:
2670: IF l_html_notification_flag = 'Y' THEN
2671:
2672: WF_ENGINE.SetItemAttrText(
2673: itemtype => itemtype,
2674: itemkey => itemkey,
2675: AName => 'ADHOC_USER_LIST',
2676: AValue => l_html_adhoc_user_list);
2674: itemkey => itemkey,
2675: AName => 'ADHOC_USER_LIST',
2676: AValue => l_html_adhoc_user_list);
2677:
2678: WF_ENGINE.SetItemAttrText(
2679: itemtype => itemtype,
2680: itemkey => itemkey,
2681: AName => 'CONTACT_ID_LIST',
2682: AValue => l_contact_id_list);
2680: itemkey => itemkey,
2681: AName => 'CONTACT_ID_LIST',
2682: AValue => l_contact_id_list);
2683:
2684: WF_ENGINE.SetItemAttrText(
2685: itemtype => itemtype,
2686: itemkey => itemkey,
2687: AName => 'CONTACT_EMAIL_LIST',
2688: AValue => l_html_contact_email_list);
2686: itemkey => itemkey,
2687: AName => 'CONTACT_EMAIL_LIST',
2688: AValue => l_html_contact_email_list);
2689:
2690: WF_ENGINE.SetItemAttrText(
2691: itemtype => itemtype,
2692: itemkey => itemkey,
2693: AName => 'CONTACT_TYPE_LIST',
2694: AValue => l_contact_type_list);
2692: itemkey => itemkey,
2693: AName => 'CONTACT_TYPE_LIST',
2694: AValue => l_contact_type_list);
2695:
2696: WF_ENGINE.SetItemAttrText(
2697: itemtype => itemtype,
2698: itemkey => itemkey,
2699: AName => 'NOTIFICATION_PREFERENCE_LIST',
2700: AValue => l_notification_pref_list);
2698: itemkey => itemkey,
2699: AName => 'NOTIFICATION_PREFERENCE_LIST',
2700: AValue => l_notification_pref_list);
2701:
2702: WF_ENGINE.SetItemAttrText(
2703: itemtype => itemtype,
2704: itemkey => itemkey,
2705: AName => 'LANGUAGE_LIST',
2706: AValue => l_language_list);
2713:
2714: ELSIF (l_action_code = 'NOTIFY_ALL_ASSOCIATED_PARTIES') THEN
2715:
2716:
2717: l_linked_subject_list := WF_ENGINE.GetItemAttrText(
2718: itemtype => itemtype,
2719: itemkey => itemkey,
2720: aname => 'NTFY_LINKED_SUBJECT_LIST');
2721:
2718: itemtype => itemtype,
2719: itemkey => itemkey,
2720: aname => 'NTFY_LINKED_SUBJECT_LIST');
2721:
2722: l_notify_relsr_party_role_list := WF_ENGINE.GetItemAttrText(
2723: itemtype => itemtype,
2724: itemkey => itemkey,
2725: aname => 'NOTIFY_RELSR_PARTY_ROLE_LIST');
2726:
2740: ELSE
2741: RETURN;
2742: END IF;
2743:
2744: WF_ENGINE.SetItemAttrText(
2745: itemtype => itemtype,
2746: itemkey => itemkey,
2747: aname => 'PARTY_ROLE_NAME',
2748: avalue => l_party_role_name );
2746: itemkey => itemkey,
2747: aname => 'PARTY_ROLE_NAME',
2748: avalue => l_party_role_name );
2749:
2750: WF_ENGINE.SetItemAttrText(
2751: itemtype => itemtype,
2752: itemkey => itemkey,
2753: aname => 'NOTIFY_RELSR_PARTY_ROLE_LIST',
2754: avalue => l_notify_relsr_party_role_list);
2759: element => l_element);
2760:
2761: l_notify_subject_id := TO_NUMBER(l_element);
2762:
2763: WF_ENGINE.SetItemAttrText(
2764: itemtype => itemtype,
2765: itemkey => itemkey,
2766: aname => 'NTFY_LINKED_SUBJECT_LIST',
2767: avalue => l_linked_subject_list );
2765: itemkey => itemkey,
2766: aname => 'NTFY_LINKED_SUBJECT_LIST',
2767: avalue => l_linked_subject_list );
2768:
2769: WF_ENGINE.SetItemAttrNumber(
2770: itemtype => itemtype,
2771: itemkey => itemkey,
2772: aname => 'NTFY_SUBJECT_ID',
2773: avalue => l_notify_subject_id );
2779: OPEN sel_linked_sr_type_csr;
2780: FETCH sel_linked_sr_type_csr INTO sel_linked_sr_type_rec;
2781: CLOSE sel_linked_sr_type_csr;
2782:
2783: l_user_id := WF_ENGINE.GetItemAttrNumber(
2784: itemtype => itemtype,
2785: itemkey => itemkey,
2786: aname => 'USER_ID' );
2787:
2784: itemtype => itemtype,
2785: itemkey => itemkey,
2786: aname => 'USER_ID' );
2787:
2788: WF_ENGINE.SetItemAttrText(
2789: itemtype => itemtype,
2790: itemkey => itemkey,
2791: aname => 'NTFY_LINKED_INCIDENT_NUMBER',
2792: avalue => sel_link_rec.incident_number );
2792: avalue => sel_link_rec.incident_number );
2793:
2794: -- Get link Type name from link_type_id
2795:
2796: WF_ENGINE.SetItemAttrText(
2797: itemtype => itemtype,
2798: itemkey => itemkey,
2799: aname => 'NTFY_LINK_TYPE',
2800: avalue => sel_linked_sr_type_rec.link_type_name );
2804: OPEN sel_linked_sr_details_csr;
2805: FETCH sel_linked_sr_details_csr into sel_linked_sr_details_rec;
2806: CLOSE sel_linked_sr_details_csr;
2807:
2808: WF_ENGINE.SetItemAttrText(
2809: itemtype => itemtype,
2810: itemkey => itemkey,
2811: aname => 'NTFY_LINKED_SR_STATUS',
2812: avalue => sel_linked_sr_details_rec.name );
2812: avalue => sel_linked_sr_details_rec.name );
2813:
2814:
2815:
2816: WF_ENGINE.SetItemAttrText(
2817: itemtype => itemtype,
2818: itemkey => itemkey,
2819: aname => 'NTFY_LINKED_SR_SUMMARY',
2820: avalue => sel_linked_sr_details_rec.summary );
2834: FETCH sel_contact_name_csr INTO sel_contact_name_rec;
2835: CLOSE sel_contact_name_csr;
2836:
2837: l_notify_contact_name := sel_contact_name_rec.first_name || ' ' || sel_contact_name_rec.last_name;
2838: WF_ENGINE.SetItemAttrText(
2839: itemtype => itemtype,
2840: itemkey => itemkey,
2841: aname => 'NTFY_LINKED_SR_CONTACT',
2842: avalue => l_notify_contact_name );
2847:
2848: l_serviceRequest_URL := FND_PROFILE.Value('JTF_BIS_OA_HTML') || '/' || l_jsp_name
2849: || '?srID=' || l_request_number;
2850:
2851: WF_ENGINE.SetItemAttrText(
2852: itemtype => itemtype,
2853: itemkey => itemkey,
2854: aname => 'NTFY_REQUEST_NUMBER_URL',
2855: avalue => l_serviceRequest_URL);
2915: END IF;
2916: END LOOP;
2917: CLOSE sel_party_role_contacts_csr;
2918:
2919: l_request_id := WF_ENGINE.GetItemAttrNumber(
2920: itemtype => itemtype,
2921: itemkey => itemkey,
2922: aname => 'REQUEST_ID' );
2923:
3118: -- set the item attributes for html notification
3119:
3120: IF l_html_notification_flag = 'Y' THEN
3121:
3122: WF_ENGINE.SetItemAttrText
3123: ( itemtype => itemtype,
3124: itemkey => itemkey,
3125: AName => 'ADHOC_USER_LIST',
3126: AValue => l_html_adhoc_user_list);
3124: itemkey => itemkey,
3125: AName => 'ADHOC_USER_LIST',
3126: AValue => l_html_adhoc_user_list);
3127:
3128: WF_ENGINE.SetItemAttrText
3129: ( itemtype => itemtype,
3130: itemkey => itemkey,
3131: AName => 'CONTACT_ID_LIST',
3132: AValue => l_contact_id_list);
3130: itemkey => itemkey,
3131: AName => 'CONTACT_ID_LIST',
3132: AValue => l_contact_id_list);
3133:
3134: WF_ENGINE.SetItemAttrText
3135: ( itemtype => itemtype,
3136: itemkey => itemkey,
3137: AName => 'CONTACT_EMAIL_LIST',
3138: AValue => l_html_contact_email_list);
3136: itemkey => itemkey,
3137: AName => 'CONTACT_EMAIL_LIST',
3138: AValue => l_html_contact_email_list);
3139:
3140: WF_ENGINE.SetItemAttrText
3141: ( itemtype => itemtype,
3142: itemkey => itemkey,
3143: AName => 'CONTACT_TYPE_LIST',
3144: AValue => l_contact_type_list);
3142: itemkey => itemkey,
3143: AName => 'CONTACT_TYPE_LIST',
3144: AValue => l_contact_type_list);
3145:
3146: WF_ENGINE.SetItemAttrText
3147: ( itemtype => itemtype,
3148: itemkey => itemkey,
3149: AName => 'NOTIFICATION_PREFERENCE_LIST',
3150: AValue => l_notification_pref_list);
3148: itemkey => itemkey,
3149: AName => 'NOTIFICATION_PREFERENCE_LIST',
3150: AValue => l_notification_pref_list);
3151:
3152: WF_ENGINE.SetItemAttrText
3153: ( itemtype => itemtype,
3154: itemkey => itemkey,
3155: AName => 'LANGUAGE_LIST',
3156: AValue => l_language_list);
3162: CLOSE sel_jsp_name_csr;
3163:
3164: l_serviceRequest_URL := FND_PROFILE.Value('JTF_BIS_OA_HTML') || '/' || l_jsp_name
3165: || '?srID=' || l_request_number;
3166: WF_ENGINE.SetItemAttrText(
3167: itemtype => itemtype,
3168: itemkey => itemkey,
3169: aname => 'NTFY_REQUEST_NUMBER_URL',
3170: avalue => l_serviceRequest_URL);
3198:
3199:
3200: -- 11.5.10 enhancement to Create Interaction when email to contact sent.
3201: /* Roopa - begin bug 3360069 */
3202: /* Replacing the AddItemAttr() call with WF_Engine add, get and set calls
3203: to factor in the scenario where this attr already exists */
3204:
3205: IF (l_contact_party_id_list IS NOT NULL) THEN
3206:
3207: OPEN check_if_item_attr_exists_csr;
3208: FETCH check_if_item_attr_exists_csr into l_temp_contact_id_list;
3209:
3210: IF(check_if_item_attr_exists_csr%NOTFOUND) THEN
3211: WF_ENGINE.AddItemAttr( itemtype,
3212: itemkey,
3213: 'CONTACT_PARTY_ID_LIST',
3214: l_contact_party_id_list);
3215: ELSE
3212: itemkey,
3213: 'CONTACT_PARTY_ID_LIST',
3214: l_contact_party_id_list);
3215: ELSE
3216: WF_ENGINE.SetItemAttrText(
3217: itemtype => itemtype,
3218: itemkey => itemkey,
3219: aname => 'CONTACT_PARTY_ID_LIST',
3220: avalue => l_contact_party_id_list);
3227: -- Start of code for Associated Party Notification --
3228: ELSIF (l_action_code = 'NOTIFY_ASSOCIATED_PARTIES') THEN
3229:
3230:
3231: l_notify_party_role_list := WF_ENGINE.GetItemAttrText(
3232: itemtype => itemtype,
3233: itemkey => itemkey,
3234: aname => 'NOTIFY_PARTY_ROLE_LIST');
3235:
3249: ELSE
3250: RETURN;
3251: END IF;
3252:
3253: WF_ENGINE.SetItemAttrText(
3254: itemtype => itemtype,
3255: itemkey => itemkey,
3256: aname => 'PARTY_ROLE_NAME',
3257: avalue => l_party_role_name );
3255: itemkey => itemkey,
3256: aname => 'PARTY_ROLE_NAME',
3257: avalue => l_party_role_name );
3258:
3259: WF_ENGINE.SetItemAttrText(
3260: itemtype => itemtype,
3261: itemkey => itemkey,
3262: aname => 'NOTIFY_PARTY_ROLE_LIST',
3263: avalue => l_notify_party_role_list);
3344: CLOSE sel_jsp_name_csr;
3345:
3346: l_serviceRequest_URL := FND_PROFILE.Value('JTF_BIS_OA_HTML') || '/' || l_jsp_name
3347: || '?srID=' || l_request_number;
3348: WF_ENGINE.SetItemAttrText(
3349: itemtype => itemtype,
3350: itemkey => itemkey,
3351: aname => 'NTFY_REQUEST_NUMBER_URL',
3352: avalue => l_serviceRequest_URL);
3549: END IF ; -- end if for l_html_notification_flag
3550:
3551: IF l_html_notification_flag = 'Y' THEN
3552:
3553: WF_ENGINE.SetItemAttrText(
3554: itemtype => itemtype,
3555: itemkey => itemkey,
3556: AName => 'ADHOC_USER_LIST',
3557: AValue => l_html_adhoc_user_list);
3555: itemkey => itemkey,
3556: AName => 'ADHOC_USER_LIST',
3557: AValue => l_html_adhoc_user_list);
3558:
3559: WF_ENGINE.SetItemAttrText(
3560: itemtype => itemtype,
3561: itemkey => itemkey,
3562: AName => 'CONTACT_ID_LIST',
3563: AValue => l_contact_id_list);
3561: itemkey => itemkey,
3562: AName => 'CONTACT_ID_LIST',
3563: AValue => l_contact_id_list);
3564:
3565: WF_ENGINE.SetItemAttrText(
3566: itemtype => itemtype,
3567: itemkey => itemkey,
3568: AName => 'CONTACT_EMAIL_LIST',
3569: AValue => l_html_contact_email_list);
3567: itemkey => itemkey,
3568: AName => 'CONTACT_EMAIL_LIST',
3569: AValue => l_html_contact_email_list);
3570:
3571: WF_ENGINE.SetItemAttrText(
3572: itemtype => itemtype,
3573: itemkey => itemkey,
3574: AName => 'CONTACT_TYPE_LIST',
3575: AValue => l_contact_type_list);
3573: itemkey => itemkey,
3574: AName => 'CONTACT_TYPE_LIST',
3575: AValue => l_contact_type_list);
3576:
3577: WF_ENGINE.SetItemAttrText(
3578: itemtype => itemtype,
3579: itemkey => itemkey,
3580: AName => 'NOTIFICATION_PREFERENCE_LIST',
3581: AValue => l_notification_pref_list);
3579: itemkey => itemkey,
3580: AName => 'NOTIFICATION_PREFERENCE_LIST',
3581: AValue => l_notification_pref_list);
3582:
3583: WF_ENGINE.SetItemAttrText(
3584: itemtype => itemtype,
3585: itemkey => itemkey,
3586: AName => 'LANGUAGE_LIST',
3587: AValue => l_language_list);
3592: l_notify_recipient := l_user;
3593:
3594: -- 11.5.10 enhancement to Create Interaction when email to contact sent.
3595: /* Roopa - begin bug 3360069 */
3596: /* Replacing the AddItemAttr() call with WF_Engine add, get and set calls
3597: to factor in the scenario where this attr already exists */
3598:
3599: IF ((l_contact_party_id IS NOT NULL) AND (l_contact_type <> 'EMPLOYEE')) THEN
3600:
3601: OPEN check_if_item_attr_exists_csr;
3602: FETCH check_if_item_attr_exists_csr into l_temp_contact_id_list;
3603:
3604: IF(check_if_item_attr_exists_csr%NOTFOUND) THEN
3605: WF_ENGINE.AddItemAttr( itemtype,
3606: itemkey,
3607: 'CONTACT_PARTY_ID_LIST',
3608: l_contact_party_id);
3609: ELSE
3606: itemkey,
3607: 'CONTACT_PARTY_ID_LIST',
3608: l_contact_party_id);
3609: ELSE
3610: WF_ENGINE.SetItemAttrText(
3611: itemtype => itemtype,
3612: itemkey => itemkey,
3613: aname => 'CONTACT_PARTY_ID_LIST',
3614: avalue => l_contact_party_id);
3622: CLOSE sel_jsp_name_csr;
3623:
3624: l_serviceRequest_URL := FND_PROFILE.Value('JTF_BIS_OA_HTML') || '/' || l_jsp_name
3625: || '?srID=' || l_request_number;
3626: WF_ENGINE.SetItemAttrText(
3627: itemtype => itemtype,
3628: itemkey => itemkey,
3629: aname => 'NTFY_REQUEST_NUMBER_URL',
3630: avalue => l_serviceRequest_URL);
3642: OPEN c_check_html_notification;
3643: FETCH c_check_html_notification INTO l_html_notification_flag ;
3644: CLOSE c_check_html_notification;
3645:
3646: l_contact_point_id_list := WF_ENGINE.GetItemAttrText(
3647: itemtype => itemtype,
3648: itemkey => itemkey,
3649: aname => 'NEW_CONTACT_POINT_ID_LIST' );
3650:
3789: END IF ; -- end if for l_html_notification_flag
3790:
3791: IF l_html_notification_flag = 'Y' THEN
3792:
3793: WF_ENGINE.SetItemAttrText(
3794: itemtype => itemtype,
3795: itemkey => itemkey,
3796: AName => 'ADHOC_USER_LIST',
3797: AValue => l_html_adhoc_user_list);
3795: itemkey => itemkey,
3796: AName => 'ADHOC_USER_LIST',
3797: AValue => l_html_adhoc_user_list);
3798:
3799: WF_ENGINE.SetItemAttrText(
3800: itemtype => itemtype,
3801: itemkey => itemkey,
3802: AName => 'CONTACT_ID_LIST',
3803: AValue => l_contact_id_list);
3801: itemkey => itemkey,
3802: AName => 'CONTACT_ID_LIST',
3803: AValue => l_contact_id_list);
3804:
3805: WF_ENGINE.SetItemAttrText(
3806: itemtype => itemtype,
3807: itemkey => itemkey,
3808: AName => 'CONTACT_EMAIL_LIST',
3809: AValue => l_html_contact_email_list);
3807: itemkey => itemkey,
3808: AName => 'CONTACT_EMAIL_LIST',
3809: AValue => l_html_contact_email_list);
3810:
3811: WF_ENGINE.SetItemAttrText(
3812: itemtype => itemtype,
3813: itemkey => itemkey,
3814: AName => 'CONTACT_TYPE_LIST',
3815: AValue => l_contact_type_list);
3813: itemkey => itemkey,
3814: AName => 'CONTACT_TYPE_LIST',
3815: AValue => l_contact_type_list);
3816:
3817: WF_ENGINE.SetItemAttrText(
3818: itemtype => itemtype,
3819: itemkey => itemkey,
3820: AName => 'NOTIFICATION_PREFERENCE_LIST',
3821: AValue => l_notification_pref_list);
3819: itemkey => itemkey,
3820: AName => 'NOTIFICATION_PREFERENCE_LIST',
3821: AValue => l_notification_pref_list);
3822:
3823: WF_ENGINE.SetItemAttrText(
3824: itemtype => itemtype,
3825: itemkey => itemkey,
3826: AName => 'LANGUAGE_LIST',
3827: AValue => l_language_list);
3860: CLOSE sel_jsp_name_csr;
3861:
3862: l_serviceRequest_URL := FND_PROFILE.Value('JTF_BIS_OA_HTML') || '/' || l_jsp_name
3863: || '?srID=' || l_request_number;
3864: WF_ENGINE.SetItemAttrText(
3865: itemtype => itemtype,
3866: itemkey => itemkey,
3867: aname => 'NTFY_REQUEST_NUMBER_URL',
3868: avalue => l_serviceRequest_URL);
3873:
3874:
3875: -- 11.5.10 enhancement to Create Interaction when email to contact sent.
3876: /* Roopa - begin bug 3360069 */
3877: /* Replacing the AddItemAttr() call with WF_Engine add, get and set calls
3878: to factor in the scenario where this attr already exists */
3879: IF (l_contact_party_id_list IS NOT NULL) THEN
3880:
3881: OPEN check_if_item_attr_exists_csr;
3881: OPEN check_if_item_attr_exists_csr;
3882: FETCH check_if_item_attr_exists_csr into l_temp_contact_id_list;
3883:
3884: IF(check_if_item_attr_exists_csr%NOTFOUND) THEN
3885: WF_ENGINE.AddItemAttr( itemtype,
3886: itemkey,
3887: 'CONTACT_PARTY_ID_LIST',
3888: l_contact_party_id_list);
3889: ELSE
3886: itemkey,
3887: 'CONTACT_PARTY_ID_LIST',
3888: l_contact_party_id_list);
3889: ELSE
3890: WF_ENGINE.SetItemAttrText(
3891: itemtype => itemtype,
3892: itemkey => itemkey,
3893: aname => 'CONTACT_PARTY_ID_LIST',
3894: avalue => l_contact_party_id_list);
3900:
3901: -- Start of code for Associated Party Notification -- Associated Party Added
3902: ELSIF (l_action_code = 'NOTIFY_NEW_ASSOCIATE_PARTY_ADD') THEN
3903:
3904: l_contact_point_id_list := WF_ENGINE.GetItemAttrText(
3905: itemtype => itemtype,
3906: itemkey => itemkey,
3907: aname => 'NEW_ASSOCIATED_PARTY_ID_LIST' );
3908:
3919: FETCH sel_new_party_role_contact_csr
3920: INTO l_contact_email, l_contact_party_id, l_person_id, l_contact_type, l_tmp_contact_point_id,
3921: l_party_role_name, l_party_role_code;
3922:
3923: WF_ENGINE.SetItemAttrText(
3924: itemtype => itemtype,
3925: itemkey => itemkey,
3926: aname => 'PARTY_ROLE_CODE',
3927: avalue => l_party_role_code);
3925: itemkey => itemkey,
3926: aname => 'PARTY_ROLE_CODE',
3927: avalue => l_party_role_code);
3928:
3929: WF_ENGINE.SetItemAttrText(
3930: itemtype => itemtype,
3931: itemkey => itemkey,
3932: aname => 'PARTY_ROLE_NAME',
3933: avalue => l_party_role_name);
4032: CLOSE sel_jsp_name_csr;
4033:
4034: l_serviceRequest_URL := FND_PROFILE.Value('JTF_BIS_OA_HTML') || '/' || l_jsp_name
4035: || '?srID=' || l_request_number;
4036: WF_ENGINE.SetItemAttrText(
4037: itemtype => itemtype,
4038: itemkey => itemkey,
4039: aname => 'NTFY_REQUEST_NUMBER_URL',
4040: avalue => l_serviceRequest_URL);
4047:
4048: END IF; -- IF (l_action_code = 'NOTIFY_OWNER' OR .......
4049:
4050: -- Get the message template to be used for the notification
4051: l_notification_template_id := WF_ENGINE.GetItemAttrText(
4052: itemtype => itemtype,
4053: itemkey => itemkey,
4054: aname => 'NTFY_MESSAGE_NAME');
4055:
4061: result := 'COMPLETE:SET';
4062: END IF;
4063:
4064: -- Set the recipient role for the notification
4065: WF_ENGINE.SetItemAttrText(
4066: itemtype => itemtype,
4067: itemkey => itemkey,
4068: aname => 'NTFY_RECIPIENT',
4069: avalue => l_notify_recipient);
4130: BEGIN
4131:
4132: IF (funmode = 'RUN') THEN
4133:
4134: l_contact_party_id_list := WF_ENGINE.GetItemAttrText(
4135: itemtype => itemtype,
4136: itemkey => itemkey,
4137: aname => 'CONTACT_PARTY_ID_LIST',
4138: ignore_notfound => TRUE);
4145:
4146: pull_from_list(itemlist => l_contact_party_id_list,
4147: element => l_element);
4148:
4149: WF_ENGINE.SetItemAttrText(
4150: itemtype => itemtype,
4151: itemkey => itemkey,
4152: aname => 'CONTACT_PARTY_ID_LIST',
4153: avalue => l_contact_party_id_list );
4153: avalue => l_contact_party_id_list );
4154:
4155: l_contact_party_id := TO_NUMBER(l_element);
4156:
4157: l_request_id := WF_ENGINE.GetItemAttrNumber(
4158: itemtype => itemtype,
4159: itemkey => itemkey,
4160: aname => 'REQUEST_ID' );
4161: l_request_number := WF_ENGINE.GetItemAttrText(
4157: l_request_id := WF_ENGINE.GetItemAttrNumber(
4158: itemtype => itemtype,
4159: itemkey => itemkey,
4160: aname => 'REQUEST_ID' );
4161: l_request_number := WF_ENGINE.GetItemAttrText(
4162: itemtype => itemtype,
4163: itemkey => itemkey,
4164: aname => 'REQUEST_NUMBER' );
4165: l_user_id := WF_ENGINE.GetItemAttrNumber(
4161: l_request_number := WF_ENGINE.GetItemAttrText(
4162: itemtype => itemtype,
4163: itemkey => itemkey,
4164: aname => 'REQUEST_NUMBER' );
4165: l_user_id := WF_ENGINE.GetItemAttrNumber(
4166: itemtype => itemtype,
4167: itemkey => itemkey,
4168: aname => 'USER_ID' );
4169: l_resp_appl_id := WF_ENGINE.GetItemAttrNumber(
4165: l_user_id := WF_ENGINE.GetItemAttrNumber(
4166: itemtype => itemtype,
4167: itemkey => itemkey,
4168: aname => 'USER_ID' );
4169: l_resp_appl_id := WF_ENGINE.GetItemAttrNumber(
4170: itemtype => itemtype,
4171: itemkey => itemkey,
4172: aname => 'RESP_APPL_ID' );
4173: l_resp_id := WF_ENGINE.GetItemAttrNumber(
4169: l_resp_appl_id := WF_ENGINE.GetItemAttrNumber(
4170: itemtype => itemtype,
4171: itemkey => itemkey,
4172: aname => 'RESP_APPL_ID' );
4173: l_resp_id := WF_ENGINE.GetItemAttrNumber(
4174: itemtype => itemtype,
4175: itemkey => itemkey,
4176: aname => 'RESP_ID' );
4177:
4174: itemtype => itemtype,
4175: itemkey => itemkey,
4176: aname => 'RESP_ID' );
4177:
4178: l_owner_role := WF_ENGINE.GetItemAttrText(
4179: itemtype => itemtype,
4180: itemkey => itemkey,
4181: aname => 'OWNER_ROLE' );
4182:
4217: l_error_text := l_error_text || x_msg_data ||NL;
4218: END LOOP;
4219: END IF;
4220:
4221: WF_ENGINE.SetItemAttrText(
4222: itemtype => itemtype,
4223: itemkey => itemkey,
4224: aname => 'INTERACTION_ERR_DATA',
4225: avalue => l_error_text );
4227: OPEN sel_contact_party_name_csr;
4228: FETCH sel_contact_party_name_csr INTO l_contact_party_name;
4229: CLOSE sel_contact_party_name_csr;
4230:
4231: WF_ENGINE.SetItemAttrText(
4232: itemtype => itemtype,
4233: itemkey => itemkey,
4234: aname => 'INTERACTION_PARTY_NAME',
4235: avalue => l_contact_party_name );
4239: l_error_role := l_owner_role;
4240: ELSE
4241: l_error_role := 'SYSADMIN';
4242: END IF;
4243: WF_ENGINE.SetItemAttrText(
4244: itemtype => itemtype,
4245: itemkey => itemkey,
4246: aname => 'INTERACTION_ERROR_ROLE',
4247: avalue => l_error_role );
4285: BEGIN
4286:
4287: IF (funmode = 'RUN') THEN
4288:
4289: l_contact_party_id_list := WF_ENGINE.GetItemAttrText(
4290: itemtype => itemtype,
4291: itemkey => itemkey,
4292: aname => 'CONTACT_PARTY_ID_LIST',
4293: ignore_notfound => TRUE);
4391: BEGIN
4392:
4393: IF (funmode = 'RUN') THEN
4394:
4395: l_action_code := WF_ENGINE.GetItemAttrText(
4396: itemtype => itemtype,
4397: itemkey => itemkey,
4398: aname => 'NTFY_ACTION_CODE' );
4399:
4400: IF (l_action_code = 'NOTIFY_OWNER_OF_RELATED_SR') OR
4401: (l_action_code = 'NOTIFY_PRIM_CONTACT_OF_REL_SR') OR
4402: (l_action_code = 'NOTIFY_ALL_CONTACTS_OF_REL_SR') THEN
4403:
4404: l_linked_subject_list := WF_ENGINE.GetItemAttrText(
4405: itemtype => itemtype,
4406: itemkey => itemkey,
4407: aname => 'NTFY_LINKED_SUBJECT_LIST');
4408:
4411: result := 'COMPLETE:N';
4412:
4413: ELSE
4414:
4415: l_overflow_flag := WF_ENGINE.GetItemAttrText(
4416: itemtype => itemtype,
4417: itemkey => itemkey,
4418: aname => 'MORE_NTFY_LINKED_SUBJECT_LIST');
4419:
4419:
4420: IF (l_overflow_flag = 'Y') THEN
4421:
4422: -- Reset the Overflow flag
4423: WF_ENGINE.SetItemAttrText(
4424: itemtype => itemtype,
4425: itemkey => itemkey,
4426: aname => 'MORE_NTFY_LINKED_SUBJECT_LIST',
4427: avalue => '' );
4425: itemkey => itemkey,
4426: aname => 'MORE_NTFY_LINKED_SUBJECT_LIST',
4427: avalue => '' );
4428:
4429: l_event_condition_id := WF_ENGINE.GetItemAttrNumber(
4430: itemtype => itemtype,
4431: itemkey => itemkey,
4432: aname => 'NTFY_EVENT_CONDITION_ID' );
4433:
4430: itemtype => itemtype,
4431: itemkey => itemkey,
4432: aname => 'NTFY_EVENT_CONDITION_ID' );
4433:
4434: l_subject_id := WF_ENGINE.GetItemAttrNumber(
4435: itemtype => itemtype,
4436: itemkey => itemkey,
4437: aname => 'NTFY_SUBJECT_ID');
4438:
4435: itemtype => itemtype,
4436: itemkey => itemkey,
4437: aname => 'NTFY_SUBJECT_ID');
4438:
4439: l_request_number := WF_ENGINE.GetItemAttrText(
4440: itemtype => itemtype,
4441: itemkey => itemkey,
4442: aname => 'REQUEST_NUMBER' );
4443:
4440: itemtype => itemtype,
4441: itemkey => itemkey,
4442: aname => 'REQUEST_NUMBER' );
4443:
4444: l_request_id := WF_ENGINE.GetItemAttrNumber(
4445: itemtype => itemtype,
4446: itemkey => itemkey,
4447: aname => 'REQUEST_ID' );
4448:
4471: ELSE
4472: l_linked_subject_list := l_linked_subject_list || ' ' || l_char_subject_id;
4473: END IF;
4474: ELSE /**** Will need to build another list later since it won't fit here ***/
4475: WF_ENGINE.SetItemAttrText(
4476: itemtype => itemtype,
4477: itemkey => itemkey,
4478: aname => 'MORE_NTFY_LINKED_SUBJECT_LIST',
4479: avalue => 'Y' );
4489: END IF;
4490:
4491: IF (l_linked_subject_list IS NOT NULL) THEN
4492:
4493: WF_ENGINE.SetItemAttrText(
4494: itemtype => itemtype,
4495: itemkey => itemkey,
4496: aname => 'NTFY_LINKED_SUBJECT_LIST',
4497: avalue => l_linked_subject_list );
4507: END IF; /*** IF (l_linked_subject_list IS NOT NULL) ***/
4508:
4509: ELSIF (l_action_code = 'NOTIFY_ALL_ASSOCIATED_PARTIES') THEN
4510:
4511: l_notify_relsr_party_role_list := WF_ENGINE.GetItemAttrText(
4512: itemtype => itemtype,
4513: itemkey => itemkey,
4514: aname => 'NOTIFY_RELSR_PARTY_ROLE_LIST');
4515:
4512: itemtype => itemtype,
4513: itemkey => itemkey,
4514: aname => 'NOTIFY_RELSR_PARTY_ROLE_LIST');
4515:
4516: l_linked_subject_list := WF_ENGINE.GetItemAttrText(
4517: itemtype => itemtype,
4518: itemkey => itemkey,
4519: aname => 'NTFY_LINKED_SUBJECT_LIST');
4520:
4523: result := 'COMPLETE:N';
4524:
4525: ELSE
4526:
4527: l_overflow_flag := WF_ENGINE.GetItemAttrText(
4528: itemtype => itemtype,
4529: itemkey => itemkey,
4530: aname => 'MORE_NTFY_LINKED_SUBJECT_LIST');
4531:
4531:
4532: IF (l_overflow_flag = 'Y') THEN
4533:
4534: -- Reset the Overflow flag
4535: WF_ENGINE.SetItemAttrText(
4536: itemtype => itemtype,
4537: itemkey => itemkey,
4538: aname => 'MORE_NTFY_LINKED_SUBJECT_LIST',
4539: avalue => '' );
4537: itemkey => itemkey,
4538: aname => 'MORE_NTFY_LINKED_SUBJECT_LIST',
4539: avalue => '' );
4540:
4541: l_event_condition_id := WF_ENGINE.GetItemAttrNumber(
4542: itemtype => itemtype,
4543: itemkey => itemkey,
4544: aname => 'NTFY_EVENT_CONDITION_ID' );
4545:
4542: itemtype => itemtype,
4543: itemkey => itemkey,
4544: aname => 'NTFY_EVENT_CONDITION_ID' );
4545:
4546: l_subject_id := WF_ENGINE.GetItemAttrNumber(
4547: itemtype => itemtype,
4548: itemkey => itemkey,
4549: aname => 'NTFY_SUBJECT_ID');
4550:
4547: itemtype => itemtype,
4548: itemkey => itemkey,
4549: aname => 'NTFY_SUBJECT_ID');
4550:
4551: l_request_number := WF_ENGINE.GetItemAttrText(
4552: itemtype => itemtype,
4553: itemkey => itemkey,
4554: aname => 'REQUEST_NUMBER' );
4555:
4552: itemtype => itemtype,
4553: itemkey => itemkey,
4554: aname => 'REQUEST_NUMBER' );
4555:
4556: l_request_id := WF_ENGINE.GetItemAttrNumber(
4557: itemtype => itemtype,
4558: itemkey => itemkey,
4559: aname => 'REQUEST_ID' );
4560:
4583: ELSE
4584: l_linked_subject_list := l_linked_subject_list || ' ' || l_char_subject_id;
4585: END IF;
4586: ELSE /**** Will need to build another list later since it won't fit here ***/
4587: WF_ENGINE.SetItemAttrText(
4588: itemtype => itemtype,
4589: itemkey => itemkey,
4590: aname => 'MORE_NTFY_LINKED_SUBJECT_LIST',
4591: avalue => 'Y' );
4601: END IF;
4602:
4603: IF (l_linked_subject_list IS NOT NULL) THEN
4604:
4605: WF_ENGINE.SetItemAttrText(
4606: itemtype => itemtype,
4607: itemkey => itemkey,
4608: aname => 'NTFY_LINKED_SUBJECT_LIST',
4609: avalue => l_linked_subject_list );
4618:
4619: END IF; /*** IF (l_linked_subject_list IS NOT NULL) ***/
4620:
4621: ELSIF (l_action_code = 'NOTIFY_ASSOCIATED_PARTIES') THEN
4622: l_notify_party_role_list := WF_ENGINE.GetItemAttrText(
4623: itemtype => itemtype,
4624: itemkey => itemkey,
4625: aname => 'NOTIFY_PARTY_ROLE_LIST');
4626:
4702: BEGIN
4703:
4704: IF (funmode = 'RUN') THEN
4705:
4706: l_notify_conditions_list := WF_ENGINE.GetItemAttrText(
4707: itemtype => itemtype,
4708: itemkey => itemkey,
4709: aname => 'NTFY_CONDITION_LIST' );
4710:
4707: itemtype => itemtype,
4708: itemkey => itemkey,
4709: aname => 'NTFY_CONDITION_LIST' );
4710:
4711: l_notify_actions_list := WF_ENGINE.GetItemAttrText(
4712: itemtype => itemtype,
4713: itemkey => itemkey,
4714: aname => 'NTFY_ACTION_LIST' );
4715:
4716: IF (l_notify_conditions_list IS NOT NULL AND l_notify_actions_list IS NOT NULL) THEN
4717: result := 'COMPLETE:N';
4718: ELSE
4719:
4720: l_overflow_flag := WF_ENGINE.GetItemAttrText(
4721: itemtype => itemtype,
4722: itemkey => itemkey,
4723: aname => 'MORE_NTFY_ACTION_LIST');
4724:
4724:
4725: IF (l_overflow_flag = 'Y') THEN
4726:
4727: -- Reset the Overflow flag
4728: WF_ENGINE.SetItemAttrText(
4729: itemtype => itemtype,
4730: itemkey => itemkey,
4731: aname => 'MORE_NTFY_ACTION_LIST',
4732: avalue => '' );
4730: itemkey => itemkey,
4731: aname => 'MORE_NTFY_ACTION_LIST',
4732: avalue => '' );
4733:
4734: l_event_condition_id := WF_ENGINE.GetItemAttrNumber(
4735: itemtype => itemtype,
4736: itemkey => itemkey,
4737: aname => 'NTFY_EVENT_CONDITION_ID');
4738: l_action_code := WF_ENGINE.GetItemAttrText(
4734: l_event_condition_id := WF_ENGINE.GetItemAttrNumber(
4735: itemtype => itemtype,
4736: itemkey => itemkey,
4737: aname => 'NTFY_EVENT_CONDITION_ID');
4738: l_action_code := WF_ENGINE.GetItemAttrText(
4739: itemtype => itemtype,
4740: itemkey => itemkey,
4741: aname => 'NTFY_ACTION_CODE');
4742: l_event_name := WF_ENGINE.GetItemAttrText(
4738: l_action_code := WF_ENGINE.GetItemAttrText(
4739: itemtype => itemtype,
4740: itemkey => itemkey,
4741: aname => 'NTFY_ACTION_CODE');
4742: l_event_name := WF_ENGINE.GetItemAttrText(
4743: itemtype => itemtype,
4744: itemkey => itemkey,
4745: aname => 'EVENTNAME' );
4746:
4763: l_notify_actions_list := l_notify_actions_list || ' ' || sel_action_rec.action_code;
4764: END IF;
4765: ELSE
4766:
4767: WF_ENGINE.SetItemAttrText(
4768: itemtype => itemtype,
4769: itemkey => itemkey,
4770: aname => 'MORE_NTFY_ACTION_LIST',
4771: avalue => 'Y' );
4776: CLOSE sel_action_csr;
4777:
4778: IF (l_notify_conditions_list IS NOT NULL AND l_notify_actions_list IS NOT NULL) THEN
4779:
4780: WF_ENGINE.SetItemAttrText(
4781: itemtype => itemtype,
4782: itemkey => itemkey,
4783: aname => 'NTFY_CONDITION_LIST',
4784: avalue => l_notify_conditions_list );
4781: itemtype => itemtype,
4782: itemkey => itemkey,
4783: aname => 'NTFY_CONDITION_LIST',
4784: avalue => l_notify_conditions_list );
4785: WF_ENGINE.SetItemAttrText(
4786: itemtype => itemtype,
4787: itemkey => itemkey,
4788: aname => 'NTFY_ACTION_LIST',
4789: avalue => l_notify_actions_list );
4854: BEGIN
4855:
4856: IF (funmode = 'RUN') THEN
4857:
4858: l_update_conditions_list := WF_ENGINE.GetItemAttrText(
4859: itemtype => itemtype,
4860: itemkey => itemkey,
4861: aname => 'UPDATE_CONDITION_LIST' );
4862:
4859: itemtype => itemtype,
4860: itemkey => itemkey,
4861: aname => 'UPDATE_CONDITION_LIST' );
4862:
4863: l_update_actions_list := WF_ENGINE.GetItemAttrText(
4864: itemtype => itemtype,
4865: itemkey => itemkey,
4866: aname => 'UPDATE_ACTION_LIST' );
4867:
4874: pull_from_list(itemlist => l_update_actions_list,
4875: element => l_action_code);
4876:
4877: IF (l_event_condition_id IS NOT NULL AND l_action_code IS NOT NULL) THEN
4878: WF_ENGINE.SetItemAttrText(
4879: itemtype => itemtype,
4880: itemkey => itemkey,
4881: aname => 'UPDATE_CONDITION_LIST',
4882: avalue => l_update_conditions_list );
4879: itemtype => itemtype,
4880: itemkey => itemkey,
4881: aname => 'UPDATE_CONDITION_LIST',
4882: avalue => l_update_conditions_list );
4883: WF_ENGINE.SetItemAttrText(
4884: itemtype => itemtype,
4885: itemkey => itemkey,
4886: aname => 'UPDATE_ACTION_LIST',
4887: avalue => l_update_actions_list );
4884: itemtype => itemtype,
4885: itemkey => itemkey,
4886: aname => 'UPDATE_ACTION_LIST',
4887: avalue => l_update_actions_list );
4888: WF_ENGINE.SetItemAttrNumber(
4889: itemtype => itemtype,
4890: itemkey => itemkey,
4891: aname => 'UPDATE_EVENT_CONDITION_ID',
4892: avalue => l_event_condition_id );
4889: itemtype => itemtype,
4890: itemkey => itemkey,
4891: aname => 'UPDATE_EVENT_CONDITION_ID',
4892: avalue => l_event_condition_id );
4893: WF_ENGINE.SetItemAttrText(
4894: itemtype => itemtype,
4895: itemkey => itemkey,
4896: aname => 'UPDATE_ACTION_CODE',
4897: avalue => l_action_code );
5006: BEGIN
5007:
5008: IF (funmode = 'RUN') THEN
5009:
5010: l_request_number := WF_ENGINE.GetItemAttrText(
5011: itemtype => itemtype,
5012: itemkey => itemkey,
5013: aname => 'REQUEST_NUMBER' );
5014:
5011: itemtype => itemtype,
5012: itemkey => itemkey,
5013: aname => 'REQUEST_NUMBER' );
5014:
5015: l_request_id := WF_ENGINE.GetItemAttrNumber(
5016: itemtype => itemtype,
5017: itemkey => itemkey,
5018: aname => 'REQUEST_ID' );
5019:
5016: itemtype => itemtype,
5017: itemkey => itemkey,
5018: aname => 'REQUEST_ID' );
5019:
5020: l_event_name := WF_ENGINE.GetItemAttrText(
5021: itemtype => itemtype,
5022: itemkey => itemkey,
5023: aname => 'EVENTNAME' );
5024:
5021: itemtype => itemtype,
5022: itemkey => itemkey,
5023: aname => 'EVENTNAME' );
5024:
5025: l_event_condition_id := WF_ENGINE.GetItemAttrNumber(
5026: itemtype => itemtype,
5027: itemkey => itemkey,
5028: aname => 'UPDATE_EVENT_CONDITION_ID' );
5029:
5026: itemtype => itemtype,
5027: itemkey => itemkey,
5028: aname => 'UPDATE_EVENT_CONDITION_ID' );
5029:
5030: l_action_code := WF_ENGINE.GetItemAttrText(
5031: itemtype => itemtype,
5032: itemkey => itemkey,
5033: aname => 'UPDATE_ACTION_CODE' );
5034:
5038:
5039: IF (sel_event_action_rec.from_to_status_code IS NOT NULL) THEN
5040:
5041: IF (sel_event_action_rec.from_to_status_code = 'STATUS_CHANGED_TO') THEN
5042: l_request_status := WF_ENGINE.GetItemAttrText(
5043: itemtype => itemtype,
5044: itemkey => itemkey,
5045: aname => 'REQUEST_STATUS' );
5046: ELSIF (sel_event_action_rec.from_to_status_code = 'STATUS_CHANGED_FROM') THEN
5043: itemtype => itemtype,
5044: itemkey => itemkey,
5045: aname => 'REQUEST_STATUS' );
5046: ELSIF (sel_event_action_rec.from_to_status_code = 'STATUS_CHANGED_FROM') THEN
5047: l_request_status := WF_ENGINE.GetItemAttrText(
5048: itemtype => itemtype,
5049: itemkey => itemkey,
5050: aname => 'REQUEST_STATUS_OLD' );
5051: END IF;
5055: FROM CS_INCIDENT_STATUSES_VL
5056: WHERE INCIDENT_STATUS_ID = sel_event_action_rec.trigger_incident_status_id;
5057:
5058: IF (l_request_status = l_request_status_temp) THEN
5059: WF_ENGINE.SetItemAttrNumber(
5060: itemtype => itemtype,
5061: itemkey => itemkey,
5062: aname => 'SUBJECT_STATUS_ID',
5063: avalue => sel_event_action_rec.detail_incident_status_id );
5062: aname => 'SUBJECT_STATUS_ID',
5063: avalue => sel_event_action_rec.detail_incident_status_id );
5064:
5065: ELSE
5066: WF_ENGINE.SetItemAttrText(
5067: itemtype => itemtype,
5068: itemkey => itemkey,
5069: aname => 'SUBJECT_STATUS_ID',
5070: avalue => NULL);
5073: l_relationship_type_id := sel_event_action_rec.detail_link_type;
5074:
5075:
5076: ELSIF (sel_event_action_rec.trigger_link_type IS NOT NULL) THEN
5077: WF_ENGINE.SetItemAttrNumber(
5078: itemtype => itemtype,
5079: itemkey => itemkey,
5080: aname => 'SUBJECT_STATUS_ID',
5081: avalue => sel_event_action_rec.detail_incident_status_id );
5079: itemkey => itemkey,
5080: aname => 'SUBJECT_STATUS_ID',
5081: avalue => sel_event_action_rec.detail_incident_status_id );
5082:
5083: WF_ENGINE.SetItemAttrText(
5084: itemtype => itemtype,
5085: itemkey => itemkey,
5086: aname => 'SUBJECT_RESOLUTION_CODE',
5087: avalue => sel_event_action_rec.resolution_code );
5095: INTO l_relationship_type_name
5096: FROM CS_SR_LINK_TYPES_VL
5097: WHERE link_type_id = l_relationship_type_id;
5098:
5099: WF_ENGINE.SetItemAttrText(
5100: itemtype => itemtype,
5101: itemkey => itemkey,
5102: aname => 'UPDATE_RELATIONSHIP_TYPE',
5103: avalue => l_relationship_type_name);
5119: l_linked_subject_list := l_linked_subject_list || ' ' || l_subject_id;
5120: END IF;
5121: ELSE
5122:
5123: WF_ENGINE.SetItemAttrText(
5124: itemtype => itemtype,
5125: itemkey => itemkey,
5126: aname => 'MORE_UPDT_LINKED_SUBJECT_LIST',
5127: avalue => 'Y' );
5132: END LOOP;
5133: CLOSE sel_link_csr;
5134:
5135: IF (l_linked_subject_list IS NOT NULL) THEN
5136: WF_ENGINE.SetItemAttrText(
5137: itemtype => itemtype,
5138: itemkey => itemkey,
5139: aname => 'UPDATE_LINKED_SUBJECT_LIST',
5140: avalue => l_linked_subject_list );
5184: BEGIN
5185:
5186: IF (funmode = 'RUN') THEN
5187:
5188: l_linked_subject_list := WF_ENGINE.GetItemAttrText(
5189: itemtype => itemtype,
5190: itemkey => itemkey,
5191: aname => 'UPDATE_LINKED_SUBJECT_LIST' );
5192:
5192:
5193: pull_from_list(itemlist => l_linked_subject_list,
5194: element => l_element);
5195:
5196: WF_ENGINE.SetItemAttrNumber(
5197: itemtype => itemtype,
5198: itemkey => itemkey,
5199: aname => 'UPDATE_SUBJECT_ID',
5200: avalue => TO_NUMBER(l_element) );
5198: itemkey => itemkey,
5199: aname => 'UPDATE_SUBJECT_ID',
5200: avalue => TO_NUMBER(l_element) );
5201:
5202: WF_ENGINE.SetItemAttrText(
5203: itemtype => itemtype,
5204: itemkey => itemkey,
5205: aname => 'UPDATE_LINKED_SUBJECT_LIST',
5206: avalue => l_linked_subject_list );
5287:
5288: IF (funmode = 'RUN') THEN
5289:
5290: -- SUBJECT_STATUS_ID can be null when updating resolution code . Update Rule #3.
5291: l_subject_status_id := WF_ENGINE.GetItemAttrNumber(
5292: itemtype => itemtype,
5293: itemkey => itemkey,
5294: aname => 'SUBJECT_STATUS_ID' );
5295:
5294: aname => 'SUBJECT_STATUS_ID' );
5295:
5296: --l_err_txt := 'Valid1';
5297:
5298: l_resolution_code := WF_ENGINE.GetItemAttrText(
5299: itemtype => itemtype,
5300: itemkey => itemkey,
5301: aname => 'SUBJECT_RESOLUTION_CODE' );
5302:
5304: result := 'COMPLETE:N';
5305:
5306: ELSE
5307:
5308: l_subject_id := WF_ENGINE.GetItemAttrNumber(
5309: itemtype => itemtype,
5310: itemkey => itemkey,
5311: aname => 'UPDATE_SUBJECT_ID' );
5312:
5309: itemtype => itemtype,
5310: itemkey => itemkey,
5311: aname => 'UPDATE_SUBJECT_ID' );
5312:
5313: l_action_code := WF_ENGINE.GetItemAttrText(
5314: itemtype => itemtype,
5315: itemkey => itemkey,
5316: aname => 'UPDATE_ACTION_CODE' );
5317:
5315: itemkey => itemkey,
5316: aname => 'UPDATE_ACTION_CODE' );
5317:
5318: IF (l_action_code = 'CHANGE_SR_STATUS' OR l_action_code = 'CHANGE_SR_RESOLUTION') THEN
5319: l_sr_updated := WF_ENGINE.GetItemAttrNumber(
5320: itemtype => itemtype,
5321: itemkey => itemkey,
5322: aname => 'REQUEST_ID' );
5323: ELSIF (l_action_code = 'CHANGE_RELATED_SR_STATUS') THEN
5488:
5489:
5490: CS_ServiceRequest_PVT.initialize_rec(l_service_request_rec);
5491:
5492: l_action_code := WF_ENGINE.GetItemAttrText(
5493: itemtype => itemtype,
5494: itemkey => itemkey,
5495: aname => 'UPDATE_ACTION_CODE' );
5496:
5493: itemtype => itemtype,
5494: itemkey => itemkey,
5495: aname => 'UPDATE_ACTION_CODE' );
5496:
5497: l_request_number := WF_ENGINE.GetItemAttrText(
5498: itemtype => itemtype,
5499: itemkey => itemkey,
5500: aname => 'REQUEST_NUMBER' );
5501:
5498: itemtype => itemtype,
5499: itemkey => itemkey,
5500: aname => 'REQUEST_NUMBER' );
5501:
5502: l_user_id := WF_ENGINE.GetItemAttrNumber(
5503: itemtype => itemtype,
5504: itemkey => itemkey,
5505: aname => 'USER_ID' );
5506:
5503: itemtype => itemtype,
5504: itemkey => itemkey,
5505: aname => 'USER_ID' );
5506:
5507: l_subject_status_id := WF_ENGINE.GetItemAttrNumber(
5508: itemtype => itemtype,
5509: itemkey => itemkey,
5510: aname => 'SUBJECT_STATUS_ID' );
5511:
5508: itemtype => itemtype,
5509: itemkey => itemkey,
5510: aname => 'SUBJECT_STATUS_ID' );
5511:
5512: l_resolution_code := WF_ENGINE.GetItemAttrText(
5513: itemtype => itemtype,
5514: itemkey => itemkey,
5515: aname => 'SUBJECT_RESOLUTION_CODE' );
5516:
5513: itemtype => itemtype,
5514: itemkey => itemkey,
5515: aname => 'SUBJECT_RESOLUTION_CODE' );
5516:
5517: l_subject_id := WF_ENGINE.GetItemAttrNumber(
5518: itemtype => itemtype,
5519: itemkey => itemkey,
5520: aname => 'UPDATE_SUBJECT_ID' );
5521:
5560: l_service_request_rec.last_update_program_code := 'SUPPORT.WF';
5561:
5562: --l_wf_process_id := TO_NUMBER(substr(itemkey, instr(itemkey,'-')+1));
5563:
5564: l_resp_appl_id := WF_ENGINE.GetItemAttrNumber(
5565: itemtype => itemtype,
5566: itemkey => itemkey,
5567: aname => 'RESP_APPL_ID' );
5568: l_resp_id := WF_ENGINE.GetItemAttrNumber(
5564: l_resp_appl_id := WF_ENGINE.GetItemAttrNumber(
5565: itemtype => itemtype,
5566: itemkey => itemkey,
5567: aname => 'RESP_APPL_ID' );
5568: l_resp_id := WF_ENGINE.GetItemAttrNumber(
5569: itemtype => itemtype,
5570: itemkey => itemkey,
5571: aname => 'RESP_ID' );
5572:
5621: END LOOP;
5622: END IF;
5623:
5624:
5625: WF_ENGINE.SetItemAttrText(
5626: itemtype => itemtype,
5627: itemkey => itemkey,
5628: aname => 'UPDATE_ERROR_DATA',
5629: avalue => l_error_text );
5701: BEGIN
5702:
5703: IF (funmode = 'RUN') THEN
5704:
5705: l_action_code := WF_ENGINE.GetItemAttrText(
5706: itemtype => itemtype,
5707: itemkey => itemkey,
5708: aname => 'UPDATE_ACTION_CODE' );
5709:
5706: itemtype => itemtype,
5707: itemkey => itemkey,
5708: aname => 'UPDATE_ACTION_CODE' );
5709:
5710: l_request_number := WF_ENGINE.GetItemAttrText(
5711: itemtype => itemtype,
5712: itemkey => itemkey,
5713: aname => 'REQUEST_NUMBER' );
5714:
5711: itemtype => itemtype,
5712: itemkey => itemkey,
5713: aname => 'REQUEST_NUMBER' );
5714:
5715: l_subject_id := WF_ENGINE.GetItemAttrNumber(
5716: itemtype => itemtype,
5717: itemkey => itemkey,
5718: aname => 'UPDATE_SUBJECT_ID' );
5719:
5718: aname => 'UPDATE_SUBJECT_ID' );
5719:
5720: IF (l_action_code = 'CHANGE_SR_STATUS' OR l_action_code = 'CHANGE_SR_RESOLUTION') THEN
5721:
5722: l_owner_role := WF_ENGINE.GetItemAttrText(
5723: itemtype => itemtype,
5724: itemkey => itemkey,
5725: aname => 'OWNER_ROLE' );
5726:
5761: END IF;
5762:
5763: If (l_owner_role IS NOT NULL) THEN
5764:
5765: WF_ENGINE.SetItemAttrText(
5766: itemtype => itemtype,
5767: itemkey => itemkey,
5768: aname => 'UPDATE_REQUEST_ROLE',
5769: avalue => l_owner_role );
5767: itemkey => itemkey,
5768: aname => 'UPDATE_REQUEST_ROLE',
5769: avalue => l_owner_role );
5770:
5771: WF_ENGINE.SetItemAttrText(
5772: itemtype => itemtype,
5773: itemkey => itemkey,
5774: aname => 'UPDATE_REQUEST_NUMBER',
5775: avalue => l_request_number );
5846: BEGIN
5847:
5848: IF (funmode = 'RUN') THEN
5849:
5850: l_linked_subject_list := WF_ENGINE.GetItemAttrText(
5851: itemtype => itemtype,
5852: itemkey => itemkey,
5853: aname => 'UPDATE_LINKED_SUBJECT_LIST' );
5854:
5855: IF (l_linked_subject_list IS NOT NULL) THEN
5856: result := 'COMPLETE:N';
5857: ELSE
5858:
5859: l_overflow_flag := WF_ENGINE.GetItemAttrText(
5860: itemtype => itemtype,
5861: itemkey => itemkey,
5862: aname => 'MORE_UPDT_LINKED_SUBJECT_LIST');
5863:
5863:
5864: IF (l_overflow_flag = 'Y') THEN
5865:
5866: -- Reset the Overflow flag
5867: WF_ENGINE.SetItemAttrText(
5868: itemtype => itemtype,
5869: itemkey => itemkey,
5870: aname => 'MORE_UPDT_LINKED_SUBJECT_LIST',
5871: avalue => '' );
5869: itemkey => itemkey,
5870: aname => 'MORE_UPDT_LINKED_SUBJECT_LIST',
5871: avalue => '' );
5872:
5873: l_request_number := WF_ENGINE.GetItemAttrText(
5874: itemtype => itemtype,
5875: itemkey => itemkey,
5876: aname => 'REQUEST_NUMBER' );
5877: l_request_id := WF_ENGINE.GetItemAttrNumber(
5873: l_request_number := WF_ENGINE.GetItemAttrText(
5874: itemtype => itemtype,
5875: itemkey => itemkey,
5876: aname => 'REQUEST_NUMBER' );
5877: l_request_id := WF_ENGINE.GetItemAttrNumber(
5878: itemtype => itemtype,
5879: itemkey => itemkey,
5880: aname => 'REQUEST_ID' );
5881: l_relationship_type_name := WF_ENGINE.GetItemAttrText(
5877: l_request_id := WF_ENGINE.GetItemAttrNumber(
5878: itemtype => itemtype,
5879: itemkey => itemkey,
5880: aname => 'REQUEST_ID' );
5881: l_relationship_type_name := WF_ENGINE.GetItemAttrText(
5882: itemtype => itemtype,
5883: itemkey => itemkey,
5884: aname => 'UPDATE_RELATIONSHIP_TYPE');
5885: l_subject_id := WF_ENGINE.GetItemAttrNumber(
5881: l_relationship_type_name := WF_ENGINE.GetItemAttrText(
5882: itemtype => itemtype,
5883: itemkey => itemkey,
5884: aname => 'UPDATE_RELATIONSHIP_TYPE');
5885: l_subject_id := WF_ENGINE.GetItemAttrNumber(
5886: itemtype => itemtype,
5887: itemkey => itemkey,
5888: aname => 'UPDATE_SUBJECT_ID');
5889:
5901: ELSE
5902: l_linked_subject_list := l_linked_subject_list || ' ' || l_char_subject_id;
5903: END IF;
5904: ELSE
5905: WF_ENGINE.SetItemAttrText(
5906: itemtype => itemtype,
5907: itemkey => itemkey,
5908: aname => 'MORE_UPDT_LINKED_SUBJECT_LIST',
5909: avalue => 'Y' );
5914: END LOOP;
5915: CLOSE sel_link_csr;
5916:
5917: IF (l_linked_subject_list IS NOT NULL) THEN
5918: WF_ENGINE.SetItemAttrText(
5919: itemtype => itemtype,
5920: itemkey => itemkey,
5921: aname => 'UPDATE_LINKED_SUBJECT_LIST',
5922: avalue => l_linked_subject_list );
6035: BEGIN
6036:
6037: IF (funmode = 'RUN') THEN
6038:
6039: l_update_conditions_list := WF_ENGINE.GetItemAttrText(
6040: itemtype => itemtype,
6041: itemkey => itemkey,
6042: aname => 'UPDATE_CONDITION_LIST' );
6043:
6040: itemtype => itemtype,
6041: itemkey => itemkey,
6042: aname => 'UPDATE_CONDITION_LIST' );
6043:
6044: l_update_actions_list := WF_ENGINE.GetItemAttrText(
6045: itemtype => itemtype,
6046: itemkey => itemkey,
6047: aname => 'UPDATE_ACTION_LIST' );
6048:
6049: IF (l_update_conditions_list IS NOT NULL AND l_update_actions_list IS NOT NULL) THEN
6050: result := 'COMPLETE:N';
6051: ELSE
6052:
6053: l_overflow_flag := WF_ENGINE.GetItemAttrText(
6054: itemtype => itemtype,
6055: itemkey => itemkey,
6056: aname => 'MORE_UPDATE_ACTION_LIST');
6057:
6057:
6058: IF (l_overflow_flag = 'Y') THEN
6059:
6060: -- Reset the Overflow flag
6061: WF_ENGINE.SetItemAttrText(
6062: itemtype => itemtype,
6063: itemkey => itemkey,
6064: aname => 'MORE_UPDATE_ACTION_LIST',
6065: avalue => '' );
6063: itemkey => itemkey,
6064: aname => 'MORE_UPDATE_ACTION_LIST',
6065: avalue => '' );
6066:
6067: l_event_condition_id := WF_ENGINE.GetItemAttrNumber(
6068: itemtype => itemtype,
6069: itemkey => itemkey,
6070: aname => 'UPDATE_EVENT_CONDITION_ID');
6071: l_action_code := WF_ENGINE.GetItemAttrText(
6067: l_event_condition_id := WF_ENGINE.GetItemAttrNumber(
6068: itemtype => itemtype,
6069: itemkey => itemkey,
6070: aname => 'UPDATE_EVENT_CONDITION_ID');
6071: l_action_code := WF_ENGINE.GetItemAttrText(
6072: itemtype => itemtype,
6073: itemkey => itemkey,
6074: aname => 'UPDATE_ACTION_CODE');
6075: l_event_name := WF_ENGINE.GetItemAttrText(
6071: l_action_code := WF_ENGINE.GetItemAttrText(
6072: itemtype => itemtype,
6073: itemkey => itemkey,
6074: aname => 'UPDATE_ACTION_CODE');
6075: l_event_name := WF_ENGINE.GetItemAttrText(
6076: itemtype => itemtype,
6077: itemkey => itemkey,
6078: aname => 'EVENTNAME' );
6079: l_request_number := WF_ENGINE.GetItemAttrText(
6075: l_event_name := WF_ENGINE.GetItemAttrText(
6076: itemtype => itemtype,
6077: itemkey => itemkey,
6078: aname => 'EVENTNAME' );
6079: l_request_number := WF_ENGINE.GetItemAttrText(
6080: itemtype => itemtype,
6081: itemkey => itemkey,
6082: aname => 'REQUEST_NUMBER' );
6083: l_request_id := WF_ENGINE.GetItemAttrNumber(
6079: l_request_number := WF_ENGINE.GetItemAttrText(
6080: itemtype => itemtype,
6081: itemkey => itemkey,
6082: aname => 'REQUEST_NUMBER' );
6083: l_request_id := WF_ENGINE.GetItemAttrNumber(
6084: itemtype => itemtype,
6085: itemkey => itemkey,
6086: aname => 'REQUEST_ID' );
6087:
6104: l_update_actions_list := l_update_actions_list || ' ' || sel_action_rec.action_code;
6105: END IF;
6106: ELSE
6107:
6108: WF_ENGINE.SetItemAttrText(
6109: itemtype => itemtype,
6110: itemkey => itemkey,
6111: aname => 'MORE_UPDATE_ACTION_LIST',
6112: avalue => 'Y' );
6117: CLOSE sel_action_csr;
6118:
6119: IF (l_update_conditions_list IS NOT NULL AND l_update_actions_list IS NOT NULL) THEN
6120:
6121: WF_ENGINE.SetItemAttrText(
6122: itemtype => itemtype,
6123: itemkey => itemkey,
6124: aname => 'UPDATE_CONDITION_LIST',
6125: avalue => l_update_conditions_list );
6122: itemtype => itemtype,
6123: itemkey => itemkey,
6124: aname => 'UPDATE_CONDITION_LIST',
6125: avalue => l_update_conditions_list );
6126: WF_ENGINE.SetItemAttrText(
6127: itemtype => itemtype,
6128: itemkey => itemkey,
6129: aname => 'UPDATE_ACTION_LIST',
6130: avalue => l_update_actions_list );
6303: BEGIN
6304:
6305: IF (funmode = 'RUN') THEN
6306:
6307: l_request_number := WF_ENGINE.GetItemAttrText(
6308: itemtype => itemtype,
6309: itemkey => itemkey,
6310: aname => 'REQUEST_NUMBER' );
6311:
6374: number of parameters in an event is 100).
6375: *******/
6376:
6377: -- Initialize item attributes that will remain constant
6378: WF_ENGINE.SetItemAttrDate(
6379: itemtype => 'SERVEREQ',
6380: itemkey => itemkey,
6381: aname => 'REQUEST_DATE',
6382: avalue => l_ServiceRequest_rec.incident_date );
6380: itemkey => itemkey,
6381: aname => 'REQUEST_DATE',
6382: avalue => l_ServiceRequest_rec.incident_date );
6383:
6384: WF_ENGINE.SetItemAttrNumber(
6385: itemtype => 'SERVEREQ',
6386: itemkey => itemkey,
6387: aname => 'REQUEST_ID',
6388: avalue => l_ServiceRequest_rec.incident_id );
6387: aname => 'REQUEST_ID',
6388: avalue => l_ServiceRequest_rec.incident_id );
6389:
6390: /***** IF Request_id is given, request_number is derived in Check_Rules_For_Event()
6391: WF_ENGINE.SetItemAttrText(
6392: itemtype => 'SERVEREQ',
6393: itemkey => itemkey,
6394: aname => 'REQUEST_NUMBER',
6395: avalue => l_ServiceRequest_rec.incident_number );
6394: aname => 'REQUEST_NUMBER',
6395: avalue => l_ServiceRequest_rec.incident_number );
6396: *****/
6397:
6398: WF_ENGINE.SetItemAttrText(
6399: itemtype => 'SERVEREQ',
6400: itemkey => itemkey,
6401: aname => 'REQUEST_TYPE',
6402: avalue => l_ServiceRequest_rec.incident_type );
6402: avalue => l_ServiceRequest_rec.incident_type );
6403:
6404:
6405: -- Update service request item attributes
6406: WF_ENGINE.SetItemAttrNumber(
6407: itemtype => 'SERVEREQ',
6408: itemkey => itemkey,
6409: aname => 'OWNER_ID',
6410: avalue => l_ServiceRequest_rec.incident_owner_id );
6408: itemkey => itemkey,
6409: aname => 'OWNER_ID',
6410: avalue => l_ServiceRequest_rec.incident_owner_id );
6411:
6412: WF_ENGINE.SetItemAttrText(
6413: itemtype => 'SERVEREQ',
6414: itemkey => itemkey,
6415: aname => 'OWNER_ROLE',
6416: avalue => l_owner_role );
6414: itemkey => itemkey,
6415: aname => 'OWNER_ROLE',
6416: avalue => l_owner_role );
6417:
6418: WF_ENGINE.SetItemAttrText(
6419: itemtype => 'SERVEREQ',
6420: itemkey => itemkey,
6421: aname => 'OWNER_NAME',
6422: avalue => l_owner_name );
6420: itemkey => itemkey,
6421: aname => 'OWNER_NAME',
6422: avalue => l_owner_name );
6423:
6424: WF_ENGINE.SetItemAttrNumber(
6425: itemtype => 'SERVEREQ',
6426: itemkey => itemkey,
6427: aname => 'CUSTOMER_PRODUCT_ID',
6428: avalue => l_ServiceRequest_rec.customer_product_id );
6426: itemkey => itemkey,
6427: aname => 'CUSTOMER_PRODUCT_ID',
6428: avalue => l_ServiceRequest_rec.customer_product_id );
6429:
6430: WF_ENGINE.SetItemAttrDate(
6431: itemtype => 'SERVEREQ',
6432: itemkey => itemkey,
6433: aname => 'EXPECTED_RESOLUTION_DATE',
6434: avalue => l_ServiceRequest_rec.expected_resolution_date );
6432: itemkey => itemkey,
6433: aname => 'EXPECTED_RESOLUTION_DATE',
6434: avalue => l_ServiceRequest_rec.expected_resolution_date );
6435:
6436: WF_ENGINE.SetItemAttrNumber(
6437: itemtype => 'SERVEREQ',
6438: itemkey => itemkey,
6439: aname => 'INVENTORY_ITEM_ID',
6440: avalue => l_ServiceRequest_rec.inventory_item_id );
6438: itemkey => itemkey,
6439: aname => 'INVENTORY_ITEM_ID',
6440: avalue => l_ServiceRequest_rec.inventory_item_id );
6441:
6442: WF_ENGINE.SetItemAttrText(
6443: itemtype => 'SERVEREQ',
6444: itemkey => itemkey,
6445: aname => 'PROBLEM_DESCRIPTION',
6446: avalue => l_ServiceRequest_rec.problem_code_description );
6445: aname => 'PROBLEM_DESCRIPTION',
6446: avalue => l_ServiceRequest_rec.problem_code_description );
6447:
6448: -- 5245018_start
6449: WF_ENGINE.SetItemAttrText(
6450: itemtype => 'SERVEREQ',
6451: itemkey => itemkey,
6452: aname => 'PROBLEM_CODE',
6453: avalue => l_ServiceRequest_rec.problem_code );
6452: aname => 'PROBLEM_CODE',
6453: avalue => l_ServiceRequest_rec.problem_code );
6454: -- 5245018_eof
6455:
6456: WF_ENGINE.SetItemAttrText(
6457: itemtype => 'SERVEREQ',
6458: itemkey => itemkey,
6459: aname => 'PRODUCT_DESCRIPTION',
6460: avalue => l_ServiceRequest_rec.product_description );
6458: itemkey => itemkey,
6459: aname => 'PRODUCT_DESCRIPTION',
6460: avalue => l_ServiceRequest_rec.product_description );
6461:
6462: WF_ENGINE.SetItemAttrText(
6463: itemtype => 'SERVEREQ',
6464: itemkey => itemkey,
6465: aname => 'REQUEST_CUSTOMER',
6466: avalue => l_ServiceRequest_rec.customer_name );
6464: itemkey => itemkey,
6465: aname => 'REQUEST_CUSTOMER',
6466: avalue => l_ServiceRequest_rec.customer_name );
6467:
6468: WF_ENGINE.SetItemAttrText(
6469: itemtype => 'SERVEREQ',
6470: itemkey => itemkey,
6471: aname => 'REQUEST_SEVERITY',
6472: avalue => l_ServiceRequest_rec.severity );
6470: itemkey => itemkey,
6471: aname => 'REQUEST_SEVERITY',
6472: avalue => l_ServiceRequest_rec.severity );
6473:
6474: WF_ENGINE.SetItemAttrText(
6475: itemtype => 'SERVEREQ',
6476: itemkey => itemkey,
6477: aname => 'REQUEST_STATUS',
6478: avalue => l_ServiceRequest_rec.status_code );
6476: itemkey => itemkey,
6477: aname => 'REQUEST_STATUS',
6478: avalue => l_ServiceRequest_rec.status_code );
6479:
6480: WF_ENGINE.SetItemAttrText(
6481: itemtype => 'SERVEREQ',
6482: itemkey => itemkey,
6483: aname => 'REQUEST_SUMMARY',
6484: avalue => l_ServiceRequest_rec.summary );
6482: itemkey => itemkey,
6483: aname => 'REQUEST_SUMMARY',
6484: avalue => l_ServiceRequest_rec.summary );
6485:
6486: WF_ENGINE.SetItemAttrText(
6487: itemtype => 'SERVEREQ',
6488: itemkey => itemkey,
6489: aname => 'REQUEST_URGENCY',
6490: avalue => l_ServiceRequest_rec.urgency );
6490: avalue => l_ServiceRequest_rec.urgency );
6491:
6492:
6493: -- Get the old incident_owner role if old incident owner is given
6494: l_old_incident_owner_id := WF_ENGINE.GetItemAttrText(
6495: itemtype => itemtype,
6496: itemkey => itemkey,
6497: aname => 'PREV_OWNER_ID');
6498:
6507: p_role_name => l_owner_role,
6508: p_role_display_name => l_owner_name );
6509:
6510: IF (l_owner_role IS NOT NULL) THEN
6511: WF_ENGINE.SetItemAttrText(
6512: itemtype => itemtype,
6513: itemkey => itemkey,
6514: aname => 'PREV_OWNER_ROLE',
6515: avalue => l_owner_role );
6512: itemtype => itemtype,
6513: itemkey => itemkey,
6514: aname => 'PREV_OWNER_ROLE',
6515: avalue => l_owner_role );
6516: WF_ENGINE.SetItemAttrText(
6517: itemtype => itemtype,
6518: itemkey => itemkey,
6519: aname => 'PREV_OWNER_NAME',
6520: avalue => l_owner_name );
6523:
6524: END IF;
6525:
6526:
6527: l_role_name := WF_ENGINE.GetItemAttrText(
6528: itemtype => itemtype,
6529: itemkey => itemkey,
6530: aname => 'SENDER_ROLE' );
6531:
6572: IF l_get_source_id%ISOPEN THEN
6573: CLOSE l_get_source_id;
6574: END IF;
6575:
6576: WF_ENGINE.SetItemAttrText(
6577: itemtype => 'SERVEREQ',
6578: itemkey => itemkey,
6579: aname => 'SENDER_ROLE',
6580: avalue => l_role_name );
7287:
7288:
7289: IF (funmode = 'RUN') THEN
7290:
7291: l_request_id := WF_ENGINE.GetItemAttrText(
7292: itemtype => itemtype,
7293: itemkey => itemkey,
7294: aname => 'REQUEST_ID' );
7295:
7292: itemtype => itemtype,
7293: itemkey => itemkey,
7294: aname => 'REQUEST_ID' );
7295:
7296: l_request_number := WF_ENGINE.GetItemAttrText(
7297: itemtype => itemtype,
7298: itemkey => itemkey,
7299: aname => 'REQUEST_NUMBER' );
7300:
7297: itemtype => itemtype,
7298: itemkey => itemkey,
7299: aname => 'REQUEST_NUMBER' );
7300:
7301: l_sender := WF_ENGINE.GetItemAttrText(
7302: itemtype => itemtype,
7303: itemkey => itemkey,
7304: aname => 'SENDER_ROLE' );
7305:
7302: itemtype => itemtype,
7303: itemkey => itemkey,
7304: aname => 'SENDER_ROLE' );
7305:
7306: l_contact_id_list := WF_ENGINE.GetItemAttrText(
7307: itemtype => itemtype,
7308: itemkey => itemkey,
7309: aname => 'CONTACT_ID_LIST' );
7310:
7307: itemtype => itemtype,
7308: itemkey => itemkey,
7309: aname => 'CONTACT_ID_LIST' );
7310:
7311: l_contact_email_list := WF_ENGINE.GetItemAttrText(
7312: itemtype => itemtype,
7313: itemkey => itemkey,
7314: aname => 'CONTACT_EMAIL_LIST' );
7315:
7312: itemtype => itemtype,
7313: itemkey => itemkey,
7314: aname => 'CONTACT_EMAIL_LIST' );
7315:
7316: l_adhoc_user_list := WF_ENGINE.GetItemAttrText(
7317: itemtype => itemtype,
7318: itemkey => itemkey,
7319: aname => 'ADHOC_USER_LIST');
7320:
7317: itemtype => itemtype,
7318: itemkey => itemkey,
7319: aname => 'ADHOC_USER_LIST');
7320:
7321: l_contact_type_list := WF_ENGINE.GetItemAttrText(
7322: itemtype => itemtype,
7323: itemkey => itemkey,
7324: aname => 'CONTACT_TYPE_LIST');
7325:
7322: itemtype => itemtype,
7323: itemkey => itemkey,
7324: aname => 'CONTACT_TYPE_LIST');
7325:
7326: l_language_list := WF_ENGINE.GetItemAttrText(
7327: itemtype => itemtype,
7328: itemkey => itemkey,
7329: aname => 'LANGUAGE_LIST');
7330:
7327: itemtype => itemtype,
7328: itemkey => itemkey,
7329: aname => 'LANGUAGE_LIST');
7330:
7331: l_notification_pref_list := WF_ENGINE.GetItemAttrText(
7332: itemtype => itemtype,
7333: itemkey => itemkey,
7334: aname => 'NOTIFICATION_PREFERENCE_LIST');
7335:
7332: itemtype => itemtype,
7333: itemkey => itemkey,
7334: aname => 'NOTIFICATION_PREFERENCE_LIST');
7335:
7336: l_message_name := WF_ENGINE.GetItemAttrText(
7337: itemtype => itemtype,
7338: itemkey => itemkey,
7339: aname => 'NTFY_MESSAGE_NAME');
7340:
7396: END IF;
7397:
7398: IF l_message_name = 'CS_SR_IBU_EVT_STATUS_CHANGED' THEN
7399:
7400: l_from_status := WF_ENGINE.GetItemAttrText(
7401: itemtype => itemtype,
7402: itemkey => itemkey,
7403: aname => 'REQUEST_STATUS_OLD');
7404:
7401: itemtype => itemtype,
7402: itemkey => itemkey,
7403: aname => 'REQUEST_STATUS_OLD');
7404:
7405: l_to_status := WF_ENGINE.GetItemAttrText(
7406: itemtype => itemtype,
7407: itemkey => itemkey,
7408: aname => 'REQUEST_STATUS');
7409: END IF;
7431:
7432: pull_from_list(itemlist => l_notification_pref_list,
7433: element => l_notification_pref);
7434:
7435: WF_ENGINE.SetItemAttrText
7436: ( itemtype => itemtype,
7437: itemkey => itemkey,
7438: AName => 'ADHOC_USER_LIST',
7439: AValue => l_adhoc_user_list);
7437: itemkey => itemkey,
7438: AName => 'ADHOC_USER_LIST',
7439: AValue => l_adhoc_user_list);
7440:
7441: WF_ENGINE.SetItemAttrText
7442: ( itemtype => itemtype,
7443: itemkey => itemkey,
7444: AName => 'CONTACT_ID_LIST',
7445: AValue => l_contact_id_list);
7443: itemkey => itemkey,
7444: AName => 'CONTACT_ID_LIST',
7445: AValue => l_contact_id_list);
7446:
7447: WF_ENGINE.SetItemAttrText
7448: ( itemtype => itemtype,
7449: itemkey => itemkey,
7450: AName => 'CONTACT_EMAIL_LIST',
7451: AValue => l_contact_email_list);
7449: itemkey => itemkey,
7450: AName => 'CONTACT_EMAIL_LIST',
7451: AValue => l_contact_email_list);
7452:
7453: WF_ENGINE.SetItemAttrText
7454: ( itemtype => itemtype,
7455: itemkey => itemkey,
7456: AName => 'CONTACT_TYPE_LIST',
7457: AValue => l_contact_type_list);
7455: itemkey => itemkey,
7456: AName => 'CONTACT_TYPE_LIST',
7457: AValue => l_contact_type_list);
7458:
7459: WF_ENGINE.SetItemAttrText
7460: ( itemtype => itemtype,
7461: itemkey => itemkey,
7462: AName => 'NOTIFICATION_PREFERENCE_LIST',
7463: AValue => l_notification_pref_list);
7461: itemkey => itemkey,
7462: AName => 'NOTIFICATION_PREFERENCE_LIST',
7463: AValue => l_notification_pref_list);
7464:
7465: WF_ENGINE.SetItemAttrText
7466: ( itemtype => itemtype,
7467: itemkey => itemkey,
7468: AName => 'LANGUAGE_LIST',
7469: AValue => l_language_list);
7512: END IF;
7513:
7514: -- Set the recipient role for the notification
7515:
7516: WF_ENGINE.SetItemAttrText
7517: ( itemtype => itemtype,
7518: itemkey => itemkey,
7519: aname => 'NTFY_RECIPIENT',
7520: avalue => l_adhoc_user);
7716: END IF;
7717:
7718: IF l_count1 = 2 THEN
7719:
7720: WF_ENGINE.SetItemAttrText(
7721: itemtype => p_itemtype,
7722: itemkey => p_itemkey,
7723: aname => 'STYLESHEET',
7724: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7725:
7726:
7727: ELSIF l_count1 = 3 then
7728:
7729: WF_ENGINE.SetItemAttrText(
7730: itemtype => p_itemtype,
7731: itemkey => p_itemkey,
7732: aname => 'BRANDINGINFO',
7733: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7733: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7734:
7735: ELSIF l_count1 = 4 then
7736:
7737: WF_ENGINE.SetItemAttrText(
7738: itemtype => p_itemtype,
7739: itemkey => p_itemkey,
7740: aname => 'IBU_CONTENT1',
7741: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7741: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7742:
7743: ELSIF l_count1 = 5 then
7744:
7745: WF_ENGINE.SetItemAttrText(
7746: itemtype => p_itemtype,
7747: itemkey => p_itemkey,
7748: aname => 'IBU_CONTENT2',
7749: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7750:
7751:
7752: ELSIF l_count1 = 6 then
7753:
7754: WF_ENGINE.SetItemAttrText(
7755: itemtype => p_itemtype,
7756: itemkey => p_itemkey,
7757: aname => 'IBU_CONTENT3',
7758: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7759:
7760:
7761: ELSIF l_count1 = 7 then
7762:
7763: WF_ENGINE.SetItemAttrText(
7764: itemtype => p_itemtype,
7765: itemkey => p_itemkey,
7766: aname => 'IBU_CONTENT4',
7767: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7768:
7769:
7770: ELSIF l_count1 = 8 then
7771:
7772: WF_ENGINE.SetItemAttrText(
7773: itemtype => p_itemtype,
7774: itemkey => p_itemkey,
7775: aname => 'IBU_CONTENT5',
7776: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7778:
7779:
7780: ELSIF l_count1 = 9 then
7781:
7782: WF_ENGINE.SetItemAttrText(
7783: itemtype => p_itemtype,
7784: itemkey => p_itemkey,
7785: aname => 'IBU_CONTENT6',
7786: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7788:
7789:
7790: ELSIF l_count1 = 10 then
7791:
7792: WF_ENGINE.SetItemAttrText(
7793: itemtype => p_itemtype,
7794: itemkey => p_itemkey,
7795: aname => 'IBU_CONTENT7',
7796: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7798:
7799:
7800: ELSIF l_count1 = 11 then
7801:
7802: WF_ENGINE.SetItemAttrText(
7803: itemtype => p_itemtype,
7804: itemkey => p_itemkey,
7805: aname => 'IBU_CONTENT8',
7806: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7807:
7808:
7809: ELSIF l_count1 = 12 then
7810:
7811: WF_ENGINE.SetItemAttrText(
7812: itemtype => p_itemtype,
7813: itemkey => p_itemkey,
7814: aname => 'IBU_CONTENT9',
7815: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7816:
7817:
7818: ELSIF l_count1 = 13 then
7819:
7820: WF_ENGINE.SetItemAttrText(
7821: itemtype => p_itemtype,
7822: itemkey => p_itemkey,
7823: aname => 'IBU_CONTENT10',
7824: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7825:
7826:
7827: ELSIF l_count1 = 14 then
7828:
7829: WF_ENGINE.SetItemAttrText(
7830: itemtype => p_itemtype,
7831: itemkey => p_itemkey,
7832: aname => 'IBU_CONTENT11',
7833: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7834:
7835:
7836: ELSIF l_count1 = 15 then
7837:
7838: WF_ENGINE.SetItemAttrText(
7839: itemtype => p_itemtype,
7840: itemkey => p_itemkey,
7841: aname => 'IBU_CONTENT12',
7842: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7843:
7844:
7845: ELSIF l_count1 = 16 then
7846:
7847: WF_ENGINE.SetItemAttrText(
7848: itemtype => p_itemtype,
7849: itemkey => p_itemkey,
7850: aname => 'IBU_CONTENT13',
7851: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7852:
7853:
7854: ELSIF l_count1 = 17 then
7855:
7856: WF_ENGINE.SetItemAttrText(
7857: itemtype => p_itemtype,
7858: itemkey => p_itemkey,
7859: aname => 'IBU_CONTENT14',
7860: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7861:
7862:
7863: ELSIF l_count1 = 18 then
7864:
7865: WF_ENGINE.SetItemAttrText(
7866: itemtype => p_itemtype,
7867: itemkey => p_itemkey,
7868: aname => 'IBU_CONTENT15',
7869: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7874: NULL;
7875: ELSIF l_count1 = 20 then
7876:
7877: IF l_count1 IS NOT NULL THEN
7878: WF_ENGINE.SetItemAttrText(
7879: itemtype => p_itemtype,
7880: itemkey => p_itemkey,
7881: aname => 'URL_LINK',
7882: avalue => 'plsql:IBU_SUBS_DOC_PKG.set_msg_body_token/'||l_out_value );
7928: END IF;
7929: END IF;
7930: IF (funmode = 'RUN') THEN
7931:
7932: l_contact_id_list := WF_ENGINE.GetItemAttrText(
7933: itemtype => itemtype,
7934: itemkey => itemkey,
7935: aname => 'CONTACT_ID_LIST' );
7936:
8004: set an attribute to indicate that we need to re-query again to obtain
8005: the remainder of the results which were not put in the initial list.
8006: **********/
8007:
8008: WF_ENGINE.SetItemAttrText
8009: (itemtype => p_itemtype,
8010: itemkey => p_itemkey,
8011: aname => 'MORE_NTFY_ACTION_LIST',
8012: avalue => 'Y' );
8032: set an attribute to indicate that we need to re-query again to obtain
8033: the remainder of the results which were not put in the initial list.
8034: **********/
8035:
8036: WF_ENGINE.SetItemAttrText
8037: (itemtype => p_itemtype,
8038: itemkey => p_itemkey,
8039: aname => 'MORE_NTFY_ACTION_LIST',
8040: avalue => 'Y' );
8067: set an attribute to indicate that we need to re-query again to obtain
8068: the remainder of the results which were not put in the initial list.
8069: **********/
8070:
8071: WF_ENGINE.SetItemAttrText
8072: (itemtype => p_itemtype,
8073: itemkey => p_itemkey,
8074: aname => 'MORE_NTFY_ACTION_LIST',
8075: avalue => 'Y' );
8096: set an attribute to indicate that we need to re-query again to obtain
8097: the remainder of the results which were not put in the initial list.
8098: **********/
8099:
8100: WF_ENGINE.SetItemAttrText
8101: (itemtype => p_itemtype,
8102: itemkey => p_itemkey,
8103: aname => 'MORE_NTFY_ACTION_LIST',
8104: avalue => 'Y' );
8107: END IF; --(sel_action_rec.role_group_type = 'ROLEGROUP') THEN
8108:
8109: END IF;
8110:
8111: WF_ENGINE.SetItemAttrText
8112: (itemtype => p_itemtype,
8113: itemkey => p_itemkey,
8114: aname => 'NOTIFY_PARTY_ROLE_LIST',
8115: avalue => l_notify_party_role_list );
8113: itemkey => p_itemkey,
8114: aname => 'NOTIFY_PARTY_ROLE_LIST',
8115: avalue => l_notify_party_role_list );
8116:
8117: WF_ENGINE.SetItemAttrText
8118: (itemtype => p_itemtype,
8119: itemkey => p_itemkey,
8120: aname => 'NOTIFY_RELSR_PARTY_ROLE_LIST',
8121: avalue => l_notify_party_role_relsr_list );