148:
149: x_Progress VARCHAR2(2000);
150:
151: begin
152: l_FeID := wf_engine.GetItemAttrNumber(itemtype => EnqueueFPQueue.itemtype,
153: itemkey => EnqueueFPQueue.itemkey,
154: aname => 'FE_ID');
155:
156: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => EnqueueFPQueue.itemtype,
152: l_FeID := wf_engine.GetItemAttrNumber(itemtype => EnqueueFPQueue.itemtype,
153: itemkey => EnqueueFPQueue.itemkey,
154: aname => 'FE_ID');
155:
156: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => EnqueueFPQueue.itemtype,
157: itemkey => EnqueueFPQueue.itemkey,
158: aname => 'ORDER_ID');
159:
160: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => EnqueueFPQueue.itemtype,
156: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => EnqueueFPQueue.itemtype,
157: itemkey => EnqueueFPQueue.itemkey,
158: aname => 'ORDER_ID');
159:
160: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => EnqueueFPQueue.itemtype,
161: itemkey => EnqueueFPQueue.itemkey,
162: aname => 'WORKITEM_INSTANCE_ID');
163:
164: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => EnqueueFPQueue.itemtype,
160: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => EnqueueFPQueue.itemtype,
161: itemkey => EnqueueFPQueue.itemkey,
162: aname => 'WORKITEM_INSTANCE_ID');
163:
164: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => EnqueueFPQueue.itemtype,
165: itemkey => EnqueueFPQueue.itemkey,
166: aname => 'FA_INSTANCE_ID');
167:
168: l_ReProcessFlag := wf_engine.GetItemAttrText(itemtype => EnqueueFPQueue.itemtype,
164: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => EnqueueFPQueue.itemtype,
165: itemkey => EnqueueFPQueue.itemkey,
166: aname => 'FA_INSTANCE_ID');
167:
168: l_ReProcessFlag := wf_engine.GetItemAttrText(itemtype => EnqueueFPQueue.itemtype,
169: itemkey => EnqueueFPQueue.itemkey,
170: aname => 'RE_PROCESS_FLAG');
171:
172:
188:
189: if l_ReProcessFlag = 'Y' then
190:
191: /* Reset the flag */
192: wf_engine.SetItemAttrText(itemtype => EnqueueFPQueue.itemtype,
193: itemkey => EnqueueFPQueue.itemkey,
194: aname => 'RE_PROCESS_FLAG',
195: avalue => 'N');
196:
193: itemkey => EnqueueFPQueue.itemkey,
194: aname => 'RE_PROCESS_FLAG',
195: avalue => 'N');
196:
197: l_ReProcessEnqTime := wf_engine.GetItemAttrDate(itemtype => EnqueueFPQueue.itemtype,
198: itemkey => EnqueueFPQueue.itemkey,
199: aname => 'RE_PROCESS_ENQ_TIME');
200: else
201: l_ReProcessEnqTime := SYSDATE;
250:
251: /* Check if the FA is aborted. If so abort the process immediately */
252: if IsFAAborted(l_FAInstanceID) = TRUE then
253: rollback to EnqueueAbortFA;
254: wf_engine.abortprocess(itemtype => EnqueueFPQueue.itemtype,
255: itemkey => EnqueueFPQueue.itemkey);
256:
257: return;
258: end if;
1078: BEGIN
1079: -- RUN mode - normal process execution
1080: --
1081: IF (funcmode = 'RUN') THEN
1082: lv_fp_name := wf_engine.getItemAttrText( itemtype => IS_THRESHOLD_EXCEEDED.itemtype,
1083: itemkey => IS_THRESHOLD_EXCEEDED.itemkey,
1084: aname => g_fp_name );
1085: l_result := IsThresholdExceeded(lv_fp_name);
1086: -- set the channel name attribute.. so that dequeuing fe ready queue will not fail..
1149: BEGIN
1150: -- RUN mode - normal process execution
1151: --
1152: IF (funcmode = 'RUN') THEN
1153: lv_fp_name := wf_engine.getItemAttrText( itemtype => IS_THRESHOLD_REACHED.itemtype,
1154: itemkey => IS_THRESHOLD_REACHED.itemkey,
1155: aname => g_fp_name );
1156:
1157:
1182: BEGIN
1183: -- RUN mode - normal process execution
1184: --
1185: IF (funcmode = 'RUN') THEN
1186: lv_fp_name := wf_engine.getItemAttrText( itemtype => RESET_SYSTEM_HOLD.itemtype,
1187: itemkey => RESET_SYSTEM_HOLD.itemkey,
1188: aname => g_fp_name );
1189: ResetSystemHold( lv_fp_name);
1190: resultout := 'COMPLETE';
1212: BEGIN
1213: -- RUN mode - normal process execution
1214: --
1215: IF (funcmode = 'RESPOND') THEN
1216: l_nid := WF_ENGINE.context_nid;
1217: l_newFeName := wf_notification.GetAttrText( l_nid, 'FE_NAME');
1218:
1219: -- User havent entered any overriding FE Name..
1220: IF l_newFeName IS NOT NULL THEN
1217: l_newFeName := wf_notification.GetAttrText( l_nid, 'FE_NAME');
1218:
1219: -- User havent entered any overriding FE Name..
1220: IF l_newFeName IS NOT NULL THEN
1221: l_faInstanceID := wf_engine.getItemAttrNumber( itemtype, itemkey, 'FA_INSTANCE_ID' );
1222: OverrideFE( l_faInstanceID, l_newFeName, resultout );
1223: END IF;
1224:
1225: ELSIF (funcmode = 'RUN') THEN
1338: l_result varchar2(15) := 'SUCCESS';
1339:
1340: begin
1341:
1342: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => InitializeFAList.itemtype,
1343: itemkey => InitializeFAList.itemkey,
1344: aname => 'WORKITEM_INSTANCE_ID');
1345:
1346: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => InitializeFAList.itemtype,
1342: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => InitializeFAList.itemtype,
1343: itemkey => InitializeFAList.itemkey,
1344: aname => 'WORKITEM_INSTANCE_ID');
1345:
1346: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => InitializeFAList.itemtype,
1347: itemkey => InitializeFAList.itemkey,
1348: aname => 'ORDER_ID');
1349:
1350: l_LineItemID := wf_engine.GetItemAttrNumber(itemtype => InitializeFAList.itemtype,
1346: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => InitializeFAList.itemtype,
1347: itemkey => InitializeFAList.itemkey,
1348: aname => 'ORDER_ID');
1349:
1350: l_LineItemID := wf_engine.GetItemAttrNumber(itemtype => InitializeFAList.itemtype,
1351: itemkey => InitializeFAList.itemkey,
1352: aname => 'LINE_ITEM_ID');
1353:
1354: GetWorkitemFAMappingProc(l_WIInstanceID, l_ProcFound, l_FAListProc);
1469: x_Progress VARCHAR2(2000);
1470:
1471: begin
1472:
1473: l_WIInstanceID := WF_engine.GetItemAttrNumber(itemtype => AreAllFAsDone.itemtype,
1474: itemkey => AreAllFAsDone.itemkey,
1475: aname => 'WORKITEM_INSTANCE_ID');
1476:
1477:
1474: itemkey => AreAllFAsDone.itemkey,
1475: aname => 'WORKITEM_INSTANCE_ID');
1476:
1477:
1478: l_PrevFASeq := wf_engine.GetItemAttrNumber(itemtype => AreAllFAsDone.itemtype,
1479: itemkey => AreAllFAsDone.itemkey,
1480: aname => 'CURRENT_FA_SEQUENCE');
1481:
1482:
1538: x_Progress VARCHAR2(2000);
1539:
1540: begin
1541:
1542: l_OrderID := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProvisioningProcess.itemtype,
1543: itemkey => LaunchFAProvisioningProcess.itemkey,
1544: aname => 'ORDER_ID');
1545:
1546: l_WIInstanceID := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProvisioningProcess.itemtype,
1542: l_OrderID := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProvisioningProcess.itemtype,
1543: itemkey => LaunchFAProvisioningProcess.itemkey,
1544: aname => 'ORDER_ID');
1545:
1546: l_WIInstanceID := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProvisioningProcess.itemtype,
1547: itemkey => LaunchFAProvisioningProcess.itemkey,
1548: aname => 'WORKITEM_INSTANCE_ID');
1549:
1550: l_FAInstanceID := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProvisioningProcess.itemtype,
1546: l_WIInstanceID := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProvisioningProcess.itemtype,
1547: itemkey => LaunchFAProvisioningProcess.itemkey,
1548: aname => 'WORKITEM_INSTANCE_ID');
1549:
1550: l_FAInstanceID := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProvisioningProcess.itemtype,
1551: itemkey => LaunchFAProvisioningProcess.itemkey,
1552: aname => 'FA_INSTANCE_ID');
1553:
1554: l_Priority := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProvisioningProcess.itemtype,
1550: l_FAInstanceID := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProvisioningProcess.itemtype,
1551: itemkey => LaunchFAProvisioningProcess.itemkey,
1552: aname => 'FA_INSTANCE_ID');
1553:
1554: l_Priority := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProvisioningProcess.itemtype,
1555: itemkey => LaunchFAProvisioningProcess.itemkey,
1556: aname => 'FA_PRIORITY');
1557:
1558:
1627: x_Progress VARCHAR2(2000);
1628:
1629: begin
1630:
1631: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => InitializeFA.itemtype,
1632: itemkey => InitializeFA.itemkey,
1633: aname => 'FA_INSTANCE_ID');
1634:
1635: l_ResubmissionJobID := GetResubmissionJobID(itemtype => InitializeFA.itemtype,
1660:
1661: /* Check if the FA is aborted. If so abort the process immediately */
1662: if IsFAAborted(l_FAInstanceID) = TRUE then
1663: rollback to InitializeAbortFA;
1664: wf_engine.abortprocess(itemtype => InitializeFA.itemtype,
1665: itemkey => InitializeFA.itemkey);
1666:
1667: return;
1668: end if;
1721: for update of FE_ID, LAST_UPDATED_BY, LAST_UPDATE_DATE, LAST_UPDATE_LOGIN;
1722:
1723: begin
1724:
1725: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => GetFE.itemtype,
1726: itemkey => GetFE.itemkey,
1727: aname => 'FA_INSTANCE_ID');
1728:
1729: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => GetFE.itemtype,
1725: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => GetFE.itemtype,
1726: itemkey => GetFE.itemkey,
1727: aname => 'FA_INSTANCE_ID');
1728:
1729: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => GetFE.itemtype,
1730: itemkey => GetFE.itemkey,
1731: aname => 'WORKITEM_INSTANCE_ID');
1732:
1733: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => GetFE.itemtype,
1729: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => GetFE.itemtype,
1730: itemkey => GetFE.itemkey,
1731: aname => 'WORKITEM_INSTANCE_ID');
1732:
1733: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => GetFE.itemtype,
1734: itemkey => GetFE.itemkey,
1735: aname => 'ORDER_ID');
1736:
1737: l_LineItemID := wf_engine.GetItemAttrNumber(itemtype => GetFE.itemtype,
1733: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => GetFE.itemtype,
1734: itemkey => GetFE.itemkey,
1735: aname => 'ORDER_ID');
1736:
1737: l_LineItemID := wf_engine.GetItemAttrNumber(itemtype => GetFE.itemtype,
1738: itemkey => GetFE.itemkey,
1739: aname => 'LINE_ITEM_ID');
1740:
1741: SavePoint GetFEAbortFA;
1914:
1915: /* Check if the FA is aborted. If so abort the process immediately */
1916: if IsFAAborted(l_FAInstanceID) = TRUE then
1917: rollback to GetFEAbortFA;
1918: wf_engine.abortprocess(itemtype => GetFE.itemtype,
1919: itemkey => GetFE.itemkey);
1920: -- are we still doing faaborted???? skilaru 03/06/02
1921: return l_result;
1922: end if;
1987: l_Status varchar2(1) := 'N';
1988:
1989: begin
1990:
1991: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => IsChannelAvailable.itemtype,
1992: itemkey => IsChannelAvailable.itemkey,
1993: aname => 'FA_INSTANCE_ID');
1994:
1995: l_FPFuncMode := wf_engine.GetItemAttrText(itemtype => IsChannelAvailable.itemtype,
1991: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => IsChannelAvailable.itemtype,
1992: itemkey => IsChannelAvailable.itemkey,
1993: aname => 'FA_INSTANCE_ID');
1994:
1995: l_FPFuncMode := wf_engine.GetItemAttrText(itemtype => IsChannelAvailable.itemtype,
1996: itemkey => IsChannelAvailable.itemkey,
1997: aname => 'FP_FUNC_MODE');
1998:
1999: SavePoint GetChannelAbortFA;
1999: SavePoint GetChannelAbortFA;
2000:
2001: if l_FPFuncMode <> 'RUN' then
2002: /* Reset the Func Mode */
2003: wf_engine.SetItemAttrText(itemtype => IsChannelAvailable.itemtype,
2004: itemkey => IsChannelAvailable.itemkey,
2005: aname => 'FP_FUNC_MODE',
2006: avalue => 'RUN');
2007: end if;
2005: aname => 'FP_FUNC_MODE',
2006: avalue => 'RUN');
2007: end if;
2008:
2009: l_FeID := wf_engine.GetItemAttrNumber(itemtype => IsChannelAvailable.itemtype,
2010: itemkey => IsChannelAvailable.itemkey,
2011: aname => 'FE_ID');
2012:
2013: XDPCORE.CheckNAddItemAttrText (itemtype => IsChannelAvailable.itemtype,
2072:
2073: /* Check if the FA is aborted. If so abort the process immediately */
2074: if IsFAAborted(l_FAInstanceID) = TRUE then
2075: rollback to GetChannelAbortFA;
2076: wf_engine.abortprocess(itemtype => IsChannelAvailable.itemtype,
2077: itemkey => IsChannelAvailable.itemkey);
2078:
2079: return wf_engine.eng_force;
2080: end if;
2075: rollback to GetChannelAbortFA;
2076: wf_engine.abortprocess(itemtype => IsChannelAvailable.itemtype,
2077: itemkey => IsChannelAvailable.itemkey);
2078:
2079: return wf_engine.eng_force;
2080: end if;
2081:
2082: return 'Y';
2083: else
2083: else
2084: /* Check if the FA is aborted. If so abort the process immediately */
2085: if IsFAAborted(l_FAInstanceID) = TRUE then
2086: rollback to GetChannelAbortFA;
2087: wf_engine.abortprocess(itemtype => IsChannelAvailable.itemtype,
2088: itemkey => IsChannelAvailable.itemkey);
2089:
2090: return wf_engine.eng_force;
2091: end if;
2086: rollback to GetChannelAbortFA;
2087: wf_engine.abortprocess(itemtype => IsChannelAvailable.itemtype,
2088: itemkey => IsChannelAvailable.itemkey);
2089:
2090: return wf_engine.eng_force;
2091: end if;
2092: return 'N';
2093: end if;
2094:
2129:
2130: e_HandOverChannelException exception;
2131: begin
2132:
2133: l_ChannelName := wf_engine.GetItemAttrText(itemtype => VerifyChannel.itemtype,
2134: itemkey => VerifyChannel.itemkey,
2135: aname => 'CHANNEL_NAME');
2136:
2137: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => VerifyChannel.itemtype,
2133: l_ChannelName := wf_engine.GetItemAttrText(itemtype => VerifyChannel.itemtype,
2134: itemkey => VerifyChannel.itemkey,
2135: aname => 'CHANNEL_NAME');
2136:
2137: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => VerifyChannel.itemtype,
2138: itemkey => VerifyChannel.itemkey,
2139: aname => 'FA_INSTANCE_ID');
2140:
2141:
2207: end if;
2208: end if;
2209:
2210: if l_Result = 'RE_PROCESS' then
2211: wf_engine.SetItemAttrText(itemtype => VerifyChannel.itemtype,
2212: itemkey => VerifyChannel.itemkey,
2213: aname => 'RE_PROCESS_FLAG',
2214: avalue => 'Y');
2215: else
2232: if l_ErrCode <> 0 then
2233: RAISE e_HandOverChannelException;
2234: end if;
2235:
2236: wf_engine.AbortProcess(itemtype => VerifyChannel.itemtype,
2237: itemkey => VerifyChannel.itemkey);
2238:
2239: return wf_engine.eng_force;
2240: else
2235:
2236: wf_engine.AbortProcess(itemtype => VerifyChannel.itemtype,
2237: itemkey => VerifyChannel.itemkey);
2238:
2239: return wf_engine.eng_force;
2240: else
2241: return l_Result;
2242: end if;
2243:
2308:
2309: l_Status varchar2(1);
2310: begin
2311:
2312: l_FPFuncMode := wf_engine.GetItemAttrText(itemtype => ProvisionFE.itemtype,
2313: itemkey => ProvisionFE.itemkey,
2314: aname => 'FP_FUNC_MODE');
2315:
2316:
2313: itemkey => ProvisionFE.itemkey,
2314: aname => 'FP_FUNC_MODE');
2315:
2316:
2317: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => ProvisionFE.itemtype,
2318: itemkey => ProvisionFE.itemkey,
2319: aname => 'FA_INSTANCE_ID');
2320:
2321:
2326:
2327: if l_FPFuncMode <> 'RUN' then
2328: /* Check if the FA is aborted. If so abort the process immediately */
2329: if IsFAAborted(l_FAInstanceID) = TRUE then
2330: wf_engine.abortprocess(itemtype => ProvisionFE.itemtype,
2331: itemkey => ProvisionFE.itemkey);
2332:
2333: return wf_engine.eng_force;
2334: else
2329: if IsFAAborted(l_FAInstanceID) = TRUE then
2330: wf_engine.abortprocess(itemtype => ProvisionFE.itemtype,
2331: itemkey => ProvisionFE.itemkey);
2332:
2333: return wf_engine.eng_force;
2334: else
2335: return 'ERROR_RETRY';
2336: end if;
2337:
2337:
2338: end if;
2339:
2340:
2341: l_ChannelName := wf_engine.GetItemAttrText(itemtype => ProvisionFE.itemtype,
2342: itemkey => ProvisionFE.itemkey,
2343: aname => 'CHANNEL_NAME');
2344:
2345: l_FeID := wf_engine.GetItemAttrNumber(itemtype => ProvisionFE.itemtype,
2341: l_ChannelName := wf_engine.GetItemAttrText(itemtype => ProvisionFE.itemtype,
2342: itemkey => ProvisionFE.itemkey,
2343: aname => 'CHANNEL_NAME');
2344:
2345: l_FeID := wf_engine.GetItemAttrNumber(itemtype => ProvisionFE.itemtype,
2346: itemkey => ProvisionFE.itemkey,
2347: aname => 'FE_ID');
2348:
2349: /* If the AbortFlag is set to True then before aborting the process the Channel being used
2369: RAISE e_HandOverChannelException;
2370: end if;
2371: end if;
2372:
2373: wf_engine.AbortProcess(itemtype => ProvisionFE.itemtype,
2374: itemkey => ProvisionFE.itemkey);
2375:
2376: return wf_engine.eng_force;
2377: end if;
2372:
2373: wf_engine.AbortProcess(itemtype => ProvisionFE.itemtype,
2374: itemkey => ProvisionFE.itemkey);
2375:
2376: return wf_engine.eng_force;
2377: end if;
2378:
2379:
2380:
2377: end if;
2378:
2379:
2380:
2381: l_FeName := wf_engine.GetItemAttrText(itemtype => ProvisionFE.itemtype,
2382: itemkey => ProvisionFE.itemkey,
2383: aname => 'FE_NAME');
2384:
2385: l_FPName := wf_engine.GetItemAttrText(itemtype => ProvisionFE.itemtype,
2381: l_FeName := wf_engine.GetItemAttrText(itemtype => ProvisionFE.itemtype,
2382: itemkey => ProvisionFE.itemkey,
2383: aname => 'FE_NAME');
2384:
2385: l_FPName := wf_engine.GetItemAttrText(itemtype => ProvisionFE.itemtype,
2386: itemkey => ProvisionFE.itemkey,
2387: aname => 'FP_NAME');
2388:
2389: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => ProvisionFE.itemtype,
2385: l_FPName := wf_engine.GetItemAttrText(itemtype => ProvisionFE.itemtype,
2386: itemkey => ProvisionFE.itemkey,
2387: aname => 'FP_NAME');
2388:
2389: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => ProvisionFE.itemtype,
2390: itemkey => ProvisionFE.itemkey,
2391: aname => 'ORDER_ID');
2392:
2393: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => ProvisionFE.itemtype,
2389: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => ProvisionFE.itemtype,
2390: itemkey => ProvisionFE.itemkey,
2391: aname => 'ORDER_ID');
2392:
2393: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => ProvisionFE.itemtype,
2394: itemkey => ProvisionFE.itemkey,
2395: aname => 'WORKITEM_INSTANCE_ID');
2396:
2397: l_LineItemID := wf_engine.GetItemAttrNumber(itemtype => ProvisionFE.itemtype,
2393: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => ProvisionFE.itemtype,
2394: itemkey => ProvisionFE.itemkey,
2395: aname => 'WORKITEM_INSTANCE_ID');
2396:
2397: l_LineItemID := wf_engine.GetItemAttrNumber(itemtype => ProvisionFE.itemtype,
2398: itemkey => ProvisionFE.itemkey,
2399: aname => 'LINE_ITEM_ID');
2400:
2401: /* Need to dynamically execute the FP with te above parameters */
2420:
2421: --skilaru 05/19/2002
2422: --NON-PIPE based adapters are always available never be BUSY..
2423: if NOT XDP_ADAPTER_CORE_DB.checkLockRequired( l_ChannelName ) then
2424: wf_engine.SetItemAttrText(itemtype => ProvisionFe.itemtype,
2425: itemkey => ProvisionFe.itemkey,
2426: aname => 'HANDOVER_CHANNEL_FLAG',
2427: avalue => 'TRUE');
2428: elsif l_AdapterStatus <> 'BUSY' then
2425: itemkey => ProvisionFe.itemkey,
2426: aname => 'HANDOVER_CHANNEL_FLAG',
2427: avalue => 'TRUE');
2428: elsif l_AdapterStatus <> 'BUSY' then
2429: wf_engine.SetItemAttrText(itemtype => ProvisionFe.itemtype,
2430: itemkey => ProvisionFe.itemkey,
2431: aname => 'HANDOVER_CHANNEL_FLAG',
2432: avalue => 'FALSE');
2433: else
2430: itemkey => ProvisionFe.itemkey,
2431: aname => 'HANDOVER_CHANNEL_FLAG',
2432: avalue => 'FALSE');
2433: else
2434: wf_engine.SetItemAttrText(itemtype => ProvisionFe.itemtype,
2435: itemkey => ProvisionFe.itemkey,
2436: aname => 'HANDOVER_CHANNEL_FLAG',
2437: avalue => 'TRUE');
2438: end if;
2581:
2582: COMMIT;
2583: */
2584:
2585: wf_engine.SetItemAttrText(itemtype => ProvisionFE.itemtype,
2586: itemkey => ProvisionFE.itemkey,
2587: aname => 'HANDOVER_CHANNEL_FLAG',
2588: avalue => 'FALSE');
2589:
2666: where current of c_UpdateFAStatus;
2667: END LOOP;
2668:
2669:
2670: wf_engine.AbortProcess(itemtype => ProvisionFE.itemtype,
2671: itemkey => ProvisionFE.itemkey);
2672:
2673: return wf_engine.eng_force;
2674: else
2669:
2670: wf_engine.AbortProcess(itemtype => ProvisionFE.itemtype,
2671: itemkey => ProvisionFE.itemkey);
2672:
2673: return wf_engine.eng_force;
2674: else
2675: return l_Result;
2676: end if;
2677:
2692: /* Set the FP_FUNC_MODE to be RETRY so that when the user retries the activity it goes
2693: ** back to the regular get Channel Process
2694: */
2695:
2696: wf_engine.SetItemAttrText(itemtype => ProvisionFE.itemtype,
2697: itemkey => ProvisionFE.itemkey,
2698: aname => 'FP_FUNC_MODE',
2699: avalue => 'RETRY');
2700:
2779: x_Progress VARCHAR2(2000);
2780:
2781: begin
2782:
2783: l_ChannelName := wf_engine.GetItemAttrText(itemtype => ReleaseFEChannel.itemtype,
2784: itemkey => ReleaseFEChannel.itemkey,
2785: aname => 'CHANNEL_NAME');
2786:
2787: l_FeID := wf_engine.GetItemAttrNumber(itemtype => ReleaseFEChannel.itemtype,
2783: l_ChannelName := wf_engine.GetItemAttrText(itemtype => ReleaseFEChannel.itemtype,
2784: itemkey => ReleaseFEChannel.itemkey,
2785: aname => 'CHANNEL_NAME');
2786:
2787: l_FeID := wf_engine.GetItemAttrNumber(itemtype => ReleaseFEChannel.itemtype,
2788: itemkey => ReleaseFEChannel.itemkey,
2789: aname => 'FE_ID');
2790:
2791: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => ReleaseFEChannel.itemtype,
2787: l_FeID := wf_engine.GetItemAttrNumber(itemtype => ReleaseFEChannel.itemtype,
2788: itemkey => ReleaseFEChannel.itemkey,
2789: aname => 'FE_ID');
2790:
2791: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => ReleaseFEChannel.itemtype,
2792: itemkey => ReleaseFEChannel.itemkey,
2793: aname => 'ORDER_ID');
2794:
2795: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => ReleaseFEChannel.itemtype,
2791: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => ReleaseFEChannel.itemtype,
2792: itemkey => ReleaseFEChannel.itemkey,
2793: aname => 'ORDER_ID');
2794:
2795: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => ReleaseFEChannel.itemtype,
2796: itemkey => ReleaseFEChannel.itemkey,
2797: aname => 'WORKITEM_INSTANCE_ID');
2798:
2799: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => ReleaseFEChannel.itemtype,
2795: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => ReleaseFEChannel.itemtype,
2796: itemkey => ReleaseFEChannel.itemkey,
2797: aname => 'WORKITEM_INSTANCE_ID');
2798:
2799: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => ReleaseFEChannel.itemtype,
2800: itemkey => ReleaseFEChannel.itemkey,
2801: aname => 'FA_INSTANCE_ID');
2802:
2803:
2803:
2804: l_ResubmissionJobID := GetResubmissionJobID(itemtype => ReleaseFEChannel.itemtype,
2805: itemkey => ReleaseFEChannel.itemkey);
2806:
2807: l_HandOverChannelFlag := wf_engine.GetItemAttrText(itemtype => ReleaseFEChannel.itemtype,
2808: itemkey => ReleaseFEChannel.itemkey,
2809: aname => 'HANDOVER_CHANNEL_FLAG');
2810:
2811: if l_ResubmissionJobID <> 0 then
2823: if l_ErrCode <> 0 then
2824: RAISE e_HandOverChannelException;
2825: end if;
2826: end if;
2827: wf_engine.SetItemAttrText(itemtype => ReleaseFEChannel.itemtype,
2828: itemkey => ReleaseFEChannel.itemkey,
2829: aname => 'HANDOVER_CHANNEL_FLAG',
2830: avalue => 'TRUE');
2831:
2832: COMMIT;
2833:
2834: /* Check if the FA is aborted. If so abort the process immediately */
2835: if IsFAAborted(l_FAInstanceID) = TRUE then
2836: wf_engine.abortprocess(itemtype => ReleaseFEChannel.itemtype,
2837: itemkey => ReleaseFEChannel.itemkey);
2838:
2839: return;
2840: end if;
2857: x_Progress VARCHAR2(2000);
2858:
2859: begin
2860:
2861: l_FAInstanceID := wf_engine.GetItemAttrNumber(itemtype => StopFAProcessing.itemtype,
2862: itemkey => StopFAProcessing.itemkey,
2863: aname => 'FA_INSTANCE_ID');
2864:
2865:
2911:
2912:
2913:
2914:
2915: wf_engine.SetItemAttrText(itemtype => ResetChannel.itemtype,
2916: itemkey => ResetChannel.itemkey,
2917: aname => 'CHANNEL_NAME',
2918: avalue => null);
2919:
2938: x_Progress VARCHAR2(2000);
2939:
2940: begin
2941:
2942: l_FaCaller := wf_engine.GetItemAttrText(itemtype => GetFaCaller.itemtype,
2943: itemkey => GetFaCaller.itemkey,
2944: aname => 'FA_CALLER');
2945:
2946:
2975: l_LineItemID number;
2976:
2977: x_Progress VARCHAR2(2000);
2978:
2979: l_NameArray Wf_Engine.NameTabTyp;
2980: l_ValueNumArray Wf_Engine.NumTabTyp;
2981: begin
2982: FaItemtype := 'XDPPROV';
2983: ErrCode := 0;
2976:
2977: x_Progress VARCHAR2(2000);
2978:
2979: l_NameArray Wf_Engine.NameTabTyp;
2980: l_ValueNumArray Wf_Engine.NumTabTyp;
2981: begin
2982: FaItemtype := 'XDPPROV';
2983: ErrCode := 0;
2984: ErrStr := null;
2982: FaItemtype := 'XDPPROV';
2983: ErrCode := 0;
2984: ErrStr := null;
2985:
2986: l_LineItemID := wf_engine.GetItemAttrNumber(itemtype => parentitemtype,
2987: itemkey => parentitemkey,
2988: aname => 'LINE_ITEM_ID');
2989:
2990: select to_char(XDP_WF_ITEMKEY_S.NEXTVAL) into l_tempKey from dual;
3002: LineitemID => l_LineItemID,
3003: WIInstanceID => WIInstanceID,
3004: FAInstanceID => FAInstanceID);
3005:
3006: wf_engine.SetItemAttrText(itemtype => 'XDPPROV',
3007: itemkey => FaItemkey,
3008: aname => 'MASTER_TO_CONTINUE',
3009: avalue => FaMaster);
3010:
3090: l_tempKey varchar2(240);
3091:
3092: x_Progress VARCHAR2(2000);
3093:
3094: l_NameArray Wf_Engine.NameTabTyp;
3095: l_ValueNumArray Wf_Engine.NumTabTyp;
3096:
3097: begin
3098: FaItemtype := 'XDPPROV';
3091:
3092: x_Progress VARCHAR2(2000);
3093:
3094: l_NameArray Wf_Engine.NameTabTyp;
3095: l_ValueNumArray Wf_Engine.NumTabTyp;
3096:
3097: begin
3098: FaItemtype := 'XDPPROV';
3099: ErrCode := 0;
3115: WIInstanceID => WIInstanceID,
3116: FAInstanceID => FAInstanceID);
3117:
3118:
3119: wf_engine.SetItemAttrText(itemtype => 'XDPPROV',
3120: itemkey => FaItemkey,
3121: aname => 'MASTER_TO_CONTINUE',
3122: avalue => FaMaster);
3123:
3200: l_JobID number;
3201: e_UnhandledException exception;
3202: begin
3203: begin
3204: l_JobID := wf_engine.GetItemAttrNumber(itemtype => GetResubmissionJobID.itemtype,
3205: itemkey => GetResubmissionJobID.itemkey,
3206: aname => 'RESUBMISSION_JOB_ID');
3207:
3208: exception
3265: x_Progress VARCHAR2(2000);
3266:
3267: begin
3268:
3269: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => LaunchFAProcess.itemtype,
3270: itemkey => LaunchFAProcess.itemkey,
3271: aname => 'ORDER_ID');
3272:
3273: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => LaunchFAProcess.itemtype,
3269: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => LaunchFAProcess.itemtype,
3270: itemkey => LaunchFAProcess.itemkey,
3271: aname => 'ORDER_ID');
3272:
3273: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => LaunchFAProcess.itemtype,
3274: itemkey => LaunchFAProcess.itemkey,
3275: aname => 'WORKITEM_INSTANCE_ID');
3276:
3277: l_LineItemID := wf_engine.GetItemAttrNumber(itemtype => LaunchFAProcess.itemtype,
3273: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => LaunchFAProcess.itemtype,
3274: itemkey => LaunchFAProcess.itemkey,
3275: aname => 'WORKITEM_INSTANCE_ID');
3276:
3277: l_LineItemID := wf_engine.GetItemAttrNumber(itemtype => LaunchFAProcess.itemtype,
3278: itemkey => LaunchFAProcess.itemkey,
3279: aname => 'LINE_ITEM_ID');
3280:
3281: /* Launch all the Independent FA Processes */
3408: end if;
3409:
3410: /* Launch all the WOrkflows */
3411: FOR i in 1..l_Counter LOOP
3412: wf_engine.StartProcess(t_ChildTypes(i),
3413: t_ChildKeys(i));
3414: END LOOP;
3415:
3416:
3504: begin
3505:
3506: l_Counter := 0;
3507:
3508: l_OrderID := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProcessSeq.itemtype,
3509: itemkey => LaunchFAProcessSeq.itemkey,
3510: aname => 'ORDER_ID');
3511:
3512: l_WIInstanceID := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProcessSeq.itemtype,
3508: l_OrderID := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProcessSeq.itemtype,
3509: itemkey => LaunchFAProcessSeq.itemkey,
3510: aname => 'ORDER_ID');
3511:
3512: l_WIInstanceID := WF_engine.GetItemAttrNumber(itemtype => LaunchFAProcessSeq.itemtype,
3513: itemkey => LaunchFAProcessSeq.itemkey,
3514: aname => 'WORKITEM_INSTANCE_ID');
3515:
3516:
3513: itemkey => LaunchFAProcessSeq.itemkey,
3514: aname => 'WORKITEM_INSTANCE_ID');
3515:
3516:
3517: l_PrevFASeq := wf_engine.GetItemAttrNumber(itemtype => LaunchFAProcessSeq.itemtype,
3518: itemkey => LaunchFAProcessSeq.itemkey,
3519: aname => 'CURRENT_FA_SEQUENCE');
3520:
3521: if c_FAList%ISOPEN then
4878:
4879:
4880: begin
4881: BEGIN
4882: l_ChannelName := wf_engine.GetItemAttrText(itemtype => ConnectOnDemand.itemtype,
4883: itemkey => ConnectOnDemand.itemkey,
4884: aname => 'CHANNEL_NAME');
4885:
4886: l_FeName := wf_engine.GetItemAttrText(itemtype => ConnectOnDemand.itemtype,
4882: l_ChannelName := wf_engine.GetItemAttrText(itemtype => ConnectOnDemand.itemtype,
4883: itemkey => ConnectOnDemand.itemkey,
4884: aname => 'CHANNEL_NAME');
4885:
4886: l_FeName := wf_engine.GetItemAttrText(itemtype => ConnectOnDemand.itemtype,
4887: itemkey => ConnectOnDemand.itemkey,
4888: aname => 'FE_NAME');
4889:
4890: ErrStr := ConnectOnDemand(l_channelName,l_ErrCode,l_ErrStr);
5028:
5029: l_item_type := 'XDPWFSTD' ;
5030: select to_char(XDP_WF_ITEMKEY_S.NEXTVAL) into l_item_key from dual;
5031:
5032: l_order_id := wf_engine.GetItemAttrNumber(
5033: itemtype => SendAdapterErrorNotif.itemtype,
5034: itemkey => SendAdapterErrorNotif.itemkey,
5035: aname => 'ORDER_ID');
5036:
5041: 'ADAPTER_ERROR',
5042: l_item_type,
5043: l_item_key) ;
5044:
5045: wf_engine.createprocess(l_item_type,
5046: l_item_key,
5047: 'ADAPTER_ERROR_NOTIFICATION') ;
5048:
5049: wf_engine.SetItemAttrText(
5045: wf_engine.createprocess(l_item_type,
5046: l_item_key,
5047: 'ADAPTER_ERROR_NOTIFICATION') ;
5048:
5049: wf_engine.SetItemAttrText(
5050: ItemType=>l_item_type,
5051: ItemKey=>l_item_key,
5052: aname=>'FE_NAME',
5053: avalue=>FEName);
5051: ItemKey=>l_item_key,
5052: aname=>'FE_NAME',
5053: avalue=>FEName);
5054:
5055: wf_engine.SetItemAttrText(
5056: ItemType=>l_item_type,
5057: ItemKey=>l_item_key,
5058: aname=>'CHANNEL_NAME',
5059: avalue=>ChannelName);
5057: ItemKey=>l_item_key,
5058: aname=>'CHANNEL_NAME',
5059: avalue=>ChannelName);
5060:
5061: wf_engine.SetItemAttrText(
5062: ItemType=>l_item_type,
5063: ItemKey=>l_item_key,
5064: aname=>'DESCRIPTION',
5065: avalue=>ErrorDescription);
5063: ItemKey=>l_item_key,
5064: aname=>'DESCRIPTION',
5065: avalue=>ErrorDescription);
5066:
5067: wf_engine.startprocess(l_item_type,
5068: l_item_key ) ;
5069:
5070: end SendAdapterErrorNotif;
5071:
5121: x_progress varchar2(2000);
5122:
5123: BEGIN
5124:
5125: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => ResolveIndDepFAs.itemtype,
5126: itemkey => ResolveIndDepFAs.itemkey,
5127: aname => 'WORKITEM_INSTANCE_ID');
5128:
5129: FOR lv_FARec in c_GetIndFAs( l_WIInstanceID ) LOOP
5191: x_Progress VARCHAR2(2000);
5192:
5193: BEGIN
5194:
5195: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => LaunchAllIndFAs.itemtype,
5196: itemkey => LaunchAllIndFAs.itemkey,
5197: aname => 'ORDER_ID');
5198:
5199: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => LaunchAllIndFAs.itemtype,
5195: l_OrderID := wf_engine.GetItemAttrNumber(itemtype => LaunchAllIndFAs.itemtype,
5196: itemkey => LaunchAllIndFAs.itemkey,
5197: aname => 'ORDER_ID');
5198:
5199: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => LaunchAllIndFAs.itemtype,
5200: itemkey => LaunchAllIndFAs.itemkey,
5201: aname => 'WORKITEM_INSTANCE_ID');
5202:
5203: l_LineItemID := wf_engine.GetItemAttrNumber(itemtype => LaunchAllIndFAs.itemtype,
5199: l_WIInstanceID := wf_engine.GetItemAttrNumber(itemtype => LaunchAllIndFAs.itemtype,
5200: itemkey => LaunchAllIndFAs.itemkey,
5201: aname => 'WORKITEM_INSTANCE_ID');
5202:
5203: l_LineItemID := wf_engine.GetItemAttrNumber(itemtype => LaunchAllIndFAs.itemtype,
5204: itemkey => LaunchAllIndFAs.itemkey,
5205: aname => 'LINE_ITEM_ID');
5206:
5207:
5391: ErrCode NUMBER;
5392: BEGIN
5393:
5394: BEGIN
5395: lv_fp_in_error := wf_engine.getItemAttrText( itemtype => ErrorDuringRetry.itemtype,
5396: itemkey => ErrorDuringRetry.itemkey,
5397: aname => g_fp_in_error );
5398: -- This FAs FP errored out already.. so this is a retry on that error..
5399: