[Home] [Help]
62: --Error Item Key bp-15082-2-MANAGE_SUBMISSION-09/04/2005
63: --
64:
65:
66: l_error_item_key := WF_ENGINE.GetItemAttrText(
67: itemtype => itemtype,
68: itemkey => itemkey,
69: aname => 'ERROR_ITEM_KEY' );
70: l_error_item_type := WF_ENGINE.GetItemAttrText(
66: l_error_item_key := WF_ENGINE.GetItemAttrText(
67: itemtype => itemtype,
68: itemkey => itemkey,
69: aname => 'ERROR_ITEM_KEY' );
70: l_error_item_type := WF_ENGINE.GetItemAttrText(
71: itemtype => itemtype,
72: itemkey => itemkey,
73: aname => 'ERROR_ITEM_TYPE' );
74:
77: -- Get details of the process that errored out using above l_error_item_key
78: -- these were set in the erroring out process by Execute_Error_Process
79:
80:
81: l_ACNAME := WF_ENGINE.GetItemAttrText(
82: itemtype => l_error_item_type,
83: itemkey => l_error_item_key,
84: aname => 'ACNAME');
85: l_ACID := WF_ENGINE.GetItemAttrNumber(
81: l_ACNAME := WF_ENGINE.GetItemAttrText(
82: itemtype => l_error_item_type,
83: itemkey => l_error_item_key,
84: aname => 'ACNAME');
85: l_ACID := WF_ENGINE.GetItemAttrNumber(
86: itemtype => l_error_item_type,
87: itemkey => l_error_item_key,
88: aname => 'ACID');
89:
86: itemtype => l_error_item_type,
87: itemkey => l_error_item_key,
88: aname => 'ACID');
89:
90: l_TASKID := WF_ENGINE.GetItemAttrNumber(
91: itemtype => l_error_item_type,
92: itemkey => l_error_item_key,
93: aname => 'TASKID');
94: l_TASKNAME := WF_ENGINE.GetItemAttrText(
90: l_TASKID := WF_ENGINE.GetItemAttrNumber(
91: itemtype => l_error_item_type,
92: itemkey => l_error_item_key,
93: aname => 'TASKID');
94: l_TASKNAME := WF_ENGINE.GetItemAttrText(
95: itemtype => l_error_item_type,
96: itemkey => l_error_item_key,
97: aname => 'TASKNAME');
98: l_INSTANCEID := WF_ENGINE.GetItemAttrNumber(
94: l_TASKNAME := WF_ENGINE.GetItemAttrText(
95: itemtype => l_error_item_type,
96: itemkey => l_error_item_key,
97: aname => 'TASKNAME');
98: l_INSTANCEID := WF_ENGINE.GetItemAttrNumber(
99: itemtype => l_error_item_type,
100: itemkey => l_error_item_key,
101: aname => 'INSTANCEID');
102: l_INSTANCEDESC := WF_ENGINE.GetItemAttrText(
98: l_INSTANCEID := WF_ENGINE.GetItemAttrNumber(
99: itemtype => l_error_item_type,
100: itemkey => l_error_item_key,
101: aname => 'INSTANCEID');
102: l_INSTANCEDESC := WF_ENGINE.GetItemAttrText(
103: itemtype => l_error_item_type,
104: itemkey => l_error_item_key,
105: aname => 'INSTANCEDESC');
106: l_BUSINESSAREAID := WF_ENGINE.GetItemAttrNumber(
102: l_INSTANCEDESC := WF_ENGINE.GetItemAttrText(
103: itemtype => l_error_item_type,
104: itemkey => l_error_item_key,
105: aname => 'INSTANCEDESC');
106: l_BUSINESSAREAID := WF_ENGINE.GetItemAttrNumber(
107: itemtype => l_error_item_type,
108: itemkey => l_error_item_key,
109: aname => 'BUSINESSAREAID');
110:
108: itemkey => l_error_item_key,
109: aname => 'BUSINESSAREAID');
110:
111: -- bug 5251227
112: l_OWNERID := WF_ENGINE.GetItemAttrNumber(
113: itemtype => l_error_item_type,
114: itemkey => l_error_item_key,
115: aname => 'OWNERID');
116:
124: from zpb_business_areas_vl
125: where BUSINESS_AREA_ID = l_BUSINESSAREAID;
126:
127: -- SET business area display name to BUSINESSAREA in notification
128: wf_engine.SetItemAttrText(Itemtype => ItemType,
129: Itemkey => ItemKey,
130: aname => 'BUSINESSAREA',
131: avalue => l_BUSINESSAREA);
132: end if;
157: end if;
158:
159: if l_rolename is not null then
160:
161: wf_engine.SetItemAttrText(Itemtype => ItemType,
162: Itemkey => ItemKey,
163: aname => 'WF_ADMINISTRATOR',
164: avalue => l_rolename);
165: end if;
170: -- Set attribures for NOTIFICATION if itemtype is ZPBWFERR only.
171: -- for EPBCYCLE or ZPBSCHED these are already set.
172:
173: -- BP Name
174: wf_engine.SetItemAttrText(Itemtype => ItemType,
175: Itemkey => ItemKey,
176: aname => 'ACNAME',
177: avalue => l_ACNAME);
178:
176: aname => 'ACNAME',
177: avalue => l_ACNAME);
178:
179: --ACID
180: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
181: Itemkey => ItemKey,
182: aname => 'ACID',
183: avalue => l_ACID);
184:
182: aname => 'ACID',
183: avalue => l_ACID);
184:
185: --TASKID
186: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
187: Itemkey => ItemKey,
188: aname => 'TASKID',
189: avalue => l_TASKID);
190: --TASKNAME
187: Itemkey => ItemKey,
188: aname => 'TASKID',
189: avalue => l_TASKID);
190: --TASKNAME
191: wf_engine.SetItemAttrText(Itemtype => ItemType,
192: Itemkey => ItemKey,
193: aname => 'TASKNAME',
194: avalue => l_TASKNAME);
195:
192: Itemkey => ItemKey,
193: aname => 'TASKNAME',
194: avalue => l_TASKNAME);
195:
196: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
197: Itemkey => ItemKey,
198: aname => 'INSTANCEID',
199: avalue => l_INSTANCEID);
200:
197: Itemkey => ItemKey,
198: aname => 'INSTANCEID',
199: avalue => l_INSTANCEID);
200:
201: wf_engine.SetItemAttrText(Itemtype => ItemType,
202: Itemkey => ItemKey,
203: aname => 'INSTANCEDESC',
204: avalue => l_INSTANCEDESC);
205:
203: aname => 'INSTANCEDESC',
204: avalue => l_INSTANCEDESC);
205:
206:
207: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
208: Itemkey => ItemKey,
209: aname => 'BUSINESSAREAID',
210: avalue => l_BUSINESSAREAID);
211:
327: -- these were set in the erroring out process by Execute_Error_Process
328:
329:
330:
331: l_TASKID := WF_ENGINE.GetItemAttrNumber(
332: itemtype => itemtype,
333: itemkey => itemkey,
334: aname => 'TASKID');
335:
332: itemtype => itemtype,
333: itemkey => itemkey,
334: aname => 'TASKID');
335:
336: l_INSTANCEID := WF_ENGINE.GetItemAttrNumber(
337: itemtype => itemtype,
338: itemkey => itemkey,
339: aname => 'INSTANCEID');
340:
338: itemkey => itemkey,
339: aname => 'INSTANCEID');
340:
341:
342: l_OWNERID := WF_ENGINE.GetItemAttrNumber(
343: itemtype => itemtype,
344: itemkey => itemkey,
345: aname => 'OWNERID');
346:
343: itemtype => itemtype,
344: itemkey => itemkey,
345: aname => 'OWNERID');
346:
347: l_APPID := WF_ENGINE.GetItemAttrNumber(
348: itemtype => itemtype,
349: itemkey => itemkey,
350: aname => 'RESPAPPID');
351:
348: itemtype => itemtype,
349: itemkey => itemkey,
350: aname => 'RESPAPPID');
351:
352: l_BUSINESSAREAID := WF_ENGINE.GetItemAttrNumber(
353: itemtype => itemtype,
354: itemkey => itemkey,
355: aname => 'BUSINESSAREAID');
356:
363: where BUSINESS_AREA_ID = l_BUSINESSAREAID;
364:
365:
366: -- set business area display name
367: wf_engine.SetItemAttrText(Itemtype => ItemType,
368: Itemkey => ItemKey,
369: aname => 'BUSINESSAREA',
370: avalue => l_BUSINESSAREA);
371:
386:
387: if l_result_code in ('ERROR', 'CANCELLED', 'TERMINATED', 'WARNING') then
388:
389: dbms_lock.sleep(5);
390: l_request_id := WF_ENGINE.GetItemAttrNumber(
391: itemtype => itemtype,
392: itemkey => itemkey,
393: aname => 'REQUEST_ID');
394:
417: from fnd_concurrent_programs_vl
418: where APPLICATION_ID = 210
419: and CONCURRENT_PROGRAM_ID = l_concprgID;
420:
421: wf_engine.SetItemAttrText(Itemtype => ItemType,
422: Itemkey => ItemKey,
423: aname => 'REGISTER1',
424: avalue => l_ConcName);
425:
422: Itemkey => ItemKey,
423: aname => 'REGISTER1',
424: avalue => l_ConcName);
425:
426: wf_engine.SetItemAttrText(Itemtype => ItemType,
427: Itemkey => ItemKey,
428: aname => 'MSGHISTORY',
429: avalue => l_reqlog);
430:
427: Itemkey => ItemKey,
428: aname => 'MSGHISTORY',
429: avalue => l_reqlog);
430:
431: wf_engine.SetItemAttrText(Itemtype => ItemType,
432: Itemkey => ItemKey,
433: aname => 'ISSUEMSG',
434: avalue => l_req_resultDisp);
435:
434: avalue => l_req_resultDisp);
435:
436: else
437:
438: wf_engine.SetItemAttrText(Itemtype => ItemType,
439: Itemkey => ItemKey,
440: aname => 'ISSUEMSG',
441: avalue => to_char(l_count));
442: