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 3658: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */

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

Line 3660: from WF_ITEM_ACTIVITY_STATUSES WIASP,

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

Line 3661: WF_ITEMS WI,

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

Line 3676: from WF_ITEM_ACTIVITY_STATUSES WIASC,

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

Line 3689: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */

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

Line 3691: from WF_ITEM_ACTIVITY_STATUSES WIASP,

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

Line 3692: WF_ITEMS WI,

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

Line 3706: from WF_ITEM_ACTIVITY_STATUSES WIASC,

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

Line 3755: from WF_ITEM_ACTIVITY_STATUSES WIASP,

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

Line 3758: WF_ITEMS WI

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

Line 3770: from WF_ITEM_ACTIVITY_STATUSES WIASC,

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

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

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

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

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

Line 4031: from WF_ITEM_ATTRIBUTES WIA

4027: -- All event item attrs to be initialized
4028: -- Initialization is now deferred until GetItemAttrEvent
4029: /* cursor evtcurs is
4030: select WIA.NAME
4031: from WF_ITEM_ATTRIBUTES WIA
4032: where WIA.ITEM_TYPE = CreateProcess.itemtype
4033: and WIA.TYPE = 'EVENT';*/
4034:
4035: begin

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

4047: end if;
4048:
4049: -- Check for duplicate item
4050: if (itemkey = wf_engine.eng_synch) then
4051: if (Wf_Item.Item_Exist(itemtype, itemkey)) then
4052: -- SYNCHMODE: If duplicate is a synch process, check the status
4053: -- of the root process of the existing item.
4054: -- If the cached item is already complete, then it is ok to
4055: -- toss out the old item and create a new one.

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

4053: -- of the root process of the existing item.
4054: -- If the cached item is already complete, then it is ok to
4055: -- toss out the old item and create a new one.
4056: begin
4057: Wf_Item.Root_Process(itemtype, itemkey, root, version);
4058: rootid := Wf_Process_Activity.RootInstanceId(itemtype,
4059: itemkey, root);
4060: Wf_Item_Activity_Status.Status(itemtype, itemkey, rootid, status);
4061: exception

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

4056: begin
4057: Wf_Item.Root_Process(itemtype, itemkey, root, version);
4058: rootid := Wf_Process_Activity.RootInstanceId(itemtype,
4059: itemkey, root);
4060: Wf_Item_Activity_Status.Status(itemtype, itemkey, rootid, status);
4061: exception
4062: when others then
4063: status := 'x'; -- Treat errors like incomplete process
4064: end;

Line 4074: Wf_Item.ClearCache;

4070: end if;
4071: else
4072: -- Not synchmode. Clear plsql cache first, just in case previous
4073: -- item was purged/rolled back, then check for duplicate.
4074: Wf_Item.ClearCache;
4075: if (Wf_Item.Item_Exist(itemtype, itemkey)) then
4076: Wf_Core.Token('TYPE', itemtype);
4077: Wf_Core.Token('KEY', itemkey);
4078: Wf_Core.Raise('WFENG_ITEM_UNIQUE');

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

4071: else
4072: -- Not synchmode. Clear plsql cache first, just in case previous
4073: -- item was purged/rolled back, then check for duplicate.
4074: Wf_Item.ClearCache;
4075: if (Wf_Item.Item_Exist(itemtype, itemkey)) then
4076: Wf_Core.Token('TYPE', itemtype);
4077: Wf_Core.Token('KEY', itemkey);
4078: Wf_Core.Raise('WFENG_ITEM_UNIQUE');
4079: end if;

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

4104: Wf_Core.Raise('WFENG_PROCESS_NAME');
4105: end if;
4106:
4107: -- Insert row in items table
4108: Wf_Item.Create_Item(itemtype, itemkey, root, actdate, createprocess.user_key,
4109: createprocess.owner_role);
4110:
4111: -- Validate the root argument is runnable
4112: rootid := Wf_Process_Activity.RootInstanceId(itemtype, itemkey,

Line 4150: Wf_Item.ClearCache;

4146: -- Call clearcache() when #SYNCH flow is in error
4147: if ((itemkey = WF_ENGINE.eng_synch) and
4148: (wf_core.error_name is null or wf_core.error_name <> 'WFENG_SYNCH_ITEM') and
4149: (not WF_ENGINE.debug)) then
4150: Wf_Item.ClearCache;
4151: end if;
4152:
4153: Wf_Core.Context('Wf_Engine', 'CreateProcess', itemtype, itemkey, process);
4154: raise;

Line 4259: from WF_ITEM_ACTIVITY_STATUSES

4255:
4256: -- Cursor to select deferred activities to remove from background queue
4257: cursor defact is
4258: select PROCESS_ACTIVITY, BEGIN_DATE
4259: from WF_ITEM_ACTIVITY_STATUSES
4260: where ITEM_TYPE = itemtype
4261: and ITEM_KEY = itemkey
4262: and ACTIVITY_STATUS = wf_engine.eng_deferred;
4263:

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

4278:
4279: end if;
4280:
4281: -- Get the root process for this key and also validate the item
4282: Wf_Item.Root_Process(itemtype, itemkey, root, version);
4283: if (root is null) then
4284: Wf_Core.Token('TYPE', itemtype);
4285: Wf_Core.Token('KEY', itemkey);
4286: Wf_Core.Raise('WFENG_ITEM');

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

4288:
4289: -- Get the process instance id.
4290: -- Search the process beginnning at the root process of the item for the
4291: -- activity matching process.
4292: actdate := Wf_Item.Active_Date(itemtype, itemkey);
4293: rootid := Wf_Process_Activity.RootInstanceId(itemtype, itemkey, root);
4294: if (rootid is null) then
4295: Wf_Core.Token('TYPE', itemtype);
4296: Wf_Core.Token('KEY', itemkey);

Line 4331: Wf_Item_Activity_Status.ClearCache;

4327: -- Always clear the cache first
4328: -- AbortProcess, SuspendProcess and ResumeProcess should be rarely called
4329: -- from the background engine, so it should be safe to force reading from
4330: -- the database.
4331: Wf_Item_Activity_Status.ClearCache;
4332:
4333: -- Check if the process is active
4334: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4335:

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

4330: -- the database.
4331: Wf_Item_Activity_Status.ClearCache;
4332:
4333: -- Check if the process is active
4334: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4335:
4336: if (status is null) then
4337: -- This process has not been run yet. Create a pre-suspended
4338: -- status row so engine does not run process later

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

4335:
4336: if (status is null) then
4337: -- This process has not been run yet. Create a pre-suspended
4338: -- status row so engine does not run process later
4339: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,
4340: wf_engine.eng_suspended, wf_engine.eng_null, null, null,
4341: newStatus=>TRUE);
4342: elsif (status = wf_engine.eng_deferred) then
4343: -- Change status from 'deferred' to 'suspended'

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

4341: newStatus=>TRUE);
4342: elsif (status = wf_engine.eng_deferred) then
4343: -- Change status from 'deferred' to 'suspended'
4344: -- Doing this prevents the background processor from picking it up.
4345: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,
4346: wf_engine.eng_suspended, null,
4347: null, null);
4348: elsif (status = wf_engine.eng_active) then
4349: -- Mark process as 'suspended', 'null' in WIAS table

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

4347: null, null);
4348: elsif (status = wf_engine.eng_active) then
4349: -- Mark process as 'suspended', 'null' in WIAS table
4350: -- Doing this stops the engine from going through the rest of the flow
4351: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,
4352: wf_engine.eng_suspended, null,
4353: null, null);
4354:
4355: -- Suspend all the children processes

Line 4411: FROM wf_notifications wn, WF_ITEM_ACTIVITY_STATUSES ias

4407:
4408: l_lock boolean;
4409: cursor openNotifications is -- <7513983>
4410: SELECT wn.notification_id
4411: FROM wf_notifications wn, WF_ITEM_ACTIVITY_STATUSES ias
4412: WHERE ias.item_type = itemtype
4413: AND ias.item_key = itemkey
4414: AND ias.notification_id is not null
4415: AND ias.notification_id = wn.group_id

Line 4419: FROM wf_notifications wn, WF_ITEM_ACTIVITY_STATUSES_H iash

4415: AND ias.notification_id = wn.group_id
4416: AND wn.status = 'OPEN'
4417: UNION
4418: SELECT wn.notification_id
4419: FROM wf_notifications wn, WF_ITEM_ACTIVITY_STATUSES_H iash
4420: WHERE iash.item_type = itemtype
4421: AND iash.item_key = itemkey
4422: AND iash.notification_id is not null
4423: AND iash.notification_id = wn.notification_id

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

4439: --request for the same.
4440: if verify_lock then
4441: --Check if we can acquire lock for the
4442: --the item type/key here
4443: l_lock := wf_item.acquire_lock(itemtype,itemkey,true) ;
4444: end if;
4445:
4446: -- Get the root process for this key and also validate the item
4447: Wf_Item.Root_Process(itemtype, itemkey, root, version);

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

4443: l_lock := wf_item.acquire_lock(itemtype,itemkey,true) ;
4444: end if;
4445:
4446: -- Get the root process for this key and also validate the item
4447: Wf_Item.Root_Process(itemtype, itemkey, root, version);
4448: if (root is null) then
4449: Wf_Core.Context('Wf_Engine', 'AbortProcess', itemtype, itemkey, process);
4450: Wf_Core.Token('TYPE', itemtype);
4451: Wf_Core.Token('KEY', itemkey);

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

4454:
4455: -- Get the process instance id.
4456: -- Search the process beginnning at the root process of the item for the
4457: -- activity matching process.
4458: actdate := Wf_Item.Active_Date(itemtype, itemkey);
4459: rootid := Wf_Process_Activity.RootInstanceId(itemtype, itemkey, root);
4460: if (rootid is null) then
4461: Wf_Core.Token('TYPE', itemtype);
4462: Wf_Core.Token('KEY', itemkey);

Line 4494: Wf_Item_Activity_Status.ClearCache;

4490: end if;
4491: end if;
4492:
4493: -- Always clear the cache first
4494: Wf_Item_Activity_Status.ClearCache;
4495:
4496: -- Check the process is not already complete
4497: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4498:

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

4493: -- Always clear the cache first
4494: Wf_Item_Activity_Status.ClearCache;
4495:
4496: -- Check the process is not already complete
4497: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4498:
4499: if (status is null) then
4500: if (WF_ITEM.SetEndDate(itemtype, itemkey) = 1) then
4501: Wf_Core.Token('TYPE', itemtype);

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

4496: -- Check the process is not already complete
4497: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4498:
4499: if (status is null) then
4500: if (WF_ITEM.SetEndDate(itemtype, itemkey) = 1) then
4501: Wf_Core.Token('TYPE', itemtype);
4502: Wf_core.Token('KEY', itemkey);
4503: Wf_core.Token('NAME', proc);
4504: Wf_Core.Raise('WFENG_ITEM_PROCESS_RUNNING');

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

4511: Wf_Core.Raise('WFENG_ITEM_PROCESS_ACTIVE');
4512: else
4513: -- Mark process as 'COMPLETE', 'result' in WIAS table
4514: -- Doing this stops the engine from going through the rest of the flow
4515: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,
4516: wf_engine.eng_completed, result,
4517: null, SYSDATE);
4518:
4519: -- Kill child activities recursively

Line 4585: from WF_ITEM_ACTIVITY_STATUSES

4581: -- Cursor to select deferred activities to restart.
4582: cursor defact is
4583: select
4584: PROCESS_ACTIVITY, BEGIN_DATE
4585: from WF_ITEM_ACTIVITY_STATUSES
4586: where ITEM_TYPE = itemtype
4587: and ITEM_KEY = itemkey
4588: and ACTIVITY_STATUS = wf_engine.eng_deferred;
4589:

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

4614:
4615: end if;
4616:
4617: -- Get the root process for this key
4618: Wf_Item.Root_Process(itemtype, itemkey, root, version);
4619: if (root is null) then
4620: Wf_Core.Token('TYPE', itemtype);
4621: Wf_Core.Token('KEY', itemkey);
4622: Wf_Core.Raise('WFENG_ITEM');

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

4624:
4625: -- Get the process instance id.
4626: -- Search the process beginnning at the root process of the item for the
4627: -- activity matching process.
4628: actdate := Wf_Item.Active_Date(itemtype, itemkey);
4629: rootid := Wf_Process_Activity.RootInstanceId(itemtype, itemkey, root);
4630: if (rootid is null) then
4631: Wf_Core.Token('TYPE', itemtype);
4632: Wf_Core.Token('KEY', itemkey);

Line 4664: Wf_Item_Activity_Status.ClearCache;

4660: end if;
4661: end if;
4662:
4663: -- Always clear the cache first
4664: Wf_Item_Activity_Status.ClearCache;
4665:
4666: -- Check if the process is suspended
4667: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4668: if (status is null) then

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

4663: -- Always clear the cache first
4664: Wf_Item_Activity_Status.ClearCache;
4665:
4666: -- Check if the process is suspended
4667: Wf_Item_Activity_Status.Status(itemtype, itemkey, procid, status);
4668: if (status is null) then
4669: Wf_Core.Token('TYPE', itemtype);
4670: Wf_Core.Token('KEY', itemkey);
4671: Wf_Core.Token('NAME', proc);

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

4677: Wf_Core.Raise('WFENG_ITEM_PROCESS_SUSPENDED');
4678: else
4679: -- If we came here, that means the process is currently suspended.
4680: -- Mark process as eng_active 'active', 'null' in WIAS table
4681: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, procid,
4682: wf_engine.eng_active, null, null, null);
4683:
4684: -- Mark any sub-processes as active again
4685: Wf_Engine_Util.Resume_Child_Processes(itemtype, itemkey, procid);

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

4711: --of the activity or to sysdate if begin_date is null
4712: --Also set the status to active only if begin_date <= sysdate
4713:
4714: if (nvl(act_begin_date(i),sysdate) <= sysdate) then
4715: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actidarr(i),
4716: wf_engine.eng_active, null, sysdate, null);
4717: begin
4718: savepoint wf_savepoint;
4719: Wf_Engine_Util.Process_Activity(itemtype, itemkey, actidarr(i),

Line 4725: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey,

4721: exception
4722: when trig_savepoint or dist_savepoint then
4723: -- Can't restart process here, re-defer for the
4724: -- background process to pick up.
4725: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey,
4726: actidarr(i),wf_engine.eng_deferred, null, sysdate, null);
4727: when others then
4728: -- If anything in this process raises an exception:
4729: -- 1. rollback any work in this process thread

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

4732: -- 4. clear the error to continue with next activity
4733: rollback to wf_savepoint;
4734: Wf_Core.Context('Wf_Engine', 'ResumeProcess', itemtype, itemkey,
4735: process);
4736: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actidarr(i),
4737: wf_engine.eng_exception, FALSE);
4738: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actidarr(i),
4739: wf_engine.eng_exception);
4740:

Line 4769: FROM wf_items

4765: p_process in varchar2) is
4766:
4767: cursor Open_Items(p_itemType in varchar2) is
4768: SELECT item_key
4769: FROM wf_items
4770: WHERE item_type = p_itemType
4771: AND end_date is NULL;
4772:
4773: cursor All_Open_Items is

Line 4775: FROM wf_items

4771: AND end_date is NULL;
4772:
4773: cursor All_Open_Items is
4774: SELECT item_type, item_key
4775: FROM wf_items
4776: WHERE end_date is NULL;
4777:
4778: begin
4779:

Line 4837: FROM wf_item_activity_statuses wias

4833: p_process in varchar2) is
4834:
4835: cursor suspended_items(p_itemType in varchar2) is
4836: SELECT distinct wias.item_key
4837: FROM wf_item_activity_statuses wias
4838: WHERE wias.item_type = p_itemType
4839: AND wias.activity_status = wf_engine.eng_suspended;
4840:
4841: cursor all_suspended_items is

Line 4843: FROM wf_item_activity_statuses wias

4839: AND wias.activity_status = wf_engine.eng_suspended;
4840:
4841: cursor all_suspended_items is
4842: SELECT distinct wias.item_type, wias.item_key
4843: FROM wf_item_activity_statuses wias
4844: WHERE wias.activity_status = wf_engine.eng_suspended;
4845:
4846: begin
4847:

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

4921: Wf_Core.Raise('WFENG_NOFORK_ONERROR');
4922: end if;
4923:
4924: -- Check for duplicate item
4925: if (Wf_Item.Item_Exist(copy_itemtype, new_itemkey)) then
4926: Wf_Core.Token('TYPE', copy_itemtype);
4927: Wf_Core.Token('KEY', new_itemkey);
4928: Wf_Core.Raise('WFENG_ITEM_UNIQUE');
4929: end if;

Line 4934: from wf_items

4930:
4931: --Place row-lock on this item and retrieve parent process info:
4932: select parent_item_type, parent_item_key, parent_context
4933: into l_parent_itemType, l_parent_itemKey, l_parent_context
4934: from wf_items
4935: where item_type = copy_itemtype
4936: and item_key = copy_itemkey
4937: for update of item_type;
4938:

Line 4941: insert into wf_items(

4937: for update of item_type;
4938:
4939: --Create the process
4940: if same_version then
4941: insert into wf_items(
4942: ITEM_TYPE, ITEM_KEY,
4943: ROOT_ACTIVITY, ROOT_ACTIVITY_VERSION,
4944: OWNER_ROLE, USER_KEY,
4945: PARENT_ITEM_TYPE, PARENT_ITEM_KEY, PARENT_CONTEXT,

Line 4953: from wf_items

4949: ROOT_ACTIVITY, ROOT_ACTIVITY_VERSION,
4950: OWNER_ROLE, USER_KEY,
4951: PARENT_ITEM_TYPE, PARENT_ITEM_KEY, PARENT_CONTEXT,
4952: BEGIN_DATE, null
4953: from wf_items
4954: where item_type = copy_itemtype
4955: and item_key = copy_itemkey;
4956: else
4957:

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

4955: and item_key = copy_itemkey;
4956: else
4957:
4958: --lookup the root process
4959: wf_item.Root_Process(itemtype => copy_itemtype,
4960: itemkey => copy_itemkey,
4961: wflow => root_process,
4962: version =>root_process_version);
4963:

Line 4967: delete from wf_item_attribute_values

4963:
4964: wf_engine.CreateProcess(copy_itemtype,new_itemkey,root_process);
4965:
4966: --delete any defaulted attributes because we will copy the existing ones.
4967: delete from wf_item_attribute_values
4968: where item_type = copy_itemtype
4969: and item_key = new_itemkey;
4970:
4971:

Line 4976: insert into wf_item_attribute_values

4972: end if;
4973:
4974: -- copy all item attributes including runtime attributes. Also, copy
4975: -- those item attributes that were added after the item was forked
4976: insert into wf_item_attribute_values
4977: (ITEM_TYPE, ITEM_KEY, NAME,
4978: TEXT_VALUE, NUMBER_VALUE, DATE_VALUE)
4979: select ITEM_TYPE, NEW_ITEMKEY, NAME,
4980: TEXT_VALUE, NUMBER_VALUE, DATE_VALUE

Line 4981: from wf_item_attribute_values

4977: (ITEM_TYPE, ITEM_KEY, NAME,
4978: TEXT_VALUE, NUMBER_VALUE, DATE_VALUE)
4979: select ITEM_TYPE, NEW_ITEMKEY, NAME,
4980: TEXT_VALUE, NUMBER_VALUE, DATE_VALUE
4981: from wf_item_attribute_values
4982: where item_type = copy_itemtype
4983: and item_key = copy_itemkey
4984: and name not like '#LBL_'
4985: and name not like '#CNT_'

Line 4989: from WF_ITEM_ATTRIBUTES

4985: and name not like '#CNT_'
4986: union all
4987: select ITEM_TYPE, new_itemkey, NAME,
4988: TEXT_DEFAULT, NUMBER_DEFAULT, DATE_DEFAULT
4989: from WF_ITEM_ATTRIBUTES
4990: where ITEM_TYPE = copy_itemtype
4991: and NAME not in
4992: (select name
4993: from wf_item_attribute_values

Line 4993: from wf_item_attribute_values

4989: from WF_ITEM_ATTRIBUTES
4990: where ITEM_TYPE = copy_itemtype
4991: and NAME not in
4992: (select name
4993: from wf_item_attribute_values
4994: where item_type = copy_itemtype
4995: and item_key = copy_itemkey
4996: and name not like '#LBL_'
4997: and name not like '#CNT_');

Line 5092: update WF_ITEM_ATTRIBUTE_VALUES

5088: end;
5089: else
5090: -- PARENT_CONTEXT is null
5091: -- increase all known #CNT counter by 1
5092: update WF_ITEM_ATTRIBUTE_VALUES
5093: set NUMBER_VALUE = NUMBER_VALUE + 1
5094: where NAME like '#CNT_%'
5095: and NUMBER_VALUE is not null
5096: and ITEM_TYPE = l_parent_itemType

Line 5132: from wf_item_activity_statuses

5128: ASSIGNED_USER, NOTIFICATION_ID,
5129: BEGIN_DATE, END_DATE, EXECUTION_TIME,
5130: ERROR_NAME, ERROR_MESSAGE, ERROR_STACK,
5131: OUTBOUND_QUEUE_ID, DUE_DATE
5132: from wf_item_activity_statuses
5133: where item_type = itemtype
5134: and item_key = copy_itemkey;
5135:
5136: cursor all_activities_hist is

Line 5143: from wf_item_activity_statuses_h

5139: ASSIGNED_USER, NOTIFICATION_ID,
5140: BEGIN_DATE, END_DATE, EXECUTION_TIME,
5141: ERROR_NAME, ERROR_MESSAGE, ERROR_STACK,
5142: OUTBOUND_QUEUE_ID, DUE_DATE
5143: from wf_item_activity_statuses_h
5144: where item_type = itemtype
5145: and item_key = copy_itemkey;
5146:
5147:

Line 5156: from wf_item_activity_statuses

5152: ASSIGNED_USER, NOTIFICATION_ID,
5153: BEGIN_DATE, END_DATE, EXECUTION_TIME,
5154: ERROR_NAME, ERROR_MESSAGE, ERROR_STACK,
5155: OUTBOUND_QUEUE_ID, DUE_DATE
5156: from wf_item_activity_statuses
5157: where item_type = itemtype
5158: and item_key = copy_itemkey
5159: and notification_id is not null
5160: and activity_status = 'NOTIFIED'

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

5207: end if;
5208:
5209:
5210: -- Check item exists and store attributes while cached
5211: if not (Wf_Item.Item_Exist(itemtype, copy_itemkey)) then
5212: Wf_Core.Token('TYPE', itemtype);
5213: Wf_Core.Token('KEY', copy_itemkey);
5214: Wf_Core.Raise('WFENG_ITEM');
5215: end if;

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

5213: Wf_Core.Token('KEY', copy_itemkey);
5214: Wf_Core.Raise('WFENG_ITEM');
5215: end if;
5216:
5217: wf_item.Root_Process(itemtype => itemtype,
5218: itemkey => copy_itemkey,
5219: wflow => copy_root_process,
5220: version =>copy_process_version);
5221:

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

5218: itemkey => copy_itemkey,
5219: wflow => copy_root_process,
5220: version =>copy_process_version);
5221:
5222: copy_active_date:= wf_item.Active_Date(itemtype => itemtype,
5223: itemkey => copy_itemkey);
5224:
5225:
5226: --check status of item to copy is active or complete

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

5227: --
5228:
5229:
5230: -- Check item exists
5231: if not (Wf_Item.Item_Exist(itemtype, itemkey)) then
5232: Wf_Core.Token('TYPE', itemtype);
5233: Wf_Core.Token('KEY', itemkey);
5234: Wf_Core.Raise('WFENG_ITEM');
5235: end if;

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

5233: Wf_Core.Token('KEY', itemkey);
5234: Wf_Core.Raise('WFENG_ITEM');
5235: end if;
5236:
5237: wf_item.Root_Process(itemtype => itemtype,
5238: itemkey => itemkey,
5239: wflow => new_root_process,
5240: version =>new_process_version);
5241:

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

5238: itemkey => itemkey,
5239: wflow => new_root_process,
5240: version =>new_process_version);
5241:
5242: new_active_date:= wf_item.Active_Date(itemtype => itemtype,
5243: itemkey => itemkey);
5244:
5245:
5246:

Line 5335: insert into wf_item_activity_statuses

5331:
5332: end if;
5333:
5334: -- now insert the status
5335: insert into wf_item_activity_statuses
5336: (ITEM_TYPE, ITEM_KEY, PROCESS_ACTIVITY,
5337: ACTIVITY_STATUS, ACTIVITY_RESULT_CODE,
5338: ASSIGNED_USER, NOTIFICATION_ID,
5339: BEGIN_DATE, END_DATE, EXECUTION_TIME,

Line 5362: insert into wf_item_activity_statuses_h

5358: hist.item_key, itemkey, nid);
5359: end if;
5360:
5361: -- now insert the status
5362: insert into wf_item_activity_statuses_h
5363: (ITEM_TYPE, ITEM_KEY, PROCESS_ACTIVITY,
5364: ACTIVITY_STATUS, ACTIVITY_RESULT_CODE,
5365: ASSIGNED_USER, NOTIFICATION_ID,
5366: BEGIN_DATE, END_DATE, EXECUTION_TIME,

Line 5380: update wf_item_activity_statuses ias

5376: end loop;
5377:
5378: -- update any active functions to notified state
5379: begin
5380: update wf_item_activity_statuses ias
5381: set activity_status = wf_engine.eng_notified
5382: where item_type = itemtype
5383: and item_key = itemkey
5384: and activity_status = 'ACTIVE'

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

5458: -- 2. The item and root process exist, and activity is NOTIFIED
5459: -- --> Activity just completed in a running process.
5460:
5461: -- Check if item exists and get root process
5462: Wf_Item.Root_Process(itemtype, itemkey, root, version);
5463: if (root is null) then
5464: -- Item does not exist. Must be case (1).
5465:
5466: -- Use selector to get the root process

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

5555: -- 2. The item and root process exist, and activity is NOTIFIED
5556: -- --> Activity just completed in a running process.
5557:
5558: -- Check if item exists and get root process
5559: Wf_Item.Root_Process(itemtype, itemkey, root, version);
5560: if (root is null) then
5561: -- Item does not exist. Must be case (1).
5562:
5563: -- Use selector to get the root process

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

5584: itemkey => itemkey,
5585: runmode => 'ACTIVITY');
5586:
5587: -- Get root process for the item
5588: Wf_Item.Root_Process(itemtype, itemkey, root, version);
5589:
5590: -- Look for the starting activity in the root process.
5591: actid := Wf_Process_Activity.StartInstanceId(itemtype, root, version,
5592: activity);

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

5591: actid := Wf_Process_Activity.StartInstanceId(itemtype, root, version,
5592: activity);
5593:
5594: -- Create a status row for new activity
5595: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,
5596: wf_engine.eng_active, wf_engine.eng_null, sysdate, null, newStatus=>TRUE);
5597: else
5598:
5599: --Bug 2607770

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

5619: --Any other exception we let the caller decide what to do
5620: if (itemkey <> wf_engine.eng_synch) then
5621: --If its an async process and you cannot acquire a lock
5622: --raise the exception to the user
5623: l_lock := wf_item.acquire_lock(itemtype,itemkey,true);
5624: end if;
5625:
5626: -- Get notification id
5627: Wf_Item_Activity_Status.Notification_Status(itemtype, itemkey, actid,

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

5623: l_lock := wf_item.acquire_lock(itemtype,itemkey,true);
5624: end if;
5625:
5626: -- Get notification id
5627: Wf_Item_Activity_Status.Notification_Status(itemtype, itemkey, actid,
5628: notid, user);
5629:
5630: -- Close any open notifications associated with this activity.
5631: -- Note: if notifications are not closed here, they will be cancelled

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

5668: -- 4. clear the error to continue with next activity
5669: rollback to wf_savepoint;
5670: Wf_Core.Context('Wf_Engine', 'CompleteActivity', itemtype, itemkey,
5671: activity, result);
5672: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
5673: wf_engine.eng_exception, FALSE);
5674: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
5675: wf_engine.eng_exception);
5676: Wf_Core.Clear;

Line 5751: from WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA

5747: -- Look up activity instance label
5748: begin
5749: select WPA.PROCESS_NAME, WPA.INSTANCE_LABEL
5750: into process, label
5751: from WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA
5752: where WIAS.ITEM_TYPE = itemtype
5753: and WIAS.ITEM_KEY = itemkey
5754: and WIAS.ACTIVITY_STATUS = wf_engine.eng_notified
5755: and WIAS.PROCESS_ACTIVITY = WPA.INSTANCE_ID

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

5825: end if;
5826:
5827: -- Get the root process for this key, and check that the item
5828: -- has been created.
5829: Wf_Item.Root_Process(itemtype, itemkey, root, version);
5830: if (root is null) then
5831: Wf_Core.Token('TYPE', itemtype);
5832: Wf_Core.Token('KEY', itemkey);
5833: Wf_Core.Raise('WFENG_ITEM');

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

5843: end if;
5844:
5845: -- Get the actid and check that this is a valid activity in the
5846: -- root process
5847: actdate := Wf_Item.Active_Date(itemtype, itemkey);
5848: actid := Wf_Process_Activity.FindActivity(rootid, activity, actdate);
5849: if (actid is null) then
5850: Wf_Core.Token('TYPE', itemtype);
5851: Wf_Core.Token('KEY', itemkey);

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

5860: Wf_Core.Raise('WFENG_NOTIFICATION_NAME');
5861: end if;
5862:
5863: -- Check if the activity is active
5864: Wf_Item_Activity_Status.Status(itemtype, itemkey, actid, status);
5865:
5866: if (status is null) then
5867: -- Insert one row with the performer
5868: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,

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

5864: Wf_Item_Activity_Status.Status(itemtype, itemkey, actid, status);
5865:
5866: if (status is null) then
5867: -- Insert one row with the performer
5868: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,
5869: wf_engine.eng_waiting, '', null, null, newStatus=>TRUE);
5870: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5871: '', performer);
5872: elsif (status = wf_engine.eng_waiting) then

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

5866: if (status is null) then
5867: -- Insert one row with the performer
5868: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, actid,
5869: wf_engine.eng_waiting, '', null, null, newStatus=>TRUE);
5870: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5871: '', performer);
5872: elsif (status = wf_engine.eng_waiting) then
5873: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5874: '', performer);

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

5869: wf_engine.eng_waiting, '', null, null, newStatus=>TRUE);
5870: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5871: '', performer);
5872: elsif (status = wf_engine.eng_waiting) then
5873: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5874: '', performer);
5875: elsif (status in (wf_engine.eng_notified, wf_engine.eng_error)) then
5876: -- Check this is not a voting activity.
5877: -- Voting activities cannot be re-assigned.

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

5882: Wf_Core.Raise('WFENG_VOTE_REASSIGN');
5883: end if;
5884:
5885: -- Get notification id
5886: Wf_Item_Activity_Status.Notification_Status(itemtype, itemkey, actid,
5887: notid, user);
5888: -- Update the assigned user column in WIAS
5889: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5890: notid, performer);

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

5885: -- Get notification id
5886: Wf_Item_Activity_Status.Notification_Status(itemtype, itemkey, actid,
5887: notid, user);
5888: -- Update the assigned user column in WIAS
5889: Wf_Item_Activity_Status.Update_Notification(itemtype, itemkey, actid,
5890: notid, performer);
5891:
5892: if (notid is not null) then
5893: -- 16-DEC-03 shanjgik bug fix 2722369 check for reassignType added

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

6019: -- 4. clear the error to continue with next activity
6020: rollback to wf_savepoint;
6021: Wf_Core.Context('Wf_Engine', 'HandleErrorInternal', itemtype, itemkey,
6022: activity, command, result);
6023: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
6024: wf_engine.eng_exception, FALSE);
6025: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
6026: wf_engine.eng_exception);
6027: Wf_Core.Clear;

Line 6048: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey,

6044: when trig_savepoint or dist_savepoint then
6045: -- You must be in a restricted environment,
6046: -- no fancy error processing for you!
6047: -- Immediately defer activity to background engine.
6048: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey,
6049: actid, wf_engine.eng_deferred, wf_engine.eng_null,
6050: SYSDATE, null);
6051: when others then
6052: -- If anything in this process raises an exception:

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

6056: -- 4. clear the error to continue with next activity
6057: rollback to wf_savepoint;
6058: Wf_Core.Context('Wf_Engine', 'HandleErrorInternal',itemtype,itemkey,
6059: activity, command, result);
6060: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actid,
6061: wf_engine.eng_exception, FALSE);
6062: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actid,
6063: wf_engine.eng_exception);
6064: Wf_Core.Clear;

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

6067: event_name := 'oracle.apps.wf.engine.retry';
6068: end if;
6069:
6070: -- Store the info for Audit (Bug 5903106 - moved from HandleError to here)
6071: Wf_Item_Activity_Status.Audit(itemtype, itemkey, actid, upper(command), null);
6072:
6073: --Pass the signature of the handle error API in the
6074: --parameter list
6075: wf_event.AddParameterToList('ITMETYPE', itemtype, l_parameterlist);

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

6143: Wf_Global.Init;
6144: end if;
6145:
6146: -- Make sure item is valid
6147: Wf_Item.Root_Process(itemtype, itemkey, root, version);
6148: if (root is null) then
6149: Wf_Core.Token('TYPE', itemtype);
6150: Wf_Core.Token('KEY', itemkey);
6151: Wf_Core.Raise('WFENG_ITEM');

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

6158: Wf_Core.Raise('WFENG_ITEM_ROOT');
6159: end if;
6160:
6161: -- Look for the activity instance for this item
6162: actdate := Wf_Item.Active_Date(itemtype, itemkey);
6163: actid := Wf_Process_Activity.FindActivity(rootid, activity, actdate);
6164:
6165: if (actid is null) then
6166: Wf_Core.Token('TYPE', itemtype);

Line 6221: from WF_ITEM_ACTIVITY_STATUSES ias,

6217: cursor actc(x_itemtype varchar2, x_itemkey varchar2, x_activity varchar2) is
6218: select ias.ITEM_KEY,
6219: pa.INSTANCE_LABEL activity,
6220: pa.INSTANCE_ID actid
6221: from WF_ITEM_ACTIVITY_STATUSES ias,
6222: WF_PROCESS_ACTIVITIES pa
6223: where ias.ITEM_TYPE = x_itemtype
6224: and (x_itemkey is null or ias.ITEM_KEY = x_itemkey)
6225: and (x_activity is null or pa.INSTANCE_LABEL = x_activity)

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

6270: Wf_Core.Raise('WFSQL_ARGS');
6271: end if;
6272:
6273: -- Make sure item is valid
6274: Wf_Item.Root_Process(itemtype, c_item_key, root, version);
6275: if (root is null) then
6276: Wf_Core.Token('TYPE', itemtype);
6277: Wf_Core.Token('KEY', c_item_key);
6278: Wf_Core.Raise('WFENG_ITEM');

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

6285: Wf_Core.Raise('WFENG_ITEM_ROOT');
6286: end if;
6287:
6288: -- Look for the activity instance for this item
6289: actdate := Wf_Item.Active_Date(itemtype, c_item_key);
6290:
6291: -- Call the internal function to do the real job
6292: HandleErrorInternal(itemtype, c_item_key, root, rootid, c_activity,
6293: c_actid, actdate, upper(command), result);

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

6323: end HandleErrorAll;
6324:
6325: --
6326: -- ItemStatus (Public)
6327: -- This is a public cover for WF_ITEM_ACTIVITY_STATUS.ROOT_STATUS
6328: -- Returns the status and result for the root process of this item.
6329: -- If the item does not exist an exception will be raised.
6330: -- IN
6331: -- itemtype - Activity item type.

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

6346: Wf_Core.Token('ITEMKEY', nvl(itemkey, 'NULL'));
6347: Wf_Core.Raise('WFSQL_ARGS');
6348: end if;
6349:
6350: wf_item_activity_status.root_status(itemtype,itemkey,status,result);
6351: exception
6352: when others then
6353: Wf_Core.Context('Wf_Engine', 'ItemStatus', itemtype, itemkey);
6354: raise;

Line 6395: from wf_item_activity_statuses ias,

6391: ias.assigned_user,
6392: ias.notification_id NID,
6393: ntf.status,
6394: ias.performed_by
6395: from wf_item_activity_statuses ias,
6396: wf_process_activities pa,
6397: wf_activities ac,
6398: wf_activities ap,
6399: wf_items i,

Line 6399: wf_items i,

6395: from wf_item_activity_statuses ias,
6396: wf_process_activities pa,
6397: wf_activities ac,
6398: wf_activities ap,
6399: wf_items i,
6400: wf_notifications ntf
6401: where ias.item_type = p_itemtype
6402: and ias.item_key = p_itemkey
6403: and ias.activity_status = wf_engine.eng_completed

Line 6441: from wf_item_activity_statuses

6437: (
6438: select process_activity,
6439: activity_status,
6440: activity_result_code
6441: from wf_item_activity_statuses
6442: where item_type = itemtype
6443: and item_key = itemkey
6444: and activity_status <> wf_engine.eng_completed
6445: order by decode(activity_status, 'ERROR',1, 'NOTIFIED',2, 'DEFERRED',3,

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

6450:
6451: --Now lets start getting all details out of the last activity
6452: if l_status = 'ERROR' then
6453: --Populate the error stack
6454: wf_item_activity_status.Error_Info(itemtype,itemkey,l_instance_id,errname,errmsg,errstack);
6455: end if;
6456:
6457: status := l_status;
6458: result := l_result;

Line 6505: from WF_ITEMS

6501: begin
6502: begin
6503: select ROOT_ACTIVITY, BEGIN_DATE
6504: into rootactivity, active_date
6505: from WF_ITEMS
6506: where ITEM_TYPE = p_item_type
6507: and ITEM_KEY = p_item_key;
6508: exception
6509: -- if itemtype/itemkey combination not exists, treats it as not exists

Line 6665: FROM WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA,

6661:
6662: -- Blocked activities waiting for event (if existing process)
6663: cursor evtacts is
6664: SELECT WIAS.PROCESS_ACTIVITY actid
6665: FROM WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA,
6666: WF_ACTIVITIES WA
6667: WHERE WIAS.ITEM_TYPE = event.itemtype
6668: AND WIAS.ITEM_KEY = event.itemkey
6669: AND WIAS.ACTIVITY_STATUS = 'NOTIFIED'

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

6722:
6723: end if;
6724:
6725: -- Check if item exists
6726: if (Wf_Item.Item_Exist(itemtype, itemkey)) then
6727:
6728: -- Process is already running.
6729: --Acquire lock here so that no other session
6730: --will work on it.

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

6728: -- Process is already running.
6729: --Acquire lock here so that no other session
6730: --will work on it.
6731: --Acquire lock here by opening the cursor
6732: l_lock := wf_item.acquire_lock(itemtype, itemkey,true);
6733:
6734: -- Find all activities waiting for this event.
6735: actdate := WF_Item.Active_Date(itemtype, itemkey);
6736: for act in evtacts loop

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

6731: --Acquire lock here by opening the cursor
6732: l_lock := wf_item.acquire_lock(itemtype, itemkey,true);
6733:
6734: -- Find all activities waiting for this event.
6735: actdate := WF_Item.Active_Date(itemtype, itemkey);
6736: for act in evtacts loop
6737: actarr(i) := act.actid;
6738: i := i + 1;
6739: end loop;

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

6742: else
6743: -- Process not running yet, create it.
6744: -- If process_name is null then will use selector function.
6745: Wf_Engine.CreateProcess(itemtype, itemkey, process_name);
6746: actdate := WF_Item.Active_Date(itemtype, itemkey);
6747:
6748: -- Bug 2259039
6749: -- Start the new process
6750: Wf_Engine_Util.Start_Process_Internal(

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

6752: itemkey => itemkey,
6753: runmode => 'EVENT');
6754:
6755: --Select the activities waiting to receive this event
6756: actdate := WF_Item.Active_Date(itemtype, itemkey);
6757: for act in evtacts loop
6758: actarr(i) := act.actid;
6759: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, act.actid,
6760: wf_engine.eng_notified, wf_engine.eng_null, sysdate, null);

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

6755: --Select the activities waiting to receive this event
6756: actdate := WF_Item.Active_Date(itemtype, itemkey);
6757: for act in evtacts loop
6758: actarr(i) := act.actid;
6759: Wf_Item_Activity_Status.Create_Status(itemtype, itemkey, act.actid,
6760: wf_engine.eng_notified, wf_engine.eng_null, sysdate, null);
6761: i := i + 1;
6762: end loop;
6763: actarr(i) := '';

Line 6789: FROM wf_items

6785: -- Bug 2255002 - if the parent item type and parent item key
6786: -- already exist do nothing
6787: SELECT parent_item_type, parent_item_key
6788: INTO parent_itemtype, parent_itemkey
6789: FROM wf_items
6790: WHERE item_type = itemtype
6791: AND item_key = itemkey;
6792:
6793: if (parent_itemtype is null and parent_itemkey is null ) then

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

6862: -- 4. clear the error to continue with next activity
6863: rollback to wf_savepoint;
6864: Wf_Core.Context('Wf_Engine', 'Event', itemtype, itemkey,
6865: process_name, event_name);
6866: Wf_Item_Activity_Status.Set_Error(itemtype, itemkey, actarr(i),
6867: wf_engine.eng_exception, FALSE);
6868: Wf_Engine_Util.Execute_Error_Process(itemtype, itemkey, actarr(i),
6869: wf_engine.eng_exception);
6870: Wf_Core.Clear;

Line 6904: FROM WF_ITEM_ACTIVITY_STATUSES WIAS,

6900:
6901: -- Blocked activities waiting for event (if existing process)
6902: cursor evtacts is
6903: SELECT /*+ LEADING(WA) */ WIAS.ITEM_TYPE, WIAS.ITEM_KEY, WIAS.PROCESS_ACTIVITY ACTID
6904: FROM WF_ITEM_ACTIVITY_STATUSES WIAS,
6905: WF_PROCESS_ACTIVITIES WPA,
6906: (
6907: SELECT /*+ NO_MERGE */ WA.*
6908: FROM WF_ACTIVITIES WA

Line 6925: WF_ITEMS WI

6921: AND GRP.NAME = WA.EVENT_NAME
6922: )
6923: )
6924: ) WA,
6925: WF_ITEMS WI
6926: WHERE WIAS.ACTIVITY_STATUS = 'NOTIFIED'
6927: AND WIAS.PROCESS_ACTIVITY = WPA.INSTANCE_ID
6928: AND WIAS.ITEM_TYPE = WPA.PROCESS_ITEM_TYPE
6929: AND WPA.ACTIVITY_ITEM_TYPE = WA.ITEM_TYPE

Line 6933: WF_ITEM_ATTRIBUTE_VALUES WIAV

6929: AND WPA.ACTIVITY_ITEM_TYPE = WA.ITEM_TYPE
6930: AND WPA.ACTIVITY_NAME = WA.NAME
6931: AND EXISTS
6932: ( SELECT 1 FROM WF_ACTIVITY_ATTR_VALUES WAAV,
6933: WF_ITEM_ATTRIBUTE_VALUES WIAV
6934: WHERE WAAV.PROCESS_ACTIVITY_ID = WIAS.PROCESS_ACTIVITY
6935: AND WAAV.NAME = '#BUSINESS_KEY'
6936: AND WAAV.VALUE_TYPE = 'ITEMATTR'
6937: AND WIAV.ITEM_TYPE = WIAS.ITEM_TYPE

Line 7068: Wf_Item_Activity_Status.Set_Error(evtacts_rec.item_type,

7064: -- 4. clear the error to continue with next activity
7065: rollback to wf_savepoint;
7066: Wf_Core.Context('Wf_Engine', 'Event2', evtacts_rec.item_type,
7067: evtacts_rec.item_key, event_name);
7068: Wf_Item_Activity_Status.Set_Error(evtacts_rec.item_type,
7069: evtacts_rec.item_key,
7070: evtacts_rec.actid,
7071: wf_engine.eng_exception, FALSE);
7072: Wf_Engine_Util.Execute_Error_Process(evtacts_rec.item_type,

Line 7154: update WF_ITEM_ATTRIBUTE_VALUES wiav

7150: end if;
7151:
7152: else
7153: if (p_addend is NOT null) then
7154: update WF_ITEM_ATTRIBUTE_VALUES wiav
7155: set wiav.NUMBER_VALUE = (wiav.NUMBER_VALUE+p_addend)
7156: where wiav.ITEM_TYPE = p_itemtype
7157: and wiav.ITEM_KEY = p_itemkey
7158: and wiav.NAME = p_aname

Line 7161: update WF_ITEM_ATTRIBUTE_VALUES wiav

7157: and wiav.ITEM_KEY = p_itemkey
7158: and wiav.NAME = p_aname
7159: returning wiav.NUMBER_VALUE into l_avalue;
7160: else
7161: update WF_ITEM_ATTRIBUTE_VALUES wiav
7162: set wiav.NUMBER_VALUE = 0
7163: where wiav.ITEM_TYPE = p_itemtype
7164: and wiav.ITEM_KEY = p_itemkey
7165: and wiav.NAME = p_aname

Line 7237: FROM wf_item_activity_statuses wias,

7233: IS
7234: SELECT wias.item_key,
7235: wpa.process_name,
7236: wpa.instance_label activity
7237: FROM wf_item_activity_statuses wias,
7238: wf_process_activities wpa
7239: WHERE wias.item_type = x_item_type
7240: AND (x_item_key IS NULL OR wias.item_key = x_item_key)
7241: AND (x_process IS NULL OR wpa.process_name = x_process)

Line 7249: FROM wf_item_activity_statuses_h wiash

7245: AND wias.process_activity = wpa.instance_id
7246: AND wias.activity_status = 'ERROR'
7247: AND x_max_retry >=
7248: (SELECT count(1)
7249: FROM wf_item_activity_statuses_h wiash
7250: WHERE wiash.item_type = wias.item_type
7251: AND wiash.item_key = wias.item_key
7252: AND wiash.process_activity = wias.process_activity
7253: AND wiash.action = 'RETRY');