DBA Data[Home] [Help]

APPS.MSD_WF dependencies on WF_ENGINE

Line 50: express_server:=wf_engine.GetItemAttrText(Itemtype => ItemType,

46: SELECT ACTIVITY_NAME, PROCESS_NAME INTO ActEntry, Process FROM WF_PROCESS_ACTIVITIES
47: WHERE INSTANCE_ID=actid;
48: SELECT TEXT_VALUE INTO thisrole FROM WF_ITEM_ATTRIBUTE_VALUES
49: WHERE ITEM_KEY=itemkey AND ITEM_TYPE=itemtype AND NAME='ODPROLE';
50: express_server:=wf_engine.GetItemAttrText(Itemtype => ItemType,
51: Itemkey => ItemKey,
52: aname => 'EXPCONN');
53:
54: -- new to indicate if ODP Master is governing Cycle

Line 55: Master:=wf_engine.GetItemAttrText(Itemtype => ItemType,

51: Itemkey => ItemKey,
52: aname => 'EXPCONN');
53:
54: -- new to indicate if ODP Master is governing Cycle
55: Master:=wf_engine.GetItemAttrText(Itemtype => ItemType,
56: Itemkey => ItemKey,
57: aname => 'ISMASTER');
58:
59: DBName:=wf_engine.GetItemAttrText(Itemtype => ItemType,

Line 59: DBName:=wf_engine.GetItemAttrText(Itemtype => ItemType,

55: Master:=wf_engine.GetItemAttrText(Itemtype => ItemType,
56: Itemkey => ItemKey,
57: aname => 'ISMASTER');
58:
59: DBName:=wf_engine.GetItemAttrText(Itemtype => ItemType,
60: Itemkey => ItemKey,
61: aname => 'DBNAME');
62: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,
63: Itemkey => ItemKey,

Line 62: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,

58:
59: DBName:=wf_engine.GetItemAttrText(Itemtype => ItemType,
60: Itemkey => ItemKey,
61: aname => 'DBNAME');
62: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,
63: Itemkey => ItemKey,
64: aname => 'DPADMIN');
65: SharedLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
66: Itemkey => ItemKey,

Line 65: SharedLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,

61: aname => 'DBNAME');
62: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,
63: Itemkey => ItemKey,
64: aname => 'DPADMIN');
65: SharedLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
66: Itemkey => ItemKey,
67: aname => 'SHAREDLOC');
68: CodeLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
69: Itemkey => ItemKey,

Line 68: CodeLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,

64: aname => 'DPADMIN');
65: SharedLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
66: Itemkey => ItemKey,
67: aname => 'SHAREDLOC');
68: CodeLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
69: Itemkey => ItemKey,
70: aname => 'CODELOC');
71: PlanID:=wf_engine.GetItemAttrText(Itemtype => ItemType,
72: Itemkey => ItemKey,

Line 71: PlanID:=wf_engine.GetItemAttrText(Itemtype => ItemType,

67: aname => 'SHAREDLOC');
68: CodeLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
69: Itemkey => ItemKey,
70: aname => 'CODELOC');
71: PlanID:=wf_engine.GetItemAttrText(Itemtype => ItemType,
72: Itemkey => ItemKey,
73: aname => 'ODPPLAN');
74:
75:

Line 94: wf_engine.SetItemAttrDate(Itemtype => ItemType,

90: then
91: TxtDate := to_char(sysdate, 'YY MM DD HH24:MI');
92: TempDate := to_date(TxtDate, 'YY MM DD HH24:MI');
93: -- obsolete agb 6/14/00 TempDate := sysdate;
94: wf_engine.SetItemAttrDate(Itemtype => ItemType,
95: Itemkey => ItemKey,
96: aname => 'VALUE1',
97: avalue => TempDate);
98: end if;

Line 109: wf_engine.SetItemAttrDate(Itemtype => ItemType,

105: then
106: TxtDate := to_char(sysdate, 'YY MM DD HH24:MI');
107: TempDate := to_date(TxtDate, 'YY MM DD HH24:MI');
108: -- obsolete agb 6/14/00 TempDate := sysdate;
109: wf_engine.SetItemAttrDate(Itemtype => ItemType,
110: Itemkey => ItemKey,
111: aname => 'VALUE1',
112: avalue => TempDate);
113: end if;

Line 129: wf_engine.SetItemAttrText(Itemtype => ItemType,

125: end if;
126: if ActRetCode = 'Y' then
127: if ActEntry = 'ODPDIST'
128: then
129: wf_engine.SetItemAttrText(Itemtype => ItemType,
130: Itemkey => ItemKey,
131: aname => 'ASSIGNID',
132: avalue => ActRetVal);
133: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 133: wf_engine.SetItemAttrText(Itemtype => ItemType,

129: wf_engine.SetItemAttrText(Itemtype => ItemType,
130: Itemkey => ItemKey,
131: aname => 'ASSIGNID',
132: avalue => ActRetVal);
133: wf_engine.SetItemAttrText(Itemtype => ItemType,
134: Itemkey => ItemKey,
135: aname => 'ASSIGNNAME',
136: avalue => ActRetText);
137: end if;

Line 141: wf_engine.SetItemAttrText(Itemtype => ItemType,

137: end if;
138:
139: end if;
140: if ActRetCode = 'N' then
141: wf_engine.SetItemAttrText(Itemtype => ItemType,
142: Itemkey => ItemKey,
143: aname => 'DPPROBLEM',
144: avalue => ActRetErr);
145: end if;

Line 156: wf_engine.SetItemAttrText(Itemtype => ItemType,

152: when others then
153: if instr(upper(SQLERRM), 'EXPRESS') > 0 or instr(upper(SQLERRM), 'SNAPI') > 0
154: then
155: resultout :='COMPLETE:N';
156: wf_engine.SetItemAttrText(Itemtype => ItemType,
157: Itemkey => ItemKey,
158: aname => 'DPPROBLEM',
159: avalue => substr(SQLERRM, 1, 200));
160:

Line 211: wf_engine.CreateProcess(ItemType => ItemType,

207: from msd_demand_plans_v
208: where demand_plan_id=to_number(inPlan);
209:
210:
211: wf_engine.CreateProcess(ItemType => ItemType,
212: itemKey => ItemKey,
213: process => WorkflowProcess);
214: -- The sysinfo(user that launched the process or the Owner of the process.
215: -- This would be the demand planning administrator.

Line 216: wf_engine.SetItemOwner(ItemType => ItemType,

212: itemKey => ItemKey,
213: process => WorkflowProcess);
214: -- The sysinfo(user that launched the process or the Owner of the process.
215: -- This would be the demand planning administrator.
216: wf_engine.SetItemOwner(ItemType => ItemType,
217: ItemKey => ItemKey,
218: owner => owner);
219: wf_engine.SetItemAttrText(Itemtype => ItemType,
220: Itemkey => ItemKey,

Line 219: wf_engine.SetItemAttrText(Itemtype => ItemType,

215: -- This would be the demand planning administrator.
216: wf_engine.SetItemOwner(ItemType => ItemType,
217: ItemKey => ItemKey,
218: owner => owner);
219: wf_engine.SetItemAttrText(Itemtype => ItemType,
220: Itemkey => ItemKey,
221: aname => 'DPADMIN',
222: avalue => owner);
223: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 223: wf_engine.SetItemAttrText(Itemtype => ItemType,

219: wf_engine.SetItemAttrText(Itemtype => ItemType,
220: Itemkey => ItemKey,
221: aname => 'DPADMIN',
222: avalue => owner);
223: wf_engine.SetItemAttrText(Itemtype => ItemType,
224: Itemkey => ItemKey,
225: aname => 'ODPROLE',
226: avalue => inrole);
227: -- Plan ID!

Line 228: wf_engine.SetItemAttrText(Itemtype => ItemType,

224: Itemkey => ItemKey,
225: aname => 'ODPROLE',
226: avalue => inrole);
227: -- Plan ID!
228: wf_engine.SetItemAttrText(Itemtype => ItemType,
229: Itemkey => ItemKey,
230: aname => 'ODPPLAN',
231: avalue => inplan);
232: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 232: wf_engine.SetItemAttrText(Itemtype => ItemType,

228: wf_engine.SetItemAttrText(Itemtype => ItemType,
229: Itemkey => ItemKey,
230: aname => 'ODPPLAN',
231: avalue => inplan);
232: wf_engine.SetItemAttrText(Itemtype => ItemType,
233: Itemkey => ItemKey,
234: aname => 'PLNAME',
235: avalue => PlName);
236: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 236: wf_engine.SetItemAttrText(Itemtype => ItemType,

232: wf_engine.SetItemAttrText(Itemtype => ItemType,
233: Itemkey => ItemKey,
234: aname => 'PLNAME',
235: avalue => PlName);
236: wf_engine.SetItemAttrText(Itemtype => ItemType,
237: Itemkey => ItemKey,
238: aname => 'CODELOC',
239: avalue => CodeLoc);
240: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 240: wf_engine.SetItemAttrText(Itemtype => ItemType,

236: wf_engine.SetItemAttrText(Itemtype => ItemType,
237: Itemkey => ItemKey,
238: aname => 'CODELOC',
239: avalue => CodeLoc);
240: wf_engine.SetItemAttrText(Itemtype => ItemType,
241: Itemkey => ItemKey,
242: aname => 'DBNAME',
243: avalue => DBName);
244: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 244: wf_engine.SetItemAttrText(Itemtype => ItemType,

240: wf_engine.SetItemAttrText(Itemtype => ItemType,
241: Itemkey => ItemKey,
242: aname => 'DBNAME',
243: avalue => DBName);
244: wf_engine.SetItemAttrText(Itemtype => ItemType,
245: Itemkey => ItemKey,
246: aname => 'SHAREDLOC',
247: avalue => SharedLoc);
248: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 248: wf_engine.SetItemAttrText(Itemtype => ItemType,

244: wf_engine.SetItemAttrText(Itemtype => ItemType,
245: Itemkey => ItemKey,
246: aname => 'SHAREDLOC',
247: avalue => SharedLoc);
248: wf_engine.SetItemAttrText(Itemtype => ItemType,
249: Itemkey => ItemKey,
250: aname => 'EXPCONN',
251: avalue => express_server);
252:

Line 253: wf_engine.SetItemAttrText(Itemtype => ItemType,

249: Itemkey => ItemKey,
250: aname => 'EXPCONN',
251: avalue => express_server);
252:
253: wf_engine.SetItemAttrText(Itemtype => ItemType,
254: Itemkey => ItemKey,
255: aname => 'CODEDB',
256: avalue => inCodeDB);
257:

Line 258: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

254: Itemkey => ItemKey,
255: aname => 'CODEDB',
256: avalue => inCodeDB);
257:
258: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
259: Itemkey => ItemKey,
260: aname => 'USER_ID',
261: avalue => userID);
262: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

Line 262: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

258: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
259: Itemkey => ItemKey,
260: aname => 'USER_ID',
261: avalue => userID);
262: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
263: Itemkey => ItemKey,
264: aname => 'RESP_ID',
265: avalue => respID);
266: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

Line 266: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

262: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
263: Itemkey => ItemKey,
264: aname => 'RESP_ID',
265: avalue => respID);
266: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
267: Itemkey => ItemKey,
268: aname => 'RESP_APPL_ID',
269: avalue => respApplID);
270:

Line 274: wf_engine.SetItemAttrDate(Itemtype => ItemType,

270:
271: if WorkflowProcess = 'ODPSTDCOL'
272: then
273: CompDate:= to_date(inCDate, 'YY MM DD');
274: wf_engine.SetItemAttrDate(Itemtype => ItemType,
275: Itemkey => ItemKey,
276: aname => 'VALUE2',
277: avalue => CompDate);
278: end if;

Line 287: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

283: select count(value) into FixedDate from v$parameter
284: where name like '%fixed_date%' AND length(VALUE) > 0;
285: if FixedDate > 0
286: then
287: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
288: Itemkey => ItemKey,
289: aname => 'WAIT_RELATIVE_TIME',
290: avalue => NULL);
291: end if;

Line 296: wf_engine.StartProcess(ItemType => ItemType,

292: end if;
293:
294: commit;
295:
296: wf_engine.StartProcess(ItemType => ItemType,
297: ItemKey => ItemKey);
298: return;
299: exception
300: when others then

Line 333: LaunchMgr:=wf_engine.GetItemAttrText(Itemtype => ItemType,

329: -- DONE means all DB Assignments are complete.
330: -- CYCLE means keep processing.
331: -- This is set upon the start of the process.
332: -- This is set by MSD_WF.GOVERNOR.
333: LaunchMgr:=wf_engine.GetItemAttrText(Itemtype => ItemType,
334: Itemkey => ItemKey,
335: aname => 'LAUNCHMGR');
336: PlanID:=wf_engine.GetItemAttrText(Itemtype => ItemType,
337: Itemkey => ItemKey,

Line 336: PlanID:=wf_engine.GetItemAttrText(Itemtype => ItemType,

332: -- This is set by MSD_WF.GOVERNOR.
333: LaunchMgr:=wf_engine.GetItemAttrText(Itemtype => ItemType,
334: Itemkey => ItemKey,
335: aname => 'LAUNCHMGR');
336: PlanID:=wf_engine.GetItemAttrText(Itemtype => ItemType,
337: Itemkey => ItemKey,
338: aname => 'ODPPLAN');
339: if LaunchMgr = 'CYCLE' or LaunchMgr = 'DONE'
340: then

Line 351: express_server:=wf_engine.GetItemAttrText(Itemtype => ItemType,

347:
348: gItemType := ItemType;
349: gItemKey := ItemKey;
350:
351: express_server:=wf_engine.GetItemAttrText(Itemtype => ItemType,
352: Itemkey => ItemKey,
353: aname => 'EXPCONN');
354: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,
355: Itemkey => ItemKey,

Line 354: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,

350:
351: express_server:=wf_engine.GetItemAttrText(Itemtype => ItemType,
352: Itemkey => ItemKey,
353: aname => 'EXPCONN');
354: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,
355: Itemkey => ItemKey,
356: aname => 'DPADMIN');
357: DBName:=wf_engine.GetItemAttrText(Itemtype => ItemType,
358: Itemkey => ItemKey,

Line 357: DBName:=wf_engine.GetItemAttrText(Itemtype => ItemType,

353: aname => 'EXPCONN');
354: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,
355: Itemkey => ItemKey,
356: aname => 'DPADMIN');
357: DBName:=wf_engine.GetItemAttrText(Itemtype => ItemType,
358: Itemkey => ItemKey,
359: aname => 'DBNAME');
360: SharedLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
361: Itemkey => ItemKey,

Line 360: SharedLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,

356: aname => 'DPADMIN');
357: DBName:=wf_engine.GetItemAttrText(Itemtype => ItemType,
358: Itemkey => ItemKey,
359: aname => 'DBNAME');
360: SharedLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
361: Itemkey => ItemKey,
362: aname => 'SHAREDLOC');
363: CodeLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
364: Itemkey => ItemKey,

Line 363: CodeLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,

359: aname => 'DBNAME');
360: SharedLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
361: Itemkey => ItemKey,
362: aname => 'SHAREDLOC');
363: CodeLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
364: Itemkey => ItemKey,
365: aname => 'CODELOC');
366:
367: execute_dml(actentry, planid, dbname, SharedLoc, dpadmin, thisrole, itemkey, master, '',

Line 376: -- wf_engine.SetItemAttrText(Itemtype => ItemType,

372: if ActRetCode = 'Y' then
373: resultout :='COMPLETE:Y';
374: end if;
375: -- if ActRetCode = 'Y' then
376: -- wf_engine.SetItemAttrText(Itemtype => ItemType,
377: -- Itemkey => ItemKey,
378: -- aname => 'ODPBODY',
379: -- avalue => ActRetText);
380: -- end if;

Line 382: wf_engine.SetItemAttrText(Itemtype => ItemType,

378: -- aname => 'ODPBODY',
379: -- avalue => ActRetText);
380: -- end if;
381: if ActRetCode = 'N' then
382: wf_engine.SetItemAttrText(Itemtype => ItemType,
383: Itemkey => ItemKey,
384: aname => 'DPPROBLEM',
385: avalue => ActRetErr);
386: end if;

Line 395: wf_engine.SetItemAttrText(Itemtype => ItemType,

391: when others then
392: if instr(upper(SQLERRM), 'EXPRESS') > 0 or instr(upper(SQLERRM), 'SNAPI') > 0
393: then
394: resultout :='COMPLETE:N';
395: wf_engine.SetItemAttrText(Itemtype => ItemType,
396: Itemkey => ItemKey,
397: aname => 'DPPROBLEM',
398: avalue => substr(SQLERRM, 1, 200));
399:

Line 439: express_server := wf_engine.GetItemAttrText(Itemtype => ItemType,

435: SELECT ACTIVITY_NAME INTO ActEntry FROM WF_PROCESS_ACTIVITIES
436: WHERE INSTANCE_ID=actid;
437: SELECT TEXT_VALUE INTO thisrole FROM WF_ITEM_ATTRIBUTE_VALUES
438: WHERE ITEM_KEY=itemkey AND ITEM_TYPE=itemtype AND NAME='ODPROLE';
439: express_server := wf_engine.GetItemAttrText(Itemtype => ItemType,
440: Itemkey => ItemKey,
441: aname => 'EXPCONN');
442: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,
443: Itemkey => ItemKey,

Line 442: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,

438: WHERE ITEM_KEY=itemkey AND ITEM_TYPE=itemtype AND NAME='ODPROLE';
439: express_server := wf_engine.GetItemAttrText(Itemtype => ItemType,
440: Itemkey => ItemKey,
441: aname => 'EXPCONN');
442: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,
443: Itemkey => ItemKey,
444: aname => 'DPADMIN');
445: DBName := wf_engine.GetItemAttrText(Itemtype => ItemType,
446: Itemkey => ItemKey,

Line 445: DBName := wf_engine.GetItemAttrText(Itemtype => ItemType,

441: aname => 'EXPCONN');
442: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,
443: Itemkey => ItemKey,
444: aname => 'DPADMIN');
445: DBName := wf_engine.GetItemAttrText(Itemtype => ItemType,
446: Itemkey => ItemKey,
447: aname => 'DBNAME');
448: SharedLoc := wf_engine.GetItemAttrText(Itemtype => ItemType,
449: Itemkey => ItemKey,

Line 448: SharedLoc := wf_engine.GetItemAttrText(Itemtype => ItemType,

444: aname => 'DPADMIN');
445: DBName := wf_engine.GetItemAttrText(Itemtype => ItemType,
446: Itemkey => ItemKey,
447: aname => 'DBNAME');
448: SharedLoc := wf_engine.GetItemAttrText(Itemtype => ItemType,
449: Itemkey => ItemKey,
450: aname => 'SHAREDLOC');
451: CodeLoc := wf_engine.GetItemAttrText(Itemtype => ItemType,
452: Itemkey => ItemKey,

Line 451: CodeLoc := wf_engine.GetItemAttrText(Itemtype => ItemType,

447: aname => 'DBNAME');
448: SharedLoc := wf_engine.GetItemAttrText(Itemtype => ItemType,
449: Itemkey => ItemKey,
450: aname => 'SHAREDLOC');
451: CodeLoc := wf_engine.GetItemAttrText(Itemtype => ItemType,
452: Itemkey => ItemKey,
453: aname => 'CODELOC');
454:
455: -- call to wf.setactivity and get return values

Line 469: wf_engine.setItemAttrText(Itemtype => ItemType,

465: end if;
466: -- its time to launch another or contiue
467: -- ActRetVal should be either LAUNCH or CYCLE.
468: if ActRetCode = 'Y' then
469: wf_engine.setItemAttrText(Itemtype => ItemType,
470: Itemkey => ItemKey,
471: aname => 'LAUNCHMGR',
472: avalue => ActRetVal);
473: resultout :='COMPLETE:CYCLE';

Line 476: wf_engine.SetItemAttrText(Itemtype => ItemType,

472: avalue => ActRetVal);
473: resultout :='COMPLETE:CYCLE';
474: end if;
475: if ActRetCode = 'N' then
476: wf_engine.SetItemAttrText(Itemtype => ItemType,
477: Itemkey => ItemKey,
478: aname => 'DPPROBLEM',
479: avalue => ActRetErr);
480: end if;

Line 488: wf_engine.SetItemAttrText(Itemtype => ItemType,

484: when others then
485: if instr(upper(SQLERRM), 'EXPRESS') > 0 or instr(upper(SQLERRM), 'SNAPI') > 0
486: then
487: resultout :='COMPLETE:N';
488: wf_engine.SetItemAttrText(Itemtype => ItemType,
489: Itemkey => ItemKey,
490: aname => 'DPPROBLEM',
491: avalue => substr(SQLERRM, 1, 200));
492:

Line 493: planID:=wf_engine.GetItemAttrText(Itemtype => ItemType,

489: Itemkey => ItemKey,
490: aname => 'DPPROBLEM',
491: avalue => substr(SQLERRM, 1, 200));
492:
493: planID:=wf_engine.GetItemAttrText(Itemtype => ItemType,
494: Itemkey => ItemKey,
495: aname => 'ODPPLAN');
496: update msd_demand_plans
497: set DP_BUILD_ERROR_FLAG = 'YES'

Line 598: wf_engine.ItemStatus(itemType, itemkey, status_code, result);

594: -- This should be more than sufficent
595:
596: dbms_lock.sleep(45);
597:
598: wf_engine.ItemStatus(itemType, itemkey, status_code, result);
599:
600: if RTRIM(status_code) = 'COMPLETE' then
601: exit;
602: end if;

Line 611: wf_engine.Background(itemtype);

607: -- if this is the controling Distrbution process then just
608: -- do a call to background once a minute. This will check the WAIT
609: -- and intiate any deferred thread for the distribtuion.
610:
611: wf_engine.Background(itemtype);
612: else
613: --*****************************************************
614: -- agb inspired from Emerson mod 08/12/2003
615: -- This path WILL NOT be taken for distribution!

Line 618: -- wf_engine.Background(itemtype). Note this is select is

614: -- agb inspired from Emerson mod 08/12/2003
615: -- This path WILL NOT be taken for distribution!
616: -- HERE if we find a deferrd activity waiting to be be
617: -- run by a background engine we will ONLY then call
618: -- wf_engine.Background(itemtype). Note this is select is
619: -- itemkey specific.
620:
621: select distinct ACTIVITY_STATUS_CODE into status_code
622: from wf_item_activity_statuses_v

Line 634: wf_engine.Background(itemtype);

630: -- agb inspired from Emerson mod 08/12/2003
631: -- This should give time for the deferred item to be
632: -- in both WF status and on the deferred queue
633: dbms_lock.sleep(15);
634: wf_engine.Background(itemtype);
635:
636: end if;
637:
638: end if;

Line 718: -- IN Standard parameters supplied by WF engine:

714: -- SetColDate
715: --
716: -- WF proc to set the number of days to run the Standard Collection.
717: --
718: -- IN Standard parameters supplied by WF engine:
719: -- itemtype , itemkey, actid, funcmode
720: --
721: -- OUT
722: -- resultout 'COMPLETE:N' for failure, 'COMPLETE:Y' for success

Line 740: NumDays:=wf_engine.GetItemAttrNumber(Itemtype => ItemType,

736: IF (funcmode = 'RUN') THEN
737: resultout :='COMPLETE:N';
738:
739:
740: NumDays:=wf_engine.GetItemAttrNumber(Itemtype => ItemType,
741: Itemkey => ItemKey,
742: aname => 'NUMDAYS');
743:
744: TempDate := sysdate + NumDays;

Line 747: wf_engine.SetItemAttrDate(Itemtype => ItemType,

743:
744: TempDate := sysdate + NumDays;
745: TxtDate := to_char(TempDate, 'YY MM DD HH24:MI');
746: TempDate := to_date(TxtDate, 'YY MM DD HH24:MI');
747: wf_engine.SetItemAttrDate(Itemtype => ItemType,
748: Itemkey => ItemKey,
749: aname => 'VALUE2',
750: avalue => TempDate);
751:

Line 752: wf_engine.SetItemAttrText(Itemtype => ItemType,

748: Itemkey => ItemKey,
749: aname => 'VALUE2',
750: avalue => TempDate);
751:
752: wf_engine.SetItemAttrText(Itemtype => ItemType,
753: Itemkey => ItemKey,
754: aname => 'SETUPLDREF',
755: avalue => 'NO');
756:

Line 772: -- Standard parameters supplied by WF engine:

768: --
769: -- WF proc to set the number of days to run the Upload Process.
770: --
771: -- IN
772: -- Standard parameters supplied by WF engine:
773: -- itemtype , itemkey, actid, funcmode
774: --
775: -- OUT
776: -- resultout 'COMPLETE:N' for failure, 'COMPLETE:Y' for success

Line 797: wf_engine.SetItemAttrDate(Itemtype => ItemType,

793:
794: TxtDate := to_char(sysdate, 'YY MM DD HH24:MI');
795: TempDate := to_date(TxtDate, 'YY MM DD HH24:MI');
796: -- obsolete agb 6/14/00 TempDate := sysdate;
797: wf_engine.SetItemAttrDate(Itemtype => ItemType,
798: Itemkey => ItemKey,
799: aname => 'VALUE1',
800: avalue => TempDate);
801:

Line 804: DelayUpldRef_flag := wf_engine.GetItemAttrText(Itemtype => ItemType,

800: avalue => TempDate);
801:
802: -- the Delay Reference value must be loaded only once
803: -- when UploadDelay process just started
804: DelayUpldRef_flag := wf_engine.GetItemAttrText(Itemtype => ItemType,
805: Itemkey => ItemKey,
806: aname => 'SETUPLDREF');
807:
808: IF (DelayUpldRef_flag <> 'YES') Then

Line 809: NumDays:=wf_engine.GetItemAttrNumber(Itemtype => ItemType,

805: Itemkey => ItemKey,
806: aname => 'SETUPLDREF');
807:
808: IF (DelayUpldRef_flag <> 'YES') Then
809: NumDays:=wf_engine.GetItemAttrNumber(Itemtype => ItemType,
810: Itemkey => ItemKey,
811: aname => 'DELAYDAYS');
812:
813: TempDate := sysdate + NumDays;

Line 816: wf_engine.SetItemAttrDate(Itemtype => ItemType,

812:
813: TempDate := sysdate + NumDays;
814: TxtDate := to_char(TempDate, 'YY MM DD HH24:MI');
815: TempDate := to_date(TxtDate, 'YY MM DD HH24:MI');
816: wf_engine.SetItemAttrDate(Itemtype => ItemType,
817: Itemkey => ItemKey,
818: aname => 'VALUE2',
819: avalue => TempDate);
820: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 820: wf_engine.SetItemAttrText(Itemtype => ItemType,

816: wf_engine.SetItemAttrDate(Itemtype => ItemType,
817: Itemkey => ItemKey,
818: aname => 'VALUE2',
819: avalue => TempDate);
820: wf_engine.SetItemAttrText(Itemtype => ItemType,
821: Itemkey => ItemKey,
822: aname => 'SETUPLDREF',
823: avalue => 'YES');
824: END IF;

Line 918: wf_engine.CreateProcess(ItemType => ItemType,

914: gItemType := ItemType;
915: gItemKey := itemKey;
916:
917: -- Create WF Automate process instance
918: wf_engine.CreateProcess(ItemType => ItemType,
919: itemKey => ItemKey,
920: process => WorkflowProcess);
921:
922: -- setup attributes for Master Automation process

Line 923: wf_engine.SetItemAttrText(Itemtype => ItemType,

919: itemKey => ItemKey,
920: process => WorkflowProcess);
921:
922: -- setup attributes for Master Automation process
923: wf_engine.SetItemAttrText(Itemtype => ItemType,
924: Itemkey => ItemKey,
925: aname => 'CODEDB',
926: avalue => codeDBName);
927:

Line 928: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

924: Itemkey => ItemKey,
925: aname => 'CODEDB',
926: avalue => codeDBName);
927:
928: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
929: Itemkey => ItemKey,
930: aname => 'USER_ID',
931: avalue => userID);
932: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

Line 932: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

928: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
929: Itemkey => ItemKey,
930: aname => 'USER_ID',
931: avalue => userID);
932: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
933: Itemkey => ItemKey,
934: aname => 'RESP_ID',
935: avalue => respID);
936: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

Line 936: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

932: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
933: Itemkey => ItemKey,
934: aname => 'RESP_ID',
935: avalue => respID);
936: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
937: Itemkey => ItemKey,
938: aname => 'RESP_APPL_ID',
939: avalue => respApplID);
940:

Line 942: wf_engine.SetItemOwner(ItemType => ItemType,

938: aname => 'RESP_APPL_ID',
939: avalue => respApplID);
940:
941: -- This should be the demand planning administrator.
942: wf_engine.SetItemOwner(ItemType => ItemType,
943: ItemKey => ItemKey,
944: owner => owner);
945: -- Sets new attribute Is OPD Master running.
946: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 946: wf_engine.SetItemAttrText(Itemtype => ItemType,

942: wf_engine.SetItemOwner(ItemType => ItemType,
943: ItemKey => ItemKey,
944: owner => owner);
945: -- Sets new attribute Is OPD Master running.
946: wf_engine.SetItemAttrText(Itemtype => ItemType,
947: Itemkey => ItemKey,
948: aname => 'ISMASTER',
949: avalue => 'Y');
950: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 950: wf_engine.SetItemAttrText(Itemtype => ItemType,

946: wf_engine.SetItemAttrText(Itemtype => ItemType,
947: Itemkey => ItemKey,
948: aname => 'ISMASTER',
949: avalue => 'Y');
950: wf_engine.SetItemAttrText(Itemtype => ItemType,
951: Itemkey => ItemKey,
952: aname => 'DPADMIN',
953: avalue => owner);
954: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 954: wf_engine.SetItemAttrText(Itemtype => ItemType,

950: wf_engine.SetItemAttrText(Itemtype => ItemType,
951: Itemkey => ItemKey,
952: aname => 'DPADMIN',
953: avalue => owner);
954: wf_engine.SetItemAttrText(Itemtype => ItemType,
955: Itemkey => ItemKey,
956: aname => 'ODPROLE',
957: avalue => owner);
958: -- Plan ID!

Line 959: wf_engine.SetItemAttrText(Itemtype => ItemType,

955: Itemkey => ItemKey,
956: aname => 'ODPROLE',
957: avalue => owner);
958: -- Plan ID!
959: wf_engine.SetItemAttrText(Itemtype => ItemType,
960: Itemkey => ItemKey,
961: aname => 'ODPPLAN',
962: avalue => PlanID);
963: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 963: wf_engine.SetItemAttrText(Itemtype => ItemType,

959: wf_engine.SetItemAttrText(Itemtype => ItemType,
960: Itemkey => ItemKey,
961: aname => 'ODPPLAN',
962: avalue => PlanID);
963: wf_engine.SetItemAttrText(Itemtype => ItemType,
964: Itemkey => ItemKey,
965: aname => 'PLNAME',
966: avalue => PlanName);
967: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 967: wf_engine.SetItemAttrText(Itemtype => ItemType,

963: wf_engine.SetItemAttrText(Itemtype => ItemType,
964: Itemkey => ItemKey,
965: aname => 'PLNAME',
966: avalue => PlanName);
967: wf_engine.SetItemAttrText(Itemtype => ItemType,
968: Itemkey => ItemKey,
969: aname => 'CODELOC',
970: avalue => CodeLoc);
971: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 971: wf_engine.SetItemAttrText(Itemtype => ItemType,

967: wf_engine.SetItemAttrText(Itemtype => ItemType,
968: Itemkey => ItemKey,
969: aname => 'CODELOC',
970: avalue => CodeLoc);
971: wf_engine.SetItemAttrText(Itemtype => ItemType,
972: Itemkey => ItemKey,
973: aname => 'DBNAME',
974: avalue => DBName);
975: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 975: wf_engine.SetItemAttrText(Itemtype => ItemType,

971: wf_engine.SetItemAttrText(Itemtype => ItemType,
972: Itemkey => ItemKey,
973: aname => 'DBNAME',
974: avalue => DBName);
975: wf_engine.SetItemAttrText(Itemtype => ItemType,
976: Itemkey => ItemKey,
977: aname => 'SHAREDLOC',
978: avalue => SharedLoc);
979: wf_engine.SetItemAttrText(Itemtype => ItemType,

Line 979: wf_engine.SetItemAttrText(Itemtype => ItemType,

975: wf_engine.SetItemAttrText(Itemtype => ItemType,
976: Itemkey => ItemKey,
977: aname => 'SHAREDLOC',
978: avalue => SharedLoc);
979: wf_engine.SetItemAttrText(Itemtype => ItemType,
980: Itemkey => ItemKey,
981: aname => 'EXPCONN',
982: avalue => express_server);
983: -- set NumDays to collect

Line 984: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

980: Itemkey => ItemKey,
981: aname => 'EXPCONN',
982: avalue => express_server);
983: -- set NumDays to collect
984: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
985: Itemkey => ItemKey,
986: aname => 'NUMDAYS',
987: avalue => NumDaysToCol);
988: -- set DelayDays to Upload

Line 989: wf_engine.SetItemAttrNumber(Itemtype => ItemType,

985: Itemkey => ItemKey,
986: aname => 'NUMDAYS',
987: avalue => NumDaysToCol);
988: -- set DelayDays to Upload
989: wf_engine.SetItemAttrNumber(Itemtype => ItemType,
990: Itemkey => ItemKey,
991: aname => 'DELAYDAYS',
992: avalue => DelayDaysToUpld);
993:

Line 995: wf_engine.StartProcess(ItemType => ItemType,

991: aname => 'DELAYDAYS',
992: avalue => DelayDaysToUpld);
993:
994: -- Now that all is created and set START the PROCESS!
995: wf_engine.StartProcess(ItemType => ItemType,
996: ItemKey => ItemKey);
997: commit;
998:
999: -- Start background engine for this process.

Line 1044: code_aw :=wf_engine.GetItemAttrText(Itemtype => gItemType,

1040:
1041:
1042: begin
1043:
1044: code_aw :=wf_engine.GetItemAttrText(Itemtype => gItemType,
1045: Itemkey => gItemKey,
1046: aname => 'CODEDB');
1047:
1048: user_id:=wf_engine.GetItemAttrNumber(Itemtype => gItemType,

Line 1048: user_id:=wf_engine.GetItemAttrNumber(Itemtype => gItemType,

1044: code_aw :=wf_engine.GetItemAttrText(Itemtype => gItemType,
1045: Itemkey => gItemKey,
1046: aname => 'CODEDB');
1047:
1048: user_id:=wf_engine.GetItemAttrNumber(Itemtype => gItemType,
1049: Itemkey => gItemKey,
1050: aname => 'USER_ID');
1051:
1052: resp_id:=wf_engine.GetItemAttrNumber(Itemtype => gItemType,

Line 1052: resp_id:=wf_engine.GetItemAttrNumber(Itemtype => gItemType,

1048: user_id:=wf_engine.GetItemAttrNumber(Itemtype => gItemType,
1049: Itemkey => gItemKey,
1050: aname => 'USER_ID');
1051:
1052: resp_id:=wf_engine.GetItemAttrNumber(Itemtype => gItemType,
1053: Itemkey => gItemKey,
1054: aname => 'RESP_ID');
1055:
1056: respAppl_id:=wf_engine.GetItemAttrNumber(Itemtype => gItemType,

Line 1056: respAppl_id:=wf_engine.GetItemAttrNumber(Itemtype => gItemType,

1052: resp_id:=wf_engine.GetItemAttrNumber(Itemtype => gItemType,
1053: Itemkey => gItemKey,
1054: aname => 'RESP_ID');
1055:
1056: respAppl_id:=wf_engine.GetItemAttrNumber(Itemtype => gItemType,
1057: Itemkey => gItemKey,
1058: aname => 'RESP_APPL_ID');
1059: -- get attributes to manage S&OP Master Automation Process
1060:

Line 1061: master_type := wf_engine.GetItemAttrText(Itemtype => gItemType,

1057: Itemkey => gItemKey,
1058: aname => 'RESP_APPL_ID');
1059: -- get attributes to manage S&OP Master Automation Process
1060:
1061: master_type := wf_engine.GetItemAttrText(Itemtype => gItemType,
1062: Itemkey => gItemKey,
1063: aname => 'MASTER_TYPE');
1064: show_log_title := wf_engine.GetItemAttrText(Itemtype => gItemType,
1065: Itemkey => gItemKey,

Line 1064: show_log_title := wf_engine.GetItemAttrText(Itemtype => gItemType,

1060:
1061: master_type := wf_engine.GetItemAttrText(Itemtype => gItemType,
1062: Itemkey => gItemKey,
1063: aname => 'MASTER_TYPE');
1064: show_log_title := wf_engine.GetItemAttrText(Itemtype => gItemType,
1065: Itemkey => gItemKey,
1066: aname => 'SHOW_LOG_TITLE');
1067:
1068: fnd_global.apps_initialize(user_id, resp_id, respAppl_id);

Line 1114: -- Standard parameters supplied by WF engine: itemtype , itemkey, actid, funcmode

1110: --
1111: -- set WF Attributes. Currently just argument1. Will add more as needed.
1112: --
1113: -- IN
1114: -- Standard parameters supplied by WF engine: itemtype , itemkey, actid, funcmode
1115: --
1116: -- OUT
1117: -- resultout 'COMPLETE' for success
1118: --

Line 1131: wf_engine.SetItemAttrText(Itemtype => ItemType,

1127:
1128: BEGIN
1129:
1130: IF (funcmode = 'RUN') THEN
1131: wf_engine.SetItemAttrText(Itemtype => ItemType,
1132: Itemkey => ItemKey,
1133: aname => 'ARG1',
1134: avalue => ItemKey);
1135:

Line 1188: express_server:=wf_engine.GetItemAttrText(Itemtype => ItemType,

1184:
1185: SELECT TEXT_VALUE INTO thisrole FROM WF_ITEM_ATTRIBUTE_VALUES
1186: WHERE ITEM_KEY=itemkey AND ITEM_TYPE=itemtype AND NAME='ODPROLE';
1187:
1188: express_server:=wf_engine.GetItemAttrText(Itemtype => ItemType,
1189: Itemkey => ItemKey,
1190: aname => 'EXPCONN');
1191:
1192: -- new to indicate if ODP Master is governing Cycle

Line 1193: Master:=wf_engine.GetItemAttrText(Itemtype => ItemType,

1189: Itemkey => ItemKey,
1190: aname => 'EXPCONN');
1191:
1192: -- new to indicate if ODP Master is governing Cycle
1193: Master:=wf_engine.GetItemAttrText(Itemtype => ItemType,
1194: Itemkey => ItemKey,
1195: aname => 'ISMASTER');
1196:
1197: DBName:=wf_engine.GetItemAttrText(Itemtype => ItemType,

Line 1197: DBName:=wf_engine.GetItemAttrText(Itemtype => ItemType,

1193: Master:=wf_engine.GetItemAttrText(Itemtype => ItemType,
1194: Itemkey => ItemKey,
1195: aname => 'ISMASTER');
1196:
1197: DBName:=wf_engine.GetItemAttrText(Itemtype => ItemType,
1198: Itemkey => ItemKey,
1199: aname => 'DBNAME');
1200:
1201: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,

Line 1201: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,

1197: DBName:=wf_engine.GetItemAttrText(Itemtype => ItemType,
1198: Itemkey => ItemKey,
1199: aname => 'DBNAME');
1200:
1201: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,
1202: Itemkey => ItemKey,
1203: aname => 'DPADMIN');
1204:
1205: SharedLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,

Line 1205: SharedLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,

1201: DPAdmin:=wf_engine.GetItemAttrText(Itemtype => ItemType,
1202: Itemkey => ItemKey,
1203: aname => 'DPADMIN');
1204:
1205: SharedLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
1206: Itemkey => ItemKey,
1207: aname => 'SHAREDLOC');
1208:
1209: CodeLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,

Line 1209: CodeLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,

1205: SharedLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
1206: Itemkey => ItemKey,
1207: aname => 'SHAREDLOC');
1208:
1209: CodeLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
1210: Itemkey => ItemKey,
1211: aname => 'CODELOC');
1212:
1213: PlanID:=wf_engine.GetItemAttrText(Itemtype => ItemType,

Line 1213: PlanID:=wf_engine.GetItemAttrText(Itemtype => ItemType,

1209: CodeLoc:=wf_engine.GetItemAttrText(Itemtype => ItemType,
1210: Itemkey => ItemKey,
1211: aname => 'CODELOC');
1212:
1213: PlanID:=wf_engine.GetItemAttrText(Itemtype => ItemType,
1214: Itemkey => ItemKey,
1215: aname => 'ODPPLAN');
1216:
1217: -- call to wf.setactivity and get return values

Line 1225: wf_engine.SetItemAttrText(Itemtype => ItemType,

1221:
1222: if ActRetCode = 'Y' then
1223:
1224: retcode :='0';
1225: wf_engine.SetItemAttrText(Itemtype => ItemType,
1226: Itemkey => ItemKey,
1227: aname => 'ASSIGNID',
1228: avalue => ActRetVal);
1229:

Line 1230: wf_engine.SetItemAttrText(Itemtype => ItemType,

1226: Itemkey => ItemKey,
1227: aname => 'ASSIGNID',
1228: avalue => ActRetVal);
1229:
1230: wf_engine.SetItemAttrText(Itemtype => ItemType,
1231: Itemkey => ItemKey,
1232: aname => 'ASSIGNNAME',
1233: avalue => ActRetText);
1234: end if;

Line 1237: wf_engine.SetItemAttrText(Itemtype => ItemType,

1233: avalue => ActRetText);
1234: end if;
1235:
1236: if ActRetCode = 'N' then
1237: wf_engine.SetItemAttrText(Itemtype => ItemType,
1238: Itemkey => ItemKey,
1239: aname => 'DPPROBLEM',
1240: avalue => ActRetErr);
1241: retcode :='2';

Line 1256: wf_engine.SetItemAttrText(Itemtype => ItemType,

1252: errbuf:=substr(sqlerrm, 1, 255);
1253:
1254: if instr(upper(SQLERRM), 'EXPRESS') > 0 or instr(upper(SQLERRM), 'SNAPI') > 0
1255: then
1256: wf_engine.SetItemAttrText(Itemtype => ItemType,
1257: Itemkey => ItemKey,
1258: aname => 'DPPROBLEM',
1259: avalue => substr(SQLERRM, 1, 200));
1260: