DBA Data[Home] [Help]

APPS.WF_ENGINE dependencies on WF_ITEM

Line 91: elsif (not Wf_Item.Item_Exist(itemtype, itemkey)) then

87: Wf_Core.Token('ANAME', nvl(aname, 'NULL'));
88: Wf_Core.Raise('WFSQL_ARGS');
89:
90: -- Insure this is a valid item
91: elsif (not Wf_Item.Item_Exist(itemtype, itemkey)) then
92: Wf_Core.Token('TYPE', itemtype);
93: Wf_Core.Token('KEY', itemkey);
94: Wf_Core.Raise('WFENG_ITEM');
95:

Line 111: insert into WF_ITEM_ATTRIBUTE_VALUES (

107: WF_CACHE.ItemAttrValues(wiavIND).NUMBER_VALUE := number_value;
108: WF_CACHE.ItemAttrValues(wiavIND).DATE_VALUE := date_value;
109:
110: else
111: insert into WF_ITEM_ATTRIBUTE_VALUES (
112: ITEM_TYPE,
113: ITEM_KEY,
114: NAME,
115: TEXT_VALUE,

Line 175: elsif (not Wf_Item.Item_Exist(itemtype, itemkey)) then

171:
172: -- Insure this is a valid item and validate that the text array
173: -- tables passed in are in proper order.
174:
175: elsif (not Wf_Item.Item_Exist(itemtype, itemkey)) then
176: Wf_Core.Token('TYPE', itemtype);
177: Wf_Core.Token('KEY', itemkey);
178: Wf_Core.Raise('WFENG_ITEM');
179:

Line 218: insert into WF_ITEM_ATTRIBUTE_VALUES (

214:
215: end loop;
216: else
217: forall arrayIndex in aname.FIRST..aname.LAST
218: insert into WF_ITEM_ATTRIBUTE_VALUES (
219: ITEM_TYPE,
220: ITEM_KEY,
221: NAME,
222: TEXT_VALUE

Line 281: elsif (not Wf_Item.Item_Exist(itemtype, itemkey)) then

277: Wf_Core.Raise('WFSQL_ARGS');
278:
279: -- Insure this is a valid item, and that the attribute arrays are
280: -- matching and in the proper form.
281: elsif (not Wf_Item.Item_Exist(itemtype, itemkey)) then
282: Wf_Core.Token('TYPE', itemtype);
283: Wf_Core.Token('KEY', itemkey);
284: Wf_Core.Raise('WFENG_ITEM');
285:

Line 319: insert into WF_ITEM_ATTRIBUTE_VALUES (

315: end if;
316: end loop;
317: else
318: forall arrayIndex in aname.FIRST..aname.LAST
319: insert into WF_ITEM_ATTRIBUTE_VALUES (
320: ITEM_TYPE,
321: ITEM_KEY,
322: NAME,
323: NUMBER_VALUE

Line 384: if (not Wf_Item.Item_Exist(itemtype, itemkey)) then

380:
381: -- Insure this is a valid item, and the array tables match and are
382: -- in proper form.
383:
384: if (not Wf_Item.Item_Exist(itemtype, itemkey)) then
385: Wf_Core.Token('TYPE', itemtype);
386: Wf_Core.Token('KEY', itemkey);
387: Wf_Core.Raise('WFENG_ITEM');
388:

Line 418: insert into WF_ITEM_ATTRIBUTE_VALUES (

414: end if;
415: end loop;
416: else
417: forall arrayIndex in aname.FIRST..aname.LAST
418: insert into WF_ITEM_ATTRIBUTE_VALUES (
419: ITEM_TYPE,
420: ITEM_KEY,
421: NAME,
422: DATE_VALUE

Line 499: from WF_ITEM_ATTRIBUTES WIA

495: begin
496: select WIA.ITEM_TYPE, WIA.NAME, WIA.TYPE, WIA.SUBTYPE, WIA.FORMAT,
497: WIA.TEXT_DEFAULT, WIA.NUMBER_DEFAULT, WIA.DATE_DEFAULT
498: into WF_CACHE.ItemAttributes(wiaIND)
499: from WF_ITEM_ATTRIBUTES WIA
500: where WIA.ITEM_TYPE = itemtype
501: and WIA.NAME = aname;
502:
503: exception

Line 591: update WF_ITEM_ATTRIBUTE_VALUES set

587:
588: end if;
589:
590: else
591: update WF_ITEM_ATTRIBUTE_VALUES set
592: TEXT_VALUE = tvalue
593: where ITEM_TYPE = itemtype
594: and ITEM_KEY = itemkey
595: and NAME = aname;

Line 599: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then

595: and NAME = aname;
596:
597: if (SQL%NOTFOUND) then
598: -- ondemand logic.
599: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then
600: --we need to check if the item attribute is defined or not
601: --if attribute value is not defined at design time, we raise an exception
602: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, TEXT_VALUE)
603: select

Line 602: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, TEXT_VALUE)

598: -- ondemand logic.
599: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then
600: --we need to check if the item attribute is defined or not
601: --if attribute value is not defined at design time, we raise an exception
602: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, TEXT_VALUE)
603: select
604: SetItemAttrText.itemtype,
605: SetItemAttrText.itemkey,
606: SetItemAttrText.aname,

Line 608: from WF_ITEM_ATTRIBUTES WIA

604: SetItemAttrText.itemtype,
605: SetItemAttrText.itemkey,
606: SetItemAttrText.aname,
607: SetItemAttrText.avalue
608: from WF_ITEM_ATTRIBUTES WIA
609: where WIA.ITEM_TYPE = SetItemAttrText.itemtype
610: and WIA.NAME = SetItemAttrText.aname;
611:
612: if SQL%NOTFOUND then

Line 699: update WF_ITEM_ATTRIBUTE_VALUES set

695: return TRUE;
696: end if;
697:
698: else
699: update WF_ITEM_ATTRIBUTE_VALUES set
700: TEXT_VALUE = p_avalue
701: where ITEM_TYPE = p_itemtype
702: and ITEM_KEY = p_itemkey
703: and NAME = p_aname;

Line 707: if wf_item.Attribute_ON_Demand(p_itemtype, p_itemkey) then

703: and NAME = p_aname;
704:
705: if (SQL%NOTFOUND) then
706: -- ondemand logic
707: if wf_item.Attribute_ON_Demand(p_itemtype, p_itemkey) then
708: --
709: --we need to check if the item attribute is defined or not
710: --if attribute value is not defined at design time, we raise an exception
711: --

Line 712: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, TEXT_VALUE)

708: --
709: --we need to check if the item attribute is defined or not
710: --if attribute value is not defined at design time, we raise an exception
711: --
712: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, TEXT_VALUE)
713: select
714: SetItemAttrText2.p_itemtype,
715: SetItemAttrText2.p_itemkey,
716: SetItemAttrText2.p_aname,

Line 718: from WF_ITEM_ATTRIBUTES WIA

714: SetItemAttrText2.p_itemtype,
715: SetItemAttrText2.p_itemkey,
716: SetItemAttrText2.p_aname,
717: SetItemAttrText2.p_avalue
718: from WF_ITEM_ATTRIBUTES WIA
719: where WIA.ITEM_TYPE = SetItemAttrText2.p_itemtype
720: and WIA.NAME = SetItemAttrText2.p_aname;
721:
722: if SQL%NOTFOUND then

Line 778: from WF_ITEM_ATTRIBUTES WIA

774: begin
775: select WIA.ITEM_TYPE, WIA.NAME, WIA.TYPE, WIA.SUBTYPE, WIA.FORMAT,
776: WIA.TEXT_DEFAULT, WIA.NUMBER_DEFAULT, WIA.DATE_DEFAULT
777: into WF_CACHE.ItemAttributes(wiaIND)
778: from WF_ITEM_ATTRIBUTES WIA
779: where WIA.ITEM_TYPE = itemtype
780: and WIA.NAME = aname;
781:
782: exception

Line 876: update WF_ITEM_ATTRIBUTE_VALUES set

872:
873: end if;
874:
875: else
876: update WF_ITEM_ATTRIBUTE_VALUES set
877: NUMBER_VALUE = avalue
878: where ITEM_TYPE = itemtype
879: and ITEM_KEY = itemkey
880: and NAME = aname;

Line 884: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then

880: and NAME = aname;
881:
882: if (SQL%NOTFOUND) then
883: --ondemand logic.
884: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then
885: --we need to check if the item attribute is defined or not
886: --if attribute value is not defined, we raise an exception
887: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, NUMBER_VALUE)
888: select

Line 887: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, NUMBER_VALUE)

883: --ondemand logic.
884: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then
885: --we need to check if the item attribute is defined or not
886: --if attribute value is not defined, we raise an exception
887: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, NUMBER_VALUE)
888: select
889: SetItemAttrNumber.itemtype,
890: SetItemAttrNumber.itemkey,
891: SetItemAttrNumber.aname,

Line 893: from WF_ITEM_ATTRIBUTES WIA

889: SetItemAttrNumber.itemtype,
890: SetItemAttrNumber.itemkey,
891: SetItemAttrNumber.aname,
892: SetItemAttrNumber.avalue
893: from WF_ITEM_ATTRIBUTES WIA
894: where WIA.ITEM_TYPE = SetItemAttrNumber.itemtype
895: and WIA.NAME = SetItemAttrNumber.aname;
896:
897: if SQL%NOTFOUND then

Line 963: update WF_ITEM_ATTRIBUTE_VALUES set

959:
960: end if;
961:
962: else
963: update WF_ITEM_ATTRIBUTE_VALUES set
964: DATE_VALUE = avalue
965: where ITEM_TYPE = itemtype
966: and ITEM_KEY = itemkey
967: and NAME = aname;

Line 971: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then

967: and NAME = aname;
968:
969: if (SQL%NOTFOUND) then
970: --ondemand logic.
971: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then
972: --we need to check if the item attribute is defined or not
973: --if attribute value is not defined at design time, we raise an exception
974: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, DATE_VALUE)
975: select

Line 974: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, DATE_VALUE)

970: --ondemand logic.
971: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then
972: --we need to check if the item attribute is defined or not
973: --if attribute value is not defined at design time, we raise an exception
974: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, DATE_VALUE)
975: select
976: SetItemAttrDate.itemtype,
977: SetItemAttrDate.itemkey,
978: SetItemAttrDate.aname,

Line 980: from WF_ITEM_ATTRIBUTES WIA

976: SetItemAttrDate.itemtype,
977: SetItemAttrDate.itemkey,
978: SetItemAttrDate.aname,
979: SetItemAttrDate.avalue
980: from WF_ITEM_ATTRIBUTES WIA
981: where WIA.ITEM_TYPE = SetItemAttrDate.itemtype
982: and WIA.NAME = SetItemAttrDate.aname;
983:
984: if SQL%NOTFOUND then

Line 1083: update WF_ITEM_ATTRIBUTE_VALUES set

1079: wf_core.token('OPERATION', 'Wf_Engine.SetItemAttrEvent');
1080: wf_core.raise('WFENG_SYNCH_DISABLED');
1081: end if;
1082:
1083: update WF_ITEM_ATTRIBUTE_VALUES set
1084: EVENT_VALUE = SetItemAttrEvent.event
1085: where ITEM_TYPE = SetItemAttrEvent.itemtype
1086: and ITEM_KEY = SetItemAttrEvent.itemkey
1087: and NAME = SetItemAttrEvent.name;

Line 1091: if wf_item.Attribute_ON_Demand(SetItemAttrEvent.itemtype, SetItemAttrEvent.itemkey) then

1087: and NAME = SetItemAttrEvent.name;
1088:
1089: if (SQL%NOTFOUND) then
1090: --ondemand logic.
1091: if wf_item.Attribute_ON_Demand(SetItemAttrEvent.itemtype, SetItemAttrEvent.itemkey) then
1092: --we need to check if the item attribute is defined or not
1093: --if attribute value is not defined at design time, we raise an exception
1094:
1095: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, EVENT_VALUE)

Line 1095: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, EVENT_VALUE)

1091: if wf_item.Attribute_ON_Demand(SetItemAttrEvent.itemtype, SetItemAttrEvent.itemkey) then
1092: --we need to check if the item attribute is defined or not
1093: --if attribute value is not defined at design time, we raise an exception
1094:
1095: insert into WF_ITEM_ATTRIBUTE_VALUES (ITEM_TYPE, ITEM_KEY, NAME, EVENT_VALUE)
1096: select
1097: SetItemAttrEvent.itemtype,
1098: SetItemAttrEvent.itemkey,
1099: SetItemAttrEvent.name,

Line 1101: from WF_ITEM_ATTRIBUTES WIA

1097: SetItemAttrEvent.itemtype,
1098: SetItemAttrEvent.itemkey,
1099: SetItemAttrEvent.name,
1100: SetItemAttrEvent.event
1101: from WF_ITEM_ATTRIBUTES WIA
1102: where WIA.ITEM_TYPE = SetItemAttrEvent.itemtype
1103: and WIA.NAME = SetItemAttrEvent.name;
1104:
1105: if SQL%NOTFOUND then

Line 1189: update WF_ITEM_ATTRIBUTE_VALUES set

1185: end loop;
1186:
1187: else
1188: forall arrayIndex in aname.FIRST..aname.LAST
1189: update WF_ITEM_ATTRIBUTE_VALUES set
1190: TEXT_VALUE = avalue(arrayIndex)
1191: where ITEM_TYPE = itemtype
1192: and ITEM_KEY = itemkey
1193: and NAME = aname(arrayIndex);

Line 1198: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then

1194:
1195: success_cnt := SQL%ROWCOUNT;
1196: if (success_cnt <> aname.COUNT) then
1197: --ondemand logic
1198: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then
1199: forall arrayIndex in aname.FIRST..aname.LAST
1200: insert into WF_ITEM_ATTRIBUTE_VALUES
1201: (ITEM_TYPE, ITEM_KEY, NAME, TEXT_VALUE)
1202: select itemtype, itemkey, aname(arrayIndex), avalue(arrayIndex)

Line 1200: insert into WF_ITEM_ATTRIBUTE_VALUES

1196: if (success_cnt <> aname.COUNT) then
1197: --ondemand logic
1198: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then
1199: forall arrayIndex in aname.FIRST..aname.LAST
1200: insert into WF_ITEM_ATTRIBUTE_VALUES
1201: (ITEM_TYPE, ITEM_KEY, NAME, TEXT_VALUE)
1202: select itemtype, itemkey, aname(arrayIndex), avalue(arrayIndex)
1203: from WF_ITEM_ATTRIBUTES WIA
1204: where

Line 1203: from WF_ITEM_ATTRIBUTES WIA

1199: forall arrayIndex in aname.FIRST..aname.LAST
1200: insert into WF_ITEM_ATTRIBUTE_VALUES
1201: (ITEM_TYPE, ITEM_KEY, NAME, TEXT_VALUE)
1202: select itemtype, itemkey, aname(arrayIndex), avalue(arrayIndex)
1203: from WF_ITEM_ATTRIBUTES WIA
1204: where
1205: WIA.ITEM_TYPE = itemtype
1206: and
1207: WIA.NAME = aname(arrayIndex)

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

1204: where
1205: WIA.ITEM_TYPE = itemtype
1206: and
1207: WIA.NAME = aname(arrayIndex)
1208: and not exists (select 1 from WF_ITEM_ATTRIBUTE_VALUES WIAV
1209: where WIAV.item_type=itemtype
1210: and WIAV.item_key=itemkey
1211: and WIAV.NAME=aname(arrayIndex));
1212:

Line 1302: update WF_ITEM_ATTRIBUTE_VALUES set

1298: end loop;
1299:
1300: else
1301: forall arrayIndex in aname.FIRST..aname.LAST
1302: update WF_ITEM_ATTRIBUTE_VALUES set
1303: NUMBER_VALUE = avalue(arrayIndex)
1304: where ITEM_TYPE = itemtype
1305: and ITEM_KEY = itemkey
1306: and NAME = aname(arrayIndex);

Line 1311: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then

1307:
1308: success_cnt := SQL%ROWCOUNT;
1309: if (success_cnt <> aname.COUNT) then
1310: --ondemand logic
1311: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then
1312: forall arrayIndex in aname.FIRST..aname.LAST
1313: insert into WF_ITEM_ATTRIBUTE_VALUES
1314: (ITEM_TYPE, ITEM_KEY, NAME, NUMBER_VALUE)
1315: select itemtype, itemkey, aname(arrayIndex), avalue(arrayIndex)

Line 1313: insert into WF_ITEM_ATTRIBUTE_VALUES

1309: if (success_cnt <> aname.COUNT) then
1310: --ondemand logic
1311: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then
1312: forall arrayIndex in aname.FIRST..aname.LAST
1313: insert into WF_ITEM_ATTRIBUTE_VALUES
1314: (ITEM_TYPE, ITEM_KEY, NAME, NUMBER_VALUE)
1315: select itemtype, itemkey, aname(arrayIndex), avalue(arrayIndex)
1316: from WF_ITEM_ATTRIBUTES WIA
1317: where

Line 1316: from WF_ITEM_ATTRIBUTES WIA

1312: forall arrayIndex in aname.FIRST..aname.LAST
1313: insert into WF_ITEM_ATTRIBUTE_VALUES
1314: (ITEM_TYPE, ITEM_KEY, NAME, NUMBER_VALUE)
1315: select itemtype, itemkey, aname(arrayIndex), avalue(arrayIndex)
1316: from WF_ITEM_ATTRIBUTES WIA
1317: where
1318: WIA.ITEM_TYPE = itemtype
1319: and
1320: WIA.NAME = aname(arrayIndex)

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

1317: where
1318: WIA.ITEM_TYPE = itemtype
1319: and
1320: WIA.NAME = aname(arrayIndex)
1321: and not exists (select 1 from WF_ITEM_ATTRIBUTE_VALUES WIAV
1322: where WIAV.item_type=itemtype
1323: and WIAV.item_key=itemkey
1324: and WIAV.NAME=aname(arrayIndex));
1325:

Line 1413: update WF_ITEM_ATTRIBUTE_VALUES set

1409: end loop;
1410:
1411: else
1412: forall arrayIndex in aname.FIRST..aname.LAST
1413: update WF_ITEM_ATTRIBUTE_VALUES set
1414: DATE_VALUE = avalue(arrayIndex)
1415: where ITEM_TYPE = itemtype
1416: and ITEM_KEY = itemkey
1417: and NAME = aname(arrayIndex);

Line 1422: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then

1418:
1419: success_cnt := SQL%ROWCOUNT;
1420: if (success_cnt <> aname.COUNT) then
1421: --ondemand logic
1422: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then
1423: forall arrayIndex in aname.FIRST..aname.LAST
1424: insert into WF_ITEM_ATTRIBUTE_VALUES
1425: (ITEM_TYPE, ITEM_KEY, NAME, DATE_VALUE)
1426: select itemtype, itemkey, aname(arrayIndex), avalue(arrayIndex)

Line 1424: insert into WF_ITEM_ATTRIBUTE_VALUES

1420: if (success_cnt <> aname.COUNT) then
1421: --ondemand logic
1422: if wf_item.Attribute_ON_Demand(itemtype, itemkey) then
1423: forall arrayIndex in aname.FIRST..aname.LAST
1424: insert into WF_ITEM_ATTRIBUTE_VALUES
1425: (ITEM_TYPE, ITEM_KEY, NAME, DATE_VALUE)
1426: select itemtype, itemkey, aname(arrayIndex), avalue(arrayIndex)
1427: from WF_ITEM_ATTRIBUTES WIA
1428: where

Line 1427: from WF_ITEM_ATTRIBUTES WIA

1423: forall arrayIndex in aname.FIRST..aname.LAST
1424: insert into WF_ITEM_ATTRIBUTE_VALUES
1425: (ITEM_TYPE, ITEM_KEY, NAME, DATE_VALUE)
1426: select itemtype, itemkey, aname(arrayIndex), avalue(arrayIndex)
1427: from WF_ITEM_ATTRIBUTES WIA
1428: where
1429: WIA.ITEM_TYPE = itemtype
1430: and
1431: WIA.NAME = aname(arrayIndex)

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

1428: where
1429: WIA.ITEM_TYPE = itemtype
1430: and
1431: WIA.NAME = aname(arrayIndex)
1432: and not exists (select 1 from WF_ITEM_ATTRIBUTE_VALUES WIAV
1433: where WIAV.item_type=itemtype
1434: and WIAV.item_key=itemkey
1435: and WIAV.NAME=aname(arrayIndex));
1436:

Line 1497: from WF_ITEM_ATTRIBUTES WIA

1493: if (status <> WF_CACHE.task_SUCCESS) then
1494: select WIA.ITEM_TYPE, WIA.NAME, WIA.TYPE, WIA.SUBTYPE, WIA.FORMAT,
1495: WIA.TEXT_DEFAULT, WIA.NUMBER_DEFAULT, WIA.DATE_DEFAULT
1496: into WF_CACHE.ItemAttributes(wiaIND)
1497: from WF_ITEM_ATTRIBUTES WIA
1498: where WIA.ITEM_TYPE = itemtype
1499: and WIA.NAME = aname;
1500:
1501: end if;

Line 1567: from WF_ITEM_ATTRIBUTES WIA

1563: begin
1564: select WIA.ITEM_TYPE, WIA.NAME, WIA.TYPE, WIA.SUBTYPE, WIA.FORMAT,
1565: WIA.TEXT_DEFAULT, WIA.NUMBER_DEFAULT, WIA.DATE_DEFAULT
1566: into WF_CACHE.ItemAttributes(wiaIND)
1567: from WF_ITEM_ATTRIBUTES WIA
1568: where WIA.ITEM_TYPE = itemtype
1569: and WIA.NAME = aname;
1570:
1571: exception

Line 1621: from WF_ITEM_ATTRIBUTE_VALUES

1617: --data else will propagate the exception
1618: begin
1619: select TEXT_VALUE
1620: into lvalue
1621: from WF_ITEM_ATTRIBUTE_VALUES
1622: where ITEM_TYPE = itemtype
1623: and ITEM_KEY = itemkey
1624: and NAME = aname;
1625: exception

Line 1628: if wf_item.Attribute_On_Demand(itemtype, itemkey) then

1624: and NAME = aname;
1625: exception
1626: when no_data_found then
1627: -- ondemand logic
1628: if wf_item.Attribute_On_Demand(itemtype, itemkey) then
1629: select TEXT_DEFAULT
1630: into lvalue
1631: from WF_ITEM_ATTRIBUTES
1632: where ITEM_TYPE = itemtype

Line 1631: from WF_ITEM_ATTRIBUTES

1627: -- ondemand logic
1628: if wf_item.Attribute_On_Demand(itemtype, itemkey) then
1629: select TEXT_DEFAULT
1630: into lvalue
1631: from WF_ITEM_ATTRIBUTES
1632: where ITEM_TYPE = itemtype
1633: and NAME = aname;
1634: else
1635: raise no_data_found;

Line 1715: from WF_ITEM_ATTRIBUTE_VALUES

1711: else
1712: begin
1713: select NUMBER_VALUE
1714: into lvalue
1715: from WF_ITEM_ATTRIBUTE_VALUES
1716: where ITEM_TYPE = itemtype
1717: and ITEM_KEY = itemkey
1718: and NAME = aname;
1719: exception

Line 1722: if wf_item.Attribute_On_Demand(itemtype, itemkey) then

1718: and NAME = aname;
1719: exception
1720: when no_data_found then
1721: -- ondemand logic
1722: if wf_item.Attribute_On_Demand(itemtype, itemkey) then
1723: select NUMBER_DEFAULT
1724: into lvalue
1725: from WF_ITEM_ATTRIBUTES
1726: where ITEM_TYPE = itemtype

Line 1725: from WF_ITEM_ATTRIBUTES

1721: -- ondemand logic
1722: if wf_item.Attribute_On_Demand(itemtype, itemkey) then
1723: select NUMBER_DEFAULT
1724: into lvalue
1725: from WF_ITEM_ATTRIBUTES
1726: where ITEM_TYPE = itemtype
1727: and NAME = aname;
1728: else
1729: raise no_data_found;

Line 1806: from WF_ITEM_ATTRIBUTE_VALUES

1802: else
1803: begin
1804: select DATE_VALUE
1805: into lvalue
1806: from WF_ITEM_ATTRIBUTE_VALUES
1807: where ITEM_TYPE = itemtype
1808: and ITEM_KEY = itemkey
1809: and NAME = aname;
1810: exception

Line 1812: if wf_item.Attribute_On_Demand(itemtype, itemkey) then

1808: and ITEM_KEY = itemkey
1809: and NAME = aname;
1810: exception
1811: when no_data_found then
1812: if wf_item.Attribute_On_Demand(itemtype, itemkey) then
1813: select DATE_DEFAULT
1814: into lvalue
1815: from WF_ITEM_ATTRIBUTES
1816: where ITEM_TYPE = itemtype

Line 1815: from WF_ITEM_ATTRIBUTES

1811: when no_data_found then
1812: if wf_item.Attribute_On_Demand(itemtype, itemkey) then
1813: select DATE_DEFAULT
1814: into lvalue
1815: from WF_ITEM_ATTRIBUTES
1816: where ITEM_TYPE = itemtype
1817: and NAME = aname;
1818: else
1819: raise no_data_found;

Line 1936: from WF_ITEM_ATTRIBUTES WIA

1932: begin
1933: select WIA.ITEM_TYPE, WIA.NAME, WIA.TYPE, WIA.SUBTYPE, WIA.FORMAT,
1934: WIA.TEXT_DEFAULT, WIA.NUMBER_DEFAULT, WIA.DATE_DEFAULT
1935: into WF_CACHE.ItemAttributes(wiaIND)
1936: from WF_ITEM_ATTRIBUTES WIA
1937: where WIA.ITEM_TYPE = GetItemAttrClob.itemtype
1938: and WIA.NAME = GetItemAttrClob.aname;
1939:
1940: exception

Line 2017: from WF_ITEM_ATTRIBUTE_VALUES

2013:
2014: begin
2015: select EVENT_VALUE
2016: into lvalue
2017: from WF_ITEM_ATTRIBUTE_VALUES
2018: where ITEM_TYPE = GetItemAttrEvent.itemtype
2019: and ITEM_KEY = GetItemAttrEvent.itemkey
2020: and NAME = GetItemAttrEvent.name;
2021:

Line 2038: if wf_item.Attribute_On_Demand(itemtype, itemkey) then

2034: --
2035: --Note: we do not insert value in wiav at this point. Event value
2036: -- will only be inserted into the table when setItemAttrEvent is called.
2037: --
2038: if wf_item.Attribute_On_Demand(itemtype, itemkey) then
2039: select null into l_value
2040: from WF_ITEM_ATTRIBUTES WIA
2041: where WIA.ITEM_TYPE = GetItemAttrEvent.itemtype
2042: and WIA.NAME = GetItemAttrEvent.name;

Line 2040: from WF_ITEM_ATTRIBUTES WIA

2036: -- will only be inserted into the table when setItemAttrEvent is called.
2037: --
2038: if wf_item.Attribute_On_Demand(itemtype, itemkey) then
2039: select null into l_value
2040: from WF_ITEM_ATTRIBUTES WIA
2041: where WIA.ITEM_TYPE = GetItemAttrEvent.itemtype
2042: and WIA.NAME = GetItemAttrEvent.name;
2043:
2044: Wf_Event_T.Initialize(lvalue);

Line 2106: actdate := Wf_Item.Active_Date(itemtype, itemkey);

2102: Wf_Core.Raise('WFSQL_ARGS');
2103:
2104: end if;
2105:
2106: actdate := Wf_Item.Active_Date(itemtype, itemkey);
2107:
2108: WF_CACHE.GetActivityAttr( itemtype, aname, actid, actdate, status, waIND,
2109: waaIND );
2110:

Line 2276: actdate := Wf_Item.Active_Date(itemtype, itemkey);

2272:
2273: -- This is NOT an itemattr reference, get value directly from WAAV.
2274: -- Get type and format of attr for translating number/date strings.
2275: begin
2276: actdate := Wf_Item.Active_Date(itemtype, itemkey);
2277:
2278: WF_CACHE.GetActivityAttr( itemtype, aname, actid, actdate, status, waIND,
2279: waaIND );
2280:

Line 2882: Wf_Item.Set_Item_Parent(itemtype, itemkey, parent_itemtype, parent_itemkey,

2878: wf_core.token('OPERATION', 'Wf_Engine.Set_Item_Parent');
2879: wf_core.raise('WFENG_SYNCH_DISABLED');
2880: end if;
2881:
2882: Wf_Item.Set_Item_Parent(itemtype, itemkey, parent_itemtype, parent_itemkey,
2883: parent_context);
2884: exception
2885: when others then
2886: Wf_Core.Context('Wf_Engine', 'Set_Item_Parent', itemtype, itemkey,

Line 2929: Wf_Item.Set_Item_Parent(itemtype, itemkey, parent_itemtype,

2925: wf_core.token('OPERATION', 'Wf_Engine.SetItemParent');
2926: wf_core.raise('WFENG_SYNCH_DISABLED');
2927: end if;
2928:
2929: Wf_Item.Set_Item_Parent(itemtype, itemkey, parent_itemtype,
2930: parent_itemkey, parent_context, masterdetail);
2931: exception
2932: when others then
2933: Wf_Core.Context('Wf_Engine', 'SetItemParent', itemtype, itemkey,

Line 2967: Wf_Item.SetItemOwner(itemtype, itemkey, owner);

2963: wf_core.token('OPERATION', 'Wf_Engine.SetItemOwner');
2964: wf_core.raise('WFENG_SYNCH_DISABLED');
2965: end if;
2966:
2967: Wf_Item.SetItemOwner(itemtype, itemkey, owner);
2968: exception
2969: when others then
2970: Wf_Core.Context('Wf_Engine', 'SetItemOwner', itemtype, itemkey,
2971: owner);

Line 2998: return(Wf_Item.GetItemUserKey(itemtype, itemkey));

2994: Wf_Core.Token('ITEMKEY', nvl(itemkey, 'NULL'));
2995: Wf_Core.Raise('WFSQL_ARGS');
2996: end if;
2997:
2998: return(Wf_Item.GetItemUserKey(itemtype, itemkey));
2999: exception
3000: when others then
3001: Wf_Core.Context('Wf_Engine', 'GetItemUserKey', itemtype, itemkey);
3002: raise;

Line 3034: Wf_Item.SetItemUserKey(itemtype, itemkey, userkey);

3030: wf_core.token('OPERATION', 'Wf_Engine.SetItemUserKey');
3031: wf_core.raise('WFENG_SYNCH_DISABLED');
3032: end if;
3033:
3034: Wf_Item.SetItemUserKey(itemtype, itemkey, userkey);
3035: exception
3036: when others then
3037: Wf_Core.Context('Wf_Engine', 'SetItemUserKey', itemtype, itemkey,
3038: userkey);

Line 3261: Wf_Item_Activity_Status.Status(itemtype, itemkey,

3257: -- itself has finished. In this case, do NOT actually complete
3258: -- the activity and continue processing. Exit silently and let
3259: -- execute_activity() pick up the execution when the activity
3260: -- owning this notification is actually completed.
3261: Wf_Item_Activity_Status.Status(itemtype, itemkey,
3262: actid, status);
3263: if (status = wf_engine.eng_active) then
3264: -- Do nothing!!!
3265: return;

Line 3300: Wf_Item_Activity_Status.Set_Error(itemtype,

3296: --The rollback will be done in the when others block
3297: Wf_Core.Context('Wf_Engine', 'CB', command, context, attr_name,
3298: attr_type, ':'||text_value||':'||to_char(number_value)||':'||
3299: to_char(date_value)||':');
3300: Wf_Item_Activity_Status.Set_Error(itemtype,
3301: itemkey, actid, wf_engine.eng_exception, FALSE);
3302: Wf_Engine_Util.Execute_Error_Process(itemtype,
3303: itemkey, actid, wf_engine.eng_exception);
3304: Wf_Core.Clear;

Line 3309: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,

3305: end;
3306: elsif (upper(command) = wf_engine.eng_error) then
3307:
3308: -- Set the error status
3309: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
3310: wf_engine.eng_mail, FALSE);
3311: -- Run any error process for the activity
3312: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
3313: wf_engine.eng_mail);

Line 3347: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,

3343: if (command = 'TRANSFER') then
3344: Wf_Activity.Notification_Info(itemtype, itemkey, actid,
3345: message, msgtype, expand_role);
3346: if (expand_role = 'N') then
3347: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
3348: number_value, text_value);
3349: end if;
3350: end if;
3351: else

Line 3485: from WF_ITEM_ACTIVITY_STATUSES S

3481: -- avoid "not in" which disables index in RBO
3482: cursor curs_itype is
3483: select
3484: S.ROWID ROW_ID
3485: from WF_ITEM_ACTIVITY_STATUSES S
3486: where S.DUE_DATE < SYSDATE
3487: and S.ACTIVITY_STATUS in ('ACTIVE','WAITING','NOTIFIED',
3488: 'SUSPEND','DEFERRED')
3489: and S.ITEM_TYPE = itemtype;

Line 3494: from WF_ITEM_ACTIVITY_STATUSES S

3490:
3491: cursor curs_noitype is
3492: select
3493: S.ROWID ROW_ID
3494: from WF_ITEM_ACTIVITY_STATUSES S
3495: where S.DUE_DATE < SYSDATE
3496: and S.ACTIVITY_STATUS in ('ACTIVE','WAITING','NOTIFIED',
3497: 'SUSPEND','DEFERRED');
3498:

Line 3533: from WF_ITEM_ACTIVITY_STATUSES S , WF_ITEMS WI

3529: begin
3530: select
3531: S.ITEM_TYPE, S.ITEM_KEY, S.PROCESS_ACTIVITY
3532: into l_itemtype, l_itemkey, l_actid
3533: from WF_ITEM_ACTIVITY_STATUSES S , WF_ITEMS WI
3534: where S.DUE_DATE < SYSDATE
3535: and S.ACTIVITY_STATUS in ('WAITING','NOTIFIED','SUSPEND',
3536: 'DEFERRED','ACTIVE')
3537: and S.ROWID = idarr(i)

Line 3561: Wf_Item_Activity_Status.Create_Status(l_itemtype, l_itemkey, l_actid,

3557: end;
3558:
3559: if (eligible) then
3560: -- Set the status to COMPLETE:#TIMEOUT.
3561: Wf_Item_Activity_Status.Create_Status(l_itemtype, l_itemkey, l_actid,
3562: wf_engine.eng_completed, wf_engine.eng_timedout);
3563:
3564: begin
3565: begin

Line 3609: Wf_Item_Activity_Status.Set_Error(l_itemtype, l_itemkey, l_actid,

3605: -- 3. execute the error process (if any)
3606: -- 4. clear the error to continue with next activity
3607: Wf_Core.Context('Wf_Engine', 'ProcessTimeout', l_itemkey, l_itemtype,
3608: to_char(l_actid));
3609: Wf_Item_Activity_Status.Set_Error(l_itemtype, l_itemkey, l_actid,
3610: wf_engine.eng_exception, FALSE);
3611: Wf_Engine_Util.Execute_Error_Process(l_itemtype, l_itemkey,
3612: l_actid, wf_engine.eng_exception);
3613: Wf_Core.Clear;

Line 3661: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */

3657: -- cases to get better execution plans.
3658:
3659: cursor curs_itype is
3660: select /*+ ORDERED USE_NL (WIASP WI WPAP WAP)
3661: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */
3662: WIASP.ROWID ROW_ID
3663: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3664: WF_ITEMS WI,
3665: WF_PROCESS_ACTIVITIES WPAP,

Line 3663: from WF_ITEM_ACTIVITY_STATUSES WIASP,

3659: cursor curs_itype is
3660: select /*+ ORDERED USE_NL (WIASP WI WPAP WAP)
3661: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */
3662: WIASP.ROWID ROW_ID
3663: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3664: WF_ITEMS WI,
3665: WF_PROCESS_ACTIVITIES WPAP,
3666: WF_ACTIVITIES WAP
3667: where WIASP.ITEM_TYPE = itemtype

Line 3664: WF_ITEMS WI,

3660: select /*+ ORDERED USE_NL (WIASP WI WPAP WAP)
3661: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */
3662: WIASP.ROWID ROW_ID
3663: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3664: WF_ITEMS WI,
3665: WF_PROCESS_ACTIVITIES WPAP,
3666: WF_ACTIVITIES WAP
3667: where WIASP.ITEM_TYPE = itemtype
3668: and WIASP.PROCESS_ACTIVITY = WPAP.INSTANCE_ID

Line 3679: from WF_ITEM_ACTIVITY_STATUSES WIASC,

3675: and WAP.TYPE = wf_engine.eng_process
3676: and WIASP.ACTIVITY_STATUS = 'ACTIVE' --use literal to force index
3677: and not exists
3678: (select null
3679: from WF_ITEM_ACTIVITY_STATUSES WIASC,
3680: WF_PROCESS_ACTIVITIES WPAC
3681: where WAP.ITEM_TYPE = WPAC.PROCESS_ITEM_TYPE
3682: and WAP.NAME = WPAC.PROCESS_NAME
3683: and WAP.VERSION = WPAC.PROCESS_VERSION

Line 3692: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */

3688: 'DEFERRED','ERROR'));
3689:
3690: cursor curs_noitype is
3691: select /*+ ORDERED USE_NL (WIASP WI WPAP WAP)
3692: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */
3693: WIASP.ROWID ROW_ID
3694: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3695: WF_ITEMS WI,
3696: WF_PROCESS_ACTIVITIES WPAP,

Line 3694: from WF_ITEM_ACTIVITY_STATUSES WIASP,

3690: cursor curs_noitype is
3691: select /*+ ORDERED USE_NL (WIASP WI WPAP WAP)
3692: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */
3693: WIASP.ROWID ROW_ID
3694: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3695: WF_ITEMS WI,
3696: WF_PROCESS_ACTIVITIES WPAP,
3697: WF_ACTIVITIES WAP
3698: where WIASP.PROCESS_ACTIVITY = WPAP.INSTANCE_ID

Line 3695: WF_ITEMS WI,

3691: select /*+ ORDERED USE_NL (WIASP WI WPAP WAP)
3692: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */
3693: WIASP.ROWID ROW_ID
3694: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3695: WF_ITEMS WI,
3696: WF_PROCESS_ACTIVITIES WPAP,
3697: WF_ACTIVITIES WAP
3698: where WIASP.PROCESS_ACTIVITY = WPAP.INSTANCE_ID
3699: and WPAP.ACTIVITY_ITEM_TYPE = WAP.ITEM_TYPE

Line 3709: from WF_ITEM_ACTIVITY_STATUSES WIASC,

3705: and WAP.TYPE = 'PROCESS'
3706: and WIASP.ACTIVITY_STATUS = 'ACTIVE' --use literal to force index
3707: and not exists
3708: (select null
3709: from WF_ITEM_ACTIVITY_STATUSES WIASC,
3710: WF_PROCESS_ACTIVITIES WPAC
3711: where WAP.ITEM_TYPE = WPAC.PROCESS_ITEM_TYPE
3712: and WAP.NAME = WPAC.PROCESS_NAME
3713: and WAP.VERSION = WPAC.PROCESS_VERSION

Line 3758: from WF_ITEM_ACTIVITY_STATUSES WIASP,

3754: begin
3755: select
3756: WIASP.ITEM_TYPE, WIASP.ITEM_KEY, WIASP.PROCESS_ACTIVITY
3757: into l_itemtype, l_itemkey, l_actid
3758: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3759: WF_PROCESS_ACTIVITIES WPAP,
3760: WF_ACTIVITIES WAP,
3761: WF_ITEMS WI
3762: where WIASP.PROCESS_ACTIVITY = WPAP.INSTANCE_ID

Line 3761: WF_ITEMS WI

3757: into l_itemtype, l_itemkey, l_actid
3758: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3759: WF_PROCESS_ACTIVITIES WPAP,
3760: WF_ACTIVITIES WAP,
3761: WF_ITEMS WI
3762: where WIASP.PROCESS_ACTIVITY = WPAP.INSTANCE_ID
3763: and WPAP.ACTIVITY_ITEM_TYPE = WAP.ITEM_TYPE
3764: and WPAP.ACTIVITY_NAME = WAP.NAME
3765: and WIASP.ITEM_TYPE = WI.ITEM_TYPE

Line 3773: from WF_ITEM_ACTIVITY_STATUSES WIASC,

3769: and WAP.TYPE = wf_engine.eng_process
3770: and WIASP.ACTIVITY_STATUS = 'ACTIVE' --use literal to force index
3771: and not exists
3772: (select null
3773: from WF_ITEM_ACTIVITY_STATUSES WIASC,
3774: WF_PROCESS_ACTIVITIES WPAC
3775: where WAP.ITEM_TYPE = WPAC.PROCESS_ITEM_TYPE
3776: and WAP.NAME = WPAC.PROCESS_NAME
3777: and WAP.VERSION = WPAC.PROCESS_VERSION

Line 3796: Wf_Item_Activity_Status.Create_Status(l_itemtype, l_itemkey, l_actid,

3792: end;
3793:
3794: if (eligible) then
3795: -- Set the status to ERROR:#STUCK
3796: Wf_Item_Activity_Status.Create_Status(l_itemtype, l_itemkey, l_actid,
3797: wf_engine.eng_error, wf_engine.eng_stuck);
3798:
3799: -- Execute the error process for stuck process
3800: begin

Line 3829: Wf_Item_Activity_Status.Set_Error(l_itemtype, l_itemkey, l_actid,

3825: -- 3. execute the error process (if any)
3826: -- 4. clear the error to continue with next activity
3827: Wf_Core.Context('Wf_Engine', 'ProcessStuckProcess', l_itemkey,
3828: l_itemtype, to_char(l_actid));
3829: Wf_Item_Activity_Status.Set_Error(l_itemtype, l_itemkey, l_actid,
3830: wf_engine.eng_exception, FALSE);
3831: Wf_Engine_Util.Execute_Error_Process(l_itemtype, l_itemkey,
3832: l_actid, wf_engine.eng_exception);
3833: Wf_Core.Clear;

Line 4048: from WF_ITEM_ATTRIBUTES WIA

4044: -- All event item attrs to be initialized
4045: -- Initialization is now deferred until GetItemAttrEvent
4046: /* cursor evtcurs is
4047: select WIA.NAME
4048: from WF_ITEM_ATTRIBUTES WIA
4049: where WIA.ITEM_TYPE = CreateProcess.itemtype
4050: and WIA.TYPE = 'EVENT';*/
4051:
4052: begin

Line 4098: if (Wf_Item.Item_Exist(itemtype, itemkey)) then

4094: end if;
4095:
4096: -- Check for duplicate item
4097: if (itemkey = wf_engine.eng_synch) then
4098: if (Wf_Item.Item_Exist(itemtype, itemkey)) then
4099: -- SYNCHMODE: If duplicate is a synch process, check the status
4100: -- of the root process of the existing item.
4101: -- If the cached item is already complete, then it is ok to
4102: -- toss out the old item and create a new one.

Line 4104: Wf_Item.Root_Process(itemtype, itemkey, root, version);

4100: -- of the root process of the existing item.
4101: -- If the cached item is already complete, then it is ok to
4102: -- toss out the old item and create a new one.
4103: begin
4104: Wf_Item.Root_Process(itemtype, itemkey, root, version);
4105: rootid := Wf_Process_Activity.RootInstanceId(itemtype,
4106: itemkey, root);
4107: Wf_Item_Activity_Status.Status(itemtype, itemkey, rootid, status);
4108: exception

Line 4107: Wf_Item_Activity_Status.Status(itemtype, itemkey, rootid, status);

4103: begin
4104: Wf_Item.Root_Process(itemtype, itemkey, root, version);
4105: rootid := Wf_Process_Activity.RootInstanceId(itemtype,
4106: itemkey, root);
4107: Wf_Item_Activity_Status.Status(itemtype, itemkey, rootid, status);
4108: exception
4109: when others then
4110: status := 'x'; -- Treat errors like incomplete process
4111: end;

Line 4121: Wf_Item.ClearCache;

4117: end if;
4118: else
4119: -- Not synchmode. Clear plsql cache first, just in case previous
4120: -- item was purged/rolled back, then check for duplicate.
4121: Wf_Item.ClearCache;
4122: if (Wf_Item.Item_Exist(itemtype, itemkey)) then
4123: Wf_Core.Token('TYPE', itemtype);
4124: Wf_Core.Token('KEY', itemkey);
4125: Wf_Core.Raise('WFENG_ITEM_UNIQUE');

Line 4122: if (Wf_Item.Item_Exist(itemtype, itemkey)) then

4118: else
4119: -- Not synchmode. Clear plsql cache first, just in case previous
4120: -- item was purged/rolled back, then check for duplicate.
4121: Wf_Item.ClearCache;
4122: if (Wf_Item.Item_Exist(itemtype, itemkey)) then
4123: Wf_Core.Token('TYPE', itemtype);
4124: Wf_Core.Token('KEY', itemkey);
4125: Wf_Core.Raise('WFENG_ITEM_UNIQUE');
4126: end if;

Line 4155: Wf_Item.Create_Item(itemtype, itemkey, root, actdate, createprocess.user_key,

4151: Wf_Core.Raise('WFENG_PROCESS_NAME');
4152: end if;
4153:
4154: -- Insert row in items table
4155: Wf_Item.Create_Item(itemtype, itemkey, root, actdate, createprocess.user_key,
4156: createprocess.owner_role);
4157:
4158: -- Validate the root argument is runnable
4159: rootid := Wf_Process_Activity.RootInstanceId(itemtype, itemkey,

Line 4197: Wf_Item.ClearCache;

4193: -- Call clearcache() when #SYNCH flow is in error
4194: if ((itemkey = WF_ENGINE.eng_synch) and
4195: (wf_core.error_name is null or wf_core.error_name <> 'WFENG_SYNCH_ITEM') and
4196: (not WF_ENGINE.debug)) then
4197: Wf_Item.ClearCache;
4198: end if;
4199:
4200: Wf_Core.Context('Wf_Engine', 'CreateProcess', itemtype, itemkey, process);
4201: raise;

Line 4308: from WF_ITEM_ACTIVITY_STATUSES

4304:
4305: -- Cursor to select deferred activities to remove from background queue
4306: cursor defact is
4307: select PROCESS_ACTIVITY, BEGIN_DATE
4308: from WF_ITEM_ACTIVITY_STATUSES
4309: where ITEM_TYPE = itemtype
4310: and ITEM_KEY = itemkey
4311: and ACTIVITY_STATUS = wf_engine.eng_deferred;
4312:

Line 4331: Wf_Item.Root_Process(itemtype, itemkey, root, version);

4327:
4328: end if;
4329:
4330: -- Get the root process for this key and also validate the item
4331: Wf_Item.Root_Process(itemtype, itemkey, root, version);
4332: if (root is null) then
4333: Wf_Core.Token('TYPE', itemtype);
4334: Wf_Core.Token('KEY', itemkey);
4335: Wf_Core.Raise('WFENG_ITEM');

Line 4341: actdate := Wf_Item.Active_Date(itemtype, itemkey);

4337:
4338: -- Get the process instance id.
4339: -- Search the process beginnning at the root process of the item for the
4340: -- activity matching process.
4341: actdate := Wf_Item.Active_Date(itemtype, itemkey);
4342: rootid := Wf_Process_Activity.RootInstanceId(itemtype, itemkey, root);
4343: if (rootid is null) then
4344: Wf_Core.Token('TYPE', itemtype);
4345: Wf_Core.Token('KEY', itemkey);

Line 4380: Wf_Item_Activity_Status.ClearCache;

4376: -- Always clear the cache first
4377: -- AbortProcess, SuspendProcess and ResumeProcess should be rarely called
4378: -- from the background engine, so it should be safe to force reading from
4379: -- the database.
4380: Wf_Item_Activity_Status.ClearCache;
4381:
4382: -- Check if the process is active
4383: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4384:

Line 4383: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);

4379: -- the database.
4380: Wf_Item_Activity_Status.ClearCache;
4381:
4382: -- Check if the process is active
4383: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4384:
4385: if (status is null) then
4386: -- This process has not been run yet. Create a pre-suspended
4387: -- status row so engine does not run process later

Line 4388: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,

4384:
4385: if (status is null) then
4386: -- This process has not been run yet. Create a pre-suspended
4387: -- status row so engine does not run process later
4388: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,
4389: wf_engine.eng_suspended, wf_engine.eng_null, null, null,
4390: newStatus=>TRUE);
4391: elsif (status = wf_engine.eng_deferred) then
4392: -- Change status from 'deferred' to 'suspended'

Line 4394: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,

4390: newStatus=>TRUE);
4391: elsif (status = wf_engine.eng_deferred) then
4392: -- Change status from 'deferred' to 'suspended'
4393: -- Doing this prevents the background processor from picking it up.
4394: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,
4395: wf_engine.eng_suspended, null,
4396: null, null);
4397: elsif (status = wf_engine.eng_active) then
4398: -- Mark process as 'suspended', 'null' in WIAS table

Line 4400: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,

4396: null, null);
4397: elsif (status = wf_engine.eng_active) then
4398: -- Mark process as 'suspended', 'null' in WIAS table
4399: -- Doing this stops the engine from going through the rest of the flow
4400: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,
4401: wf_engine.eng_suspended, null,
4402: null, null);
4403:
4404: -- Suspend all the children processes

Line 4460: FROM wf_notifications wn, WF_ITEM_ACTIVITY_STATUSES ias

4456:
4457: l_lock boolean;
4458: cursor openNotifications is -- <7513983>
4459: SELECT wn.notification_id
4460: FROM wf_notifications wn, WF_ITEM_ACTIVITY_STATUSES ias
4461: WHERE ias.item_type = itemtype
4462: AND ias.item_key = itemkey
4463: AND ias.notification_id is not null
4464: AND ias.notification_id = wn.group_id

Line 4468: FROM wf_notifications wn, WF_ITEM_ACTIVITY_STATUSES_H iash

4464: AND ias.notification_id = wn.group_id
4465: AND wn.status = 'OPEN'
4466: UNION
4467: SELECT wn.notification_id
4468: FROM wf_notifications wn, WF_ITEM_ACTIVITY_STATUSES_H iash
4469: WHERE iash.item_type = itemtype
4470: AND iash.item_key = itemkey
4471: AND iash.notification_id is not null
4472: AND iash.notification_id = wn.notification_id

Line 4492: l_lock := wf_item.acquire_lock(itemtype,itemkey,true) ;

4488: --request for the same.
4489: if verify_lock then
4490: --Check if we can acquire lock for the
4491: --the item type/key here
4492: l_lock := wf_item.acquire_lock(itemtype,itemkey,true) ;
4493: end if;
4494:
4495: -- Get the root process for this key and also validate the item
4496: Wf_Item.Root_Process(itemtype, itemkey, root, version);

Line 4496: Wf_Item.Root_Process(itemtype, itemkey, root, version);

4492: l_lock := wf_item.acquire_lock(itemtype,itemkey,true) ;
4493: end if;
4494:
4495: -- Get the root process for this key and also validate the item
4496: Wf_Item.Root_Process(itemtype, itemkey, root, version);
4497: if (root is null) then
4498: Wf_Core.Context('Wf_Engine', 'AbortProcess', itemtype, itemkey, process);
4499: Wf_Core.Token('TYPE', itemtype);
4500: Wf_Core.Token('KEY', itemkey);

Line 4507: actdate := Wf_Item.Active_Date(itemtype, itemkey);

4503:
4504: -- Get the process instance id.
4505: -- Search the process beginnning at the root process of the item for the
4506: -- activity matching process.
4507: actdate := Wf_Item.Active_Date(itemtype, itemkey);
4508: rootid := Wf_Process_Activity.RootInstanceId(itemtype, itemkey, root);
4509: if (rootid is null) then
4510: Wf_Core.Token('TYPE', itemtype);
4511: Wf_Core.Token('KEY', itemkey);

Line 4543: Wf_Item_Activity_Status.ClearCache;

4539: end if;
4540: end if;
4541:
4542: -- Always clear the cache first
4543: Wf_Item_Activity_Status.ClearCache;
4544:
4545: -- Check the process is not already complete
4546: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4547:

Line 4546: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);

4542: -- Always clear the cache first
4543: Wf_Item_Activity_Status.ClearCache;
4544:
4545: -- Check the process is not already complete
4546: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4547:
4548: if (status is null) then
4549: if (WF_ITEM.SetEndDate(itemtype, itemkey) = 1) then
4550: Wf_Core.Token('TYPE', itemtype);

Line 4549: if (WF_ITEM.SetEndDate(itemtype, itemkey) = 1) then

4545: -- Check the process is not already complete
4546: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4547:
4548: if (status is null) then
4549: if (WF_ITEM.SetEndDate(itemtype, itemkey) = 1) then
4550: Wf_Core.Token('TYPE', itemtype);
4551: Wf_core.Token('KEY', itemkey);
4552: Wf_core.Token('NAME', proc);
4553: Wf_Core.Raise('WFENG_ITEM_PROCESS_RUNNING');

Line 4564: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,

4560: Wf_Core.Raise('WFENG_ITEM_PROCESS_ACTIVE');
4561: else
4562: -- Mark process as 'COMPLETE', 'result' in WIAS table
4563: -- Doing this stops the engine from going through the rest of the flow
4564: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,
4565: wf_engine.eng_completed, result,
4566: null, SYSDATE);
4567:
4568: -- Kill child activities recursively

Line 4634: from WF_ITEM_ACTIVITY_STATUSES

4630: -- Cursor to select deferred activities to restart.
4631: cursor defact is
4632: select
4633: PROCESS_ACTIVITY, BEGIN_DATE
4634: from WF_ITEM_ACTIVITY_STATUSES
4635: where ITEM_TYPE = itemtype
4636: and ITEM_KEY = itemkey
4637: and ACTIVITY_STATUS = wf_engine.eng_deferred;
4638:

Line 4669: Wf_Item.Root_Process(itemtype, itemkey, root, version);

4665:
4666: end if;
4667:
4668: -- Get the root process for this key
4669: Wf_Item.Root_Process(itemtype, itemkey, root, version);
4670: if (root is null) then
4671: Wf_Core.Token('TYPE', itemtype);
4672: Wf_Core.Token('KEY', itemkey);
4673: Wf_Core.Raise('WFENG_ITEM');

Line 4679: actdate := Wf_Item.Active_Date(itemtype, itemkey);

4675:
4676: -- Get the process instance id.
4677: -- Search the process beginnning at the root process of the item for the
4678: -- activity matching process.
4679: actdate := Wf_Item.Active_Date(itemtype, itemkey);
4680: rootid := Wf_Process_Activity.RootInstanceId(itemtype, itemkey, root);
4681: if (rootid is null) then
4682: Wf_Core.Token('TYPE', itemtype);
4683: Wf_Core.Token('KEY', itemkey);

Line 4715: Wf_Item_Activity_Status.ClearCache;

4711: end if;
4712: end if;
4713:
4714: -- Always clear the cache first
4715: Wf_Item_Activity_Status.ClearCache;
4716:
4717: -- Check if the process is suspended
4718: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4719: if (status is null) then

Line 4718: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);

4714: -- Always clear the cache first
4715: Wf_Item_Activity_Status.ClearCache;
4716:
4717: -- Check if the process is suspended
4718: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4719: if (status is null) then
4720: Wf_Core.Token('TYPE', itemtype);
4721: Wf_Core.Token('KEY', itemkey);
4722: Wf_Core.Token('NAME', proc);

Line 4732: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,

4728: Wf_Core.Raise('WFENG_ITEM_PROCESS_SUSPENDED');
4729: else
4730: -- If we came here, that means the process is currently suspended.
4731: -- Mark process as eng_active 'active', 'null' in WIAS table
4732: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,
4733: wf_engine.eng_active, null, null, null);
4734:
4735: -- Mark any sub-processes as active again
4736: Wf_Engine_Util.Resume_Child_Processes(itemtype, itemkey, procid);

Line 4766: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actidarr(i),

4762: --of the activity or to sysdate if begin_date is null
4763: --Also set the status to active only if begin_date <= sysdate
4764:
4765: if (nvl(act_begin_date(i),sysdate) <= sysdate) then
4766: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actidarr(i),
4767: wf_engine.eng_active, null, sysdate, null);
4768: begin
4769: savepoint wf_savepoint;
4770: Wf_Engine_Util.Process_Activity(itemtype, itemkey, actidarr(i),

Line 4776: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey,

4772: exception
4773: when trig_savepoint or dist_savepoint then
4774: -- Can't restart process here, re-defer for the
4775: -- background process to pick up.
4776: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey,
4777: actidarr(i),wf_engine.eng_deferred, null, sysdate, null);
4778: when others then
4779: -- If anything in this process raises an exception:
4780: -- 1. rollback any work in this process thread

Line 4787: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actidarr(i),

4783: -- 4. clear the error to continue with next activity
4784: rollback to wf_savepoint;
4785: Wf_Core.Context('Wf_Engine', 'ResumeProcess', itemtype, itemkey,
4786: process);
4787: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actidarr(i),
4788: wf_engine.eng_exception, FALSE);
4789: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actidarr(i),
4790: wf_engine.eng_exception);
4791:

Line 4820: FROM wf_items

4816: p_process in varchar2) is
4817:
4818: cursor Open_Items(p_itemType in varchar2) is
4819: SELECT item_key
4820: FROM wf_items
4821: WHERE item_type = p_itemType
4822: AND end_date is NULL;
4823:
4824: cursor All_Open_Items is

Line 4826: FROM wf_items

4822: AND end_date is NULL;
4823:
4824: cursor All_Open_Items is
4825: SELECT item_type, item_key
4826: FROM wf_items
4827: WHERE end_date is NULL;
4828:
4829: begin
4830:

Line 4888: FROM wf_item_activity_statuses wias

4884: p_process in varchar2) is
4885:
4886: cursor suspended_items(p_itemType in varchar2) is
4887: SELECT distinct wias.item_key
4888: FROM wf_item_activity_statuses wias
4889: WHERE wias.item_type = p_itemType
4890: AND wias.activity_status = wf_engine.eng_suspended;
4891:
4892: cursor all_suspended_items is

Line 4894: FROM wf_item_activity_statuses wias

4890: AND wias.activity_status = wf_engine.eng_suspended;
4891:
4892: cursor all_suspended_items is
4893: SELECT distinct wias.item_type, wias.item_key
4894: FROM wf_item_activity_statuses wias
4895: WHERE wias.activity_status = wf_engine.eng_suspended;
4896:
4897: begin
4898:

Line 4979: if (Wf_Item.Item_Exist(copy_itemtype, new_itemkey)) then

4975: Wf_Core.Raise('WFENG_NOFORK_ONERROR');
4976: end if;
4977:
4978: -- Check for duplicate item
4979: if (Wf_Item.Item_Exist(copy_itemtype, new_itemkey)) then
4980: Wf_Core.Token('TYPE', copy_itemtype);
4981: Wf_Core.Token('KEY', new_itemkey);
4982: Wf_Core.Raise('WFENG_ITEM_UNIQUE');
4983: end if;

Line 4988: from wf_items

4984:
4985: --Place row-lock on this item and retrieve parent process info:
4986: select parent_item_type, parent_item_key, parent_context
4987: into l_parent_itemType, l_parent_itemKey, l_parent_context
4988: from wf_items
4989: where item_type = copy_itemtype
4990: and item_key = copy_itemkey
4991: for update of item_type;
4992:

Line 4995: insert into wf_items(

4991: for update of item_type;
4992:
4993: --Create the process
4994: if same_version then
4995: insert into wf_items(
4996: ITEM_TYPE, ITEM_KEY,
4997: ROOT_ACTIVITY, ROOT_ACTIVITY_VERSION,
4998: OWNER_ROLE, USER_KEY,
4999: PARENT_ITEM_TYPE, PARENT_ITEM_KEY, PARENT_CONTEXT,

Line 5007: from wf_items

5003: ROOT_ACTIVITY, ROOT_ACTIVITY_VERSION,
5004: OWNER_ROLE, USER_KEY,
5005: PARENT_ITEM_TYPE, PARENT_ITEM_KEY, PARENT_CONTEXT,
5006: BEGIN_DATE, null
5007: from wf_items
5008: where item_type = copy_itemtype
5009: and item_key = copy_itemkey;
5010: else
5011:

Line 5013: wf_item.Root_Process(itemtype => copy_itemtype,

5009: and item_key = copy_itemkey;
5010: else
5011:
5012: --lookup the root process
5013: wf_item.Root_Process(itemtype => copy_itemtype,
5014: itemkey => copy_itemkey,
5015: wflow => root_process,
5016: version =>root_process_version);
5017:

Line 5021: delete from wf_item_attribute_values

5017:
5018: wf_engine.CreateProcess(copy_itemtype,new_itemkey,root_process);
5019:
5020: --delete any defaulted attributes because we will copy the existing ones.
5021: delete from wf_item_attribute_values
5022: where item_type = copy_itemtype
5023: and item_key = new_itemkey;
5024:
5025:

Line 5030: insert into wf_item_attribute_values

5026: end if;
5027:
5028: -- copy all item attributes including runtime attributes. Also, copy
5029: -- those item attributes that were added after the item was forked
5030: insert into wf_item_attribute_values
5031: (ITEM_TYPE, ITEM_KEY, NAME,
5032: TEXT_VALUE, NUMBER_VALUE, DATE_VALUE)
5033: select ITEM_TYPE, NEW_ITEMKEY, NAME,
5034: TEXT_VALUE, NUMBER_VALUE, DATE_VALUE

Line 5035: from wf_item_attribute_values

5031: (ITEM_TYPE, ITEM_KEY, NAME,
5032: TEXT_VALUE, NUMBER_VALUE, DATE_VALUE)
5033: select ITEM_TYPE, NEW_ITEMKEY, NAME,
5034: TEXT_VALUE, NUMBER_VALUE, DATE_VALUE
5035: from wf_item_attribute_values
5036: where item_type = copy_itemtype
5037: and item_key = copy_itemkey
5038: and name not like '#LBL_'
5039: and name not like '#CNT_'

Line 5043: from WF_ITEM_ATTRIBUTES

5039: and name not like '#CNT_'
5040: union all
5041: select ITEM_TYPE, new_itemkey, NAME,
5042: TEXT_DEFAULT, NUMBER_DEFAULT, DATE_DEFAULT
5043: from WF_ITEM_ATTRIBUTES
5044: where ITEM_TYPE = copy_itemtype
5045: and NAME not in
5046: (select name
5047: from wf_item_attribute_values

Line 5047: from wf_item_attribute_values

5043: from WF_ITEM_ATTRIBUTES
5044: where ITEM_TYPE = copy_itemtype
5045: and NAME not in
5046: (select name
5047: from wf_item_attribute_values
5048: where item_type = copy_itemtype
5049: and item_key = copy_itemkey
5050: and name not like '#LBL_'
5051: and name not like '#CNT_');

Line 5146: update WF_ITEM_ATTRIBUTE_VALUES

5142: end;
5143: else
5144: -- PARENT_CONTEXT is null
5145: -- increase all known #CNT counter by 1
5146: update WF_ITEM_ATTRIBUTE_VALUES
5147: set NUMBER_VALUE = NUMBER_VALUE + 1
5148: where NAME like '#CNT_%'
5149: and NUMBER_VALUE is not null
5150: and ITEM_TYPE = l_parent_itemType

Line 5186: from wf_item_activity_statuses

5182: ASSIGNED_USER, NOTIFICATION_ID,
5183: BEGIN_DATE, END_DATE, EXECUTION_TIME,
5184: ERROR_NAME, ERROR_MESSAGE, ERROR_STACK,
5185: OUTBOUND_QUEUE_ID, DUE_DATE
5186: from wf_item_activity_statuses
5187: where item_type = itemtype
5188: and item_key = copy_itemkey;
5189:
5190: cursor all_activities_hist is

Line 5197: from wf_item_activity_statuses_h

5193: ASSIGNED_USER, NOTIFICATION_ID,
5194: BEGIN_DATE, END_DATE, EXECUTION_TIME,
5195: ERROR_NAME, ERROR_MESSAGE, ERROR_STACK,
5196: OUTBOUND_QUEUE_ID, DUE_DATE
5197: from wf_item_activity_statuses_h
5198: where item_type = itemtype
5199: and item_key = copy_itemkey;
5200:
5201:

Line 5210: from wf_item_activity_statuses

5206: ASSIGNED_USER, NOTIFICATION_ID,
5207: BEGIN_DATE, END_DATE, EXECUTION_TIME,
5208: ERROR_NAME, ERROR_MESSAGE, ERROR_STACK,
5209: OUTBOUND_QUEUE_ID, DUE_DATE
5210: from wf_item_activity_statuses
5211: where item_type = itemtype
5212: and item_key = copy_itemkey
5213: and notification_id is not null
5214: and activity_status = 'NOTIFIED'

Line 5265: if not (Wf_Item.Item_Exist(itemtype, copy_itemkey)) then

5261: end if;
5262:
5263:
5264: -- Check item exists and store attributes while cached
5265: if not (Wf_Item.Item_Exist(itemtype, copy_itemkey)) then
5266: Wf_Core.Token('TYPE', itemtype);
5267: Wf_Core.Token('KEY', copy_itemkey);
5268: Wf_Core.Raise('WFENG_ITEM');
5269: end if;

Line 5271: wf_item.Root_Process(itemtype => itemtype,

5267: Wf_Core.Token('KEY', copy_itemkey);
5268: Wf_Core.Raise('WFENG_ITEM');
5269: end if;
5270:
5271: wf_item.Root_Process(itemtype => itemtype,
5272: itemkey => copy_itemkey,
5273: wflow => copy_root_process,
5274: version =>copy_process_version);
5275:

Line 5276: copy_active_date:= wf_item.Active_Date(itemtype => itemtype,

5272: itemkey => copy_itemkey,
5273: wflow => copy_root_process,
5274: version =>copy_process_version);
5275:
5276: copy_active_date:= wf_item.Active_Date(itemtype => itemtype,
5277: itemkey => copy_itemkey);
5278:
5279:
5280: --check status of item to copy is active or complete

Line 5285: if not (Wf_Item.Item_Exist(itemtype, itemkey)) then

5281: --
5282:
5283:
5284: -- Check item exists
5285: if not (Wf_Item.Item_Exist(itemtype, itemkey)) then
5286: Wf_Core.Token('TYPE', itemtype);
5287: Wf_Core.Token('KEY', itemkey);
5288: Wf_Core.Raise('WFENG_ITEM');
5289: end if;

Line 5291: wf_item.Root_Process(itemtype => itemtype,

5287: Wf_Core.Token('KEY', itemkey);
5288: Wf_Core.Raise('WFENG_ITEM');
5289: end if;
5290:
5291: wf_item.Root_Process(itemtype => itemtype,
5292: itemkey => itemkey,
5293: wflow => new_root_process,
5294: version =>new_process_version);
5295:

Line 5296: new_active_date:= wf_item.Active_Date(itemtype => itemtype,

5292: itemkey => itemkey,
5293: wflow => new_root_process,
5294: version =>new_process_version);
5295:
5296: new_active_date:= wf_item.Active_Date(itemtype => itemtype,
5297: itemkey => itemkey);
5298:
5299:
5300:

Line 5389: insert into wf_item_activity_statuses

5385:
5386: end if;
5387:
5388: -- now insert the status
5389: insert into wf_item_activity_statuses
5390: (ITEM_TYPE, ITEM_KEY, PROCESS_ACTIVITY,
5391: ACTIVITY_STATUS, ACTIVITY_RESULT_CODE,
5392: ASSIGNED_USER, NOTIFICATION_ID,
5393: BEGIN_DATE, END_DATE, EXECUTION_TIME,

Line 5416: insert into wf_item_activity_statuses_h

5412: hist.item_key, itemkey, nid);
5413: end if;
5414:
5415: -- now insert the status
5416: insert into wf_item_activity_statuses_h
5417: (ITEM_TYPE, ITEM_KEY, PROCESS_ACTIVITY,
5418: ACTIVITY_STATUS, ACTIVITY_RESULT_CODE,
5419: ASSIGNED_USER, NOTIFICATION_ID,
5420: BEGIN_DATE, END_DATE, EXECUTION_TIME,

Line 5434: update wf_item_activity_statuses ias

5430: end loop;
5431:
5432: -- update any active functions to notified state
5433: begin
5434: update wf_item_activity_statuses ias
5435: set activity_status = wf_engine.eng_notified
5436: where item_type = itemtype
5437: and item_key = itemkey
5438: and activity_status = 'ACTIVE'

Line 5516: Wf_Item.Root_Process(itemtype, itemkey, root, version);

5512: -- 2. The item and root process exist, and activity is NOTIFIED
5513: -- --> Activity just completed in a running process.
5514:
5515: -- Check if item exists and get root process
5516: Wf_Item.Root_Process(itemtype, itemkey, root, version);
5517: if (root is null) then
5518: -- Item does not exist. Must be case (1).
5519:
5520: -- Use selector to get the root process

Line 5615: Wf_Item.Root_Process(itemtype, itemkey, root, version);

5611: -- 2. The item and root process exist, and activity is NOTIFIED
5612: -- --> Activity just completed in a running process.
5613:
5614: -- Check if item exists and get root process
5615: Wf_Item.Root_Process(itemtype, itemkey, root, version);
5616: if (root is null) then
5617: -- Item does not exist. Must be case (1).
5618:
5619: -- Use selector to get the root process

Line 5644: Wf_Item.Root_Process(itemtype, itemkey, root, version);

5640: itemkey => itemkey,
5641: runmode => 'ACTIVITY');
5642:
5643: -- Get root process for the item
5644: Wf_Item.Root_Process(itemtype, itemkey, root, version);
5645:
5646: -- Look for the starting activity in the root process.
5647: actid := Wf_Process_Activity.StartInstanceId(itemtype, root, version,
5648: activity);

Line 5651: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,

5647: actid := Wf_Process_Activity.StartInstanceId(itemtype, root, version,
5648: activity);
5649:
5650: -- Create a status row for new activity
5651: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,
5652: wf_engine.eng_active, wf_engine.eng_null, sysdate, null, newStatus=>TRUE);
5653: else
5654:
5655: --Bug 2607770

Line 5679: l_lock := wf_item.acquire_lock(itemtype,itemkey,true);

5675: --Any other exception we let the caller decide what to do
5676: if (itemkey <> wf_engine.eng_synch) then
5677: --If its an async process and you cannot acquire a lock
5678: --raise the exception to the user
5679: l_lock := wf_item.acquire_lock(itemtype,itemkey,true);
5680: end if;
5681:
5682: -- Get notification id
5683: Wf_Item_Activity_Status.Notification_Status(itemtype, itemkey, actid,

Line 5683: Wf_Item_Activity_Status.Notification_Status(itemtype, itemkey, actid,

5679: l_lock := wf_item.acquire_lock(itemtype,itemkey,true);
5680: end if;
5681:
5682: -- Get notification id
5683: Wf_Item_Activity_Status.Notification_Status(itemtype, itemkey, actid,
5684: notid, user);
5685:
5686: -- Close any open notifications associated with this activity.
5687: -- Note: if notifications are not closed here, they will be cancelled

Line 5734: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,

5730: raise;
5731: else
5732: Wf_Core.Context('Wf_Engine', 'CompleteActivity', itemtype, itemkey,
5733: activity, result);
5734: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
5735: wf_engine.eng_exception, FALSE);
5736: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
5737: wf_engine.eng_exception);
5738: Wf_Core.Clear;

Line 5816: from WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA

5812: -- Look up activity instance label
5813: begin
5814: select WPA.PROCESS_NAME, WPA.INSTANCE_LABEL
5815: into process, label
5816: from WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA
5817: where WIAS.ITEM_TYPE = itemtype
5818: and WIAS.ITEM_KEY = itemkey
5819: and WIAS.ACTIVITY_STATUS = wf_engine.eng_notified
5820: and WIAS.PROCESS_ACTIVITY = WPA.INSTANCE_ID

Line 5894: Wf_Item.Root_Process(itemtype, itemkey, root, version);

5890: end if;
5891:
5892: -- Get the root process for this key, and check that the item
5893: -- has been created.
5894: Wf_Item.Root_Process(itemtype, itemkey, root, version);
5895: if (root is null) then
5896: Wf_Core.Token('TYPE', itemtype);
5897: Wf_Core.Token('KEY', itemkey);
5898: Wf_Core.Raise('WFENG_ITEM');

Line 5912: actdate := Wf_Item.Active_Date(itemtype, itemkey);

5908: end if;
5909:
5910: -- Get the actid and check that this is a valid activity in the
5911: -- root process
5912: actdate := Wf_Item.Active_Date(itemtype, itemkey);
5913: actid := Wf_Process_Activity.FindActivity(rootid, activity, actdate);
5914: if (actid is null) then
5915: Wf_Core.Token('TYPE', itemtype);
5916: Wf_Core.Token('KEY', itemkey);

Line 5929: Wf_Item_Activity_Status.Status(itemtype, itemkey, actid, status);

5925: Wf_Core.Raise('WFENG_NOTIFICATION_NAME');
5926: end if;
5927:
5928: -- Check if the activity is active
5929: Wf_Item_Activity_Status.Status(itemtype, itemkey, actid, status);
5930:
5931: if (status is null) then
5932: -- Insert one row with the performer
5933: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,

Line 5933: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,

5929: Wf_Item_Activity_Status.Status(itemtype, itemkey, actid, status);
5930:
5931: if (status is null) then
5932: -- Insert one row with the performer
5933: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,
5934: wf_engine.eng_waiting, '', null, null, newStatus=>TRUE);
5935: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5936: '', performer);
5937: elsif (status = wf_engine.eng_waiting) then

Line 5935: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,

5931: if (status is null) then
5932: -- Insert one row with the performer
5933: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,
5934: wf_engine.eng_waiting, '', null, null, newStatus=>TRUE);
5935: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5936: '', performer);
5937: elsif (status = wf_engine.eng_waiting) then
5938: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5939: '', performer);

Line 5938: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,

5934: wf_engine.eng_waiting, '', null, null, newStatus=>TRUE);
5935: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5936: '', performer);
5937: elsif (status = wf_engine.eng_waiting) then
5938: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5939: '', performer);
5940: elsif (status in (wf_engine.eng_notified, wf_engine.eng_error)) then
5941: -- Check this is not a voting activity.
5942: -- Voting activities cannot be re-assigned.

Line 5951: Wf_Item_Activity_Status.Notification_Status(itemtype, itemkey, actid,

5947: Wf_Core.Raise('WFENG_VOTE_REASSIGN');
5948: end if;
5949:
5950: -- Get notification id
5951: Wf_Item_Activity_Status.Notification_Status(itemtype, itemkey, actid,
5952: notid, user);
5953: -- Update the assigned user column in WIAS
5954: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5955: notid, performer);

Line 5954: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,

5950: -- Get notification id
5951: Wf_Item_Activity_Status.Notification_Status(itemtype, itemkey, actid,
5952: notid, user);
5953: -- Update the assigned user column in WIAS
5954: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5955: notid, performer);
5956:
5957: if (notid is not null) then
5958: -- 16-DEC-03 shanjgik bug fix 2722369 check for reassignType added

Line 6089: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,

6085: -- 4. clear the error to continue with next activity
6086: rollback to wf_savepoint;
6087: Wf_Core.Context('Wf_Engine', 'HandleErrorInternal', itemtype, itemkey,
6088: activity, command, result);
6089: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
6090: wf_engine.eng_exception, FALSE);
6091: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
6092: wf_engine.eng_exception);
6093: Wf_Core.Clear;

Line 6114: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey,

6110: when trig_savepoint or dist_savepoint then
6111: -- You must be in a restricted environment,
6112: -- no fancy error processing for you!
6113: -- Immediately defer activity to background engine.
6114: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey,
6115: actid, wf_engine.eng_deferred, wf_engine.eng_null,
6116: SYSDATE, null);
6117: when others then
6118: -- If anything in this process raises an exception:

Line 6126: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,

6122: -- 4. clear the error to continue with next activity
6123: rollback to wf_savepoint;
6124: Wf_Core.Context('Wf_Engine', 'HandleErrorInternal',itemtype,itemkey,
6125: activity, command, result);
6126: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
6127: wf_engine.eng_exception, FALSE);
6128: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
6129: wf_engine.eng_exception);
6130: Wf_Core.Clear;

Line 6137: Wf_Item_Activity_Status.Audit(itemtype, itemkey, actid, upper(command), null);

6133: event_name := 'oracle.apps.wf.engine.retry';
6134: end if;
6135:
6136: -- Store the info for Audit (Bug 5903106 - moved from HandleError to here)
6137: Wf_Item_Activity_Status.Audit(itemtype, itemkey, actid, upper(command), null);
6138:
6139: --Pass the signature of the handle error API in the
6140: --parameter list
6141: wf_event.AddParameterToList('ITMETYPE', itemtype, l_parameterlist);

Line 6215: Wf_Item.Root_Process(itemtype, itemkey, root, version);

6211: Wf_Global.Init;
6212: end if;
6213:
6214: -- Make sure item is valid
6215: Wf_Item.Root_Process(itemtype, itemkey, root, version);
6216: if (root is null) then
6217: Wf_Core.Token('TYPE', itemtype);
6218: Wf_Core.Token('KEY', itemkey);
6219: Wf_Core.Raise('WFENG_ITEM');

Line 6230: actdate := Wf_Item.Active_Date(itemtype, itemkey);

6226: Wf_Core.Raise('WFENG_ITEM_ROOT');
6227: end if;
6228:
6229: -- Look for the activity instance for this item
6230: actdate := Wf_Item.Active_Date(itemtype, itemkey);
6231: actid := Wf_Process_Activity.FindActivity(rootid, activity, actdate);
6232:
6233: if (actid is null) then
6234: Wf_Core.Token('TYPE', itemtype);

Line 6290: from WF_ITEM_ACTIVITY_STATUSES ias,

6286: cursor actc(x_itemtype varchar2, x_itemkey varchar2, x_activity varchar2) is
6287: select ias.ITEM_KEY,
6288: pa.INSTANCE_LABEL activity,
6289: pa.INSTANCE_ID actid
6290: from WF_ITEM_ACTIVITY_STATUSES ias,
6291: WF_PROCESS_ACTIVITIES pa
6292: where ias.ITEM_TYPE = x_itemtype
6293: and (x_itemkey is null or ias.ITEM_KEY = x_itemkey)
6294: and (x_activity is null or pa.INSTANCE_LABEL = x_activity)

Line 6343: Wf_Item.Root_Process(itemtype, c_item_key, root, version);

6339: Wf_Core.Raise('WFSQL_ARGS');
6340: end if;
6341:
6342: -- Make sure item is valid
6343: Wf_Item.Root_Process(itemtype, c_item_key, root, version);
6344: if (root is null) then
6345: Wf_Core.Token('TYPE', itemtype);
6346: Wf_Core.Token('KEY', c_item_key);
6347: Wf_Core.Raise('WFENG_ITEM');

Line 6358: actdate := Wf_Item.Active_Date(itemtype, c_item_key);

6354: Wf_Core.Raise('WFENG_ITEM_ROOT');
6355: end if;
6356:
6357: -- Look for the activity instance for this item
6358: actdate := Wf_Item.Active_Date(itemtype, c_item_key);
6359:
6360: -- Call the internal function to do the real job
6361: HandleErrorInternal(itemtype, c_item_key, root, rootid, c_activity,
6362: c_actid, actdate, upper(command), result);

Line 6396: -- This is a public cover for WF_ITEM_ACTIVITY_STATUS.ROOT_STATUS

6392: end HandleErrorAll;
6393:
6394: --
6395: -- ItemStatus (Public)
6396: -- This is a public cover for WF_ITEM_ACTIVITY_STATUS.ROOT_STATUS
6397: -- Returns the status and result for the root process of this item.
6398: -- If the item does not exist an exception will be raised.
6399: -- IN
6400: -- itemtype - Activity item type.

Line 6419: wf_item_activity_status.root_status(itemtype,itemkey,status,result);

6415: Wf_Core.Token('ITEMKEY', nvl(itemkey, 'NULL'));
6416: Wf_Core.Raise('WFSQL_ARGS');
6417: end if;
6418:
6419: wf_item_activity_status.root_status(itemtype,itemkey,status,result);
6420: exception
6421: when others then
6422: Wf_Core.Context('Wf_Engine', 'ItemStatus', itemtype, itemkey);
6423: raise;

Line 6464: from wf_item_activity_statuses ias,

6460: ias.assigned_user,
6461: ias.notification_id NID,
6462: ntf.status,
6463: ias.performed_by
6464: from wf_item_activity_statuses ias,
6465: wf_process_activities pa,
6466: wf_activities ac,
6467: wf_activities ap,
6468: wf_items i,

Line 6468: wf_items i,

6464: from wf_item_activity_statuses ias,
6465: wf_process_activities pa,
6466: wf_activities ac,
6467: wf_activities ap,
6468: wf_items i,
6469: wf_notifications ntf
6470: where ias.item_type = p_itemtype
6471: and ias.item_key = p_itemkey
6472: and ias.activity_status = wf_engine.eng_completed

Line 6510: from wf_item_activity_statuses

6506: (
6507: select process_activity,
6508: activity_status,
6509: activity_result_code
6510: from wf_item_activity_statuses
6511: where item_type = itemtype
6512: and item_key = itemkey
6513: and activity_status <> wf_engine.eng_completed
6514: order by decode(activity_status, 'ERROR',1, 'NOTIFIED',2, 'DEFERRED',3,

Line 6523: wf_item_activity_status.Error_Info(itemtype,itemkey,l_instance_id,errname,errmsg,errstack);

6519:
6520: --Now lets start getting all details out of the last activity
6521: if l_status = 'ERROR' then
6522: --Populate the error stack
6523: wf_item_activity_status.Error_Info(itemtype,itemkey,l_instance_id,errname,errmsg,errstack);
6524: end if;
6525:
6526: status := l_status;
6527: result := l_result;

Line 6574: from WF_ITEMS

6570: begin
6571: begin
6572: select ROOT_ACTIVITY, BEGIN_DATE
6573: into rootactivity, active_date
6574: from WF_ITEMS
6575: where ITEM_TYPE = p_item_type
6576: and ITEM_KEY = p_item_key;
6577: exception
6578: -- if itemtype/itemkey combination not exists, treats it as not exists

Line 6734: FROM WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA,

6730:
6731: -- Blocked activities waiting for event (if existing process)
6732: cursor evtacts is
6733: SELECT WIAS.PROCESS_ACTIVITY actid
6734: FROM WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA,
6735: WF_ACTIVITIES WA
6736: WHERE WIAS.ITEM_TYPE = event.itemtype
6737: AND WIAS.ITEM_KEY = event.itemkey
6738: AND WIAS.ACTIVITY_STATUS = 'NOTIFIED'

Line 6796: if (Wf_Item.Item_Exist(itemtype, itemkey)) then

6792:
6793: end if;
6794:
6795: -- Check if item exists
6796: if (Wf_Item.Item_Exist(itemtype, itemkey)) then
6797:
6798: -- Process is already running.
6799: --Acquire lock here so that no other session
6800: --will work on it.

Line 6802: l_lock := wf_item.acquire_lock(itemtype, itemkey,true);

6798: -- Process is already running.
6799: --Acquire lock here so that no other session
6800: --will work on it.
6801: --Acquire lock here by opening the cursor
6802: l_lock := wf_item.acquire_lock(itemtype, itemkey,true);
6803:
6804: -- Find all activities waiting for this event.
6805: actdate := WF_Item.Active_Date(itemtype, itemkey);
6806: for act in evtacts loop

Line 6805: actdate := WF_Item.Active_Date(itemtype, itemkey);

6801: --Acquire lock here by opening the cursor
6802: l_lock := wf_item.acquire_lock(itemtype, itemkey,true);
6803:
6804: -- Find all activities waiting for this event.
6805: actdate := WF_Item.Active_Date(itemtype, itemkey);
6806: for act in evtacts loop
6807: actarr(i) := act.actid;
6808: i := i + 1;
6809: end loop;

Line 6816: actdate := WF_Item.Active_Date(itemtype, itemkey);

6812: else
6813: -- Process not running yet, create it.
6814: -- If process_name is null then will use selector function.
6815: Wf_Engine.CreateProcess(itemtype, itemkey, process_name);
6816: actdate := WF_Item.Active_Date(itemtype, itemkey);
6817:
6818: -- Bug 2259039
6819: -- Start the new process
6820: Wf_Engine_Util.Start_Process_Internal(

Line 6826: actdate := WF_Item.Active_Date(itemtype, itemkey);

6822: itemkey => itemkey,
6823: runmode => 'EVENT');
6824:
6825: --Select the activities waiting to receive this event
6826: actdate := WF_Item.Active_Date(itemtype, itemkey);
6827: for act in evtacts loop
6828: actarr(i) := act.actid;
6829: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, act.actid,
6830: wf_engine.eng_notified, wf_engine.eng_null, sysdate, null);

Line 6829: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, act.actid,

6825: --Select the activities waiting to receive this event
6826: actdate := WF_Item.Active_Date(itemtype, itemkey);
6827: for act in evtacts loop
6828: actarr(i) := act.actid;
6829: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, act.actid,
6830: wf_engine.eng_notified, wf_engine.eng_null, sysdate, null);
6831: i := i + 1;
6832: end loop;
6833: actarr(i) := '';

Line 6859: FROM wf_items

6855: -- Bug 2255002 - if the parent item type and parent item key
6856: -- already exist do nothing
6857: SELECT parent_item_type, parent_item_key
6858: INTO parent_itemtype, parent_itemkey
6859: FROM wf_items
6860: WHERE item_type = itemtype
6861: AND item_key = itemkey;
6862:
6863: if (parent_itemtype is null and parent_itemkey is null ) then

Line 6936: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actarr(i),

6932: -- 4. clear the error to continue with next activity
6933: rollback to wf_savepoint;
6934: Wf_Core.Context('Wf_Engine', 'Event', itemtype, itemkey,
6935: process_name, event_name);
6936: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actarr(i),
6937: wf_engine.eng_exception, FALSE);
6938: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actarr(i),
6939: wf_engine.eng_exception);
6940: Wf_Core.Clear;

Line 6974: FROM WF_ITEM_ACTIVITY_STATUSES WIAS,

6970:
6971: -- Blocked activities waiting for event (if existing process)
6972: cursor evtacts is
6973: SELECT /*+ LEADING(WA) */ WIAS.ITEM_TYPE, WIAS.ITEM_KEY, WIAS.PROCESS_ACTIVITY ACTID
6974: FROM WF_ITEM_ACTIVITY_STATUSES WIAS,
6975: WF_PROCESS_ACTIVITIES WPA,
6976: (
6977: SELECT /*+ NO_MERGE */ WA.*
6978: FROM WF_ACTIVITIES WA

Line 6995: WF_ITEMS WI

6991: AND GRP.NAME = WA.EVENT_NAME
6992: )
6993: )
6994: ) WA,
6995: WF_ITEMS WI
6996: WHERE WIAS.ACTIVITY_STATUS = 'NOTIFIED'
6997: AND WIAS.PROCESS_ACTIVITY = WPA.INSTANCE_ID
6998: AND WIAS.ITEM_TYPE = WPA.PROCESS_ITEM_TYPE
6999: AND WPA.ACTIVITY_ITEM_TYPE = WA.ITEM_TYPE

Line 7003: WF_ITEM_ATTRIBUTE_VALUES WIAV

6999: AND WPA.ACTIVITY_ITEM_TYPE = WA.ITEM_TYPE
7000: AND WPA.ACTIVITY_NAME = WA.NAME
7001: AND EXISTS
7002: ( SELECT 1 FROM WF_ACTIVITY_ATTR_VALUES WAAV,
7003: WF_ITEM_ATTRIBUTE_VALUES WIAV
7004: WHERE WAAV.PROCESS_ACTIVITY_ID = WIAS.PROCESS_ACTIVITY
7005: AND WAAV.NAME = '#BUSINESS_KEY'
7006: AND WAAV.VALUE_TYPE = 'ITEMATTR'
7007: AND WIAV.ITEM_TYPE = WIAS.ITEM_TYPE

Line 7138: Wf_Item_Activity_Status.Set_Error(evtacts_rec.item_type,

7134: -- 4. clear the error to continue with next activity
7135: rollback to wf_savepoint;
7136: Wf_Core.Context('Wf_Engine', 'Event2', evtacts_rec.item_type,
7137: evtacts_rec.item_key, event_name);
7138: Wf_Item_Activity_Status.Set_Error(evtacts_rec.item_type,
7139: evtacts_rec.item_key,
7140: evtacts_rec.actid,
7141: wf_engine.eng_exception, FALSE);
7142: Wf_Engine_Util.Execute_Error_Process(evtacts_rec.item_type,

Line 7224: update WF_ITEM_ATTRIBUTE_VALUES wiav

7220: end if;
7221:
7222: else
7223: if (p_addend is NOT null) then
7224: update WF_ITEM_ATTRIBUTE_VALUES wiav
7225: set wiav.NUMBER_VALUE = (wiav.NUMBER_VALUE+p_addend)
7226: where wiav.ITEM_TYPE = p_itemtype
7227: and wiav.ITEM_KEY = p_itemkey
7228: and wiav.NAME = p_aname

Line 7231: update WF_ITEM_ATTRIBUTE_VALUES wiav

7227: and wiav.ITEM_KEY = p_itemkey
7228: and wiav.NAME = p_aname
7229: returning wiav.NUMBER_VALUE into l_avalue;
7230: else
7231: update WF_ITEM_ATTRIBUTE_VALUES wiav
7232: set wiav.NUMBER_VALUE = 0
7233: where wiav.ITEM_TYPE = p_itemtype
7234: and wiav.ITEM_KEY = p_itemkey
7235: and wiav.NAME = p_aname

Line 7307: FROM wf_item_activity_statuses wias,

7303: IS
7304: SELECT wias.item_key,
7305: wpa.process_name,
7306: wpa.instance_label activity
7307: FROM wf_item_activity_statuses wias,
7308: wf_process_activities wpa
7309: WHERE wias.item_type = x_item_type
7310: AND (x_item_key IS NULL OR wias.item_key = x_item_key)
7311: AND (x_process IS NULL OR wpa.process_name = x_process)

Line 7319: FROM wf_item_activity_statuses_h wiash

7315: AND wias.process_activity = wpa.instance_id
7316: AND wias.activity_status = 'ERROR'
7317: AND x_max_retry >=
7318: (SELECT count(1)
7319: FROM wf_item_activity_statuses_h wiash
7320: WHERE wiash.item_type = wias.item_type
7321: AND wiash.item_key = wias.item_key
7322: AND wiash.process_activity = wias.process_activity
7323: AND wiash.action = 'RETRY');