67: l_n_org_id NUMBER;
68: l_debug_info VARCHAR2(200);
69: l_err_name VARCHAR2(200);
70:
71: l_textNameArr Wf_Engine.NameTabTyp;
72: l_textValArr Wf_Engine.TextTabTyp;
73: l_numNameArr Wf_Engine.NameTabTyp;
74: l_numValArr Wf_Engine.NumTabTyp;
75: l_dateNameArr Wf_Engine.NameTabTyp;
68: l_debug_info VARCHAR2(200);
69: l_err_name VARCHAR2(200);
70:
71: l_textNameArr Wf_Engine.NameTabTyp;
72: l_textValArr Wf_Engine.TextTabTyp;
73: l_numNameArr Wf_Engine.NameTabTyp;
74: l_numValArr Wf_Engine.NumTabTyp;
75: l_dateNameArr Wf_Engine.NameTabTyp;
76: l_dateValArr Wf_Engine.DateTabTyp;
69: l_err_name VARCHAR2(200);
70:
71: l_textNameArr Wf_Engine.NameTabTyp;
72: l_textValArr Wf_Engine.TextTabTyp;
73: l_numNameArr Wf_Engine.NameTabTyp;
74: l_numValArr Wf_Engine.NumTabTyp;
75: l_dateNameArr Wf_Engine.NameTabTyp;
76: l_dateValArr Wf_Engine.DateTabTyp;
77:
70:
71: l_textNameArr Wf_Engine.NameTabTyp;
72: l_textValArr Wf_Engine.TextTabTyp;
73: l_numNameArr Wf_Engine.NameTabTyp;
74: l_numValArr Wf_Engine.NumTabTyp;
75: l_dateNameArr Wf_Engine.NameTabTyp;
76: l_dateValArr Wf_Engine.DateTabTyp;
77:
78: iNum NUMBER :=0;
71: l_textNameArr Wf_Engine.NameTabTyp;
72: l_textValArr Wf_Engine.TextTabTyp;
73: l_numNameArr Wf_Engine.NameTabTyp;
74: l_numValArr Wf_Engine.NumTabTyp;
75: l_dateNameArr Wf_Engine.NameTabTyp;
76: l_dateValArr Wf_Engine.DateTabTyp;
77:
78: iNum NUMBER :=0;
79: iText NUMBER :=0;
72: l_textValArr Wf_Engine.TextTabTyp;
73: l_numNameArr Wf_Engine.NameTabTyp;
74: l_numValArr Wf_Engine.NumTabTyp;
75: l_dateNameArr Wf_Engine.NameTabTyp;
76: l_dateValArr Wf_Engine.DateTabTyp;
77:
78: iNum NUMBER :=0;
79: iText NUMBER :=0;
80: iDate NUMBER :=0;
85: Begin
86:
87: AP_WEB_UTILITIES_PKG.logProcedure('AP_WEB_INACTIVE_EMP_WF_PKG', 'start Start_inactive_emp_process');
88:
89: wf_engine.CreateProcess(ItemType => l_Item_Type,
90: ItemKey => l_Item_Key,
91: process => l_process);
92:
93: exception
109: -- ORG_ID was added later; therefore, it needs to be tested for upgrade purpose, and
110: -- is not included in the bulk update.
111: begin
112:
113: WF_ENGINE.SetItemAttrNumber(l_item_type,
114: l_item_key,
115: 'ORG_ID',
116: l_n_Org_ID);
117: exception
117: exception
118: when others then
119: if (wf_core.error_name = 'WFENG_ITEM_ATTR') then
120: -- ORG_ID item attribute doesn't exist, need to add it
121: WF_ENGINE.AddItemAttr(l_item_type, l_item_key, 'ORG_ID');
122: WF_ENGINE.SetItemAttrNumber(l_item_type,
123: l_item_key,
124: 'ORG_ID',
125: l_n_Org_ID);
118: when others then
119: if (wf_core.error_name = 'WFENG_ITEM_ATTR') then
120: -- ORG_ID item attribute doesn't exist, need to add it
121: WF_ENGINE.AddItemAttr(l_item_type, l_item_key, 'ORG_ID');
122: WF_ENGINE.SetItemAttrNumber(l_item_type,
123: l_item_key,
124: 'ORG_ID',
125: l_n_Org_ID);
126: else
134:
135: --------------------------------------------------------------
136: l_debug_info := 'Set User_ID value ';
137: --------------------------------------------------------------
138: WF_ENGINE.SetItemAttrNumber(l_item_type,
139: l_item_key,
140: 'USER_ID',
141: FND_PROFILE.VALUE('USER_ID'));
142:
142:
143: --------------------------------------------------------------
144: l_debug_info := 'Set Resp_ID value ';
145: --------------------------------------------------------------
146: WF_ENGINE.SetItemAttrNumber(l_item_type,
147: l_item_key,
148: 'RESPONSIBILITY_ID',
149: FND_PROFILE.VALUE('RESP_ID'));
150:
150:
151: --------------------------------------------------------------
152: l_debug_info := 'Set Resp_Appl_ID value ';
153: --------------------------------------------------------------
154: WF_ENGINE.SetItemAttrNumber(l_item_type,
155: l_item_key,
156: 'APPLICATION_ID',
157: FND_PROFILE.VALUE('RESP_APPL_ID'));
158:
399: -----------------------------------------------------
400: -----------------------------------------------------
401: l_debug_info := 'Set all number Attributes';
402: -----------------------------------------------------
403: WF_ENGINE.SetItemAttrNumberArray(l_item_type, l_item_key, l_numNameArr, l_numValArr);
404:
405: -----------------------------------------------------
406: l_debug_info := 'Set all text Attributes';
407: -----------------------------------------------------
404:
405: -----------------------------------------------------
406: l_debug_info := 'Set all text Attributes';
407: -----------------------------------------------------
408: WF_ENGINE.SetItemAttrTextArray(l_item_type, l_item_key, l_textNameArr, l_textValArr);
409:
410: -----------------------------------------------------
411: l_debug_info := 'Set all Date Attributes';
412: -----------------------------------------------------
409:
410: -----------------------------------------------------
411: l_debug_info := 'Set all Date Attributes';
412: -----------------------------------------------------
413: WF_ENGINE.SetItemAttrDateArray(l_item_type, l_item_key, l_dateNameArr, l_dateValArr);
414:
415:
416: exception
417: when others then
422: end if;
423: end;
424:
425: Begin
426: wf_engine.StartProcess(ItemType => l_Item_Type,
427: ItemKey => l_Item_Key);
428: exception
429: when others then
430: Wf_Core.Context('AP_WEB_INACTIVE_EMP_WF_PKG', ' Start_inactive_emp_process ',
599: l_itemtype := substrb(document_id, 1, l_colon - 1);
600: l_itemkey := substrb(document_id, l_colon + 1);
601:
602: l_debugInfo := 'Get org_id';
603: l_orgId := WF_ENGINE.GetItemAttrNumber(l_itemtype, l_itemKey, 'ORG_ID');
604:
605: -- MOAC UPTAKE --
606: -- Should not have to initialize the org context
607: -- This is done via callbackfunction()
629:
630: ------------------------------------------------------
631: l_debugInfo := 'Get WF CC_TRX_BEGIN_DATE Item Attribute';
632: ------------------------------------------------------
633: l_billedStartDate := WF_ENGINE.GetItemAttrDate(l_itemType, l_itemKey, 'CC_TRX_BEGIN_DATE');
634:
635: ------------------------------------------------------
636: l_debugInfo := 'Get WF CC_TRX_END_DATE Item Attribute';
637: ------------------------------------------------------
634:
635: ------------------------------------------------------
636: l_debugInfo := 'Get WF CC_TRX_END_DATE Item Attribute';
637: ------------------------------------------------------
638: l_billedEndDate := WF_ENGINE.GetItemAttrDate(l_itemType, l_itemKey, 'CC_TRX_END_DATE');
639:
640: --------------------------------------------------------------
641: l_debugInfo := 'Get WF CARD_PROG_ID Item Attribute';
642: --------------------------------------------------------------
639:
640: --------------------------------------------------------------
641: l_debugInfo := 'Get WF CARD_PROG_ID Item Attribute';
642: --------------------------------------------------------------
643: l_cardProgramID := WF_ENGINE.GetItemAttrNumber(l_itemType, l_itemKey, 'CARD_PROG_ID');
644:
645: --------------------------------------------------------------
646: l_debugInfo := 'Get WF INACT_EMPLOYEE_ID Item Attribute';
647: --------------------------------------------------------------
644:
645: --------------------------------------------------------------
646: l_debugInfo := 'Get WF INACT_EMPLOYEE_ID Item Attribute';
647: --------------------------------------------------------------
648: l_employeeID := WF_ENGINE.GetItemAttrNumber(l_itemType, l_itemKey, 'INACT_EMPLOYEE_ID');
649:
650: l_dateFormat := icx_sec.getID(icx_sec.PV_DATE_FORMAT);
651:
652: l_debugInfo := 'Loop over all the disputed charges';
672: l_total_billed_amt := l_total_billed_amt + l_billed_amount;
673: l_total_dsp := to_char(l_total_billed_amt, FND_CURRENCY.Get_Format_Mask(l_billed_currency_code,22));
674: l_total_dsp := l_total_dsp || ' ' || l_billed_currency_code;
675:
676: WF_ENGINE.SetItemAttrText(l_itemtype,
677: l_itemkey,
678: 'DISPLAY_TOTAL',
679: l_total_dsp);
680:
773:
774: ------------------------------------------------------------
775: l_debug_info := 'Retrieve INACT_EMPLOYEE_ID Item Attribute';
776: ------------------------------------------------------------
777: l_inact_employee_id := WF_ENGINE.GetItemAttrNumber(p_item_type,
778: p_item_key,
779: 'INACT_EMPLOYEE_ID');
780:
781: -----------------------------------------------------
780:
781: -----------------------------------------------------
782: l_debug_info := 'Get FORWARD_FROM_ID Item Attribute';
783: -----------------------------------------------------
784: l_forward_from_id := WF_ENGINE.GetItemAttrNUMBER(p_item_type,
785: p_item_key,
786: 'FORWARD_FROM_ID');
787:
788: -----------------------------------------------------
787:
788: -----------------------------------------------------
789: l_debug_info := 'Get PREPARER_EMPL_ID Item Attribute';
790: -----------------------------------------------------
791: l_preparer_empl_id := WF_ENGINE.GetItemAttrNUMBER(p_item_type,
792: p_item_key,
793: 'PREPARER_EMPL_ID');
794:
795:
796: -----------------------------------------------------
797: l_debug_info := 'Get FORWARD_FROM_NAME Item Attribute';
798: -----------------------------------------------------
799:
800: l_forward_from_name := WF_ENGINE.GetItemAttrText(p_item_type,
801: p_item_key,
802: 'FORWARD_FROM_NAME');
803: IF l_forward_from_name is null then
804: l_preparer_empl_id := NULL;
844:
845: ---------------------------------------------------------
846: l_debug_info := 'Set Item Attribute Preparer Org ID';
847: ---------------------------------------------------------
848: WF_ENGINE.SetItemAttrNumber(p_item_type,
849: p_item_key,
850: 'PREPARER_ORG_ID',
851: l_preparer_org_id);
852:
852:
853: ---------------------------------------------------------
854: l_debug_info := 'Set Item Attribute Preparer EMPL ID';
855: ---------------------------------------------------------
856: WF_ENGINE.SetItemAttrNumber(p_item_type,
857: p_item_key,
858: 'PREPARER_EMPL_ID',
859: l_PREPARER_EMPL_ID);
860: ----------------------------------------------------------
866: l_preparer_display_name);
867: ----------------------------------------------------------
868: l_debug_info := 'Set Preparer Name Info Item Attributes';
869: ----------------------------------------------------------
870: WF_ENGINE.SetItemAttrText(p_item_type,
871: p_item_key,
872: 'PREPARER_NAME',
873: l_preparer_name);
874:
875: ----------------------------------------------------------
876: l_debug_info := 'Set Preparer Display Name Item Attributes';
877: ----------------------------------------------------------
878:
879: WF_ENGINE.SetItemAttrText(p_item_type,
880: p_item_key,
881: 'PREPARER_DISPLAY_NAME',
882: l_preparer_display_name);
883:
940: ------------------------------------------------------------
941: l_debug_info := 'Retrieve AP_EXCEPTION_ROLE Item Attribute';
942: ------------------------------------------------------------
943:
944: l_set_preparer_to_role := WF_ENGINE.GetItemAttrText(p_item_type, p_item_key, 'AP_EXCEPTION_ROLE');
945:
946: ------------------------------------------------------------------
947: l_debug_info := 'Set Role Name to Preparer Name Item Attributes';
948: ------------------------------------------------------------------
946: ------------------------------------------------------------------
947: l_debug_info := 'Set Role Name to Preparer Name Item Attributes';
948: ------------------------------------------------------------------
949:
950: WF_ENGINE.SetItemAttrText(p_item_type,
951: p_item_key,
952: 'PREPARER_NAME',
953: l_set_preparer_to_role);
954:
961: -------------------------------------------------------------------------
962: l_debug_info := 'Set Role Name to Preparer Display Name Item Attributes';
963: -------------------------------------------------------------------------
964:
965: WF_ENGINE.SetItemAttrText(p_item_type,
966: p_item_key,
967: 'PREPARER_DISPLAY_NAME',
968: l_role_display_name);
969:
972: --------------------------------------------------------------
973:
974: /* Setting the Inactive Employee Org ID to be the Org ID of the Exception role Org ID */
975:
976: l_role_org_id := WF_ENGINE.GetItemAttrNumber(p_item_type,
977: p_item_key,
978: 'INACT_EMPLOYEE_ORG_ID');
979:
980: -------------------------------------------------------------------------
980: -------------------------------------------------------------------------
981: l_debug_info := 'Set PREPARER_ORG_ID Item Attribute';
982: -------------------------------------------------------------------------
983:
984: WF_ENGINE.SetItemAttrNumber(p_item_type,
985: p_item_key,
986: 'PREPARER_ORG_ID',
987: l_role_org_id);
988:
1031: IF (p_funmode = 'RUN') THEN
1032: ----------------------------------------------------------------
1033: l_debug_info := 'Set #FROM_ROLE to Forward From';
1034: ----------------------------------------------------------------
1035: WF_ENGINE.SetItemAttrText(p_item_type,
1036: p_item_key,
1037: '#FROM_ROLE',
1038: WF_ENGINE.GetItemAttrText(p_item_type,
1039: p_item_key,
1034: ----------------------------------------------------------------
1035: WF_ENGINE.SetItemAttrText(p_item_type,
1036: p_item_key,
1037: '#FROM_ROLE',
1038: WF_ENGINE.GetItemAttrText(p_item_type,
1039: p_item_key,
1040: 'FORWARD_FROM_NAME'));
1041: p_result := 'COMPLETE:Y';
1042:
1086:
1087: ------------------------------------------------------------
1088: l_debug_info := 'Retrieve Preparer_Info Item Attributes';
1089: ------------------------------------------------------------
1090: l_PREPARER_EMPL_ID := WF_ENGINE.GetItemAttrNumber(p_item_type,
1091: p_item_key,
1092: 'PREPARER_EMPL_ID');
1093:
1094: l_preparer_name := WF_ENGINE.GetItemAttrText(p_item_type,
1090: l_PREPARER_EMPL_ID := WF_ENGINE.GetItemAttrNumber(p_item_type,
1091: p_item_key,
1092: 'PREPARER_EMPL_ID');
1093:
1094: l_preparer_name := WF_ENGINE.GetItemAttrText(p_item_type,
1095: p_item_key,
1096: 'PREPARER_NAME');
1097:
1098: l_preparer_display_name := WF_ENGINE.GetItemAttrText(p_item_type,
1094: l_preparer_name := WF_ENGINE.GetItemAttrText(p_item_type,
1095: p_item_key,
1096: 'PREPARER_NAME');
1097:
1098: l_preparer_display_name := WF_ENGINE.GetItemAttrText(p_item_type,
1099: p_item_key,
1100: 'PREPARER_DISPLAY_NAME');
1101:
1102: ----------------------------------------------------------------------
1101:
1102: ----------------------------------------------------------------------
1103: l_debug_info := 'Set Forward_From Item Attributes With Approver Info';
1104: ----------------------------------------------------------------------
1105: WF_ENGINE.SetItemAttrNUMBER(p_item_type,
1106: p_item_key,
1107: 'FORWARD_FROM_ID',
1108: l_PREPARER_EMPL_ID);
1109:
1106: p_item_key,
1107: 'FORWARD_FROM_ID',
1108: l_PREPARER_EMPL_ID);
1109:
1110: WF_ENGINE.SetItemAttrText(p_item_type,
1111: p_item_key,
1112: 'FORWARD_FROM_NAME',
1113: l_preparer_name);
1114:
1111: p_item_key,
1112: 'FORWARD_FROM_NAME',
1113: l_preparer_name);
1114:
1115: WF_ENGINE.SetItemAttrText(p_item_type,
1116: p_item_key,
1117: 'FORWARD_FROM_DISPLAY_NAME',
1118: l_preparer_display_name);
1119:
1166:
1167:
1168: if (funcmode = 'RUN') then
1169:
1170: l_preparer_display_name := WF_ENGINE.GetItemAttrText(itemtype,
1171: itemkey,
1172: 'PREPARER_DISPLAY_NAME');
1173:
1174: --------------------------------------------------------------------
1178: fnd_message.set_name('SQLAP','OIE_INACT_PREPARER_NO_RESP');
1179: fnd_message.set_token('PREPARER_NAME', l_preparer_display_name);
1180: l_note_mang_prep_no_resp := fnd_message.get;
1181:
1182: WF_ENGINE.SetItemAttrText(itemtype,
1183: itemkey,
1184: 'NOTE_MANG_PREP_NO_RESPONSE',
1185: l_note_mang_prep_no_resp);
1186:
1247:
1248: ------------------------------------------------------------------
1249: l_debug_info := 'Retrieve PREPARER_EMPL_ID Item Attributes';
1250: ------------------------------------------------------------------
1251: l_preparer_emp_id := WF_ENGINE.GetItemAttrNumber(itemtype,
1252: itemkey,
1253: 'PREPARER_EMPL_ID');
1254:
1255: -------------------------------------------------------------------
1254:
1255: -------------------------------------------------------------------
1256: l_debug_info := 'Retrieve PREPARER_NAME Item Attributes';
1257: -------------------------------------------------------------------
1258: l_preparer_name := WF_ENGINE.GetItemAttrText(itemtype,
1259: itemkey,
1260: 'PREPARER_NAME');
1261:
1262:
1264: l_debug_info := 'Retrieve INACT_EMPLOYEE_ID Item Attributes';
1265: -------------------------------------------------------------------
1266:
1267:
1268: l_inactive_employee_id := WF_ENGINE.GetItemAttrNumber(itemtype,
1269: itemkey,
1270: 'INACT_EMPLOYEE_ID');
1271:
1272:
1377:
1378: ---------------------------------------------------------------
1379: l_debug_info := 'Retrieve Preparer Employee ID Item Attributes';
1380: ---------------------------------------------------------------
1381: l_preparer_emp_id := WF_ENGINE.GetItemAttrNumber(itemtype,
1382: itemkey,
1383: 'PREPARER_EMPL_ID');
1384:
1385: ------------------------------------------------------------------------
1384:
1385: ------------------------------------------------------------------------
1386: l_debug_info := 'Retrieve Preparer Employee Display Name Item Attributes';
1387: --------------------------------------------------------------------------
1388: l_preparer_display_name := WF_ENGINE.GetItemAttrText(itemtype,
1389: itemkey,
1390: 'PREPARER_DISPLAY_NAME');
1391:
1392: --------------------------------------------------------------------
1391:
1392: --------------------------------------------------------------------
1393: l_debug_info := 'Retrieve Preparer Employee Name Item Attributes';
1394: ----------------------------------------------------------------------
1395: l_preparer_name := WF_ENGINE.GetItemAttrText(itemtype,
1396: itemkey,
1397: 'PREPARER_NAME');
1398:
1399:
1400: -------------------------------------------------------------------
1401: l_debug_info := 'Retrieve INACT_EMPLOYEE_ID Item Attributes';
1402: -------------------------------------------------------------------
1403:
1404: l_inact_employee_id := WF_ENGINE.GetItemAttrNumber(itemtype,
1405: itemkey,
1406: 'INACT_EMPLOYEE_ID');
1407:
1408: -----------------------------------------------------------------------
1408: -----------------------------------------------------------------------
1409: l_debug_info := 'Retrieve INACT_EMPLOYEE_DISPLAY_NAME Item Attributes';
1410: -----------------------------------------------------------------------
1411:
1412: l_inact_employee_display_name := WF_ENGINE.GetItemAttrText(itemtype,
1413: itemkey,
1414: 'INACT_EMPLOYEE_DISPLAY_NAME');
1415: begin
1416:
1452: l_error_preparer_name := l_preparer_display_name || ' (' || l_preparer_name || ')';
1453: l_error_inact_empl_name := l_inact_employee_display_name || ' (' ||to_char(l_inact_employee_id)|| ')';
1454:
1455:
1456: WF_ENGINE.SetItemAttrText(itemtype,
1457: itemkey,
1458: 'ERROR_MESSAGE',
1459: l_error);
1460:
1457: itemkey,
1458: 'ERROR_MESSAGE',
1459: l_error);
1460:
1461: WF_ENGINE.SetItemAttrText(itemtype,
1462: itemkey,
1463: 'ERROR_ITEM_KEY',
1464: itemkey);
1465:
1462: itemkey,
1463: 'ERROR_ITEM_KEY',
1464: itemkey);
1465:
1466: WF_ENGINE.SetItemAttrText(itemtype,
1467: itemkey,
1468: 'ERROR_ITEM_TYPE',
1469: itemtype);
1470:
1467: itemkey,
1468: 'ERROR_ITEM_TYPE',
1469: itemtype);
1470:
1471: WF_ENGINE.SetItemAttrText(itemtype,
1472: itemkey,
1473: 'ERROR_ACTIVITY_ID',
1474: actid);
1475:
1472: itemkey,
1473: 'ERROR_ACTIVITY_ID',
1474: actid);
1475:
1476: WF_ENGINE.SetItemAttrText(itemtype,
1477: itemkey,
1478: 'ERROR_INACT_EMPL_NAME',
1479: l_error_inact_empl_name);
1480:
1477: itemkey,
1478: 'ERROR_INACT_EMPL_NAME',
1479: l_error_inact_empl_name);
1480:
1481: WF_ENGINE.SetItemAttrText(itemtype,
1482: itemkey,
1483: 'ERROR_PREPARER_NAME',
1484: l_error_preparer_name);
1485:
1493: -------------------------------------------------------------
1494: l_debug_info := 'Set WF Error Instructions Item Attribute';
1495: -------------------------------------------------------------
1496:
1497: WF_ENGINE.SetItemAttrText(itemtype,
1498: itemkey,
1499: 'ERROR_INSTRUCTIONS',
1500: l_error_instructions);
1501:
1509: -------------------------------------------------------------
1510: l_debug_info := 'Set WF Error Note Item Attribute';
1511: -------------------------------------------------------------
1512:
1513: WF_ENGINE.SetItemAttrText(itemtype,
1514: itemkey,
1515: 'ERROR_NOTE',
1516: l_error_note);
1517:
1596: IF (funcmode = 'RUN') then
1597: ------------------------------------------------------------------
1598: l_debug_info := 'Retrieve Preparer Employee ID Item Attributes';
1599: ------------------------------------------------------------------
1600: l_preparer_emp_id := WF_ENGINE.GetItemAttrNumber(itemtype,
1601: itemkey,
1602: 'PREPARER_EMPL_ID');
1603:
1604: -------------------------------------------------------------------
1603:
1604: -------------------------------------------------------------------
1605: l_debug_info := 'Retrieve Inactive Employee Name Item Attributes';
1606: -------------------------------------------------------------------
1607: l_inact_employee_name := WF_ENGINE.GetItemAttrText(itemtype,
1608: itemkey,
1609: 'INACT_EMP_NAME');
1610:
1611: -------------------------------------------------------------------
1610:
1611: -------------------------------------------------------------------
1612: l_debug_info := 'Retrieve Inactive Employee ID Item Attributes';
1613: -------------------------------------------------------------------
1614: l_preparer_name := WF_ENGINE.GetItemAttrText(itemtype,
1615: itemkey,
1616: 'PREPARER_NAME');
1617:
1618: -------------------------------------------------------------------
1618: -------------------------------------------------------------------
1619: l_debug_info := 'Retrieve Inactive Employee ID Item Attributes';
1620: -------------------------------------------------------------------
1621:
1622: l_inact_employee_id := WF_ENGINE.GetItemAttrNumber(itemtype,
1623: itemkey,
1624: 'INACT_EMPLOYEE_ID');
1625:
1626: -------------------------------------------------
1833: -------------------------------------------------------------------
1834: l_debug_info := 'Retrieve Inactive Employee ID Item Attributes';
1835: -------------------------------------------------------------------
1836:
1837: l_inact_employee_id := WF_ENGINE.GetItemAttrNumber(itemtype,
1838: itemkey,
1839: 'INACT_EMPLOYEE_ID');
1840:
1841: -------------------------------------------------------------------
1841: -------------------------------------------------------------------
1842: l_debug_info := 'Retrieve Credit Card Program ID Item Attributes';
1843: -------------------------------------------------------------------
1844:
1845: l_credit_card_program_id := WF_ENGINE.GetItemAttrNumber(itemtype,
1846: itemkey,
1847: 'CARD_PROG_ID');
1848:
1849: ------------------------------------------------------------
1849: ------------------------------------------------------------
1850: l_debug_info := 'Retreive CC_TRX_BEGIN_DATE Item Attribute';
1851: ------------------------------------------------------------
1852:
1853: l_cc_billed_start_date := WF_ENGINE.GetItemAttrDate(itemtype,
1854: itemkey,
1855: 'CC_TRX_BEGIN_DATE');
1856:
1857: ----------------------------------------------------------
1857: ----------------------------------------------------------
1858: l_debug_info := 'Retreive Credit_END_DATE Item Attribute';
1859: ----------------------------------------------------------
1860:
1861: l_cc_billed_end_date := WF_ENGINE.GetItemAttrDate(itemtype,
1862: itemkey,
1863: 'CC_TRX_END_DATE');
1864:
1865: Begin
1971: -------------------------------------------------------------------
1972: l_debug_info := 'Retrieve Inactive Employee ID Item Attributes';
1973: -------------------------------------------------------------------
1974:
1975: l_inact_employee_id := WF_ENGINE.GetItemAttrNumber(itemtype,
1976: itemkey,
1977: 'INACT_EMPLOYEE_ID');
1978:
1979: -------------------------------------------------------------------
1979: -------------------------------------------------------------------
1980: l_debug_info := 'Retrieve Credit Card Program ID Item Attributes';
1981: -------------------------------------------------------------------
1982:
1983: l_credit_card_program_id := WF_ENGINE.GetItemAttrNumber(itemtype,
1984: itemkey,
1985: 'CARD_PROG_ID');
1986:
1987:
2059: AP_WEB_UTILITIES_PKG.logProcedure('P_WEB_INACTIVE_EMP_WF_PKG', 'start CallbackFunction');
2060:
2061: begin
2062:
2063: l_n_org_id := WF_ENGINE.GetItemAttrNumber(p_s_item_type,
2064: p_s_item_key,
2065: 'ORG_ID');
2066: exception
2067: when others then
2066: exception
2067: when others then
2068: if (wf_core.error_name = 'WFENG_ITEM_ATTR') then
2069: -- ORG_ID item attribute doesn't exist, need to add it
2070: wf_engine.AddItemAttr(p_s_item_type, p_s_item_key, 'ORG_ID');
2071: -- get the org_id from header for old reports
2072: IF (AP_WEB_DB_EXPRPT_PKG.GetOrgIdByReportHeaderId(
2073: to_number(p_s_item_key),
2074: l_n_org_id) <> TRUE ) THEN
2073: to_number(p_s_item_key),
2074: l_n_org_id) <> TRUE ) THEN
2075: l_n_org_id := NULL;
2076: END IF;
2077: WF_ENGINE.SetItemAttrNumber(p_s_item_type,
2078: p_s_item_key,
2079: 'ORG_ID',
2080: l_n_org_id);
2081: else
2088:
2089: IF (p_s_command = 'SET_CTX') THEN
2090:
2091: begin
2092: l_n_user_id := WF_ENGINE.GetItemAttrNumber(p_s_item_type,
2093: p_s_item_key,
2094: 'USER_ID');
2095: l_n_resp_id := WF_ENGINE.GetItemAttrNumber(p_s_item_type,
2096: p_s_item_key,
2091: begin
2092: l_n_user_id := WF_ENGINE.GetItemAttrNumber(p_s_item_type,
2093: p_s_item_key,
2094: 'USER_ID');
2095: l_n_resp_id := WF_ENGINE.GetItemAttrNumber(p_s_item_type,
2096: p_s_item_key,
2097: 'RESPONSIBILITY_ID');
2098: l_n_resp_appl_id := WF_ENGINE.GetItemAttrNumber(p_s_item_type,
2099: p_s_item_key,
2094: 'USER_ID');
2095: l_n_resp_id := WF_ENGINE.GetItemAttrNumber(p_s_item_type,
2096: p_s_item_key,
2097: 'RESPONSIBILITY_ID');
2098: l_n_resp_appl_id := WF_ENGINE.GetItemAttrNumber(p_s_item_type,
2099: p_s_item_key,
2100: 'APPLICATION_ID');
2101: -- Set the context
2102: FND_GLOBAL.APPS_INITIALIZE( USER_ID => l_n_user_id,
2179: if (p_funmode IN ('TRANSFER', 'FORWARD')) then
2180: -----------------------------------------
2181: l_debug_info := 'Get the Notification ID';
2182: -----------------------------------------
2183: l_notificationID := wf_engine.context_nid;
2184:
2185: -----------------------------------------
2186: l_debug_info := 'Get information on the transfer to';
2187: -----------------------------------------
2184:
2185: -----------------------------------------
2186: l_debug_info := 'Get information on the transfer to';
2187: -----------------------------------------
2188: -- wf_engine.context_text = new responder
2189: l_Transferee := wf_engine.context_text;
2190:
2191: -----------------------------------------
2192: l_debug_info := 'check for transferee received through email/web';
2185: -----------------------------------------
2186: l_debug_info := 'Get information on the transfer to';
2187: -----------------------------------------
2188: -- wf_engine.context_text = new responder
2189: l_Transferee := wf_engine.context_text;
2190:
2191: -----------------------------------------
2192: l_debug_info := 'check for transferee received through email/web';
2193: -----------------------------------------
2203: -----------------------------------------
2204: OPEN c_person_id;
2205: FETCH c_person_id into l_TransferToID;
2206: IF c_person_id%NOTFOUND THEN
2207: p_result := wf_engine.eng_completed||':'||wf_engine.eng_null;
2208: Wf_Core.Raise(wf_core.translate('NO_ROLE_FOUND'));
2209: RETURN;
2210: ELSE
2211: IF l_TransferToID IS NULL THEN
2208: Wf_Core.Raise(wf_core.translate('NO_ROLE_FOUND'));
2209: RETURN;
2210: ELSE
2211: IF l_TransferToID IS NULL THEN
2212: p_result := wf_engine.eng_completed||':'||wf_engine.eng_null;
2213: Wf_Core.Raise(wf_core.translate('PERSON_ID_NULL'));
2214: RETURN;
2215: END IF;
2216: END IF;
2218:
2219: ---------------------------------------------------------------------
2220: l_debug_info := 'set the transferring Preparer info to the Preparer';
2221: ---------------------------------------------------------------------
2222: WF_ENGINE.SetItemAttrText(p_item_type,
2223: p_item_key,
2224: 'PREPARER_DISPLAY_NAME',
2225: WF_ENGINE.GetItemAttrText(p_item_type,
2226: p_item_key,
2221: ---------------------------------------------------------------------
2222: WF_ENGINE.SetItemAttrText(p_item_type,
2223: p_item_key,
2224: 'PREPARER_DISPLAY_NAME',
2225: WF_ENGINE.GetItemAttrText(p_item_type,
2226: p_item_key,
2227: 'PREPARER_DISPLAY_NAME'));
2228:
2229: ---------------------------------------------------------------------------
2228:
2229: ---------------------------------------------------------------------------
2230: l_debug_info := 'set the transferring Preparer Name to the Forwarded Info';
2231: ---------------------------------------------------------------------------
2232: WF_ENGINE.SetItemAttrText(p_item_type,
2233: p_item_key,
2234: 'FORWARD_FROM_NAME',
2235: WF_ENGINE.GetItemAttrText(p_item_type,
2236: p_item_key,
2231: ---------------------------------------------------------------------------
2232: WF_ENGINE.SetItemAttrText(p_item_type,
2233: p_item_key,
2234: 'FORWARD_FROM_NAME',
2235: WF_ENGINE.GetItemAttrText(p_item_type,
2236: p_item_key,
2237: 'PREPARER_NAME'));
2238: -----------------------------------------------------------------------------------
2239: l_debug_info := 'set the transferring Preparer Display Name to the Forwarded Info';
2238: -----------------------------------------------------------------------------------
2239: l_debug_info := 'set the transferring Preparer Display Name to the Forwarded Info';
2240: -----------------------------------------------------------------------------------
2241:
2242: WF_ENGINE.SetItemAttrText(p_item_type,
2243: p_item_key,
2244: 'FORWARD_FROM_DISPLAY_NAME',
2245: WF_ENGINE.GetItemAttrText(p_item_type,
2246: p_item_key,
2241:
2242: WF_ENGINE.SetItemAttrText(p_item_type,
2243: p_item_key,
2244: 'FORWARD_FROM_DISPLAY_NAME',
2245: WF_ENGINE.GetItemAttrText(p_item_type,
2246: p_item_key,
2247: 'PREPARER_DISPLAY_NAME'));
2248:
2249: ----------------------------------------------------------------------
2258: l_debug_info := 'set the current Preparer info in the Notification';
2259: -----------------------------------------
2260: WF_NOTIFICATION.SetAttrText(l_notificationID,
2261: 'PREPARER_DISPLAY_NAME',
2262: WF_ENGINE.GetItemAttrText(p_item_type,
2263: p_item_key,
2264: 'PREPARER_DISPLAY_NAME'));
2265:
2266: end if;
2314: l_preparer_display_name);
2315:
2316: IF (p_preparer_target = 'PREPARER') THEN
2317:
2318: WF_ENGINE.SetItemAttrNumber(p_item_type,
2319: p_item_key,
2320: 'PREPARER_EMPL_ID',
2321: p_preparer_id);
2322:
2322:
2323: --------------------------------------------------------
2324: l_debug_info := 'Set Preparer_Name Info Item Attribute';
2325: --------------------------------------------------------
2326: WF_ENGINE.SetItemAttrText(p_item_type,
2327: p_item_key,
2328: 'PREPARER_NAME',
2329: l_preparer_name);
2330:
2330:
2331: ---------------------------------------------------------------
2332: l_debug_info := 'Set Preparer_Display_Name Info Item Attribute';
2333: ---------------------------------------------------------------
2334: WF_ENGINE.SetItemAttrText(p_item_type,
2335: p_item_key,
2336: 'PREPARER_DISPLAY_NAME',
2337: l_preparer_display_name);
2338:
2343:
2344: --------------------------------------------------------
2345: l_debug_info := 'Set Preperer Org Info Item Attribute';
2346: --------------------------------------------------------
2347: WF_ENGINE.SetItemAttrNumber(p_item_type,
2348: p_item_key,
2349: 'PREPARER_ORG_ID',
2350: l_preparer_org_id);
2351: end if;
2354:
2355: --------------------------------------------------------
2356: l_debug_info := 'Set Supervisor_ID Info Item Attribute';
2357: --------------------------------------------------------
2358: WF_ENGINE.SetItemAttrNumber(p_item_type,
2359: p_item_key,
2360: 'PREPARER_EMPL_ID',
2361: p_preparer_id);
2362:
2362:
2363: --------------------------------------------------------
2364: l_debug_info := 'Set Approver_Name Info Item Attribute';
2365: --------------------------------------------------------
2366: WF_ENGINE.SetItemAttrText(p_item_type,
2367: p_item_key,
2368: 'PREPARER_NAME',
2369: l_preparer_name);
2370:
2370:
2371: ----------------------------------------------------------------
2372: l_debug_info := 'Set Approver_Display_Name Info Item Attribute';
2373: ----------------------------------------------------------------
2374: WF_ENGINE.SetItemAttrText(p_item_type,
2375: p_item_key,
2376: 'PREPARER_DISPLAY_NAME',
2377: l_preparer_display_name);
2378:
2446: -------------------------------------------------------------------
2447: l_debug_info := 'Retrieve Inactive Employee ID Item Attributes';
2448: -------------------------------------------------------------------
2449:
2450: l_inact_employee_id := WF_ENGINE.GetItemAttrNumber(itemtype,
2451: itemkey,
2452: 'INACT_EMPLOYEE_ID');
2453:
2454: -------------------------------------------------------------------
2454: -------------------------------------------------------------------
2455: l_debug_info := 'Retrieve Credit Card Program ID Item Attributes';
2456: -------------------------------------------------------------------
2457:
2458: l_credit_card_program_id := WF_ENGINE.GetItemAttrNumber(itemtype,
2459: itemkey,
2460: 'CARD_PROG_ID');
2461:
2462:
2601: -------------------------------------------------------------------
2602: l_debug_info := 'Retrieve Inactive Employee ID Item Attributes';
2603: -------------------------------------------------------------------
2604:
2605: l_inact_employee_id := WF_ENGINE.GetItemAttrNumber(itemtype,
2606: itemkey,
2607: 'INACT_EMPLOYEE_ID');
2608:
2609: -------------------------------------------------------------------
2609: -------------------------------------------------------------------
2610: l_debug_info := 'Retrieve Credit Card Program ID Item Attributes';
2611: -------------------------------------------------------------------
2612:
2613: l_credit_card_program_id := WF_ENGINE.GetItemAttrNumber(itemtype,
2614: itemkey,
2615: 'CARD_PROG_ID');
2616:
2617: