DBA Data[Home] [Help]

APPS.WF_PURGE dependencies on WF_ITEMS

Line 80: WHERE PERSISTENCE_TYPE = Wf_Purge.persistence_type and NAME=itemtype) WIT, WF_ITEMS WI

76: cursor item2purge is
77: SELECT WI.ITEM_TYPE, WI.ITEM_KEY
78: FROM (SELECT PERSISTENCE_DAYS, NAME
79: FROM WF_ITEM_TYPES
80: WHERE PERSISTENCE_TYPE = Wf_Purge.persistence_type and NAME=itemtype) WIT, WF_ITEMS WI
81: WHERE WI.ITEM_TYPE = WIT.NAME
82: AND WI.END_DATE <= enddate-nvl(WIT.PERSISTENCE_DAYS,0)
83: AND WI.END_DATE > xenddate
84: AND NOT EXISTS

Line 86: FROM WF_ITEMS WI2

82: AND WI.END_DATE <= enddate-nvl(WIT.PERSISTENCE_DAYS,0)
83: AND WI.END_DATE > xenddate
84: AND NOT EXISTS
85: (SELECT NULL
86: FROM WF_ITEMS WI2
87: WHERE WI2.END_DATE IS NULL
88: START WITH WI2.ITEM_TYPE = WI.ITEM_TYPE
89: AND WI2.ITEM_KEY = WI.ITEM_KEY
90: CONNECT BY PRIOR WI2.ITEM_TYPE = WI2.PARENT_ITEM_TYPE

Line 94: FROM WF_ITEMS WI2

90: CONNECT BY PRIOR WI2.ITEM_TYPE = WI2.PARENT_ITEM_TYPE
91: AND PRIOR WI2.ITEM_KEY = WI2.PARENT_ITEM_KEY )
92: AND NOT EXISTS
93: (SELECT NULL
94: FROM WF_ITEMS WI2
95: WHERE WI2.END_DATE IS NULL
96: START WITH WI2.ITEM_TYPE = WI.ITEM_TYPE
97: AND WI2.ITEM_KEY = WI.ITEM_KEY
98: CONNECT BY PRIOR WI2.PARENT_ITEM_TYPE = WI2.ITEM_TYPE

Line 106: from WF_ITEMS WI

102:
103: -- JWSMITH bug 2070056 - add new cursor for performance
104: cursor item3purge is
105: select WI.ITEM_TYPE, WI.ITEM_KEY
106: from WF_ITEMS WI
107: where WI.ITEM_TYPE = itemtype
108: and WI.ITEM_KEY = itemkey
109: and WI.end_date <= enddate
110: and exists

Line 118: from WF_ITEMS WI2

114: and WI.ITEM_TYPE = WIT.NAME
115: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type)
116: and not exists
117: (select null
118: from WF_ITEMS WI2
119: WHERE WI2.END_DATE IS NULL
120: START WITH WI2.ITEM_TYPE = WI.ITEM_TYPE
121: AND WI2.ITEM_KEY = WI.ITEM_KEY
122: CONNECT BY PRIOR WI2.ITEM_TYPE = WI2.PARENT_ITEM_TYPE

Line 126: from WF_ITEMS WI2

122: CONNECT BY PRIOR WI2.ITEM_TYPE = WI2.PARENT_ITEM_TYPE
123: AND PRIOR WI2.ITEM_KEY = WI2.PARENT_ITEM_KEY
124: UNION ALL
125: select null
126: from WF_ITEMS WI2
127: WHERE WI2.END_DATE IS NULL
128: START WITH WI2.ITEM_TYPE = WI.ITEM_TYPE
129: AND WI2.ITEM_KEY = WI.ITEM_KEY
130: CONNECT BY PRIOR WI2.PARENT_ITEM_TYPE = WI2.ITEM_TYPE

Line 137: from WF_ITEMS WI

133: -- CTILLEY bug 2642057 - added new cursor for use when FORCE
134: -- arg is TRUE.
135: cursor item4purge is
136: select WI.ITEM_TYPE, WI.ITEM_KEY
137: from WF_ITEMS WI
138: where WI.ITEM_KEY = itemkey
139: and WI.ITEM_TYPE = itemtype
140: and WI.end_date <= enddate;
141:

Line 147: select /*+ first_rows index(WI,WF_ITEMS_N3) */

143: -- of using like condition. We will no longer support passing partial values
144: -- for item type or item key.
145:
146: cursor item5purge is
147: select /*+ first_rows index(WI,WF_ITEMS_N3) */
148: WI.ITEM_TYPE, WI.ITEM_KEY
149: from WF_ITEMS WI
150: where WI.END_DATE <= enddate
151: and WI.END_DATE > xenddate

Line 149: from WF_ITEMS WI

145:
146: cursor item5purge is
147: select /*+ first_rows index(WI,WF_ITEMS_N3) */
148: WI.ITEM_TYPE, WI.ITEM_KEY
149: from WF_ITEMS WI
150: where WI.END_DATE <= enddate
151: and WI.END_DATE > xenddate
152: and exists
153: (select null

Line 160: from WF_ITEMS WI2

156: and WI.ITEM_TYPE = WIT.NAME
157: and WIT.PERSISTENCE_TYPE = Wf_Purge.persistence_type)
158: and not exists
159: (select null
160: from WF_ITEMS WI2
161: WHERE WI2.END_DATE IS NULL
162: START WITH WI2.ITEM_TYPE = WI.ITEM_TYPE
163: AND WI2.ITEM_KEY = WI.ITEM_KEY
164: CONNECT BY PRIOR WI2.ITEM_TYPE = WI2.PARENT_ITEM_TYPE

Line 168: from WF_ITEMS WI2

164: CONNECT BY PRIOR WI2.ITEM_TYPE = WI2.PARENT_ITEM_TYPE
165: AND PRIOR WI2.ITEM_KEY = WI2.PARENT_ITEM_KEY
166: UNION ALL
167: select null
168: from WF_ITEMS WI2
169: WHERE WI2.END_DATE IS NULL
170: START WITH WI2.ITEM_TYPE = WI.ITEM_TYPE
171: AND WI2.ITEM_KEY = WI.ITEM_KEY
172: CONNECT BY PRIOR WI2.PARENT_ITEM_TYPE = WI2.ITEM_TYPE

Line 435: delete from WF_ITEMS

431: -- and source = 'WORKFLOW';
432: --
433: --finally delete the item itself.
434: FORALL j IN l_itemkeyTAB.FIRST..l_itemkeyTAB.LAST
435: delete from WF_ITEMS
436: where ITEM_TYPE = l_itemtypeTAB(j)
437: and ITEM_KEY = l_itemkeyTAB(j);
438:
439: exception

Line 626: from WF_ITEMS WI

622: --Use itemcurs1 if the rootname is 'ROOT'
623: cursor itemcurs1(begdate in date, enddate in date,
624: roottype in varchar2, rootname in varchar2) is
625: select WI.ITEM_TYPE, WI.ITEM_KEY, WI.ROOT_ACTIVITY, WI.BEGIN_DATE
626: from WF_ITEMS WI
627: where WI.BEGIN_DATE between begdate and nvl(enddate, WI.BEGIN_DATE)
628: and WI.ITEM_TYPE = roottype;
629:
630: --Use itemcurs2 for other rootnames

Line 634: from WF_ITEMS WI

630: --Use itemcurs2 for other rootnames
631: cursor itemcurs2(begdate in date, enddate in date,
632: roottype in varchar2, rootname in varchar2) is
633: select WI.ITEM_TYPE, WI.ITEM_KEY, WI.ROOT_ACTIVITY, WI.BEGIN_DATE
634: from WF_ITEMS WI
635: where WI.BEGIN_DATE between begdate and nvl(enddate, WI.BEGIN_DATE)
636: and WI.ITEM_TYPE = roottype
637: and WI.ROOT_ACTIVITY = rootname ;
638:

Line 1571: from WF_ITEMS wi

1567: where wn.RECIPIENT_ROLE = local.NAME
1568: or wn.ORIGINAL_RECIPIENT = local.NAME)
1569: and not exists
1570: (select NULL
1571: from WF_ITEMS wi
1572: where wi.OWNER_ROLE = local.NAME);
1573:
1574: -- Bug 8204723. These two cursors are used to remove expired associations regardles
1575: -- of whether the role is expired or not.

Line 1843: from WF_ITEMS WI

1839: l_purgeable number ;
1840: BEGIN
1841: --Get all records for the itemtype
1842: select Count(*) into l_purgeable
1843: from WF_ITEMS WI
1844: where WI.ITEM_TYPE = p_itemType
1845: and WI.END_DATE <= sysdate
1846: and exists
1847: (select null

Line 1854: from WF_ITEMS WI2

1850: and WI.ITEM_TYPE = WIT.NAME
1851: )
1852: and not exists
1853: (select null
1854: from WF_ITEMS WI2
1855: WHERE WI2.END_DATE IS NULL
1856: START WITH WI2.ITEM_TYPE = WI.ITEM_TYPE
1857: AND WI2.ITEM_KEY = WI.ITEM_KEY
1858: CONNECT BY PRIOR WI2.ITEM_TYPE = WI2.PARENT_ITEM_TYPE

Line 1862: from WF_ITEMS WI2

1858: CONNECT BY PRIOR WI2.ITEM_TYPE = WI2.PARENT_ITEM_TYPE
1859: AND PRIOR WI2.ITEM_KEY = WI2.PARENT_ITEM_KEY
1860: UNION ALL
1861: select null
1862: from WF_ITEMS WI2
1863: WHERE WI2.END_DATE IS NULL
1864: START WITH WI2.ITEM_TYPE = WI.ITEM_TYPE
1865: AND WI2.ITEM_KEY = WI.ITEM_KEY
1866: CONNECT BY PRIOR WI2.PARENT_ITEM_TYPE = WI2.ITEM_TYPE

Line 1893: from wf_item_activity_statuses wias, wf_items wi

1889:
1890: -- Bug 11728665, added null statement to improve performance of c_errorX cursors.
1891: cursor c_error1 is
1892: select wi.item_key
1893: from wf_item_activity_statuses wias, wf_items wi
1894: where wi.item_type = 'WFERROR'
1895: and parent_item_type = itemtype
1896: and wi.parent_item_type = wias.item_type
1897: and wi.parent_item_key = wias.item_key

Line 1904: from wf_item_activity_statuses wias, wf_items wi

1900: and wias.activity_status = 'COMPLETE';
1901:
1902: cursor c_error2 is
1903: select wi.item_key
1904: from wf_item_activity_statuses wias, wf_items wi
1905: where wi.item_type = 'WFERROR'
1906: and parent_item_type = itemtype
1907: and parent_item_key = itemkey
1908: and wi.parent_item_type = wias.item_type

Line 1916: from wf_item_activity_statuses wias, wf_items wi

1912: and wias.activity_status = 'COMPLETE';
1913:
1914: cursor c_error3 is
1915: select wi.item_key
1916: from wf_item_activity_statuses wias, wf_items wi
1917: where wi.item_type = 'WFERROR'
1918: and wi.parent_item_type = wias.item_type
1919: and wi.parent_item_key = wias.item_key
1920: and wi.parent_context = wias.process_activity