424: --
425: BEGIN
426: -- Return if WF Not Running
427:
428: IF (funcmode <> wf_engine.eng_run) THEN
429: resultout := wf_engine.eng_null;
430: RETURN;
431: END IF;
432:
425: BEGIN
426: -- Return if WF Not Running
427:
428: IF (funcmode <> wf_engine.eng_run) THEN
429: resultout := wf_engine.eng_null;
430: RETURN;
431: END IF;
432:
433:
433:
434: -- GET BUDGET ITEM ATTRIBUTES for Subsequent Processing -----------------------
435:
436:
437: l_project_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
438: itemkey => itemkey,
439: aname => 'PROJECT_ID' );
440:
441: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
437: l_project_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
438: itemkey => itemkey,
439: aname => 'PROJECT_ID' );
440:
441: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
442: itemkey => itemkey,
443: aname => 'AWARD_ID' );
444:
445: l_budget_type_code := wf_engine.GetItemAttrText(itemtype => itemtype,
441: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
442: itemkey => itemkey,
443: aname => 'AWARD_ID' );
444:
445: l_budget_type_code := wf_engine.GetItemAttrText(itemtype => itemtype,
446: itemkey => itemkey,
447: aname => 'BUDGET_TYPE_CODE' );
448:
449: -- SET GLOBALS ------------------------------------------------------------------
484: AND budget_type_code = l_budget_type_code
485: AND budget_status_code = 'S';
486:
487:
488: resultout := wf_engine.eng_completed;
489:
490:
491: EXCEPTION
492:
578: BEGIN
579: --
580: -- Return if WF Not Running
581: --
582: IF (funcmode <> wf_engine.eng_run) THEN
583: --
584: resultout := wf_engine.eng_null;
585: RETURN;
586: --
580: -- Return if WF Not Running
581: --
582: IF (funcmode <> wf_engine.eng_run) THEN
583: --
584: resultout := wf_engine.eng_null;
585: RETURN;
586: --
587: END IF;
588: --
588: --
589:
590: -- GET BUDGET ITEM ATTRIBUTES for Subsequent Processing -----------------------
591:
592: l_project_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
593: itemkey => itemkey,
594: aname => 'PROJECT_ID' );
595:
596: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
592: l_project_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
593: itemkey => itemkey,
594: aname => 'PROJECT_ID' );
595:
596: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
597: itemkey => itemkey,
598: aname => 'AWARD_ID' );
599:
600: l_workflow_started_by_id := wf_engine.GetItemAttrNumber(itemtype => itemtype,
596: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
597: itemkey => itemkey,
598: aname => 'AWARD_ID' );
599:
600: l_workflow_started_by_id := wf_engine.GetItemAttrNumber(itemtype => itemtype,
601: itemkey => itemkey,
602: aname => 'WORKFLOW_STARTED_BY_ID' );
603:
604: l_budget_type_code := wf_engine.GetItemAttrText(itemtype => itemtype,
600: l_workflow_started_by_id := wf_engine.GetItemAttrNumber(itemtype => itemtype,
601: itemkey => itemkey,
602: aname => 'WORKFLOW_STARTED_BY_ID' );
603:
604: l_budget_type_code := wf_engine.GetItemAttrText(itemtype => itemtype,
605: itemkey => itemkey,
606: aname => 'BUDGET_TYPE_CODE' );
607:
608: -- SET GLOBALS ------------------------------------------------------------------
654:
655: IF (l_baseliner_user_csr%FOUND) THEN
656: CLOSE l_baseliner_user_csr;
657:
658: wf_engine.SetItemAttrNumber
659: (itemtype => itemtype,
660: itemkey => itemkey,
661: aname => 'BUDGET_BASELINER_ID',
662: avalue => l_baseliner_user_id );
660: itemkey => itemkey,
661: aname => 'BUDGET_BASELINER_ID',
662: avalue => l_baseliner_user_id );
663:
664: wf_engine.SetItemAttrText
665: (itemtype => itemtype,
666: itemkey => itemkey,
667: aname => 'BUDGET_BASELINER_NAME',
668: avalue => l_baseliner_user_name);
666: itemkey => itemkey,
667: aname => 'BUDGET_BASELINER_NAME',
668: avalue => l_baseliner_user_name);
669:
670: wf_engine.SetItemAttrText
671: (itemtype => itemtype,
672: itemkey => itemkey,
673: aname => 'BUDGET_BASELINER_FULL_NAME',
674: avalue => l_baseliner_full_name);
672: itemkey => itemkey,
673: aname => 'BUDGET_BASELINER_FULL_NAME',
674: avalue => l_baseliner_full_name);
675:
676: resultout := wf_engine.eng_completed||':'||'T';
677: ELSE
678:
679: CLOSE l_baseliner_user_csr;
680: resultout := wf_engine.eng_completed||':'||'F';
676: resultout := wf_engine.eng_completed||':'||'T';
677: ELSE
678:
679: CLOSE l_baseliner_user_csr;
680: resultout := wf_engine.eng_completed||':'||'F';
681: END IF;
682: ELSE
683:
684: resultout := wf_engine.eng_completed||':'||'F';
680: resultout := wf_engine.eng_completed||':'||'F';
681: END IF;
682: ELSE
683:
684: resultout := wf_engine.eng_completed||':'||'F';
685: END IF;
686:
687:
688: EXCEPTION
782: BEGIN
783: --
784: -- Return if WF Not Running
785: --
786: IF (funcmode <> wf_engine.eng_run) THEN
787: --
788: resultout := wf_engine.eng_null;
789: RETURN;
790: --
784: -- Return if WF Not Running
785: --
786: IF (funcmode <> wf_engine.eng_run) THEN
787: --
788: resultout := wf_engine.eng_null;
789: RETURN;
790: --
791: END IF;
792: --
792: --
793:
794: -- GET BUDGET ITEM ATTRIBUTES for Subsequent Processing -----------------------
795:
796: l_project_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
797: itemkey => itemkey,
798: aname => 'PROJECT_ID' );
799:
800: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
796: l_project_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
797: itemkey => itemkey,
798: aname => 'PROJECT_ID' );
799:
800: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
801: itemkey => itemkey,
802: aname => 'AWARD_ID' );
803:
804: l_workflow_started_by_id := wf_engine.GetItemAttrNumber(itemtype => itemtype,
800: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
801: itemkey => itemkey,
802: aname => 'AWARD_ID' );
803:
804: l_workflow_started_by_id := wf_engine.GetItemAttrNumber(itemtype => itemtype,
805: itemkey => itemkey,
806: aname => 'WORKFLOW_STARTED_BY_ID' );
807:
808: l_budget_type_code := wf_engine.GetItemAttrText(itemtype => itemtype,
804: l_workflow_started_by_id := wf_engine.GetItemAttrNumber(itemtype => itemtype,
805: itemkey => itemkey,
806: aname => 'WORKFLOW_STARTED_BY_ID' );
807:
808: l_budget_type_code := wf_engine.GetItemAttrText(itemtype => itemtype,
809: itemkey => itemkey,
810: aname => 'BUDGET_TYPE_CODE' );
811:
812: l_mark_as_original := wf_engine.GetItemAttrText(itemtype => itemtype,
808: l_budget_type_code := wf_engine.GetItemAttrText(itemtype => itemtype,
809: itemkey => itemkey,
810: aname => 'BUDGET_TYPE_CODE' );
811:
812: l_mark_as_original := wf_engine.GetItemAttrText(itemtype => itemtype,
813: itemkey => itemkey,
814: aname => 'MARK_AS_ORIGINAL' );
815:
816: l_resource_list_id := wf_engine.GetItemAttrText(itemtype => itemtype,
812: l_mark_as_original := wf_engine.GetItemAttrText(itemtype => itemtype,
813: itemkey => itemkey,
814: aname => 'MARK_AS_ORIGINAL' );
815:
816: l_resource_list_id := wf_engine.GetItemAttrText(itemtype => itemtype,
817: itemkey => itemkey,
818: aname =>'RESOURCE_LIST_ID');
819:
820: l_project_type_class_code := wf_engine.GetItemAttrText(itemtype => itemtype,
816: l_resource_list_id := wf_engine.GetItemAttrText(itemtype => itemtype,
817: itemkey => itemkey,
818: aname =>'RESOURCE_LIST_ID');
819:
820: l_project_type_class_code := wf_engine.GetItemAttrText(itemtype => itemtype,
821: itemkey => itemkey,
822: aname =>'PROJECT_TYPE_CLASS_CODE');
823:
824: -- SET GLOBALS -----------------------------------------------------------------
856: (p_item_type => itemtype
857: , p_item_key => itemkey
858: );
859:
860: resultout := wf_engine.eng_completed||':'||'F';
861: CLOSE l_budget_rules_csr;
862: RETURN;
863: END IF;
864:
986:
987:
988: IF (l_warnings_only = 'Y')
989: THEN
990: resultout := wf_engine.eng_completed||':'||'T';
991: ELSE
992: resultout := wf_engine.eng_completed||':'||'F';
993: END IF;
994:
988: IF (l_warnings_only = 'Y')
989: THEN
990: resultout := wf_engine.eng_completed||':'||'T';
991: ELSE
992: resultout := wf_engine.eng_completed||':'||'F';
993: END IF;
994:
995: --
996:
1111:
1112: --
1113: -- Return if WF Not Running
1114: --
1115: IF (funcmode <> wf_engine.eng_run) THEN
1116: --
1117: resultout := wf_engine.eng_null;
1118: RETURN;
1119: --
1113: -- Return if WF Not Running
1114: --
1115: IF (funcmode <> wf_engine.eng_run) THEN
1116: --
1117: resultout := wf_engine.eng_null;
1118: RETURN;
1119: --
1120: END IF;
1121: --
1122:
1123:
1124: -- GET BUDGET ITEM ATTRIBUTES for Subsequent Processing -----------------------
1125:
1126: l_project_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1127: itemkey => itemkey,
1128: aname => 'PROJECT_ID' );
1129:
1130: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1126: l_project_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1127: itemkey => itemkey,
1128: aname => 'PROJECT_ID' );
1129:
1130: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1131: itemkey => itemkey,
1132: aname => 'AWARD_ID' );
1133:
1134: l_budget_type_code := wf_engine.GetItemAttrText(itemtype => itemtype,
1130: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1131: itemkey => itemkey,
1132: aname => 'AWARD_ID' );
1133:
1134: l_budget_type_code := wf_engine.GetItemAttrText(itemtype => itemtype,
1135: itemkey => itemkey,
1136: aname => 'BUDGET_TYPE_CODE' );
1137:
1138: l_workflow_started_by_id := wf_engine.GetItemAttrNumber(itemtype => itemtype,
1134: l_budget_type_code := wf_engine.GetItemAttrText(itemtype => itemtype,
1135: itemkey => itemkey,
1136: aname => 'BUDGET_TYPE_CODE' );
1137:
1138: l_workflow_started_by_id := wf_engine.GetItemAttrNumber(itemtype => itemtype,
1139: itemkey => itemkey,
1140: aname => 'WORKFLOW_STARTED_BY_ID' );
1141:
1142:
1139: itemkey => itemkey,
1140: aname => 'WORKFLOW_STARTED_BY_ID' );
1141:
1142:
1143: l_baseliner_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1144: itemkey => itemkey,
1145: aname => 'BUDGET_BASELINER_ID' );
1146:
1147: l_mark_as_original := wf_engine.GetItemAttrText(itemtype => itemtype,
1143: l_baseliner_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1144: itemkey => itemkey,
1145: aname => 'BUDGET_BASELINER_ID' );
1146:
1147: l_mark_as_original := wf_engine.GetItemAttrText(itemtype => itemtype,
1148: itemkey => itemkey,
1149: aname => 'MARK_AS_ORIGINAL' );
1150:
1151: l_resource_list_id := wf_engine.GetItemAttrText(itemtype => itemtype,
1147: l_mark_as_original := wf_engine.GetItemAttrText(itemtype => itemtype,
1148: itemkey => itemkey,
1149: aname => 'MARK_AS_ORIGINAL' );
1150:
1151: l_resource_list_id := wf_engine.GetItemAttrText(itemtype => itemtype,
1152: itemkey => itemkey,
1153: aname =>'RESOURCE_LIST_ID');
1154:
1155: l_project_type_class_code := wf_engine.GetItemAttrText(itemtype => itemtype,
1151: l_resource_list_id := wf_engine.GetItemAttrText(itemtype => itemtype,
1152: itemkey => itemkey,
1153: aname =>'RESOURCE_LIST_ID');
1154:
1155: l_project_type_class_code := wf_engine.GetItemAttrText(itemtype => itemtype,
1156: itemkey => itemkey,
1157: aname =>'PROJECT_TYPE_CLASS_CODE');
1158:
1159: -- SET GLOBALS -----------------------------------------------------------------
1195: GMS_WORKFLOW_UTILS.Set_Notification_Messages
1196: (p_item_type => itemtype
1197: , p_item_key => itemkey
1198: );
1199: resultout := wf_engine.eng_completed||':'||'F';
1200: CLOSE l_budget_versions_csr;
1201: RETURN ;
1202: END IF;
1203:
1331:
1332:
1333: IF (l_warnings_only = 'Y')
1334: THEN
1335: resultout := wf_engine.eng_completed||':'||'T';
1336: ELSE
1337: resultout := wf_engine.eng_completed||':'||'F';
1338: END IF;
1339:
1333: IF (l_warnings_only = 'Y')
1334: THEN
1335: resultout := wf_engine.eng_completed||':'||'T';
1336: ELSE
1337: resultout := wf_engine.eng_completed||':'||'F';
1338: END IF;
1339:
1340: EXCEPTION
1341:
1381: is
1382: x_gms_wf_process varchar2(25);
1383: begin
1384:
1385: if (funcmode <> wf_engine.eng_run) then
1386:
1387: resultout := wf_engine.eng_null;
1388: return;
1389:
1383: begin
1384:
1385: if (funcmode <> wf_engine.eng_run) then
1386:
1387: resultout := wf_engine.eng_null;
1388: return;
1389:
1390: end if;
1391:
1388: return;
1389:
1390: end if;
1391:
1392: x_gms_wf_process := wf_engine.GetItemAttrText
1393: ( itemtype => itemtype,
1394: itemkey => itemkey,
1395: aname => 'GMS_WF_PROCESS');
1396: if x_gms_wf_process = 'BUDGET' then
1508:
1509: BEGIN
1510: -- Return if WF Not Running
1511:
1512: IF (funcmode <> wf_engine.eng_run) THEN
1513: resultout := wf_engine.eng_null;
1514: RETURN;
1515: END IF;
1516:
1509: BEGIN
1510: -- Return if WF Not Running
1511:
1512: IF (funcmode <> wf_engine.eng_run) THEN
1513: resultout := wf_engine.eng_null;
1514: RETURN;
1515: END IF;
1516:
1517: -- GET BUDGET ITEM ATTRIBUTES for Subsequent Processing -----------------------
1515: END IF;
1516:
1517: -- GET BUDGET ITEM ATTRIBUTES for Subsequent Processing -----------------------
1518:
1519: l_project_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1520: itemkey => itemkey,
1521: aname => 'PROJECT_ID' );
1522:
1523: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1519: l_project_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1520: itemkey => itemkey,
1521: aname => 'PROJECT_ID' );
1522:
1523: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1524: itemkey => itemkey,
1525: aname => 'AWARD_ID' );
1526:
1527: l_budget_type_code := wf_engine.GetItemAttrText( itemtype => itemtype,
1523: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1524: itemkey => itemkey,
1525: aname => 'AWARD_ID' );
1526:
1527: l_budget_type_code := wf_engine.GetItemAttrText( itemtype => itemtype,
1528: itemkey => itemkey,
1529: aname => 'BUDGET_TYPE_CODE' );
1530:
1531: l_mode := wf_engine.GetItemAttrText( itemtype => itemtype,
1527: l_budget_type_code := wf_engine.GetItemAttrText( itemtype => itemtype,
1528: itemkey => itemkey,
1529: aname => 'BUDGET_TYPE_CODE' );
1530:
1531: l_mode := wf_engine.GetItemAttrText( itemtype => itemtype,
1532: itemkey => itemkey,
1533: aname => 'FC_MODE' );
1534:
1535:
1895: and budget_type_code = l_budget_type_code
1896: and budget_status_code = 'W';
1897:
1898:
1899: wf_engine.SetItemAttrText(itemtype => itemtype,
1900: itemkey => itemkey,
1901: aname => 'FC_MODE',
1902: avalue => 'B');
1903:
1966: l_return_status VARCHAR2(1);
1967:
1968: begin
1969:
1970: IF (funcmode <> wf_engine.eng_run)
1971: THEN
1972: resultout := wf_engine.eng_null;
1973: RETURN;
1974: END IF;
1968: begin
1969:
1970: IF (funcmode <> wf_engine.eng_run)
1971: THEN
1972: resultout := wf_engine.eng_null;
1973: RETURN;
1974: END IF;
1975: --
1976:
1975: --
1976:
1977: -- GET BUDGET ITEM ATTRIBUTES for Subsequent Processing -----------------------
1978:
1979: l_project_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1980: itemkey => itemkey,
1981: aname => 'PROJECT_ID' );
1982:
1983: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1979: l_project_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1980: itemkey => itemkey,
1981: aname => 'PROJECT_ID' );
1982:
1983: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1984: itemkey => itemkey,
1985: aname => 'AWARD_ID' );
1986:
1987: l_budget_type_code := wf_engine.GetItemAttrText( itemtype => itemtype,
1983: l_award_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1984: itemkey => itemkey,
1985: aname => 'AWARD_ID' );
1986:
1987: l_budget_type_code := wf_engine.GetItemAttrText( itemtype => itemtype,
1988: itemkey => itemkey,
1989: aname => 'BUDGET_TYPE_CODE' );
1990:
1991:
2027:
2028: -- Since a baselined budget doesn't exist Funds checking for Submit process
2029: -- should be bypassed and so the FC_MODE is being set to 'B'.
2030:
2031: wf_engine.SetItemAttrText(itemtype => itemtype,
2032: itemkey => itemkey,
2033: aname => 'FC_MODE',
2034: avalue => 'B');
2035:
2104: END IF;
2105:
2106: close l_starter_full_name_csr;
2107:
2108: wf_engine.CreateProcess( ItemType => ItemType,
2109: ItemKey => ItemKey,
2110: process => 'GMS_WF_PROCESS' );
2111:
2112: -- Attribute GMS_WF_PROCESS is used to select the appropriate branch
2112: -- Attribute GMS_WF_PROCESS is used to select the appropriate branch
2113: -- in the workflow process.
2114:
2115:
2116: wf_engine.SetItemAttrText ( itemtype => itemtype,
2117: itemkey => itemkey,
2118: aname => 'GMS_WF_PROCESS',
2119: avalue => 'REPORT');
2120:
2117: itemkey => itemkey,
2118: aname => 'GMS_WF_PROCESS',
2119: avalue => 'REPORT');
2120:
2121: wf_engine.SetItemAttrText ( itemtype => itemtype,
2122: itemkey => itemkey,
2123: aname => 'AWARD_NUMBER',
2124: avalue => x_award_number);
2125:
2122: itemkey => itemkey,
2123: aname => 'AWARD_NUMBER',
2124: avalue => x_award_number);
2125:
2126: wf_engine.SetItemAttrText ( itemtype => itemtype,
2127: itemkey => itemkey,
2128: aname => 'AWARD_SHORT_NAME',
2129: avalue => x_award_short_name);
2130: -- Added below call to pass Installment Number attribute Bug 2286855
2127: itemkey => itemkey,
2128: aname => 'AWARD_SHORT_NAME',
2129: avalue => x_award_short_name);
2130: -- Added below call to pass Installment Number attribute Bug 2286855
2131: wf_engine.SetItemAttrText ( itemtype => itemtype,
2132: itemkey => itemkey,
2133: aname => 'INSTALL_NUM',
2134: avalue => x_installment_number);
2135:
2132: itemkey => itemkey,
2133: aname => 'INSTALL_NUM',
2134: avalue => x_installment_number);
2135:
2136: wf_engine.SetItemAttrText ( itemtype => itemtype,
2137: itemkey => itemkey,
2138: aname => 'REPORT_NAME',
2139: avalue => x_report_name);
2140:
2137: itemkey => itemkey,
2138: aname => 'REPORT_NAME',
2139: avalue => x_report_name);
2140:
2141: wf_engine.SetItemAttrDate ( itemtype => itemtype,
2142: itemkey => itemkey,
2143: aname => 'REPORT_DUE_DATE',
2144: avalue => x_report_due_date);
2145:
2142: itemkey => itemkey,
2143: aname => 'REPORT_DUE_DATE',
2144: avalue => x_report_due_date);
2145:
2146: wf_engine.SetItemAttrText ( itemtype => itemtype,
2147: itemkey => itemkey,
2148: aname => 'FUNDING_SOURCE_NAME',
2149: avalue => x_funding_source_name);
2150:
2147: itemkey => itemkey,
2148: aname => 'FUNDING_SOURCE_NAME',
2149: avalue => x_funding_source_name);
2150:
2151: wf_engine.SetItemAttrNumber ( itemtype => itemtype,
2152: itemkey => itemkey,
2153: aname => 'WORKFLOW_STARTED_BY_ID',
2154: avalue => x_workflow_started_by_id);
2155:
2152: itemkey => itemkey,
2153: aname => 'WORKFLOW_STARTED_BY_ID',
2154: avalue => x_workflow_started_by_id);
2155:
2156: wf_engine.SetItemAttrText ( itemtype => itemtype,
2157: itemkey => itemkey,
2158: aname => 'WORKFLOW_STARTED_BY_NAME',
2159: avalue => x_user_name);
2160:
2157: itemkey => itemkey,
2158: aname => 'WORKFLOW_STARTED_BY_NAME',
2159: avalue => x_user_name);
2160:
2161: wf_engine.SetItemAttrText ( itemtype => itemtype,
2162: itemkey => itemkey,
2163: aname => 'NOTIF_RECIPIENT_ROLE',
2164: avalue => x_role);
2165:
2162: itemkey => itemkey,
2163: aname => 'NOTIF_RECIPIENT_ROLE',
2164: avalue => x_role);
2165:
2166: wf_engine.SetItemAttrText ( itemtype => itemtype,
2167: itemkey => itemkey,
2168: aname => 'WORKFLOW_STARTED_BY_FULL_NAME',
2169: avalue => x_full_name);
2170:
2167: itemkey => itemkey,
2168: aname => 'WORKFLOW_STARTED_BY_FULL_NAME',
2169: avalue => x_full_name);
2170:
2171: wf_engine.SetItemAttrDate ( itemtype => itemtype,
2172: itemkey => itemkey,
2173: aname => 'WF_STARTED_DATE',
2174: avalue => x_wf_started_date
2175: );
2174: avalue => x_wf_started_date
2175: );
2176:
2177:
2178: wf_engine.StartProcess( itemtype => itemtype,
2179: itemkey => itemkey );
2180:
2181:
2182: -- p_item_type := itemtype;
2532: -- process (Workflow Background Process) on regular intervals.
2533: -- The threshold is set back to the original threshold after calling
2534: -- the start_installment_wf procedure.
2535:
2536: -- l_wf_threshold_orig := wf_engine.threshold;
2537: -- wf_engine.threshold := -1;
2538:
2539: gms_wf_pkg.start_installment_wf( x_award_id => x_award_id
2540: ,x_install_id => x_installment_id
2533: -- The threshold is set back to the original threshold after calling
2534: -- the start_installment_wf procedure.
2535:
2536: -- l_wf_threshold_orig := wf_engine.threshold;
2537: -- wf_engine.threshold := -1;
2538:
2539: gms_wf_pkg.start_installment_wf( x_award_id => x_award_id
2540: ,x_install_id => x_installment_id
2541: ,x_role => l_role_name
2541: ,x_role => l_role_name
2542: ,x_err_code => l_err_code
2543: ,x_err_stage => l_err_stage);
2544:
2545: -- wf_engine.threshold := l_wf_threshold_orig;
2546:
2547: if l_err_code <> 0
2548: then
2549: gms_error_pkg.gms_message(x_err_name => 'GMS_START_INSTALL_WF_FAIL',
2667:
2668: close l_installment_detail_csr;
2669:
2670:
2671: wf_engine.CreateProcess( ItemType => ItemType,
2672: ItemKey => ItemKey,
2673: process => 'GMS_WF_PROCESS' );
2674:
2675: -- Attribute GMS_WF_PROCESS is used to select the appropriate branch
2675: -- Attribute GMS_WF_PROCESS is used to select the appropriate branch
2676: -- in the workflow process.
2677:
2678:
2679: wf_engine.SetItemAttrText ( itemtype => itemtype,
2680: itemkey => itemkey,
2681: aname => 'GMS_WF_PROCESS',
2682: avalue => 'INSTALLMENT');
2683:
2680: itemkey => itemkey,
2681: aname => 'GMS_WF_PROCESS',
2682: avalue => 'INSTALLMENT');
2683:
2684: wf_engine.SetItemAttrText ( itemtype => itemtype,
2685: itemkey => itemkey,
2686: aname => 'AWARD_NUMBER',
2687: avalue => l_award_number);
2688:
2685: itemkey => itemkey,
2686: aname => 'AWARD_NUMBER',
2687: avalue => l_award_number);
2688:
2689: wf_engine.SetItemAttrText ( itemtype => itemtype,
2690: itemkey => itemkey,
2691: aname => 'AWARD_SHORT_NAME',
2692: avalue => l_award_short_name);
2693:
2690: itemkey => itemkey,
2691: aname => 'AWARD_SHORT_NAME',
2692: avalue => l_award_short_name);
2693:
2694: wf_engine.SetItemAttrText ( itemtype => itemtype,
2695: itemkey => itemkey,
2696: aname => 'FUNDING_SOURCE_NAME',
2697: avalue => l_funding_source_name);
2698:
2695: itemkey => itemkey,
2696: aname => 'FUNDING_SOURCE_NAME',
2697: avalue => l_funding_source_name);
2698:
2699: wf_engine.SetItemAttrText ( itemtype => itemtype,
2700: itemkey => itemkey,
2701: aname => 'INSTALL_NUM',
2702: avalue => l_install_number);
2703:
2700: itemkey => itemkey,
2701: aname => 'INSTALL_NUM',
2702: avalue => l_install_number);
2703:
2704: wf_engine.SetItemAttrDate ( itemtype => itemtype,
2705: itemkey => itemkey,
2706: aname => 'INSTALL_START_DATE',
2707: avalue => l_install_start_date);
2708:
2705: itemkey => itemkey,
2706: aname => 'INSTALL_START_DATE',
2707: avalue => l_install_start_date);
2708:
2709: wf_engine.SetItemAttrDate ( itemtype => itemtype,
2710: itemkey => itemkey,
2711: aname => 'INSTALL_END_DATE',
2712: avalue => l_install_end_date);
2713:
2710: itemkey => itemkey,
2711: aname => 'INSTALL_END_DATE',
2712: avalue => l_install_end_date);
2713:
2714: wf_engine.SetItemAttrDate ( itemtype => itemtype,
2715: itemkey => itemkey,
2716: aname => 'INSTALL_ISSUE_DATE',
2717: avalue => l_install_issue_date);
2718:
2715: itemkey => itemkey,
2716: aname => 'INSTALL_ISSUE_DATE',
2717: avalue => l_install_issue_date);
2718:
2719: wf_engine.SetItemAttrDate ( itemtype => itemtype,
2720: itemkey => itemkey,
2721: aname => 'INSTALL_CLOSE_DATE',
2722: avalue => l_install_close_date);
2723:
2720: itemkey => itemkey,
2721: aname => 'INSTALL_CLOSE_DATE',
2722: avalue => l_install_close_date);
2723:
2724: wf_engine.SetItemAttrNumber ( itemtype => itemtype,
2725: itemkey => itemkey,
2726: aname => 'INSTALL_DIRECT_COST',
2727: avalue => l_install_direct_cost);
2728:
2725: itemkey => itemkey,
2726: aname => 'INSTALL_DIRECT_COST',
2727: avalue => l_install_direct_cost);
2728:
2729: wf_engine.SetItemAttrNumber ( itemtype => itemtype,
2730: itemkey => itemkey,
2731: aname => 'INSTALL_INDIRECT_COST',
2732: avalue => l_install_indirect_cost);
2733:
2730: itemkey => itemkey,
2731: aname => 'INSTALL_INDIRECT_COST',
2732: avalue => l_install_indirect_cost);
2733:
2734: wf_engine.SetItemAttrNumber ( itemtype => itemtype,
2735: itemkey => itemkey,
2736: aname => 'INSTALL_TOTAL_AMOUNT',
2737: avalue => l_install_total_amount);
2738:
2735: itemkey => itemkey,
2736: aname => 'INSTALL_TOTAL_AMOUNT',
2737: avalue => l_install_total_amount);
2738:
2739: wf_engine.SetItemAttrText ( itemtype => itemtype,
2740: itemkey => itemkey,
2741: aname => 'INSTALL_DESCRIPTION',
2742: avalue => l_install_description);
2743:
2740: itemkey => itemkey,
2741: aname => 'INSTALL_DESCRIPTION',
2742: avalue => l_install_description);
2743:
2744: wf_engine.SetItemAttrText ( itemtype => itemtype,
2745: itemkey => itemkey,
2746: aname => 'NOTIF_RECIPIENT_ROLE',
2747: avalue => x_role);
2748:
2745: itemkey => itemkey,
2746: aname => 'NOTIF_RECIPIENT_ROLE',
2747: avalue => x_role);
2748:
2749: wf_engine.SetItemAttrNumber ( itemtype => itemtype,
2750: itemkey => itemkey,
2751: aname => 'WORKFLOW_STARTED_BY_ID',
2752: avalue => l_workflow_started_by_id);
2753:
2750: itemkey => itemkey,
2751: aname => 'WORKFLOW_STARTED_BY_ID',
2752: avalue => l_workflow_started_by_id);
2753:
2754: wf_engine.SetItemAttrText ( itemtype => itemtype,
2755: itemkey => itemkey,
2756: aname => 'WORKFLOW_STARTED_BY_NAME',
2757: avalue => l_user_name);
2758:
2755: itemkey => itemkey,
2756: aname => 'WORKFLOW_STARTED_BY_NAME',
2757: avalue => l_user_name);
2758:
2759: wf_engine.SetItemAttrText ( itemtype => itemtype,
2760: itemkey => itemkey,
2761: aname => 'WORKFLOW_STARTED_BY_FULL_NAME',
2762: avalue => l_full_name);
2763:
2760: itemkey => itemkey,
2761: aname => 'WORKFLOW_STARTED_BY_FULL_NAME',
2762: avalue => l_full_name);
2763:
2764: wf_engine.SetItemAttrDate ( itemtype => itemtype,
2765: itemkey => itemkey,
2766: aname => 'WF_STARTED_DATE',
2767: avalue => l_wf_started_date
2768: );
2767: avalue => l_wf_started_date
2768: );
2769:
2770:
2771: wf_engine.StartProcess( itemtype => itemtype,
2772: itemkey => itemkey );
2773:
2774:
2775: -- p_item_type := itemtype;
2899:
2900: -- Get the values of all the attributes used in this procedure to generate an message.
2901: l_item_type:= substr(document_id, 1, instr(document_id, ':') - 1);
2902: l_item_key := substr(document_id, instr(document_id, ':') + 1,length(document_id) - 2);
2903: l_document_id := wf_engine.GetItemAttrNumber
2904: (itemtype => l_item_type,
2905: itemkey => l_item_key,
2906: aname => 'DOCUMENT_ID');
2907: l_Award_number := wf_engine.GetItemAttrText
2903: l_document_id := wf_engine.GetItemAttrNumber
2904: (itemtype => l_item_type,
2905: itemkey => l_item_key,
2906: aname => 'DOCUMENT_ID');
2907: l_Award_number := wf_engine.GetItemAttrText
2908: (itemtype => l_item_type,
2909: itemkey => l_item_key,
2910: aname => 'AWARD_NUMBER');
2911: l_Award_id := wf_engine.GetItemAttrNumber
2907: l_Award_number := wf_engine.GetItemAttrText
2908: (itemtype => l_item_type,
2909: itemkey => l_item_key,
2910: aname => 'AWARD_NUMBER');
2911: l_Award_id := wf_engine.GetItemAttrNumber
2912: (itemtype => l_item_type,
2913: itemkey => l_item_key,
2914: aname => 'AWARD_ID');
2915: l_Installment_id := wf_engine.GetItemAttrNumber
2911: l_Award_id := wf_engine.GetItemAttrNumber
2912: (itemtype => l_item_type,
2913: itemkey => l_item_key,
2914: aname => 'AWARD_ID');
2915: l_Installment_id := wf_engine.GetItemAttrNumber
2916: (itemtype => l_item_type,
2917: itemkey => l_item_key,
2918: aname => 'INSTALL_ID');
2919: l_Installment_number := wf_engine.GetItemAttrText
2915: l_Installment_id := wf_engine.GetItemAttrNumber
2916: (itemtype => l_item_type,
2917: itemkey => l_item_key,
2918: aname => 'INSTALL_ID');
2919: l_Installment_number := wf_engine.GetItemAttrText
2920: (itemtype => l_item_type,
2921: itemkey => l_item_key,
2922: aname => 'INSTALL_NUM');
2923:
2920: (itemtype => l_item_type,
2921: itemkey => l_item_key,
2922: aname => 'INSTALL_NUM');
2923:
2924: l_Installment_End_date:= wf_engine.GetItemAttrDate
2925: (itemtype => l_item_type,
2926: itemkey => l_item_key,
2927: aname => 'INSTALL_END_DATE');
2928:
2925: (itemtype => l_item_type,
2926: itemkey => l_item_key,
2927: aname => 'INSTALL_END_DATE');
2928:
2929: l_Installment_start_date:= wf_engine.GetItemAttrDate
2930: (itemtype => l_item_type,
2931: itemkey => l_item_key,
2932: aname => 'INSTALL_START_DATE');
2933:
3132: CLOSE installment_cursor;
3133:
3134: -- Creating the workflow Process
3135:
3136: wf_engine.CreateProcess( ItemType => ItemType,
3137: ItemKey => ItemKey,
3138: process => 'GMS_WF_PROCESS' );
3139:
3140: -- Attribute GMS_WF_PROCESS is used to select the appropriate branch
3140: -- Attribute GMS_WF_PROCESS is used to select the appropriate branch
3141: -- in the workflow process.
3142: -- Set the values for all the attributes used for this workflow process
3143:
3144: wf_engine.SetItemAttrText ( itemtype => itemtype,
3145: itemkey => itemkey,
3146: aname => 'GMS_WF_PROCESS',
3147: avalue => 'INSTALLMENT_CLOSEOUT');
3148:
3145: itemkey => itemkey,
3146: aname => 'GMS_WF_PROCESS',
3147: avalue => 'INSTALLMENT_CLOSEOUT');
3148:
3149: wf_engine.SetItemAttrNumber ( itemtype => itemtype,
3150: itemkey => itemkey,
3151: aname => 'AWARD_ID',
3152: avalue => x_award_id);
3153:
3150: itemkey => itemkey,
3151: aname => 'AWARD_ID',
3152: avalue => x_award_id);
3153:
3154: wf_engine.SetItemAttrText ( itemtype => itemtype,
3155: itemkey => itemkey,
3156: aname => 'AWARD_NUMBER',
3157: avalue => l_award_number);
3158:
3155: itemkey => itemkey,
3156: aname => 'AWARD_NUMBER',
3157: avalue => l_award_number);
3158:
3159: wf_engine.SetItemAttrNumber ( itemtype => itemtype,
3160: itemkey => itemkey,
3161: aname => 'INSTALL_ID',
3162: avalue => x_installment_id);
3163:
3160: itemkey => itemkey,
3161: aname => 'INSTALL_ID',
3162: avalue => x_installment_id);
3163:
3164: wf_engine.SetItemAttrText ( itemtype => itemtype,
3165: itemkey => itemkey,
3166: aname => 'INSTALL_NUM',
3167: avalue => l_installment_number);
3168:
3165: itemkey => itemkey,
3166: aname => 'INSTALL_NUM',
3167: avalue => l_installment_number);
3168:
3169: wf_engine.SetItemAttrDate ( itemtype => itemtype,
3170: itemkey => itemkey,
3171: aname => 'INSTALL_END_DATE',
3172: avalue => l_installment_end_date);
3173:
3170: itemkey => itemkey,
3171: aname => 'INSTALL_END_DATE',
3172: avalue => l_installment_end_date);
3173:
3174: wf_engine.SetItemAttrDate ( itemtype => itemtype,
3175: itemkey => itemkey,
3176: aname => 'INSTALL_START_DATE',
3177: avalue => l_installment_start_date);
3178:
3175: itemkey => itemkey,
3176: aname => 'INSTALL_START_DATE',
3177: avalue => l_installment_start_date);
3178:
3179: wf_engine.SetItemAttrText ( itemtype => itemtype,
3180: itemkey => itemkey,
3181: aname => 'DOCUMENT_ID',
3182: avalue => ItemType ||':'||to_char(ItemKey));
3183:
3180: itemkey => itemkey,
3181: aname => 'DOCUMENT_ID',
3182: avalue => ItemType ||':'||to_char(ItemKey));
3183:
3184: wf_engine.SetItemAttrtext( itemtype => itemtype,
3185: itemkey => itemkey,
3186: aname => 'CLOSEOUT_MESSAGE',
3187: avalue => 'PLSQL:GMS_WF_PKG.Get_Inst_Open_Commitments/'||itemtype||':'||to_char(itemkey));
3188:
3185: itemkey => itemkey,
3186: aname => 'CLOSEOUT_MESSAGE',
3187: avalue => 'PLSQL:GMS_WF_PKG.Get_Inst_Open_Commitments/'||itemtype||':'||to_char(itemkey));
3188:
3189: wf_engine.SetItemAttrText ( itemtype => itemtype,
3190: itemkey => itemkey,
3191: aname => 'NOTIF_RECIPIENT_ROLE',
3192: avalue => x_role);
3193: -- Start the work flow process
3191: aname => 'NOTIF_RECIPIENT_ROLE',
3192: avalue => x_role);
3193: -- Start the work flow process
3194:
3195: wf_engine.StartProcess ( itemtype => itemtype,
3196: itemkey => itemkey );
3197: -- Added Exception for Bug:2662848
3198: EXCEPTION
3199: when OTHERS then