DBA Data[Home] [Help]

APPS.WF_ITEM dependencies on WF_ITEM

Line 1: package body WF_ITEM as

1: package body WF_ITEM as
2: /* $Header: wfengb.pls 120.38.12020000.3 2012/11/13 19:42:45 alsosa ship $ */
3:
4: c_itemtype varchar2(8);
5: c_itemkey varchar2(240);

Line 21: wf_item.c_itemtype := '';

17: --
18: procedure ClearCache
19: is
20: begin
21: wf_item.c_itemtype := '';
22: wf_item.c_itemkey := '';
23: wf_item.c_root_activity := '';
24: wf_item.c_root_activity_version := '';
25: wf_item.c_begin_date := to_date(NULL);

Line 22: wf_item.c_itemkey := '';

18: procedure ClearCache
19: is
20: begin
21: wf_item.c_itemtype := '';
22: wf_item.c_itemkey := '';
23: wf_item.c_root_activity := '';
24: wf_item.c_root_activity_version := '';
25: wf_item.c_begin_date := to_date(NULL);
26: wf_item.c_userkey := '';

Line 23: wf_item.c_root_activity := '';

19: is
20: begin
21: wf_item.c_itemtype := '';
22: wf_item.c_itemkey := '';
23: wf_item.c_root_activity := '';
24: wf_item.c_root_activity_version := '';
25: wf_item.c_begin_date := to_date(NULL);
26: wf_item.c_userkey := '';
27:

Line 24: wf_item.c_root_activity_version := '';

20: begin
21: wf_item.c_itemtype := '';
22: wf_item.c_itemkey := '';
23: wf_item.c_root_activity := '';
24: wf_item.c_root_activity_version := '';
25: wf_item.c_begin_date := to_date(NULL);
26: wf_item.c_userkey := '';
27:
28: --clear ondemand flag

Line 25: wf_item.c_begin_date := to_date(NULL);

21: wf_item.c_itemtype := '';
22: wf_item.c_itemkey := '';
23: wf_item.c_root_activity := '';
24: wf_item.c_root_activity_version := '';
25: wf_item.c_begin_date := to_date(NULL);
26: wf_item.c_userkey := '';
27:
28: --clear ondemand flag
29: wf_item.c_ondemand := null;

Line 26: wf_item.c_userkey := '';

22: wf_item.c_itemkey := '';
23: wf_item.c_root_activity := '';
24: wf_item.c_root_activity_version := '';
25: wf_item.c_begin_date := to_date(NULL);
26: wf_item.c_userkey := '';
27:
28: --clear ondemand flag
29: wf_item.c_ondemand := null;
30: -- Clear the synch attribute cache too

Line 29: wf_item.c_ondemand := null;

25: wf_item.c_begin_date := to_date(NULL);
26: wf_item.c_userkey := '';
27:
28: --clear ondemand flag
29: wf_item.c_ondemand := null;
30: -- Clear the synch attribute cache too
31: wf_engine.synch_attr_count := 0;
32:
33: exception

Line 35: Wf_Core.Context('Wf_Item', 'ClearCache');

31: wf_engine.synch_attr_count := 0;
32:
33: exception
34: when others then
35: Wf_Core.Context('Wf_Item', 'ClearCache');
36: raise;
37: end ClearCache;
38:
39: --

Line 57: if ((itemtype = wf_item.c_itemtype) and

53: status varchar2(8);
54: onDemandFlag wf_activity_attributes.text_default%type;
55: begin
56: -- Check for refresh
57: if ((itemtype = wf_item.c_itemtype) and
58: (itemkey = wf_item.c_itemkey)) then
59: return;
60: end if;
61:

Line 58: (itemkey = wf_item.c_itemkey)) then

54: onDemandFlag wf_activity_attributes.text_default%type;
55: begin
56: -- Check for refresh
57: if ((itemtype = wf_item.c_itemtype) and
58: (itemkey = wf_item.c_itemkey)) then
59: return;
60: end if;
61:
62: -- SYNCHMODE: If

Line 68: if (wf_item.c_itemkey = wf_engine.eng_synch) then

64: -- 2. The cached item is a synch process AND
65: -- 3. The cached item has not yet completed
66: -- then raise an error. Other items cannot be accessed until synch
67: -- item completes, because it can't be restarted from db
68: if (wf_item.c_itemkey = wf_engine.eng_synch) then
69: -- Get status of root process of cached item
70: -- Note: If process completed successfully, the last thing in the
71: -- WIAS runtime cache should be the root process, which is the
72: -- only reason this will work.

Line 76: Wf_Item_Activity_Status.Status(c_itemtype, c_itemkey, rootid, status);

72: -- only reason this will work.
73: begin
74: rootid := Wf_Process_Activity.RootInstanceId(c_itemtype, c_itemkey,
75: c_root_activity);
76: Wf_Item_Activity_Status.Status(c_itemtype, c_itemkey, rootid, status);
77: exception
78: when others then
79: status := 'x'; -- Treat errors like incomplete process
80: end;

Line 91: into wf_item.c_root_activity, wf_item.c_root_activity_version,

87:
88: -- Query new values
89: select WI.ROOT_ACTIVITY, WI.ROOT_ACTIVITY_VERSION, WI.BEGIN_DATE,
90: WI.USER_KEY
91: into wf_item.c_root_activity, wf_item.c_root_activity_version,
92: wf_item.c_begin_date, wf_item.c_userkey
93: from WF_ITEMS WI
94: where WI.ITEM_TYPE = InitCache.itemtype
95: and WI.ITEM_KEY = InitCache.itemkey;

Line 92: wf_item.c_begin_date, wf_item.c_userkey

88: -- Query new values
89: select WI.ROOT_ACTIVITY, WI.ROOT_ACTIVITY_VERSION, WI.BEGIN_DATE,
90: WI.USER_KEY
91: into wf_item.c_root_activity, wf_item.c_root_activity_version,
92: wf_item.c_begin_date, wf_item.c_userkey
93: from WF_ITEMS WI
94: where WI.ITEM_TYPE = InitCache.itemtype
95: and WI.ITEM_KEY = InitCache.itemkey;
96:

Line 93: from WF_ITEMS WI

89: select WI.ROOT_ACTIVITY, WI.ROOT_ACTIVITY_VERSION, WI.BEGIN_DATE,
90: WI.USER_KEY
91: into wf_item.c_root_activity, wf_item.c_root_activity_version,
92: wf_item.c_begin_date, wf_item.c_userkey
93: from WF_ITEMS WI
94: where WI.ITEM_TYPE = InitCache.itemtype
95: and WI.ITEM_KEY = InitCache.itemkey;
96:
97: -- Save cache key values

Line 98: wf_item.c_itemtype := itemtype;

94: where WI.ITEM_TYPE = InitCache.itemtype
95: and WI.ITEM_KEY = InitCache.itemkey;
96:
97: -- Save cache key values
98: wf_item.c_itemtype := itemtype;
99: wf_item.c_itemkey := itemkey;
100:
101: --cache ondemand flag
102: -- this could potentially have some impact on the performance as this

Line 99: wf_item.c_itemkey := itemkey;

95: and WI.ITEM_KEY = InitCache.itemkey;
96:
97: -- Save cache key values
98: wf_item.c_itemtype := itemtype;
99: wf_item.c_itemkey := itemkey;
100:
101: --cache ondemand flag
102: -- this could potentially have some impact on the performance as this
103: -- routine is called many times while we are dealing with design time data.

Line 114: wf_item.c_ondemand := true;

110: and activity_name = c_root_activity
111: and activity_version=c_root_activity_version
112: and name = '#ONDEMANDATTR';
113:
114: wf_item.c_ondemand := true;
115: exception
116: when no_data_found then
117: wf_item.c_ondemand := false;
118: end;

Line 117: wf_item.c_ondemand := false;

113:
114: wf_item.c_ondemand := true;
115: exception
116: when no_data_found then
117: wf_item.c_ondemand := false;
118: end;
119:
120:
121:

Line 125: WF_ITEM.ClearCache;

121:
122: exception
123: when NO_DATA_FOUND then
124: if (ignore_notfound) then
125: WF_ITEM.ClearCache;
126:
127: else
128:
129: Wf_Core.Context('Wf_Item', 'InitCache', itemtype, itemkey);

Line 129: Wf_Core.Context('Wf_Item', 'InitCache', itemtype, itemkey);

125: WF_ITEM.ClearCache;
126:
127: else
128:
129: Wf_Core.Context('Wf_Item', 'InitCache', itemtype, itemkey);
130: raise;
131:
132: end if;
133:

Line 135: Wf_Core.Context('Wf_Item', 'InitCache', itemtype, itemkey);

131:
132: end if;
133:
134: when others then
135: Wf_Core.Context('Wf_Item', 'InitCache', itemtype, itemkey);
136: raise;
137: end InitCache;
138:
139: --

Line 158: Wf_Item.InitCache(itemtype, itemkey, ignore_notfound=>TRUE);

154: --
155: --we need to call in case itemtype and itemkey are not in synch with
156: --cached value.
157: --
158: Wf_Item.InitCache(itemtype, itemkey, ignore_notfound=>TRUE);
159: return c_ondemand;
160: end Attribute_On_Demand;
161:
162: --

Line 189: update WF_ITEMS set

185: l_count number;
186: begin
187: begin
188: savepoint wf_loop_savepoint;
189: update WF_ITEMS set
190: PARENT_ITEM_TYPE = Set_Item_Parent.parent_itemtype,
191: PARENT_ITEM_KEY = Set_Item_Parent.parent_itemkey,
192: PARENT_CONTEXT = Set_Item_Parent.parent_context
193: where ITEM_TYPE = Set_Item_Parent.itemtype

Line 202: from WF_ITEMS

198: end if;
199:
200: -- bug 12850046: preventing a loop condition from being created
201: select count(1) into l_count
202: from WF_ITEMS
203: CONNECT BY PRIOR PARENT_ITEM_TYPE = ITEM_TYPE AND
204: PRIOR PARENT_ITEM_KEY = ITEM_KEY
205: start with ITEM_TYPE=Set_Item_Parent.itemtype AND
206: ITEM_KEY=Set_Item_Parent.itemkey;

Line 210: Wf_Core.Context('Wf_Item', 'Set_Item_Parent', itemtype, itemkey,

206: ITEM_KEY=Set_Item_Parent.itemkey;
207: exception
208: when connect_by_loop then
209: rollback to wf_loop_savepoint;
210: Wf_Core.Context('Wf_Item', 'Set_Item_Parent', itemtype, itemkey,
211: parent_itemtype, parent_itemkey, parent_context);
212: Wf_Core.Token('PARENT_ITEM_TYPE', parent_itemtype);
213: Wf_Core.Token('PARENT_ITEM_KEY', parent_itemkey);
214: Wf_Core.Token('ITEM_TYPE', itemtype);

Line 245: update WF_ITEM_ATTRIBUTE_VALUES

241:
242: else
243: -- Parent context is null
244: -- increase all known #CNT counter by 1
245: update WF_ITEM_ATTRIBUTE_VALUES
246: set NUMBER_VALUE = NUMBER_VALUE + 1
247: where NAME like '#CNT_%'
248: and NUMBER_VALUE is not null
249: and ITEM_TYPE = parent_itemType

Line 257: Wf_Core.Context('Wf_Item', 'Set_Item_Parent', itemtype, itemkey,

253: end if; --Caller is signalling that this "should" be a coordinated flow.
254:
255: exception
256: when no_data_found then
257: Wf_Core.Context('Wf_Item', 'Set_Item_Parent', itemtype, itemkey,
258: parent_itemtype, parent_itemkey, parent_context);
259: Wf_Core.Token('TYPE', itemtype);
260: Wf_Core.Token('KEY', itemkey);
261: Wf_Core.Raise('WFENG_ITEM');

Line 264: Wf_Core.Context('Wf_Item', 'Set_Item_Parent', itemtype, itemkey,

260: Wf_Core.Token('KEY', itemkey);
261: Wf_Core.Raise('WFENG_ITEM');
262:
263: when ValTooLarge or ValTooLargeNew then
264: Wf_Core.Context('Wf_Item', 'Set_Item_Parent', itemtype, itemkey,
265: parent_itemtype, parent_itemkey, parent_context, 'TRUE');
266: WF_CORE.Token('LABEL', parent_context);
267: WF_CORE.Token('LENGTH', 30);
268: WF_CORE.Raise('WFENG_LABEL_TOO_LARGE');

Line 271: Wf_Core.Context('Wf_Item', 'Set_Item_Parent', itemtype, itemkey,

267: WF_CORE.Token('LENGTH', 30);
268: WF_CORE.Raise('WFENG_LABEL_TOO_LARGE');
269:
270: when others then
271: Wf_Core.Context('Wf_Item', 'Set_Item_Parent', itemtype, itemkey,
272: parent_itemtype, parent_itemkey, parent_context);
273: raise;
274: end Set_Item_Parent;
275:

Line 292: update WF_ITEMS WI set

288: is
289: begin
290:
291: -- Update owner column
292: update WF_ITEMS WI set
293: OWNER_ROLE = SetItemOwner.owner
294: where WI.ITEM_TYPE = SetItemOwner.itemtype
295: and WI.ITEM_KEY = SetItemOwner.itemkey;
296:

Line 302: Wf_Core.Context('Wf_Item', 'SetItemOwner', itemtype, itemkey,

298: raise no_data_found;
299: end if;
300: exception
301: when no_data_found then
302: Wf_Core.Context('Wf_Item', 'SetItemOwner', itemtype, itemkey,
303: owner);
304: Wf_Core.Token('TYPE', itemtype);
305: Wf_Core.Token('KEY', itemkey);
306: Wf_Core.Raise('WFENG_ITEM');

Line 308: Wf_Core.Context('Wf_Item', 'SetItemOwner', itemtype, itemkey,

304: Wf_Core.Token('TYPE', itemtype);
305: Wf_Core.Token('KEY', itemkey);
306: Wf_Core.Raise('WFENG_ITEM');
307: when others then
308: Wf_Core.Context('Wf_Item', 'SetItemOwner', itemtype, itemkey,
309: owner);
310: raise;
311: end SetItemOwner;
312:

Line 327: update WF_ITEMS WI set

323: itemkey in varchar2,
324: userkey in varchar2)
325: is
326: begin
327: update WF_ITEMS WI set
328: USER_KEY = SetItemUserKey.userkey
329: where WI.ITEM_TYPE = SetItemUserKey.itemtype
330: and WI.ITEM_KEY = SetItemUserKey.itemkey;
331:

Line 337: if ((itemtype = wf_item.c_itemtype) and

333: raise no_data_found;
334: end if;
335:
336: -- Set value in the local cache the right item
337: if ((itemtype = wf_item.c_itemtype) and
338: (itemkey = wf_item.c_itemkey)) then
339: wf_item.c_userkey := userkey;
340: end if;
341: exception

Line 338: (itemkey = wf_item.c_itemkey)) then

334: end if;
335:
336: -- Set value in the local cache the right item
337: if ((itemtype = wf_item.c_itemtype) and
338: (itemkey = wf_item.c_itemkey)) then
339: wf_item.c_userkey := userkey;
340: end if;
341: exception
342: when no_data_found then

Line 339: wf_item.c_userkey := userkey;

335:
336: -- Set value in the local cache the right item
337: if ((itemtype = wf_item.c_itemtype) and
338: (itemkey = wf_item.c_itemkey)) then
339: wf_item.c_userkey := userkey;
340: end if;
341: exception
342: when no_data_found then
343: Wf_Core.Context('Wf_Item', 'SetItemUserKey', itemtype, itemkey,

Line 343: Wf_Core.Context('Wf_Item', 'SetItemUserKey', itemtype, itemkey,

339: wf_item.c_userkey := userkey;
340: end if;
341: exception
342: when no_data_found then
343: Wf_Core.Context('Wf_Item', 'SetItemUserKey', itemtype, itemkey,
344: userkey);
345: Wf_Core.Token('TYPE', itemtype);
346: Wf_Core.Token('KEY', itemkey);
347: Wf_Core.Raise('WFENG_ITEM');

Line 349: Wf_Core.Context('Wf_Item', 'SetItemUserKey', itemtype, itemkey,

345: Wf_Core.Token('TYPE', itemtype);
346: Wf_Core.Token('KEY', itemkey);
347: Wf_Core.Raise('WFENG_ITEM');
348: when others then
349: Wf_Core.Context('Wf_Item', 'SetItemUserKey', itemtype, itemkey,
350: userkey);
351: raise;
352: end SetItemUserKey;
353:

Line 371: if ((itemtype = wf_item.c_itemtype) and

367: is
368: buf varchar2(240);
369: begin
370: -- Check first for cached value
371: if ((itemtype = wf_item.c_itemtype) and
372: (itemkey = wf_item.c_itemkey)) then
373: return(wf_item.c_userkey);
374: end if;
375:

Line 372: (itemkey = wf_item.c_itemkey)) then

368: buf varchar2(240);
369: begin
370: -- Check first for cached value
371: if ((itemtype = wf_item.c_itemtype) and
372: (itemkey = wf_item.c_itemkey)) then
373: return(wf_item.c_userkey);
374: end if;
375:
376: -- No cached value, go directly to the source

Line 373: return(wf_item.c_userkey);

369: begin
370: -- Check first for cached value
371: if ((itemtype = wf_item.c_itemtype) and
372: (itemkey = wf_item.c_itemkey)) then
373: return(wf_item.c_userkey);
374: end if;
375:
376: -- No cached value, go directly to the source
377: select USER_KEY

Line 379: from WF_ITEMS WI

375:
376: -- No cached value, go directly to the source
377: select USER_KEY
378: into buf
379: from WF_ITEMS WI
380: where WI.ITEM_TYPE = GetItemUserKey.itemtype
381: and WI.ITEM_KEY = GetItemUserKey.itemkey;
382:
383: return(buf);

Line 386: Wf_Core.Context('Wf_Item', 'GetItemUserKey', itemtype, itemkey);

382:
383: return(buf);
384: exception
385: when no_data_found then
386: Wf_Core.Context('Wf_Item', 'GetItemUserKey', itemtype, itemkey);
387: Wf_Core.Token('TYPE', itemtype);
388: Wf_Core.Token('KEY', itemkey);
389: Wf_Core.Raise('WFENG_ITEM');
390: when others then

Line 391: Wf_Core.Context('Wf_Item', 'GetItemUserKey', itemtype, itemkey);

387: Wf_Core.Token('TYPE', itemtype);
388: Wf_Core.Token('KEY', itemkey);
389: Wf_Core.Raise('WFENG_ITEM');
390: when others then
391: Wf_Core.Context('Wf_Item', 'GetItemUserKey', itemtype, itemkey);
392: raise;
393: end GetItemUserKey;
394:
395: --

Line 408: Wf_Item.InitCache(itemtype, itemkey, ignore_notfound=>TRUE);

404: return boolean
405: is
406: begin
407:
408: Wf_Item.InitCache(itemtype, itemkey, ignore_notfound=>TRUE);
409:
410: if (wf_item.c_itemtype is not null) then
411:
412: return(TRUE);

Line 410: if (wf_item.c_itemtype is not null) then

406: begin
407:
408: Wf_Item.InitCache(itemtype, itemkey, ignore_notfound=>TRUE);
409:
410: if (wf_item.c_itemtype is not null) then
411:
412: return(TRUE);
413:
414: else

Line 422: Wf_Core.Context('Wf_Item', 'Item_Exist', itemtype, itemkey);

418: end if;
419:
420: exception
421: when OTHERS then
422: Wf_Core.Context('Wf_Item', 'Item_Exist', itemtype, itemkey);
423: raise;
424: end Item_Exist;
425:
426: --

Line 444: Wf_Item.InitCache(itemtype, itemkey);

440: version out NOCOPY number)
441: is
442: begin
443:
444: Wf_Item.InitCache(itemtype, itemkey);
445: wflow := wf_item.c_root_activity;
446: version := wf_item.c_root_activity_version;
447:
448: exception

Line 445: wflow := wf_item.c_root_activity;

441: is
442: begin
443:
444: Wf_Item.InitCache(itemtype, itemkey);
445: wflow := wf_item.c_root_activity;
446: version := wf_item.c_root_activity_version;
447:
448: exception
449: when NO_DATA_FOUND then

Line 446: version := wf_item.c_root_activity_version;

442: begin
443:
444: Wf_Item.InitCache(itemtype, itemkey);
445: wflow := wf_item.c_root_activity;
446: version := wf_item.c_root_activity_version;
447:
448: exception
449: when NO_DATA_FOUND then
450: wflow := '';

Line 453: Wf_Core.Context('Wf_Item', 'Root_Process', itemtype, itemkey);

449: when NO_DATA_FOUND then
450: wflow := '';
451: version := -1;
452: when OTHERS then
453: Wf_Core.Context('Wf_Item', 'Root_Process', itemtype, itemkey);
454: raise;
455: end Root_Process;
456:
457: --

Line 459: -- Create one row in the WF_ITEMS table with the given item type, item key

455: end Root_Process;
456:
457: --
458: -- Create_Item (PRIVATE)
459: -- Create one row in the WF_ITEMS table with the given item type, item key
460: -- and the root process name.
461: -- IN
462: -- itemtype - item type
463: -- itemkey - item key

Line 488: from WF_ITEM_ATTRIBUTES WIA

484:
485: cursor attrcurs(itype in varchar2) is
486: select WIA.ITEM_TYPE, WIA.NAME, WIA.TYPE, WIA.SUBTYPE, WIA.FORMAT,
487: WIA.TEXT_DEFAULT, WIA.NUMBER_DEFAULT, WIA.DATE_DEFAULT
488: from WF_ITEM_ATTRIBUTES WIA
489: where WIA.ITEM_TYPE = itype;
490:
491: begin
492:

Line 497: insert into WF_ITEMS (

493: rootversion := Wf_Activity.Version(itemtype, wflow, actdate);
494:
495: if (itemkey <> wf_engine.eng_synch) then
496: -- NORMAL: Insert new item and attributes directly in the db
497: insert into WF_ITEMS (
498: ITEM_TYPE,
499: ITEM_KEY,
500: ROOT_ACTIVITY,
501: ROOT_ACTIVITY_VERSION,

Line 523: wf_item.c_itemtype := itemtype;

519: );
520: end if;
521:
522: -- Initialize runtime cache (used in both NORMAL and SYNCHMODE).
523: wf_item.c_itemtype := itemtype;
524: wf_item.c_itemkey := itemkey;
525: wf_item.c_root_activity := wflow;
526: wf_item.c_root_activity_version := rootversion;
527: wf_item.c_begin_date := actdate;

Line 524: wf_item.c_itemkey := itemkey;

520: end if;
521:
522: -- Initialize runtime cache (used in both NORMAL and SYNCHMODE).
523: wf_item.c_itemtype := itemtype;
524: wf_item.c_itemkey := itemkey;
525: wf_item.c_root_activity := wflow;
526: wf_item.c_root_activity_version := rootversion;
527: wf_item.c_begin_date := actdate;
528: wf_item.c_userkey := Create_item.user_key;

Line 525: wf_item.c_root_activity := wflow;

521:
522: -- Initialize runtime cache (used in both NORMAL and SYNCHMODE).
523: wf_item.c_itemtype := itemtype;
524: wf_item.c_itemkey := itemkey;
525: wf_item.c_root_activity := wflow;
526: wf_item.c_root_activity_version := rootversion;
527: wf_item.c_begin_date := actdate;
528: wf_item.c_userkey := Create_item.user_key;
529:

Line 526: wf_item.c_root_activity_version := rootversion;

522: -- Initialize runtime cache (used in both NORMAL and SYNCHMODE).
523: wf_item.c_itemtype := itemtype;
524: wf_item.c_itemkey := itemkey;
525: wf_item.c_root_activity := wflow;
526: wf_item.c_root_activity_version := rootversion;
527: wf_item.c_begin_date := actdate;
528: wf_item.c_userkey := Create_item.user_key;
529:
530: --

Line 527: wf_item.c_begin_date := actdate;

523: wf_item.c_itemtype := itemtype;
524: wf_item.c_itemkey := itemkey;
525: wf_item.c_root_activity := wflow;
526: wf_item.c_root_activity_version := rootversion;
527: wf_item.c_begin_date := actdate;
528: wf_item.c_userkey := Create_item.user_key;
529:
530: --
531: --ondemand flag

Line 528: wf_item.c_userkey := Create_item.user_key;

524: wf_item.c_itemkey := itemkey;
525: wf_item.c_root_activity := wflow;
526: wf_item.c_root_activity_version := rootversion;
527: wf_item.c_begin_date := actdate;
528: wf_item.c_userkey := Create_item.user_key;
529:
530: --
531: --ondemand flag
532: --

Line 539: wf_item.c_ondemand := true;

535: where activity_item_type = c_itemtype
536: and activity_name = c_root_activity
537: and activity_version=c_root_activity_version
538: and name = '#ONDEMANDATTR';
539: wf_item.c_ondemand := true;
540: exception
541: when no_data_found then
542: wf_item.c_ondemand := false;
543: end;

Line 542: wf_item.c_ondemand := false;

538: and name = '#ONDEMANDATTR';
539: wf_item.c_ondemand := true;
540: exception
541: when no_data_found then
542: wf_item.c_ondemand := false;
543: end;
544:
545: -- Initialize item attributes
546: if (itemkey <> wf_engine.eng_synch) then

Line 548: if(not wf_item.c_ondemand) then

544:
545: -- Initialize item attributes
546: if (itemkey <> wf_engine.eng_synch) then
547: -- NORMAL: store attributes in table
548: if(not wf_item.c_ondemand) then
549: -- only popluate when the flag is false
550: insert into WF_ITEM_ATTRIBUTE_VALUES (
551: ITEM_TYPE,
552: ITEM_KEY,

Line 550: insert into WF_ITEM_ATTRIBUTE_VALUES (

546: if (itemkey <> wf_engine.eng_synch) then
547: -- NORMAL: store attributes in table
548: if(not wf_item.c_ondemand) then
549: -- only popluate when the flag is false
550: insert into WF_ITEM_ATTRIBUTE_VALUES (
551: ITEM_TYPE,
552: ITEM_KEY,
553: NAME,
554: TEXT_VALUE,

Line 564: from WF_ITEM_ATTRIBUTES WIA

560: WIA.NAME,
561: WIA.TEXT_DEFAULT,
562: WIA.NUMBER_DEFAULT,
563: WIA.DATE_DEFAULT
564: from WF_ITEM_ATTRIBUTES WIA
565: where WIA.ITEM_TYPE = itemtype;
566: end if;
567: else
568: -- SYNCHMODE: store attributes in plsql only

Line 600: Wf_Core.Context('Wf_Item', 'Create_Item', itemtype, itemkey, wflow);

596: end if;
597:
598: exception
599: when DUP_VAL_ON_INDEX then
600: Wf_Core.Context('Wf_Item', 'Create_Item', itemtype, itemkey, wflow);
601: Wf_Core.Token('TYPE', itemtype);
602: Wf_Core.Token('KEY', itemkey);
603: Wf_Core.Raise('WFENG_ITEM_UNIQUE');
604: when OTHERS then

Line 605: Wf_Core.Context('Wf_Item', 'Create_Item', itemtype, itemkey, wflow);

601: Wf_Core.Token('TYPE', itemtype);
602: Wf_Core.Token('KEY', itemkey);
603: Wf_Core.Raise('WFENG_ITEM_UNIQUE');
604: when OTHERS then
605: Wf_Core.Context('Wf_Item', 'Create_Item', itemtype, itemkey, wflow);
606: raise;
607: end Create_Item;
608:
609: --

Line 623: Wf_Item.InitCache(itemtype, itemkey);

619: itemkey in varchar2)
620: return date
621: is
622: begin
623: Wf_Item.InitCache(itemtype, itemkey);
624: return(wf_item.c_begin_date);
625: exception
626: when NO_DATA_FOUND then
627: Wf_Core.Context('Wf_Item', 'Active_Date', itemtype, itemkey);

Line 624: return(wf_item.c_begin_date);

620: return date
621: is
622: begin
623: Wf_Item.InitCache(itemtype, itemkey);
624: return(wf_item.c_begin_date);
625: exception
626: when NO_DATA_FOUND then
627: Wf_Core.Context('Wf_Item', 'Active_Date', itemtype, itemkey);
628: Wf_Core.Token('TYPE', itemtype);

Line 627: Wf_Core.Context('Wf_Item', 'Active_Date', itemtype, itemkey);

623: Wf_Item.InitCache(itemtype, itemkey);
624: return(wf_item.c_begin_date);
625: exception
626: when NO_DATA_FOUND then
627: Wf_Core.Context('Wf_Item', 'Active_Date', itemtype, itemkey);
628: Wf_Core.Token('TYPE', itemtype);
629: Wf_Core.Token('KEY', itemkey);
630: Wf_Core.Raise('WFENG_ITEM');
631: when OTHERS then

Line 632: Wf_Core.Context('Wf_Item', 'Active_Date', itemtype, itemkey);

628: Wf_Core.Token('TYPE', itemtype);
629: Wf_Core.Token('KEY', itemkey);
630: Wf_Core.Raise('WFENG_ITEM');
631: when OTHERS then
632: Wf_Core.Context('Wf_Item', 'Active_Date', itemtype, itemkey);
633: end Active_Date;
634:
635: --Function Acquire_lock (PRIVATE)
636: --This function tries to lock the particular item (for the give

Line 637: --itemtype/itemkey ) in the wf_items table. It returns true if the lock

633: end Active_Date;
634:
635: --Function Acquire_lock (PRIVATE)
636: --This function tries to lock the particular item (for the give
637: --itemtype/itemkey ) in the wf_items table. It returns true if the lock
638: --acquired else returns false.
639:
640: --Here we will not do any error handling but return true/false
641: --for the case of lock_acquired or not . This leaves the caller

Line 655: from wf_items

651: --Bug 2607770
652: --Cursor for acquiring lock
653: cursor itemlock (itemtype varchar2, itemkey varchar2) is
654: select '1'
655: from wf_items
656: where item_type = itemtype
657: and item_key = itemkey
658: for update nowait;
659:

Line 693: Wf_Core.Context('Wf_Item', 'Acquire_lock', itemtype, itemkey);

689: CLOSE itemlock;
690: end if;
691: --In this case we do not want a TRUE/FALSE return
692: --we just raise the error.
693: Wf_Core.Context('Wf_Item', 'Acquire_lock', itemtype, itemkey);
694: raise;
695: end;
696:
697: --

Line 729: UPDATE wf_items

725: pragma exception_init(ValTooLargeNew, -12899);
726: l_module varchar2(20) := 'SetEndDate';
727: l_context_label varchar2(40);
728: begin
729: UPDATE wf_items
730: SET end_date = sysdate
731: WHERE item_type = p_itemType
732: AND item_key = p_itemKey
733: AND end_date is NULL

Line 770: FROM WF_ITEM_ATTRIBUTE_VALUES

766: end if;
767: else
768: SELECT TEXT_VALUE
769: bulk collect into attrNames
770: FROM WF_ITEM_ATTRIBUTE_VALUES
771: WHERE ITEM_TYPE = p_itemType
772: AND ITEM_KEY = p_itemKey
773: AND NAME like ('#LBL_%')
774: AND TEXT_VALUE is NOT null;

Line 794: FROM WF_ITEM_ATTRIBUTE_VALUES wiav

790: --in the parent which the child may not have created the corresponding
791: --#LBL_ (did not arrive) such as in the case of an AbortProcess()
792: SELECT wiav.NAME
793: bulk collect into attrNames
794: FROM WF_ITEM_ATTRIBUTE_VALUES wiav
795: WHERE wiav.ITEM_TYPE = l_parent_itemType
796: AND wiav.ITEM_KEY = l_parent_itemKey
797: and wiav.NAME like ('#CNT_%')
798: AND NOT EXISTS (select null

Line 799: from wf_item_attribute_values wiav2

795: WHERE wiav.ITEM_TYPE = l_parent_itemType
796: AND wiav.ITEM_KEY = l_parent_itemKey
797: and wiav.NAME like ('#CNT_%')
798: AND NOT EXISTS (select null
799: from wf_item_attribute_values wiav2
800: where wiav2.item_type = p_itemType
801: and wiav2.item_key = p_itemKey
802: and wiav2.name = REPLACE(wiav.name,'#CNT_','#LBL_'));
803: if (attrNames.COUNT > 0) then

Line 817: from wf_items wi

813:
814: -- Bug 10126650
815: -- Find active error children for this completing item and abort them
816: for c_abort in (select item_type, item_key
817: from wf_items wi
818: where wi.parent_item_type = p_itemtype
819: and wi.parent_item_key = p_itemkey
820: and wi.parent_item_type = (select wiav.text_value
821: from wf_item_attribute_values wiav

Line 821: from wf_item_attribute_values wiav

817: from wf_items wi
818: where wi.parent_item_type = p_itemtype
819: and wi.parent_item_key = p_itemkey
820: and wi.parent_item_type = (select wiav.text_value
821: from wf_item_attribute_values wiav
822: where wiav.item_type = wi.item_type
823: and wiav.item_key = wi.item_key
824: and wiav.name = 'ERROR_ITEM_TYPE')
825: and wi.parent_item_key = (select wiav.text_value

Line 826: from wf_item_attribute_values wiav

822: where wiav.item_type = wi.item_type
823: and wiav.item_key = wi.item_key
824: and wiav.name = 'ERROR_ITEM_TYPE')
825: and wi.parent_item_key = (select wiav.text_value
826: from wf_item_attribute_values wiav
827: where wiav.item_type = wi.item_type
828: and wiav.item_key = wi.item_key
829: and wiav.name = 'ERROR_ITEM_KEY')
830: and exists (select null

Line 831: from wf_item_attribute_values wiav

827: where wiav.item_type = wi.item_type
828: and wiav.item_key = wi.item_key
829: and wiav.name = 'ERROR_ITEM_KEY')
830: and exists (select null
831: from wf_item_attribute_values wiav
832: where wiav.item_type = wi.item_type
833: and wiav.item_key = wi.item_key
834: and wiav.name = 'ERROR_ACTIVITY_LABEL')
835: and end_date is null)

Line 849: WF_CORE.Context('WF_ITEM', 'SetEndDate', p_itemType, p_itemKey);

845: WF_CORE.Token('LABEL', l_context_label);
846: WF_CORE.Token('LENGTH', 30);
847: WF_CORE.Raise('WFENG_LABEL_TOO_LARGE');
848: when OTHERS then
849: WF_CORE.Context('WF_ITEM', 'SetEndDate', p_itemType, p_itemKey);
850: raise;
851:
852: end SetEndDate;
853:

Line 854: end WF_ITEM;

850: raise;
851:
852: end SetEndDate;
853:
854: end WF_ITEM;