DBA Data[Home] [Help]

APPS.WF_PURGE dependencies on WF_PURGE

Line 1: package body WF_PURGE as

1: package body WF_PURGE as
2: /* $Header: wfprgb.pls 120.13.12010000.2 2008/09/08 11:39:36 ajverma ship $ */
3:
4: --Private Variables
5: l_docommit boolean;

Line 87: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type)

83: (select null
84: from WF_ITEM_TYPES WIT
85: where WI.END_DATE+nvl(WIT.PERSISTENCE_DAYS,0)<=enddate
86: and WI.ITEM_TYPE = WIT.NAME
87: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type)
88: and not exists
89: (select null
90: from WF_ITEMS WI2
91: WHERE WI2.END_DATE IS NULL

Line 118: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type)

114: (select null
115: from WF_ITEM_TYPES WIT
116: where WI.END_DATE+nvl(WIT.PERSISTENCE_DAYS,0)<=enddate
117: and WI.ITEM_TYPE = WIT.NAME
118: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type)
119: and not exists
120: (select null
121: from WF_ITEMS WI2
122: WHERE WI2.END_DATE IS NULL

Line 160: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type)

156: (select null
157: from WF_ITEM_TYPES WIT
158: where WI.END_DATE+nvl(WIT.PERSISTENCE_DAYS,0)<=enddate
159: and WI.ITEM_TYPE = WIT.NAME
160: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type)
161: and not exists
162: (select null
163: from WF_ITEMS WI2
164: WHERE WI2.END_DATE IS NULL

Line 258: l_itemkeyTAB LIMIT wf_purge.commit_frequency;

254: -- Bug 4163328
255: -- Use bulk operations to improve performance
256: FETCH item4purge BULK COLLECT INTO l_enddateTAB,
257: l_itemtypeTAB,
258: l_itemkeyTAB LIMIT wf_purge.commit_frequency;
259: exit outer_purge when l_itemkeyTAB.COUNT = 0;
260:
261: -- JWSMITH bug 2070056
262: elsif (itemtype is not null and itemkey is null) then

Line 265: l_itemkeyTAB LIMIT wf_purge.commit_frequency;

261: -- JWSMITH bug 2070056
262: elsif (itemtype is not null and itemkey is null) then
263: FETCH item2purge BULK COLLECT INTO l_enddateTAB,
264: l_itemtypeTAB,
265: l_itemkeyTAB LIMIT wf_purge.commit_frequency;
266: exit outer_purge when l_itemkeyTAB.COUNT = 0;
267:
268: -- CTILLEY bug 3228475
269: elsif (itemtype is not null) then

Line 272: l_itemkeyTAB LIMIT wf_purge.commit_frequency;

268: -- CTILLEY bug 3228475
269: elsif (itemtype is not null) then
270: FETCH item3purge BULK COLLECT INTO l_enddateTAB,
271: l_itemtypeTAB,
272: l_itemkeyTAB LIMIT wf_purge.commit_frequency;
273: exit outer_purge when l_itemkeyTAB.COUNT = 0;
274:
275: else
276: FETCH item5purge BULK COLLECT INTO l_enddateTAB,

Line 278: l_itemkeyTAB LIMIT wf_purge.commit_frequency;

274:
275: else
276: FETCH item5purge BULK COLLECT INTO l_enddateTAB,
277: l_itemtypeTAB,
278: l_itemkeyTAB LIMIT wf_purge.commit_frequency;
279: exit outer_purge when l_itemkeyTAB.COUNT = 0;
280: end if;
281:
282: l_keycount := l_itemkeyTAB.COUNT;

Line 463: if (l_keycount >= wf_purge.commit_frequency) then

459: end;
460: --
461: end if;
462:
463: if (l_keycount >= wf_purge.commit_frequency) then
464: exit item_purge_loop;
465: elsif (l_keycount < wf_purge.commit_frequency) then
466: exit outer_purge;
467: end if;

Line 465: elsif (l_keycount < wf_purge.commit_frequency) then

461: end if;
462:
463: if (l_keycount >= wf_purge.commit_frequency) then
464: exit item_purge_loop;
465: elsif (l_keycount < wf_purge.commit_frequency) then
466: exit outer_purge;
467: end if;
468:
469: end loop item_purge_loop; -- item2purge or item3purge loop

Line 540: Wf_Core.Context('Wf_Purge', 'Items', itemtype, itemkey, to_char(enddate));

536: close item5purge;
537: end if;
538:
539:
540: Wf_Core.Context('Wf_Purge', 'Items', itemtype, itemkey, to_char(enddate));
541: raise;
542: end Items;
543:
544: --

Line 626: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type);

622: (select null
623: from WF_ITEM_TYPES WIT
624: where WA.END_DATE+nvl(WIT.PERSISTENCE_DAYS,0)<=enddate
625: and WA.ITEM_TYPE = WIT.NAME
626: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type);
627:
628: --Use itemcurs1 if the rootname is 'ROOT'
629: cursor itemcurs1(begdate in date, enddate in date,
630: roottype in varchar2, rootname in varchar2) is

Line 989: Wf_Core.Context('Wf_Purge', 'Activities', itemtype, to_char(enddate));

985:
986: if (actcurs3%ISOPEN) then
987: close actcurs3;
988: end if;
989: Wf_Core.Context('Wf_Purge', 'Activities', itemtype, to_char(enddate));
990: raise;
991: end Activities;
992:
993: --

Line 1035: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type)

1031: select null
1032: from WF_ITEM_TYPES WIT
1033: where WN.END_DATE+nvl(WIT.PERSISTENCE_DAYS,0) <= enddate
1034: and WN.MESSAGE_TYPE = WIT.NAME
1035: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type)
1036: or not exists(
1037: select null
1038: from WF_ITEM_TYPES WIT
1039: where WN.MESSAGE_TYPE = WIT.NAME))

Line 1065: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type)

1061: select null
1062: from WF_ITEM_TYPES WIT
1063: where WN.END_DATE+nvl(WIT.PERSISTENCE_DAYS,0) <= enddate
1064: and WN.MESSAGE_TYPE = WIT.NAME
1065: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type)
1066: or not exists(
1067: select null
1068: from WF_ITEM_TYPES WIT
1069: where WN.MESSAGE_TYPE = WIT.NAME))

Line 1114: AND rownum < Wf_Purge.Commit_Frequency;

1110: FROM wf_item_activity_statuses_h wiash
1111: WHERE wiash.notification_id = wn.group_id)
1112: AND wn.end_date is null
1113: AND wn.begin_date <= enddate
1114: AND rownum < Wf_Purge.Commit_Frequency;
1115:
1116: --Bug 6759163 : if statement added to avoid commit when
1117: --'docommit' parameter is false
1118: if (docommit) then

Line 1140: FETCH c1 BULK COLLECT INTO l_nidListTAB LIMIT wf_purge.commit_frequency;

1136:
1137: if (itemtype is not null) then
1138: -- Bug 4163328
1139: -- Use bulk operations to improve performance
1140: FETCH c1 BULK COLLECT INTO l_nidListTAB LIMIT wf_purge.commit_frequency;
1141: exit outer_ntf_loop when l_nidListTAB.COUNT = 0;
1142: else
1143: FETCH c2 BULK COLLECT INTO l_nidListTAB LIMIT wf_purge.commit_frequency;
1144: exit outer_ntf_loop when l_nidListTAB.COUNT = 0;

Line 1143: FETCH c2 BULK COLLECT INTO l_nidListTAB LIMIT wf_purge.commit_frequency;

1139: -- Use bulk operations to improve performance
1140: FETCH c1 BULK COLLECT INTO l_nidListTAB LIMIT wf_purge.commit_frequency;
1141: exit outer_ntf_loop when l_nidListTAB.COUNT = 0;
1142: else
1143: FETCH c2 BULK COLLECT INTO l_nidListTAB LIMIT wf_purge.commit_frequency;
1144: exit outer_ntf_loop when l_nidListTAB.COUNT = 0;
1145: end if;
1146:
1147: -- Delete notification attributes

Line 1180: if (l_nidListTAB.COUNT >= wf_purge.commit_frequency) then

1176: FORALL j in l_nidListTAB.FIRST..l_nidListTAB.LAST
1177: delete from WF_NOTIFICATIONS WN
1178: where WN.NOTIFICATION_ID = l_nidListTAB(j);
1179:
1180: if (l_nidListTAB.COUNT >= wf_purge.commit_frequency) then
1181: exit inner_ntf_loop;
1182: elsif (l_nidListTAB.COUNT < wf_purge.commit_frequency) then
1183: exit outer_ntf_loop;
1184: end if;

Line 1182: elsif (l_nidListTAB.COUNT < wf_purge.commit_frequency) then

1178: where WN.NOTIFICATION_ID = l_nidListTAB(j);
1179:
1180: if (l_nidListTAB.COUNT >= wf_purge.commit_frequency) then
1181: exit inner_ntf_loop;
1182: elsif (l_nidListTAB.COUNT < wf_purge.commit_frequency) then
1183: exit outer_ntf_loop;
1184: end if;
1185:
1186: end loop inner_ntf_loop;

Line 1215: Wf_Purge.AdHocDirectory(enddate);

1211: Fnd_Concurrent.Set_Preferred_RBS;
1212: end if;
1213:
1214: -- Purge AdHoc Users/Roles/User_Roles
1215: Wf_Purge.AdHocDirectory(enddate);
1216:
1217: exception
1218: when others then
1219: if (c1%ISOPEN) then

Line 1225: Wf_Core.Context('Wf_Purge', 'Notifications', itemtype, to_char(enddate));

1221: elsif (c2%ISOPEN) then
1222: close c2;
1223: end if;
1224:
1225: Wf_Core.Context('Wf_Purge', 'Notifications', itemtype, to_char(enddate));
1226: raise;
1227: end Notifications;
1228:
1229: --

Line 1288: wf_purge.abortErrorProcess(itemtype, itemkey);

1284:
1285: -- Bug 1636510
1286: -- Before attempting to purge items we will abort any error process
1287: -- if the activity that launched it is now complete.
1288: wf_purge.abortErrorProcess(itemtype, itemkey);
1289:
1290: l_docommit := docommit;
1291: l_runtimeonly := runtimeonly;
1292: wf_purge.items(itemtype=>itemtype, itemkey=>itemkey, enddate=>enddate, docommit=>docommit,purgesigs=>purgesigs);

Line 1292: wf_purge.items(itemtype=>itemtype, itemkey=>itemkey, enddate=>enddate, docommit=>docommit,purgesigs=>purgesigs);

1288: wf_purge.abortErrorProcess(itemtype, itemkey);
1289:
1290: l_docommit := docommit;
1291: l_runtimeonly := runtimeonly;
1292: wf_purge.items(itemtype=>itemtype, itemkey=>itemkey, enddate=>enddate, docommit=>docommit,purgesigs=>purgesigs);
1293:
1294: if (docommit) then
1295: commit;
1296: Fnd_Concurrent.Set_Preferred_RBS;

Line 1303: wf_purge.activities(itemtype=>itemtype, enddate=>enddate);

1299: --Purge design data only if runtime is
1300: --set to false
1301: if (not nvl(runtimeonly,TRUE)) then
1302: --also purge design data from activities
1303: wf_purge.activities(itemtype=>itemtype, enddate=>enddate);
1304: if (docommit) then
1305: commit;
1306: Fnd_Concurrent.Set_Preferred_RBS;
1307: end if;

Line 1310: Wf_Purge.Directory(enddate);

1306: Fnd_Concurrent.Set_Preferred_RBS;
1307: end if;
1308:
1309: --Directory Information
1310: Wf_Purge.Directory(enddate);
1311: if (docommit) then
1312: commit;
1313: Fnd_Concurrent.Set_Preferred_RBS;
1314: end if;

Line 1327: Wf_Core.Context('Wf_Purge', 'Total', itemtype, itemkey, to_char(enddate));

1323: Notifications(itemtype=>itemtype, enddate=>enddate,docommit=>docommit,purgesigs=>purgesigs);
1324: end if;
1325: exception
1326: when others then
1327: Wf_Core.Context('Wf_Purge', 'Total', itemtype, itemkey, to_char(enddate));
1328: raise;
1329: end Total;
1330:
1331: --

Line 1352: wf_purge.persistence_type := 'PERM';

1348: runtimeonly in boolean,
1349: purgesigs in pls_integer)
1350: is
1351: begin
1352: wf_purge.persistence_type := 'PERM';
1353:
1354: -- Call Total with new args
1355: Wf_Purge.Total(
1356: itemtype,

Line 1355: Wf_Purge.Total(

1351: begin
1352: wf_purge.persistence_type := 'PERM';
1353:
1354: -- Call Total with new args
1355: Wf_Purge.Total(
1356: itemtype,
1357: itemkey,
1358: enddate,
1359: docommit,

Line 1364: wf_purge.persistence_type := 'TEMP';

1360: nvl(runtimeonly, TRUE),
1361: purgesigs);
1362:
1363: -- Reset persistence type to the default value
1364: wf_purge.persistence_type := 'TEMP';
1365:
1366: exception
1367: when others then
1368: -- Reset persistence type to the default value

Line 1369: wf_purge.persistence_type := 'TEMP';

1365:
1366: exception
1367: when others then
1368: -- Reset persistence type to the default value
1369: wf_purge.persistence_type := 'TEMP';
1370: Wf_Core.Context('Wf_Purge', 'TotalPERM', itemtype, itemkey,
1371: to_char(enddate));
1372: raise;
1373: end TotalPERM;

Line 1370: Wf_Core.Context('Wf_Purge', 'TotalPERM', itemtype, itemkey,

1366: exception
1367: when others then
1368: -- Reset persistence type to the default value
1369: wf_purge.persistence_type := 'TEMP';
1370: Wf_Core.Context('Wf_Purge', 'TotalPERM', itemtype, itemkey,
1371: to_char(enddate));
1372: raise;
1373: end TotalPERM;
1374:

Line 1410: wf_purge.persistence_type := x_persistence_type;

1406: begin
1407: -- Convert arguments from varchar2 to real type.
1408: enddate := sysdate - to_number(age);
1409:
1410: wf_purge.persistence_type := x_persistence_type;
1411: wf_purge.commit_frequency := x_commit_frequency;
1412:
1413: --If runtimeonly 'N' then purge both runtime
1414: --and design data

Line 1411: wf_purge.commit_frequency := x_commit_frequency;

1407: -- Convert arguments from varchar2 to real type.
1408: enddate := sysdate - to_number(age);
1409:
1410: wf_purge.persistence_type := x_persistence_type;
1411: wf_purge.commit_frequency := x_commit_frequency;
1412:
1413: --If runtimeonly 'N' then purge both runtime
1414: --and design data
1415: if (upper(runtimeonly) = 'Y') then

Line 1424: Wf_Purge.Total(

1420: l_purgesigs := 1;
1421: end if;
1422:
1423: -- Call Total with new args
1424: Wf_Purge.Total(
1425: itemtype,
1426: itemkey,
1427: enddate,
1428: true,

Line 1436: wf_purge.persistence_type := 'TEMP'; -- reset to the default value

1432:
1433: -- Return 0 for successful completion.
1434: errbuf := '';
1435: retcode := '0';
1436: wf_purge.persistence_type := 'TEMP'; -- reset to the default value
1437: wf_purge.commit_frequency := 1000; -- reset to the default value
1438:
1439: exception
1440: when others then

Line 1437: wf_purge.commit_frequency := 1000; -- reset to the default value

1433: -- Return 0 for successful completion.
1434: errbuf := '';
1435: retcode := '0';
1436: wf_purge.persistence_type := 'TEMP'; -- reset to the default value
1437: wf_purge.commit_frequency := 1000; -- reset to the default value
1438:
1439: exception
1440: when others then
1441: -- Retrieve error message into errbuf

Line 1453: wf_purge.persistence_type := 'TEMP';

1449: -- Return 2 for error.
1450: retcode := '2';
1451:
1452: -- Reset persistence type to the default value
1453: wf_purge.persistence_type := 'TEMP';
1454: end TotalConcurrent;
1455:
1456: --
1457: -- Directory

Line 1609: wf_core.context('WF_PURGE', 'Directory', end_date);

1605: when others then
1606: if (role_cursor%isopen) then
1607: close role_cursor;
1608: end if;
1609: wf_core.context('WF_PURGE', 'Directory', end_date);
1610: raise;
1611: end Directory;
1612:
1613: --

Line 1623: Wf_Purge.Directory(end_date);

1619: procedure AdHocDirectory(
1620: end_date in date)
1621: is
1622: begin
1623: Wf_Purge.Directory(end_date);
1624: exception
1625: when OTHERS then
1626: wf_core.context('WF_PURGE', 'AdHocDirectory', end_date);
1627: raise;

Line 1626: wf_core.context('WF_PURGE', 'AdHocDirectory', end_date);

1622: begin
1623: Wf_Purge.Directory(end_date);
1624: exception
1625: when OTHERS then
1626: wf_core.context('WF_PURGE', 'AdHocDirectory', end_date);
1627: raise;
1628: end AdHocDirectory;
1629:
1630: --

Line 1669: wf_core.context('WF_PURGE', 'GetPurgeableCount', p_itemType);

1665: AND PRIOR WI2.PARENT_ITEM_KEY = WI2.ITEM_KEY);
1666: return l_purgeable;
1667: exception
1668: when OTHERS then
1669: wf_core.context('WF_PURGE', 'GetPurgeableCount', p_itemType);
1670: raise;
1671: end;
1672:
1673:

Line 1809: Wf_Core.Context('Wf_Purge', 'AbortErrorProcess', itemtype, itemkey);

1805: if (c_error3%ISOPEN) then
1806: close c_error3;
1807: end if;
1808:
1809: Wf_Core.Context('Wf_Purge', 'AbortErrorProcess', itemtype, itemkey);
1810: raise;
1811:
1812: end AbortErrorProcess;
1813:

Line 1821: -- -- Those requests will be removed with the WF_PURGE.Item API.

1817: -- --
1818: -- -- procedure ProvisionRequests
1819: -- -- Delete old provisiong requests with end_time before argument.
1820: -- -- These provisioning requests are not tied explicity to a item.
1821: -- -- Those requests will be removed with the WF_PURGE.Item API.
1822: -- --
1823: -- -- IN:
1824: -- -- context - The context to match for the requests to remove.
1825: -- -- enddate - Date to obsolete to

Line 1849: -- wf_core.context('WF_PURGE', 'ProvisionRequests');

1845: --
1846: -- begin
1847: --
1848: -- if (enddate > sysdate) then
1849: -- wf_core.context('WF_PURGE', 'ProvisionRequests');
1850: -- Wf_Core.Token('SYSDATE', to_char(sysdate));
1851: -- Wf_Core.Raise('WF_FUTURE_END_DATE');
1852: -- end if;
1853: --

Line 1876: -- ( docommit and (c1%rowcount = wf_purge.commit_frequency));

1872: -- delete from WF_PROV_REQUESTS
1873: -- where prov_request_id = l_prov_request_id;
1874: --
1875: -- exit inner_prv_loop when
1876: -- ( docommit and (c1%rowcount = wf_purge.commit_frequency));
1877: --
1878: -- end loop inner_prv_loop;
1879: --
1880: -- if c1%isopen then

Line 1906: -- wf_core.context('WF_PURGE','ProvisionRequests', context, enddate);

1902: -- when others then
1903: -- if c1%isopen then
1904: -- close c1;
1905: -- end if;
1906: -- wf_core.context('WF_PURGE','ProvisionRequests', context, enddate);
1907: -- end ProvisionRequests;
1908: --
1909: -- --
1910: -- -- ProvisionRequestsConcurrent

Line 1945: -- wf_purge.commit_frequency := x_commit_frequency;

1941: -- end if;
1942: --
1943: --
1944: -- if x_commit_frequency is not null or x_commit_frequency > 0 then
1945: -- wf_purge.commit_frequency := x_commit_frequency;
1946: -- end if;
1947: --
1948: -- -- Call provisionrequest with new args
1949: -- Wf_Purge.ProvisionRequests(context,

Line 1949: -- Wf_Purge.ProvisionRequests(context,

1945: -- wf_purge.commit_frequency := x_commit_frequency;
1946: -- end if;
1947: --
1948: -- -- Call provisionrequest with new args
1949: -- Wf_Purge.ProvisionRequests(context,
1950: -- enddate,
1951: -- true);
1952: --
1953: --

Line 1957: -- wf_purge.commit_frequency := 500; -- reset to the default value

1953: --
1954: -- -- Return 0 for successful completion.
1955: -- errbuf := '';
1956: -- retcode := '0';
1957: -- wf_purge.commit_frequency := 500; -- reset to the default value
1958: --
1959: -- exception
1960: -- when others then
1961: -- -- Retrieve error message into errbuf

Line 1973: -- wf_purge.commit_frequency := 500;

1969: -- -- Return 2 for error.
1970: -- retcode := '2';
1971:
1972: -- -- Reset commit frequency to the default value
1973: -- wf_purge.commit_frequency := 500;
1974: -- end ProvisionRequestsConcurrent;
1975:
1976:
1977:

Line 1978: end WF_PURGE;

1974: -- end ProvisionRequestsConcurrent;
1975:
1976:
1977:
1978: end WF_PURGE;