DBA Data[Home] [Help]

APPS.WF_ENGINE_BULK dependencies on WF_ITEM

Line 86: -- Create rows in bulk in the WF_ITEMS table with the given item type

82: end Current_Schema;
83:
84: --
85: -- BulkCreateItems (PRIVATE)
86: -- Create rows in bulk in the WF_ITEMS table with the given item type
87: -- , item key list
88: -- and the root process name.
89: -- IN
90: -- itemtype - item type

Line 125: insert into WF_ITEMS (

121: --insert depending on whether user_keys and owner_roles are null or not
122: if user_keys.count > 0 and owner_roles.count > 0 then
123: forall arrInd in itemkeys.FIRST..itemkeys.LAST SAVE EXCEPTIONS
124: -- NORMAL: Insert new item and attributes directly in the db
125: insert into WF_ITEMS (
126: ITEM_TYPE,
127: ITEM_KEY,
128: ROOT_ACTIVITY,
129: ROOT_ACTIVITY_VERSION,

Line 152: insert into WF_ITEMS (

148: user_keys(arrInd)
149: );
150: elsif user_keys.count>0 and owner_roles.count=0 then
151: forall arrInd in itemkeys.FIRST..itemkeys.LAST SAVE EXCEPTIONS
152: insert into WF_ITEMS (
153: ITEM_TYPE,
154: ITEM_KEY,
155: ROOT_ACTIVITY,
156: ROOT_ACTIVITY_VERSION,

Line 177: insert into WF_ITEMS (

173: user_keys(arrInd)
174: );
175: elsif owner_roles.count>0 and user_keys.count=0 then
176: forall arrInd in itemkeys.FIRST..itemkeys.LAST SAVE EXCEPTIONS
177: insert into WF_ITEMS (
178: ITEM_TYPE,
179: ITEM_KEY,
180: ROOT_ACTIVITY,
181: ROOT_ACTIVITY_VERSION,

Line 202: insert into WF_ITEMS (

198: to_date(NULL)
199: );
200: elsif owner_roles.count=0 and user_keys.count=0 then
201: forall arrInd in itemkeys.FIRST..itemkeys.LAST SAVE EXCEPTIONS
202: insert into WF_ITEMS (
203: ITEM_TYPE,
204: ITEM_KEY,
205: ROOT_ACTIVITY,
206: ROOT_ACTIVITY_VERSION,

Line 245: if itemkeys.count > 0 AND (not wf_item.Attribute_On_Demand(itemtype, itemkeys(itemkeys.FIRST))) then

241: ConsolidateKeys(ItemKeys,User_Keys,Owner_Roles);
242: end if;
243: end;
244:
245: if itemkeys.count > 0 AND (not wf_item.Attribute_On_Demand(itemtype, itemkeys(itemkeys.FIRST))) then
246: begin
247: -- Initialize item attributes in bulk
248:
249: --if its on demand, we are not going to do this

Line 253: insert into WF_ITEM_ATTRIBUTE_VALUES (

249: --if its on demand, we are not going to do this
250: forall arrInd in itemkeys.FIRST..itemkeys.LAST save exceptions
251:
252: -- NORMAL: store attributes in table
253: insert into WF_ITEM_ATTRIBUTE_VALUES (
254: ITEM_TYPE,
255: ITEM_KEY,
256: NAME,
257: TEXT_VALUE,

Line 267: from WF_ITEM_ATTRIBUTES WIA

263: WIA.NAME,
264: WIA.TEXT_DEFAULT,
265: WIA.NUMBER_DEFAULT,
266: WIA.DATE_DEFAULT
267: from WF_ITEM_ATTRIBUTES WIA
268: where WIA.ITEM_TYPE = itemtype;
269:
270: exception
271: when others then

Line 330: insert into WF_ITEM_ATTRIBUTE_VALUES (

326: --bulk insert the new attribute for all the itemkeys in the list
327: begin
328:
329: forall arrInd in l_itemkeys.FIRST..l_itemkeys.LAST SAVE EXCEPTIONS
330: insert into WF_ITEM_ATTRIBUTE_VALUES (
331: ITEM_TYPE,
332: ITEM_KEY,
333: NAME,
334: TEXT_VALUE

Line 414: if wf_item.Attribute_On_Demand(itemtype, itemkeys(itemkeys.FIRST)) then

410: Wf_Core.Raise('WFENG_BLK_ITM_ATTRARR_MISMATCH');
411: end if;
412:
413: --If itemtype is on demand, we will insert default values if not exists already
414: if wf_item.Attribute_On_Demand(itemtype, itemkeys(itemkeys.FIRST)) then
415: begin
416: forall arrayIndex in itemkeys.FIRST..itemkeys.LAST save exceptions
417: insert into WF_ITEM_ATTRIBUTE_VALUES
418: (ITEM_TYPE, ITEM_KEY, NAME, TEXT_VALUE)

Line 417: insert into WF_ITEM_ATTRIBUTE_VALUES

413: --If itemtype is on demand, we will insert default values if not exists already
414: if wf_item.Attribute_On_Demand(itemtype, itemkeys(itemkeys.FIRST)) then
415: begin
416: forall arrayIndex in itemkeys.FIRST..itemkeys.LAST save exceptions
417: insert into WF_ITEM_ATTRIBUTE_VALUES
418: (ITEM_TYPE, ITEM_KEY, NAME, TEXT_VALUE)
419: select itemtype, itemkeys(arrayIndex), anames(arrayIndex), text_default
420: from WF_ITEM_ATTRIBUTES WIA
421: where

Line 420: from WF_ITEM_ATTRIBUTES WIA

416: forall arrayIndex in itemkeys.FIRST..itemkeys.LAST save exceptions
417: insert into WF_ITEM_ATTRIBUTE_VALUES
418: (ITEM_TYPE, ITEM_KEY, NAME, TEXT_VALUE)
419: select itemtype, itemkeys(arrayIndex), anames(arrayIndex), text_default
420: from WF_ITEM_ATTRIBUTES WIA
421: where
422: WIA.ITEM_TYPE = itemtype
423: and
424: WIA.NAME = anames(arrayIndex)

Line 425: and not exists (select 1 from WF_ITEM_ATTRIBUTE_VALUES WIAV

421: where
422: WIA.ITEM_TYPE = itemtype
423: and
424: WIA.NAME = anames(arrayIndex)
425: and not exists (select 1 from WF_ITEM_ATTRIBUTE_VALUES WIAV
426: where WIAV.item_type=itemtype
427: and WIAV.item_key=itemkeys(arrayIndex)
428: and WIAV.NAME=anames(arrayIndex));
429: exception

Line 441: update WF_ITEM_ATTRIBUTE_VALUES set

437: g_FailedAttributes.DELETE;
438: -- Set the text value.
439: begin
440: forall arrInd in itemkeys.FIRST..itemkeys.LAST save exceptions
441: update WF_ITEM_ATTRIBUTE_VALUES set
442: TEXT_VALUE = avalues(arrInd)
443: where ITEM_TYPE = itemtype
444: and ITEM_KEY = itemkeys(arrInd)
445: and NAME = anames(arrInd)

Line 559: if wf_item.Attribute_On_Demand(itemtype, itemkeys(itemkeys.FIRST)) then

555: g_failedAttributes:=anames;
556: Wf_Core.Raise('WFENG_BLK_ITM_ATTRARR_MISMATCH');
557: end if;
558: --If itemtype is on demand, we will insert default values if not exists already
559: if wf_item.Attribute_On_Demand(itemtype, itemkeys(itemkeys.FIRST)) then
560: begin
561: forall arrayIndex in itemkeys.FIRST..itemkeys.LAST save exceptions
562: insert into WF_ITEM_ATTRIBUTE_VALUES
563: (ITEM_TYPE, ITEM_KEY, NAME, NUMBER_VALUE)

Line 562: insert into WF_ITEM_ATTRIBUTE_VALUES

558: --If itemtype is on demand, we will insert default values if not exists already
559: if wf_item.Attribute_On_Demand(itemtype, itemkeys(itemkeys.FIRST)) then
560: begin
561: forall arrayIndex in itemkeys.FIRST..itemkeys.LAST save exceptions
562: insert into WF_ITEM_ATTRIBUTE_VALUES
563: (ITEM_TYPE, ITEM_KEY, NAME, NUMBER_VALUE)
564: select itemtype, itemkeys(arrayIndex), anames(arrayIndex), number_default
565: from WF_ITEM_ATTRIBUTES WIA
566: where

Line 565: from WF_ITEM_ATTRIBUTES WIA

561: forall arrayIndex in itemkeys.FIRST..itemkeys.LAST save exceptions
562: insert into WF_ITEM_ATTRIBUTE_VALUES
563: (ITEM_TYPE, ITEM_KEY, NAME, NUMBER_VALUE)
564: select itemtype, itemkeys(arrayIndex), anames(arrayIndex), number_default
565: from WF_ITEM_ATTRIBUTES WIA
566: where
567: WIA.ITEM_TYPE = itemtype
568: and
569: WIA.NAME = anames(arrayIndex)

Line 570: and not exists (select 1 from WF_ITEM_ATTRIBUTE_VALUES WIAV

566: where
567: WIA.ITEM_TYPE = itemtype
568: and
569: WIA.NAME = anames(arrayIndex)
570: and not exists (select 1 from WF_ITEM_ATTRIBUTE_VALUES WIAV
571: where WIAV.item_type=itemtype
572: and WIAV.item_key=itemkeys(arrayIndex)
573: and WIAV.NAME=anames(arrayIndex));
574: exception

Line 587: update WF_ITEM_ATTRIBUTE_VALUES set

583:
584: -- Set the number value.
585: begin
586: forall arrInd in itemkeys.FIRST..itemkeys.LAST save exceptions
587: update WF_ITEM_ATTRIBUTE_VALUES set
588: NUMBER_VALUE = avalues(arrInd)
589: where ITEM_TYPE = itemtype
590: and ITEM_KEY = itemkeys(arrInd)
591: and NAME = anames(arrInd)

Line 709: if wf_item.Attribute_On_Demand(itemtype, itemkeys(itemkeys.FIRST)) then

705: g_FailedItems.DELETE;
706: g_FailedAttributes.DELETE;
707:
708: --If itemtype is on demand, we will insert default values if not exists already
709: if wf_item.Attribute_On_Demand(itemtype, itemkeys(itemkeys.FIRST)) then
710: begin
711: forall arrayIndex in itemkeys.FIRST..itemkeys.LAST save exceptions
712: insert into WF_ITEM_ATTRIBUTE_VALUES
713: (ITEM_TYPE, ITEM_KEY, NAME, DATE_VALUE)

Line 712: insert into WF_ITEM_ATTRIBUTE_VALUES

708: --If itemtype is on demand, we will insert default values if not exists already
709: if wf_item.Attribute_On_Demand(itemtype, itemkeys(itemkeys.FIRST)) then
710: begin
711: forall arrayIndex in itemkeys.FIRST..itemkeys.LAST save exceptions
712: insert into WF_ITEM_ATTRIBUTE_VALUES
713: (ITEM_TYPE, ITEM_KEY, NAME, DATE_VALUE)
714: select itemtype, itemkeys(arrayIndex), anames(arrayIndex), Date_default
715: from WF_ITEM_ATTRIBUTES WIA
716: where

Line 715: from WF_ITEM_ATTRIBUTES WIA

711: forall arrayIndex in itemkeys.FIRST..itemkeys.LAST save exceptions
712: insert into WF_ITEM_ATTRIBUTE_VALUES
713: (ITEM_TYPE, ITEM_KEY, NAME, DATE_VALUE)
714: select itemtype, itemkeys(arrayIndex), anames(arrayIndex), Date_default
715: from WF_ITEM_ATTRIBUTES WIA
716: where
717: WIA.ITEM_TYPE = itemtype
718: and
719: WIA.NAME = anames(arrayIndex)

Line 720: and not exists (select 1 from WF_ITEM_ATTRIBUTE_VALUES WIAV

716: where
717: WIA.ITEM_TYPE = itemtype
718: and
719: WIA.NAME = anames(arrayIndex)
720: and not exists (select 1 from WF_ITEM_ATTRIBUTE_VALUES WIAV
721: where WIAV.item_type=itemtype
722: and WIAV.item_key=itemkeys(arrayIndex)
723: and WIAV.NAME=anames(arrayIndex));
724: exception

Line 732: update WF_ITEM_ATTRIBUTE_VALUES set

728: end if;
729: -- Set the date value.
730: begin
731: forall arrInd in itemkeys.FIRST..itemkeys.LAST save exceptions
732: update WF_ITEM_ATTRIBUTE_VALUES set
733: DATE_VALUE = avalues(arrInd)
734: where ITEM_TYPE = itemtype
735: and ITEM_KEY = itemkeys(arrInd)
736: and NAME = anames(arrInd)

Line 938: /* Wf_Item.ClearCache;

934: -- Check for duplicate item. Not needed as BulkCreateItems would validate this
935:
936: -- Clear plsql cache first, just in case previous
937: -- item was purged/rolled back, then check for duplicate.
938: /* Wf_Item.ClearCache;
939: -- loop through all itemkeys in the list to check for duplicate
940: for arrInd in itemkeys.FIRST..itemkeys.LAST loop
941: if (Wf_Item.Item_Exist(itemtype, itemkeys(arrInd))) then
942: foundDuplicate:=TRUE;

Line 941: if (Wf_Item.Item_Exist(itemtype, itemkeys(arrInd))) then

937: -- item was purged/rolled back, then check for duplicate.
938: /* Wf_Item.ClearCache;
939: -- loop through all itemkeys in the list to check for duplicate
940: for arrInd in itemkeys.FIRST..itemkeys.LAST loop
941: if (Wf_Item.Item_Exist(itemtype, itemkeys(arrInd))) then
942: foundDuplicate:=TRUE;
943: g_FailedItems(g_FailedItems.COUNT+1):=itemkeys(arrInd);
944: itemkeys.delete(arrInd);
945: user_keys.delete(arrInd);

Line 979: insert into WF_ITEM_ATTRIBUTE_VALUES (

975: -- Create a schema attribute across the itemkeys
976: if l_itemkeys.count>0 then
977: begin
978: forall arrInd in l_itemkeys.FIRST..l_itemkeys.LAST SAVE EXCEPTIONS
979: insert into WF_ITEM_ATTRIBUTE_VALUES (
980: ITEM_TYPE,
981: ITEM_KEY,
982: NAME,
983: TEXT_VALUE

Line 1028: insert into WF_ITEM_ATTRIBUTE_VALUES (

1024: number_value=>l_itemkeys.count);
1025: end if; --Label Counter exists
1026: begin
1027: forall arrInd in l_itemkeys.FIRST..l_itemkeys.LAST SAVE EXCEPTIONS
1028: insert into WF_ITEM_ATTRIBUTE_VALUES (
1029: ITEM_TYPE,
1030: ITEM_KEY,
1031: NAME,
1032: TEXT_VALUE

Line 1058: update WF_ITEM_ATTRIBUTE_VALUES

1054: else
1055: -- Parent context is null
1056: -- increase all known #CNT counter by the number of itemkeys
1057: l_count:= l_itemkeys.count;
1058: update WF_ITEM_ATTRIBUTE_VALUES
1059: set NUMBER_VALUE = NUMBER_VALUE + l_count
1060: where NAME like '#CNT_%'
1061: and NUMBER_VALUE is not null
1062: and ITEM_TYPE = parent_itemType

Line 1181: from WF_ITEMS WI

1177: g_successItems.DELETE;
1178: begin
1179: select WI.ROOT_ACTIVITY, WI.ROOT_ACTIVITY_VERSION
1180: into process,version
1181: from WF_ITEMS WI
1182: where WI.ITEM_TYPE = itemtype
1183: and WI.ITEM_KEY = l_itemkeys(1);
1184: exception
1185: when no_Data_found then

Line 1209: -- bulk insert into WF_ITEM_ACTIVITY_STATUSES

1205:
1206: --increment the execution time counter value
1207: g_execCount:=g_execCount+1;
1208:
1209: -- bulk insert into WF_ITEM_ACTIVITY_STATUSES
1210: begin
1211: forall arrInd in l_itemkeys.FIRST..l_itemkeys.LAST save exceptions
1212: insert
1213: into WF_ITEM_ACTIVITY_STATUSES (

Line 1213: into WF_ITEM_ACTIVITY_STATUSES (

1209: -- bulk insert into WF_ITEM_ACTIVITY_STATUSES
1210: begin
1211: forall arrInd in l_itemkeys.FIRST..l_itemkeys.LAST save exceptions
1212: insert
1213: into WF_ITEM_ACTIVITY_STATUSES (
1214: ITEM_TYPE,
1215: ITEM_KEY,
1216: PROCESS_ACTIVITY,
1217: ACTIVITY_STATUS,

Line 1512: into WF_ITEM_ACTIVITY_STATUSES (

1508: if l_itemkeys.count>0 then
1509: begin
1510: forall arrInd in l_itemkeys.FIRST..l_itemkeys.LAST save exceptions
1511: insert
1512: into WF_ITEM_ACTIVITY_STATUSES (
1513: ITEM_TYPE,
1514: ITEM_KEY,
1515: PROCESS_ACTIVITY,
1516: ACTIVITY_STATUS,

Line 1691: from WF_ITEMS WI

1687: -- only for the first itemkey in the list.
1688: begin
1689: select WI.ROOT_ACTIVITY_VERSION
1690: into version
1691: from WF_ITEMS WI
1692: where WI.ITEM_TYPE = itemtype
1693: and WI.ITEM_KEY = l_itemkeys(1)
1694: and WI.ROOT_ACTIVITY=process;
1695: exception

Line 1748: -- bulk insert into WF_ITEM_ACTIVITY_STATUSES

1744: -- insert the process into the item activity statuses table
1745:
1746: -- increment the execution time counter by 1.
1747: g_execCount:=g_execCount+1;
1748: -- bulk insert into WF_ITEM_ACTIVITY_STATUSES
1749: begin
1750: forall arrInd in l_itemkeys.FIRST..l_itemkeys.LAST save exceptions
1751: insert
1752: into WF_ITEM_ACTIVITY_STATUSES (

Line 1752: into WF_ITEM_ACTIVITY_STATUSES (

1748: -- bulk insert into WF_ITEM_ACTIVITY_STATUSES
1749: begin
1750: forall arrInd in l_itemkeys.FIRST..l_itemkeys.LAST save exceptions
1751: insert
1752: into WF_ITEM_ACTIVITY_STATUSES (
1753: ITEM_TYPE,
1754: ITEM_KEY,
1755: PROCESS_ACTIVITY,
1756: ACTIVITY_STATUS,

Line 1939: into WF_ITEM_ACTIVITY_STATUSES (

1935: -- for all the itemkeys.
1936: begin
1937: forall arrInd in l_itemkeys.FIRST..l_itemkeys.LAST save exceptions
1938: insert
1939: into WF_ITEM_ACTIVITY_STATUSES (
1940: ITEM_TYPE,
1941: ITEM_KEY,
1942: PROCESS_ACTIVITY,
1943: ACTIVITY_STATUS,