93: error_message VARCHAR2(2000);
94: error_stack VARCHAR2(32000);
95: BEGIN
96: wf_core.get_error(error_name, error_message, error_stack);
97: fnd_file.put_line (fnd_file.log,error_message);
98: fnd_file.new_line (fnd_file.log,1);
99: fnd_file.put_line (fnd_file.log,error_stack);
100: fnd_file.new_line (fnd_file.log,1);
101: wf_core.clear;
94: error_stack VARCHAR2(32000);
95: BEGIN
96: wf_core.get_error(error_name, error_message, error_stack);
97: fnd_file.put_line (fnd_file.log,error_message);
98: fnd_file.new_line (fnd_file.log,1);
99: fnd_file.put_line (fnd_file.log,error_stack);
100: fnd_file.new_line (fnd_file.log,1);
101: wf_core.clear;
102: END call_exception;
95: BEGIN
96: wf_core.get_error(error_name, error_message, error_stack);
97: fnd_file.put_line (fnd_file.log,error_message);
98: fnd_file.new_line (fnd_file.log,1);
99: fnd_file.put_line (fnd_file.log,error_stack);
100: fnd_file.new_line (fnd_file.log,1);
101: wf_core.clear;
102: END call_exception;
103:
96: wf_core.get_error(error_name, error_message, error_stack);
97: fnd_file.put_line (fnd_file.log,error_message);
98: fnd_file.new_line (fnd_file.log,1);
99: fnd_file.put_line (fnd_file.log,error_stack);
100: fnd_file.new_line (fnd_file.log,1);
101: wf_core.clear;
102: END call_exception;
103:
104: PROCEDURE synchronize_teams_wf AS
201: log_message14 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG14');
202: log_message36 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG36');
203: log_message37 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG37');
204:
205: fnd_file.new_line (fnd_file.log,1);
206: fnd_file.put_line (fnd_file.log,log_msg_hdr4);
207: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Teams');
208: fnd_file.put_line (fnd_file.log,'-----------------------------------------------------------------');
209: fnd_file.new_line (fnd_file.log,1);
202: log_message36 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG36');
203: log_message37 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG37');
204:
205: fnd_file.new_line (fnd_file.log,1);
206: fnd_file.put_line (fnd_file.log,log_msg_hdr4);
207: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Teams');
208: fnd_file.put_line (fnd_file.log,'-----------------------------------------------------------------');
209: fnd_file.new_line (fnd_file.log,1);
210:
203: log_message37 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG37');
204:
205: fnd_file.new_line (fnd_file.log,1);
206: fnd_file.put_line (fnd_file.log,log_msg_hdr4);
207: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Teams');
208: fnd_file.put_line (fnd_file.log,'-----------------------------------------------------------------');
209: fnd_file.new_line (fnd_file.log,1);
210:
211: wf_core.clear;
204:
205: fnd_file.new_line (fnd_file.log,1);
206: fnd_file.put_line (fnd_file.log,log_msg_hdr4);
207: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Teams');
208: fnd_file.put_line (fnd_file.log,'-----------------------------------------------------------------');
209: fnd_file.new_line (fnd_file.log,1);
210:
211: wf_core.clear;
212:
205: fnd_file.new_line (fnd_file.log,1);
206: fnd_file.put_line (fnd_file.log,log_msg_hdr4);
207: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Teams');
208: fnd_file.put_line (fnd_file.log,'-----------------------------------------------------------------');
209: fnd_file.new_line (fnd_file.log,1);
210:
211: wf_core.clear;
212:
213: -- Inactivate Workflow User Roles (Self and Member) for corresponding Inactive Resource Teams
225:
226: EXCEPTION
227: WHEN OTHERS THEN
228: wf_core.get_error(error_name, error_message, error_stack);
229: fnd_file.put_line (fnd_file.log,error_message);
230: fnd_file.new_line (fnd_file.log,1);
231: fnd_file.put_line (fnd_file.log,error_stack);
232: fnd_file.new_line (fnd_file.log,1);
233: wf_core.clear;
226: EXCEPTION
227: WHEN OTHERS THEN
228: wf_core.get_error(error_name, error_message, error_stack);
229: fnd_file.put_line (fnd_file.log,error_message);
230: fnd_file.new_line (fnd_file.log,1);
231: fnd_file.put_line (fnd_file.log,error_stack);
232: fnd_file.new_line (fnd_file.log,1);
233: wf_core.clear;
234: END;
227: WHEN OTHERS THEN
228: wf_core.get_error(error_name, error_message, error_stack);
229: fnd_file.put_line (fnd_file.log,error_message);
230: fnd_file.new_line (fnd_file.log,1);
231: fnd_file.put_line (fnd_file.log,error_stack);
232: fnd_file.new_line (fnd_file.log,1);
233: wf_core.clear;
234: END;
235: END LOOP;
228: wf_core.get_error(error_name, error_message, error_stack);
229: fnd_file.put_line (fnd_file.log,error_message);
230: fnd_file.new_line (fnd_file.log,1);
231: fnd_file.put_line (fnd_file.log,error_stack);
232: fnd_file.new_line (fnd_file.log,1);
233: wf_core.clear;
234: END;
235: END LOOP;
236:
233: wf_core.clear;
234: END;
235: END LOOP;
236:
237: fnd_file.put_line (fnd_file.log,log_message36);
238: --fnd_file.put_line (fnd_file.log,'Successfully inactivated self and member records in Workflow User Roles table,
239: --for all the corresponding records in Resource Teams table that have been inactivated');
240: fnd_file.new_line (fnd_file.log,1);
241:
234: END;
235: END LOOP;
236:
237: fnd_file.put_line (fnd_file.log,log_message36);
238: --fnd_file.put_line (fnd_file.log,'Successfully inactivated self and member records in Workflow User Roles table,
239: --for all the corresponding records in Resource Teams table that have been inactivated');
240: fnd_file.new_line (fnd_file.log,1);
241:
242: -- Inactivate Workflow Roles for corresponding Inactive Resource Teams
236:
237: fnd_file.put_line (fnd_file.log,log_message36);
238: --fnd_file.put_line (fnd_file.log,'Successfully inactivated self and member records in Workflow User Roles table,
239: --for all the corresponding records in Resource Teams table that have been inactivated');
240: fnd_file.new_line (fnd_file.log,1);
241:
242: -- Inactivate Workflow Roles for corresponding Inactive Resource Teams
243: FOR i IN c_team_wf_del LOOP
244: BEGIN
261: EXCEPTION
262: WHEN OTHERS THEN
263: l_list.DELETE;
264: wf_core.get_error(error_name, error_message, error_stack);
265: fnd_file.put_line (fnd_file.log,error_message);
266: fnd_file.new_line (fnd_file.log,1);
267: fnd_file.put_line (fnd_file.log,error_stack);
268: fnd_file.new_line (fnd_file.log,1);
269: wf_core.clear;
262: WHEN OTHERS THEN
263: l_list.DELETE;
264: wf_core.get_error(error_name, error_message, error_stack);
265: fnd_file.put_line (fnd_file.log,error_message);
266: fnd_file.new_line (fnd_file.log,1);
267: fnd_file.put_line (fnd_file.log,error_stack);
268: fnd_file.new_line (fnd_file.log,1);
269: wf_core.clear;
270: END;
263: l_list.DELETE;
264: wf_core.get_error(error_name, error_message, error_stack);
265: fnd_file.put_line (fnd_file.log,error_message);
266: fnd_file.new_line (fnd_file.log,1);
267: fnd_file.put_line (fnd_file.log,error_stack);
268: fnd_file.new_line (fnd_file.log,1);
269: wf_core.clear;
270: END;
271: END LOOP;
264: wf_core.get_error(error_name, error_message, error_stack);
265: fnd_file.put_line (fnd_file.log,error_message);
266: fnd_file.new_line (fnd_file.log,1);
267: fnd_file.put_line (fnd_file.log,error_stack);
268: fnd_file.new_line (fnd_file.log,1);
269: wf_core.clear;
270: END;
271: END LOOP;
272:
269: wf_core.clear;
270: END;
271: END LOOP;
272:
273: fnd_file.put_line (fnd_file.log,log_message12);
274: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow Roles table,
275: --for all the records in Resource Teams table that have been inactivated');
276: fnd_file.new_line (fnd_file.log,1);
277:
270: END;
271: END LOOP;
272:
273: fnd_file.put_line (fnd_file.log,log_message12);
274: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow Roles table,
275: --for all the records in Resource Teams table that have been inactivated');
276: fnd_file.new_line (fnd_file.log,1);
277:
278: -- Update Workflow Roles for corresponding Updated and Active Resource Teams
272:
273: fnd_file.put_line (fnd_file.log,log_message12);
274: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow Roles table,
275: --for all the records in Resource Teams table that have been inactivated');
276: fnd_file.new_line (fnd_file.log,1);
277:
278: -- Update Workflow Roles for corresponding Updated and Active Resource Teams
279: FOR i IN c_team_wf_upd LOOP
280: BEGIN
300: EXCEPTION
301: WHEN OTHERS THEN
302: l_list.DELETE;
303: wf_core.get_error(error_name, error_message, error_stack);
304: fnd_file.put_line (fnd_file.log,error_message);
305: fnd_file.new_line (fnd_file.log,1);
306: fnd_file.put_line (fnd_file.log,error_stack);
307: fnd_file.new_line (fnd_file.log,1);
308: wf_core.clear;
301: WHEN OTHERS THEN
302: l_list.DELETE;
303: wf_core.get_error(error_name, error_message, error_stack);
304: fnd_file.put_line (fnd_file.log,error_message);
305: fnd_file.new_line (fnd_file.log,1);
306: fnd_file.put_line (fnd_file.log,error_stack);
307: fnd_file.new_line (fnd_file.log,1);
308: wf_core.clear;
309: END;
302: l_list.DELETE;
303: wf_core.get_error(error_name, error_message, error_stack);
304: fnd_file.put_line (fnd_file.log,error_message);
305: fnd_file.new_line (fnd_file.log,1);
306: fnd_file.put_line (fnd_file.log,error_stack);
307: fnd_file.new_line (fnd_file.log,1);
308: wf_core.clear;
309: END;
310:
303: wf_core.get_error(error_name, error_message, error_stack);
304: fnd_file.put_line (fnd_file.log,error_message);
305: fnd_file.new_line (fnd_file.log,1);
306: fnd_file.put_line (fnd_file.log,error_stack);
307: fnd_file.new_line (fnd_file.log,1);
308: wf_core.clear;
309: END;
310:
311: IF (i.wlr_start_date IS NULL OR
327:
328: EXCEPTION
329: WHEN OTHERS THEN
330: wf_core.get_error(error_name, error_message, error_stack);
331: fnd_file.put_line (fnd_file.log,error_message);
332: fnd_file.new_line (fnd_file.log,1);
333: fnd_file.put_line (fnd_file.log,error_stack);
334: fnd_file.new_line (fnd_file.log,1);
335: wf_core.clear;
328: EXCEPTION
329: WHEN OTHERS THEN
330: wf_core.get_error(error_name, error_message, error_stack);
331: fnd_file.put_line (fnd_file.log,error_message);
332: fnd_file.new_line (fnd_file.log,1);
333: fnd_file.put_line (fnd_file.log,error_stack);
334: fnd_file.new_line (fnd_file.log,1);
335: wf_core.clear;
336: END;
329: WHEN OTHERS THEN
330: wf_core.get_error(error_name, error_message, error_stack);
331: fnd_file.put_line (fnd_file.log,error_message);
332: fnd_file.new_line (fnd_file.log,1);
333: fnd_file.put_line (fnd_file.log,error_stack);
334: fnd_file.new_line (fnd_file.log,1);
335: wf_core.clear;
336: END;
337: END IF;
330: wf_core.get_error(error_name, error_message, error_stack);
331: fnd_file.put_line (fnd_file.log,error_message);
332: fnd_file.new_line (fnd_file.log,1);
333: fnd_file.put_line (fnd_file.log,error_stack);
334: fnd_file.new_line (fnd_file.log,1);
335: wf_core.clear;
336: END;
337: END IF;
338:
337: END IF;
338:
339: END LOOP;
340:
341: fnd_file.put_line (fnd_file.log,log_message13);
342: --fnd_file.put_line (fnd_file.log,'Successfully updated records in Workflow Roles and User Roles tables,
343: --whose corresponding records in Resource Teams table have been updated');
344: fnd_file.new_line (fnd_file.log,1);
345:
338:
339: END LOOP;
340:
341: fnd_file.put_line (fnd_file.log,log_message13);
342: --fnd_file.put_line (fnd_file.log,'Successfully updated records in Workflow Roles and User Roles tables,
343: --whose corresponding records in Resource Teams table have been updated');
344: fnd_file.new_line (fnd_file.log,1);
345:
346: -- Update Workflow User Roles (Self and Member Records) for corresponding Updated/Active Resource Teams
340:
341: fnd_file.put_line (fnd_file.log,log_message13);
342: --fnd_file.put_line (fnd_file.log,'Successfully updated records in Workflow Roles and User Roles tables,
343: --whose corresponding records in Resource Teams table have been updated');
344: fnd_file.new_line (fnd_file.log,1);
345:
346: -- Update Workflow User Roles (Self and Member Records) for corresponding Updated/Active Resource Teams
347: FOR i IN c_team_wf_ur_upd LOOP
348: BEGIN
358:
359: EXCEPTION
360: WHEN OTHERS THEN
361: wf_core.get_error(error_name, error_message, error_stack);
362: fnd_file.put_line (fnd_file.log,error_message);
363: fnd_file.new_line (fnd_file.log,1);
364: fnd_file.put_line (fnd_file.log,error_stack);
365: fnd_file.new_line (fnd_file.log,1);
366: wf_core.clear;
359: EXCEPTION
360: WHEN OTHERS THEN
361: wf_core.get_error(error_name, error_message, error_stack);
362: fnd_file.put_line (fnd_file.log,error_message);
363: fnd_file.new_line (fnd_file.log,1);
364: fnd_file.put_line (fnd_file.log,error_stack);
365: fnd_file.new_line (fnd_file.log,1);
366: wf_core.clear;
367: END;
360: WHEN OTHERS THEN
361: wf_core.get_error(error_name, error_message, error_stack);
362: fnd_file.put_line (fnd_file.log,error_message);
363: fnd_file.new_line (fnd_file.log,1);
364: fnd_file.put_line (fnd_file.log,error_stack);
365: fnd_file.new_line (fnd_file.log,1);
366: wf_core.clear;
367: END;
368: END LOOP;
361: wf_core.get_error(error_name, error_message, error_stack);
362: fnd_file.put_line (fnd_file.log,error_message);
363: fnd_file.new_line (fnd_file.log,1);
364: fnd_file.put_line (fnd_file.log,error_stack);
365: fnd_file.new_line (fnd_file.log,1);
366: wf_core.clear;
367: END;
368: END LOOP;
369:
366: wf_core.clear;
367: END;
368: END LOOP;
369:
370: fnd_file.put_line (fnd_file.log,log_message37);
371: --fnd_file.put_line (fnd_file.log,'Successfully updated dates for records in Workflow User Roles table,
372: --whose corresponding records in Resource Teams table have different dates');
373: fnd_file.new_line (fnd_file.log,1);
374:
367: END;
368: END LOOP;
369:
370: fnd_file.put_line (fnd_file.log,log_message37);
371: --fnd_file.put_line (fnd_file.log,'Successfully updated dates for records in Workflow User Roles table,
372: --whose corresponding records in Resource Teams table have different dates');
373: fnd_file.new_line (fnd_file.log,1);
374:
375: -- Create Workflow Roles for Active Resource Teams, if they don't exist
369:
370: fnd_file.put_line (fnd_file.log,log_message37);
371: --fnd_file.put_line (fnd_file.log,'Successfully updated dates for records in Workflow User Roles table,
372: --whose corresponding records in Resource Teams table have different dates');
373: fnd_file.new_line (fnd_file.log,1);
374:
375: -- Create Workflow Roles for Active Resource Teams, if they don't exist
376: FOR i IN c_team_wf_crt LOOP
377: BEGIN
393: EXCEPTION
394: WHEN OTHERS THEN
395: l_list.DELETE;
396: wf_core.get_error(error_name, error_message, error_stack);
397: fnd_file.put_line (fnd_file.log,error_message);
398: fnd_file.new_line (fnd_file.log,1);
399: fnd_file.put_line (fnd_file.log,error_stack);
400: fnd_file.new_line (fnd_file.log,1);
401: wf_core.clear;
394: WHEN OTHERS THEN
395: l_list.DELETE;
396: wf_core.get_error(error_name, error_message, error_stack);
397: fnd_file.put_line (fnd_file.log,error_message);
398: fnd_file.new_line (fnd_file.log,1);
399: fnd_file.put_line (fnd_file.log,error_stack);
400: fnd_file.new_line (fnd_file.log,1);
401: wf_core.clear;
402: END;
395: l_list.DELETE;
396: wf_core.get_error(error_name, error_message, error_stack);
397: fnd_file.put_line (fnd_file.log,error_message);
398: fnd_file.new_line (fnd_file.log,1);
399: fnd_file.put_line (fnd_file.log,error_stack);
400: fnd_file.new_line (fnd_file.log,1);
401: wf_core.clear;
402: END;
403:
396: wf_core.get_error(error_name, error_message, error_stack);
397: fnd_file.put_line (fnd_file.log,error_message);
398: fnd_file.new_line (fnd_file.log,1);
399: fnd_file.put_line (fnd_file.log,error_stack);
400: fnd_file.new_line (fnd_file.log,1);
401: wf_core.clear;
402: END;
403:
404: -- Create Self-Record in wf_local_user_roles for the above record
414:
415: EXCEPTION
416: WHEN OTHERS THEN
417: wf_core.get_error(error_name, error_message, error_stack);
418: fnd_file.put_line (fnd_file.log,error_message);
419: fnd_file.new_line (fnd_file.log,1);
420: fnd_file.put_line (fnd_file.log,error_stack);
421: fnd_file.new_line (fnd_file.log,1);
422: wf_core.clear;
415: EXCEPTION
416: WHEN OTHERS THEN
417: wf_core.get_error(error_name, error_message, error_stack);
418: fnd_file.put_line (fnd_file.log,error_message);
419: fnd_file.new_line (fnd_file.log,1);
420: fnd_file.put_line (fnd_file.log,error_stack);
421: fnd_file.new_line (fnd_file.log,1);
422: wf_core.clear;
423: END;
416: WHEN OTHERS THEN
417: wf_core.get_error(error_name, error_message, error_stack);
418: fnd_file.put_line (fnd_file.log,error_message);
419: fnd_file.new_line (fnd_file.log,1);
420: fnd_file.put_line (fnd_file.log,error_stack);
421: fnd_file.new_line (fnd_file.log,1);
422: wf_core.clear;
423: END;
424: END LOOP;
417: wf_core.get_error(error_name, error_message, error_stack);
418: fnd_file.put_line (fnd_file.log,error_message);
419: fnd_file.new_line (fnd_file.log,1);
420: fnd_file.put_line (fnd_file.log,error_stack);
421: fnd_file.new_line (fnd_file.log,1);
422: wf_core.clear;
423: END;
424: END LOOP;
425:
422: wf_core.clear;
423: END;
424: END LOOP;
425:
426: fnd_file.put_line (fnd_file.log,log_message14);
427: --fnd_file.put_line (fnd_file.log,'Successfully created records in Workflow Roles table, for all the records in
428: --Resource Teams table that dont exist as roles. Corresponding self records also created in Workflow User Roles');
429: fnd_file.new_line (fnd_file.log,1);
430:
423: END;
424: END LOOP;
425:
426: fnd_file.put_line (fnd_file.log,log_message14);
427: --fnd_file.put_line (fnd_file.log,'Successfully created records in Workflow Roles table, for all the records in
428: --Resource Teams table that dont exist as roles. Corresponding self records also created in Workflow User Roles');
429: fnd_file.new_line (fnd_file.log,1);
430:
431: EXCEPTION
425:
426: fnd_file.put_line (fnd_file.log,log_message14);
427: --fnd_file.put_line (fnd_file.log,'Successfully created records in Workflow Roles table, for all the records in
428: --Resource Teams table that dont exist as roles. Corresponding self records also created in Workflow User Roles');
429: fnd_file.new_line (fnd_file.log,1);
430:
431: EXCEPTION
432: WHEN OTHERS THEN
433: wf_core.get_error(error_name, error_message, error_stack);
430:
431: EXCEPTION
432: WHEN OTHERS THEN
433: wf_core.get_error(error_name, error_message, error_stack);
434: fnd_file.put_line (fnd_file.log,error_message);
435: fnd_file.new_line (fnd_file.log,1);
436: fnd_file.put_line (fnd_file.log,error_stack);
437: fnd_file.new_line (fnd_file.log,1);
438: wf_core.clear;
431: EXCEPTION
432: WHEN OTHERS THEN
433: wf_core.get_error(error_name, error_message, error_stack);
434: fnd_file.put_line (fnd_file.log,error_message);
435: fnd_file.new_line (fnd_file.log,1);
436: fnd_file.put_line (fnd_file.log,error_stack);
437: fnd_file.new_line (fnd_file.log,1);
438: wf_core.clear;
439:
432: WHEN OTHERS THEN
433: wf_core.get_error(error_name, error_message, error_stack);
434: fnd_file.put_line (fnd_file.log,error_message);
435: fnd_file.new_line (fnd_file.log,1);
436: fnd_file.put_line (fnd_file.log,error_stack);
437: fnd_file.new_line (fnd_file.log,1);
438: wf_core.clear;
439:
440: END synchronize_teams_wf;
433: wf_core.get_error(error_name, error_message, error_stack);
434: fnd_file.put_line (fnd_file.log,error_message);
435: fnd_file.new_line (fnd_file.log,1);
436: fnd_file.put_line (fnd_file.log,error_stack);
437: fnd_file.new_line (fnd_file.log,1);
438: wf_core.clear;
439:
440: END synchronize_teams_wf;
441:
554: log_message3 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG3');
555: log_message38:= fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG38');
556: log_message39:= fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG39');
557:
558: fnd_file.new_line (fnd_file.log,1);
559: fnd_file.put_line (fnd_file.log,log_msg_hdr1);
560: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Groups');
561: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------------');
562: fnd_file.new_line (fnd_file.log,1);
555: log_message38:= fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG38');
556: log_message39:= fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG39');
557:
558: fnd_file.new_line (fnd_file.log,1);
559: fnd_file.put_line (fnd_file.log,log_msg_hdr1);
560: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Groups');
561: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------------');
562: fnd_file.new_line (fnd_file.log,1);
563:
556: log_message39:= fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG39');
557:
558: fnd_file.new_line (fnd_file.log,1);
559: fnd_file.put_line (fnd_file.log,log_msg_hdr1);
560: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Groups');
561: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------------');
562: fnd_file.new_line (fnd_file.log,1);
563:
564: wf_core.clear;
557:
558: fnd_file.new_line (fnd_file.log,1);
559: fnd_file.put_line (fnd_file.log,log_msg_hdr1);
560: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Groups');
561: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------------');
562: fnd_file.new_line (fnd_file.log,1);
563:
564: wf_core.clear;
565:
558: fnd_file.new_line (fnd_file.log,1);
559: fnd_file.put_line (fnd_file.log,log_msg_hdr1);
560: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Groups');
561: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------------');
562: fnd_file.new_line (fnd_file.log,1);
563:
564: wf_core.clear;
565:
566: -- Inactivate Workflow User Roles (Self-Records) for corresponding Inactive Resource Groups
578:
579: EXCEPTION
580: WHEN OTHERS THEN
581: wf_core.get_error(error_name, error_message, error_stack);
582: fnd_file.put_line (fnd_file.log,error_message);
583: fnd_file.new_line (fnd_file.log,1);
584: fnd_file.put_line (fnd_file.log,error_stack);
585: fnd_file.new_line (fnd_file.log,1);
586: wf_core.clear;
579: EXCEPTION
580: WHEN OTHERS THEN
581: wf_core.get_error(error_name, error_message, error_stack);
582: fnd_file.put_line (fnd_file.log,error_message);
583: fnd_file.new_line (fnd_file.log,1);
584: fnd_file.put_line (fnd_file.log,error_stack);
585: fnd_file.new_line (fnd_file.log,1);
586: wf_core.clear;
587: END;
580: WHEN OTHERS THEN
581: wf_core.get_error(error_name, error_message, error_stack);
582: fnd_file.put_line (fnd_file.log,error_message);
583: fnd_file.new_line (fnd_file.log,1);
584: fnd_file.put_line (fnd_file.log,error_stack);
585: fnd_file.new_line (fnd_file.log,1);
586: wf_core.clear;
587: END;
588: END LOOP;
581: wf_core.get_error(error_name, error_message, error_stack);
582: fnd_file.put_line (fnd_file.log,error_message);
583: fnd_file.new_line (fnd_file.log,1);
584: fnd_file.put_line (fnd_file.log,error_stack);
585: fnd_file.new_line (fnd_file.log,1);
586: wf_core.clear;
587: END;
588: END LOOP;
589:
586: wf_core.clear;
587: END;
588: END LOOP;
589:
590: fnd_file.put_line (fnd_file.log,log_message38);
591: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow User Roles table, for both self and
592: --group member records, whose corresponding records in Resource Groups table that have been inactivated');
593: fnd_file.new_line (fnd_file.log,1);
594:
587: END;
588: END LOOP;
589:
590: fnd_file.put_line (fnd_file.log,log_message38);
591: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow User Roles table, for both self and
592: --group member records, whose corresponding records in Resource Groups table that have been inactivated');
593: fnd_file.new_line (fnd_file.log,1);
594:
595: -- Inactivate Workflow Roles for corresponding Inactive Resource Groups
589:
590: fnd_file.put_line (fnd_file.log,log_message38);
591: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow User Roles table, for both self and
592: --group member records, whose corresponding records in Resource Groups table that have been inactivated');
593: fnd_file.new_line (fnd_file.log,1);
594:
595: -- Inactivate Workflow Roles for corresponding Inactive Resource Groups
596: FOR i IN c_grp_wf_del LOOP
597: BEGIN
614: EXCEPTION
615: WHEN OTHERS THEN
616: l_list.DELETE;
617: wf_core.get_error(error_name, error_message, error_stack);
618: fnd_file.put_line (fnd_file.log,error_message);
619: fnd_file.new_line (fnd_file.log,1);
620: fnd_file.put_line (fnd_file.log,error_stack);
621: fnd_file.new_line (fnd_file.log,1);
622: wf_core.clear;
615: WHEN OTHERS THEN
616: l_list.DELETE;
617: wf_core.get_error(error_name, error_message, error_stack);
618: fnd_file.put_line (fnd_file.log,error_message);
619: fnd_file.new_line (fnd_file.log,1);
620: fnd_file.put_line (fnd_file.log,error_stack);
621: fnd_file.new_line (fnd_file.log,1);
622: wf_core.clear;
623: END;
616: l_list.DELETE;
617: wf_core.get_error(error_name, error_message, error_stack);
618: fnd_file.put_line (fnd_file.log,error_message);
619: fnd_file.new_line (fnd_file.log,1);
620: fnd_file.put_line (fnd_file.log,error_stack);
621: fnd_file.new_line (fnd_file.log,1);
622: wf_core.clear;
623: END;
624: END LOOP;
617: wf_core.get_error(error_name, error_message, error_stack);
618: fnd_file.put_line (fnd_file.log,error_message);
619: fnd_file.new_line (fnd_file.log,1);
620: fnd_file.put_line (fnd_file.log,error_stack);
621: fnd_file.new_line (fnd_file.log,1);
622: wf_core.clear;
623: END;
624: END LOOP;
625:
622: wf_core.clear;
623: END;
624: END LOOP;
625:
626: fnd_file.put_line (fnd_file.log,log_message1);
627: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow Roles table,
628: --for all the records in Resource Groups table that have been inactivated');
629: fnd_file.new_line (fnd_file.log,1);
630:
623: END;
624: END LOOP;
625:
626: fnd_file.put_line (fnd_file.log,log_message1);
627: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow Roles table,
628: --for all the records in Resource Groups table that have been inactivated');
629: fnd_file.new_line (fnd_file.log,1);
630:
631: -- Update Workflow Roles for corresponding Updated and Active Resource Groups
625:
626: fnd_file.put_line (fnd_file.log,log_message1);
627: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow Roles table,
628: --for all the records in Resource Groups table that have been inactivated');
629: fnd_file.new_line (fnd_file.log,1);
630:
631: -- Update Workflow Roles for corresponding Updated and Active Resource Groups
632: FOR i IN c_grp_wf_upd LOOP
633: BEGIN
653: EXCEPTION
654: WHEN OTHERS THEN
655: l_list.DELETE;
656: wf_core.get_error(error_name, error_message, error_stack);
657: fnd_file.put_line (fnd_file.log,error_message);
658: fnd_file.new_line (fnd_file.log,1);
659: fnd_file.put_line (fnd_file.log,error_stack);
660: fnd_file.new_line (fnd_file.log,1);
661: wf_core.clear;
654: WHEN OTHERS THEN
655: l_list.DELETE;
656: wf_core.get_error(error_name, error_message, error_stack);
657: fnd_file.put_line (fnd_file.log,error_message);
658: fnd_file.new_line (fnd_file.log,1);
659: fnd_file.put_line (fnd_file.log,error_stack);
660: fnd_file.new_line (fnd_file.log,1);
661: wf_core.clear;
662: END;
655: l_list.DELETE;
656: wf_core.get_error(error_name, error_message, error_stack);
657: fnd_file.put_line (fnd_file.log,error_message);
658: fnd_file.new_line (fnd_file.log,1);
659: fnd_file.put_line (fnd_file.log,error_stack);
660: fnd_file.new_line (fnd_file.log,1);
661: wf_core.clear;
662: END;
663:
656: wf_core.get_error(error_name, error_message, error_stack);
657: fnd_file.put_line (fnd_file.log,error_message);
658: fnd_file.new_line (fnd_file.log,1);
659: fnd_file.put_line (fnd_file.log,error_stack);
660: fnd_file.new_line (fnd_file.log,1);
661: wf_core.clear;
662: END;
663:
664: IF (i.wlr_start_date IS NULL OR
680:
681: EXCEPTION
682: WHEN OTHERS THEN
683: wf_core.get_error(error_name, error_message, error_stack);
684: fnd_file.put_line (fnd_file.log,error_message);
685: fnd_file.new_line (fnd_file.log,1);
686: fnd_file.put_line (fnd_file.log,error_stack);
687: fnd_file.new_line (fnd_file.log,1);
688: wf_core.clear;
681: EXCEPTION
682: WHEN OTHERS THEN
683: wf_core.get_error(error_name, error_message, error_stack);
684: fnd_file.put_line (fnd_file.log,error_message);
685: fnd_file.new_line (fnd_file.log,1);
686: fnd_file.put_line (fnd_file.log,error_stack);
687: fnd_file.new_line (fnd_file.log,1);
688: wf_core.clear;
689: END;
682: WHEN OTHERS THEN
683: wf_core.get_error(error_name, error_message, error_stack);
684: fnd_file.put_line (fnd_file.log,error_message);
685: fnd_file.new_line (fnd_file.log,1);
686: fnd_file.put_line (fnd_file.log,error_stack);
687: fnd_file.new_line (fnd_file.log,1);
688: wf_core.clear;
689: END;
690: END IF;
683: wf_core.get_error(error_name, error_message, error_stack);
684: fnd_file.put_line (fnd_file.log,error_message);
685: fnd_file.new_line (fnd_file.log,1);
686: fnd_file.put_line (fnd_file.log,error_stack);
687: fnd_file.new_line (fnd_file.log,1);
688: wf_core.clear;
689: END;
690: END IF;
691:
690: END IF;
691:
692: END LOOP;
693:
694: fnd_file.put_line (fnd_file.log,log_message2);
695: --fnd_file.put_line (fnd_file.log,'Successfully updated records in Workflow Roles and User Roles table,
696: --whose corresponding records in Resource Groups table have been updated');
697: fnd_file.new_line (fnd_file.log,1);
698:
691:
692: END LOOP;
693:
694: fnd_file.put_line (fnd_file.log,log_message2);
695: --fnd_file.put_line (fnd_file.log,'Successfully updated records in Workflow Roles and User Roles table,
696: --whose corresponding records in Resource Groups table have been updated');
697: fnd_file.new_line (fnd_file.log,1);
698:
699: -- Update Workflow User Roles (Self and Member Records) for correspoding Updated/Active Resource Groups
693:
694: fnd_file.put_line (fnd_file.log,log_message2);
695: --fnd_file.put_line (fnd_file.log,'Successfully updated records in Workflow Roles and User Roles table,
696: --whose corresponding records in Resource Groups table have been updated');
697: fnd_file.new_line (fnd_file.log,1);
698:
699: -- Update Workflow User Roles (Self and Member Records) for correspoding Updated/Active Resource Groups
700: FOR i IN c_grp_wf_ur_upd LOOP
701: BEGIN
711:
712: EXCEPTION
713: WHEN OTHERS THEN
714: wf_core.get_error(error_name, error_message, error_stack);
715: fnd_file.put_line (fnd_file.log,error_message);
716: fnd_file.new_line (fnd_file.log,1);
717: fnd_file.put_line (fnd_file.log,error_stack);
718: fnd_file.new_line (fnd_file.log,1);
719: wf_core.clear;
712: EXCEPTION
713: WHEN OTHERS THEN
714: wf_core.get_error(error_name, error_message, error_stack);
715: fnd_file.put_line (fnd_file.log,error_message);
716: fnd_file.new_line (fnd_file.log,1);
717: fnd_file.put_line (fnd_file.log,error_stack);
718: fnd_file.new_line (fnd_file.log,1);
719: wf_core.clear;
720: END;
713: WHEN OTHERS THEN
714: wf_core.get_error(error_name, error_message, error_stack);
715: fnd_file.put_line (fnd_file.log,error_message);
716: fnd_file.new_line (fnd_file.log,1);
717: fnd_file.put_line (fnd_file.log,error_stack);
718: fnd_file.new_line (fnd_file.log,1);
719: wf_core.clear;
720: END;
721: END LOOP;
714: wf_core.get_error(error_name, error_message, error_stack);
715: fnd_file.put_line (fnd_file.log,error_message);
716: fnd_file.new_line (fnd_file.log,1);
717: fnd_file.put_line (fnd_file.log,error_stack);
718: fnd_file.new_line (fnd_file.log,1);
719: wf_core.clear;
720: END;
721: END LOOP;
722:
719: wf_core.clear;
720: END;
721: END LOOP;
722:
723: fnd_file.put_line (fnd_file.log,log_message39);
724: --fnd_file.put_line (fnd_file.log,'Successfully updated dates for all self and member records in Workflow
725: --User Roles table, whose corresponding records in Resource Groups table have been updated');
726: fnd_file.new_line (fnd_file.log,1);
727:
720: END;
721: END LOOP;
722:
723: fnd_file.put_line (fnd_file.log,log_message39);
724: --fnd_file.put_line (fnd_file.log,'Successfully updated dates for all self and member records in Workflow
725: --User Roles table, whose corresponding records in Resource Groups table have been updated');
726: fnd_file.new_line (fnd_file.log,1);
727:
728: -- Create Workflow Roles for Active Resource Groups, if they don't exist
722:
723: fnd_file.put_line (fnd_file.log,log_message39);
724: --fnd_file.put_line (fnd_file.log,'Successfully updated dates for all self and member records in Workflow
725: --User Roles table, whose corresponding records in Resource Groups table have been updated');
726: fnd_file.new_line (fnd_file.log,1);
727:
728: -- Create Workflow Roles for Active Resource Groups, if they don't exist
729: FOR i IN c_grp_wf_crt LOOP
730: BEGIN
745: EXCEPTION
746: WHEN OTHERS THEN
747: l_list.DELETE;
748: wf_core.get_error(error_name, error_message, error_stack);
749: fnd_file.put_line (fnd_file.log,error_message);
750: fnd_file.new_line (fnd_file.log,1);
751: fnd_file.put_line (fnd_file.log,error_stack);
752: fnd_file.new_line (fnd_file.log,1);
753: wf_core.clear;
746: WHEN OTHERS THEN
747: l_list.DELETE;
748: wf_core.get_error(error_name, error_message, error_stack);
749: fnd_file.put_line (fnd_file.log,error_message);
750: fnd_file.new_line (fnd_file.log,1);
751: fnd_file.put_line (fnd_file.log,error_stack);
752: fnd_file.new_line (fnd_file.log,1);
753: wf_core.clear;
754: END;
747: l_list.DELETE;
748: wf_core.get_error(error_name, error_message, error_stack);
749: fnd_file.put_line (fnd_file.log,error_message);
750: fnd_file.new_line (fnd_file.log,1);
751: fnd_file.put_line (fnd_file.log,error_stack);
752: fnd_file.new_line (fnd_file.log,1);
753: wf_core.clear;
754: END;
755:
748: wf_core.get_error(error_name, error_message, error_stack);
749: fnd_file.put_line (fnd_file.log,error_message);
750: fnd_file.new_line (fnd_file.log,1);
751: fnd_file.put_line (fnd_file.log,error_stack);
752: fnd_file.new_line (fnd_file.log,1);
753: wf_core.clear;
754: END;
755:
756: -- Create Self-Record in wf_local_user_roles for the above record
765: p_expiration_date => i.end_date_active);
766: EXCEPTION
767: WHEN OTHERS THEN
768: wf_core.get_error(error_name, error_message, error_stack);
769: fnd_file.put_line (fnd_file.log,error_message);
770: fnd_file.new_line (fnd_file.log,1);
771: fnd_file.put_line (fnd_file.log,error_stack);
772: fnd_file.new_line (fnd_file.log,1);
773: wf_core.clear;
766: EXCEPTION
767: WHEN OTHERS THEN
768: wf_core.get_error(error_name, error_message, error_stack);
769: fnd_file.put_line (fnd_file.log,error_message);
770: fnd_file.new_line (fnd_file.log,1);
771: fnd_file.put_line (fnd_file.log,error_stack);
772: fnd_file.new_line (fnd_file.log,1);
773: wf_core.clear;
774: END;
767: WHEN OTHERS THEN
768: wf_core.get_error(error_name, error_message, error_stack);
769: fnd_file.put_line (fnd_file.log,error_message);
770: fnd_file.new_line (fnd_file.log,1);
771: fnd_file.put_line (fnd_file.log,error_stack);
772: fnd_file.new_line (fnd_file.log,1);
773: wf_core.clear;
774: END;
775: END LOOP;
768: wf_core.get_error(error_name, error_message, error_stack);
769: fnd_file.put_line (fnd_file.log,error_message);
770: fnd_file.new_line (fnd_file.log,1);
771: fnd_file.put_line (fnd_file.log,error_stack);
772: fnd_file.new_line (fnd_file.log,1);
773: wf_core.clear;
774: END;
775: END LOOP;
776:
773: wf_core.clear;
774: END;
775: END LOOP;
776:
777: fnd_file.put_line (fnd_file.log,log_message3);
778: --fnd_file.put_line (fnd_file.log,'Successfully created records in Workflow Roles table, for all the records in
779: --Resource Groups table that dont exist as roles. Corresponding records also created in Workflow User Roles');
780: fnd_file.new_line (fnd_file.log,1);
781:
774: END;
775: END LOOP;
776:
777: fnd_file.put_line (fnd_file.log,log_message3);
778: --fnd_file.put_line (fnd_file.log,'Successfully created records in Workflow Roles table, for all the records in
779: --Resource Groups table that dont exist as roles. Corresponding records also created in Workflow User Roles');
780: fnd_file.new_line (fnd_file.log,1);
781:
782: EXCEPTION
776:
777: fnd_file.put_line (fnd_file.log,log_message3);
778: --fnd_file.put_line (fnd_file.log,'Successfully created records in Workflow Roles table, for all the records in
779: --Resource Groups table that dont exist as roles. Corresponding records also created in Workflow User Roles');
780: fnd_file.new_line (fnd_file.log,1);
781:
782: EXCEPTION
783: WHEN OTHERS THEN
784: wf_core.get_error(error_name, error_message, error_stack);
781:
782: EXCEPTION
783: WHEN OTHERS THEN
784: wf_core.get_error(error_name, error_message, error_stack);
785: fnd_file.put_line (fnd_file.log,error_message);
786: fnd_file.new_line (fnd_file.log,1);
787: fnd_file.put_line (fnd_file.log,error_stack);
788: fnd_file.new_line (fnd_file.log,1);
789: wf_core.clear;
782: EXCEPTION
783: WHEN OTHERS THEN
784: wf_core.get_error(error_name, error_message, error_stack);
785: fnd_file.put_line (fnd_file.log,error_message);
786: fnd_file.new_line (fnd_file.log,1);
787: fnd_file.put_line (fnd_file.log,error_stack);
788: fnd_file.new_line (fnd_file.log,1);
789: wf_core.clear;
790:
783: WHEN OTHERS THEN
784: wf_core.get_error(error_name, error_message, error_stack);
785: fnd_file.put_line (fnd_file.log,error_message);
786: fnd_file.new_line (fnd_file.log,1);
787: fnd_file.put_line (fnd_file.log,error_stack);
788: fnd_file.new_line (fnd_file.log,1);
789: wf_core.clear;
790:
791: END synchronize_groups_wf;
784: wf_core.get_error(error_name, error_message, error_stack);
785: fnd_file.put_line (fnd_file.log,error_message);
786: fnd_file.new_line (fnd_file.log,1);
787: fnd_file.put_line (fnd_file.log,error_stack);
788: fnd_file.new_line (fnd_file.log,1);
789: wf_core.clear;
790:
791: END synchronize_groups_wf;
792:
844:
845: log_msg_hdr2 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_HDR2');
846: log_message40 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG40');
847:
848: fnd_file.put_line (fnd_file.log,log_msg_hdr2);
849: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resources');
850: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------');
851: fnd_file.new_line (fnd_file.log,1);
852:
845: log_msg_hdr2 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_HDR2');
846: log_message40 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG40');
847:
848: fnd_file.put_line (fnd_file.log,log_msg_hdr2);
849: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resources');
850: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------');
851: fnd_file.new_line (fnd_file.log,1);
852:
853: FOR i IN c_res_details LOOP
846: log_message40 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG40');
847:
848: fnd_file.put_line (fnd_file.log,log_msg_hdr2);
849: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resources');
850: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------');
851: fnd_file.new_line (fnd_file.log,1);
852:
853: FOR i IN c_res_details LOOP
854: l_ind_user_name := l_ind_orig_system ||':'|| TO_CHAR (i.resource_id);
847:
848: fnd_file.put_line (fnd_file.log,log_msg_hdr2);
849: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resources');
850: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------');
851: fnd_file.new_line (fnd_file.log,1);
852:
853: FOR i IN c_res_details LOOP
854: l_ind_user_name := l_ind_orig_system ||':'|| TO_CHAR (i.resource_id);
855: IF (i.category IN ('EMPLOYEE','PARTY','PARTNER','SUPPLIER_CONTACT')) THEN
867: p_overwrite => TRUE);
868: EXCEPTION
869: WHEN OTHERS THEN
870: wf_core.get_error(error_name, error_message, error_stack);
871: fnd_file.put_line (fnd_file.log,error_message);
872: fnd_file.new_line (fnd_file.log,1);
873: fnd_file.put_line (fnd_file.log,error_stack);
874: fnd_file.new_line (fnd_file.log,1);
875: wf_core.clear;
868: EXCEPTION
869: WHEN OTHERS THEN
870: wf_core.get_error(error_name, error_message, error_stack);
871: fnd_file.put_line (fnd_file.log,error_message);
872: fnd_file.new_line (fnd_file.log,1);
873: fnd_file.put_line (fnd_file.log,error_stack);
874: fnd_file.new_line (fnd_file.log,1);
875: wf_core.clear;
876: END;
869: WHEN OTHERS THEN
870: wf_core.get_error(error_name, error_message, error_stack);
871: fnd_file.put_line (fnd_file.log,error_message);
872: fnd_file.new_line (fnd_file.log,1);
873: fnd_file.put_line (fnd_file.log,error_stack);
874: fnd_file.new_line (fnd_file.log,1);
875: wf_core.clear;
876: END;
877: END LOOP;
870: wf_core.get_error(error_name, error_message, error_stack);
871: fnd_file.put_line (fnd_file.log,error_message);
872: fnd_file.new_line (fnd_file.log,1);
873: fnd_file.put_line (fnd_file.log,error_stack);
874: fnd_file.new_line (fnd_file.log,1);
875: wf_core.clear;
876: END;
877: END LOOP;
878: -- Get all wf roles still defined as JRES_IND and Active.
897: EXCEPTION
898: WHEN OTHERS THEN
899: l_list.DELETE;
900: wf_core.get_error(error_name, error_message, error_stack);
901: fnd_file.put_line (fnd_file.log,error_message);
902: fnd_file.new_line (fnd_file.log,1);
903: fnd_file.put_line (fnd_file.log,error_stack);
904: fnd_file.new_line (fnd_file.log,1);
905: wf_core.clear;
898: WHEN OTHERS THEN
899: l_list.DELETE;
900: wf_core.get_error(error_name, error_message, error_stack);
901: fnd_file.put_line (fnd_file.log,error_message);
902: fnd_file.new_line (fnd_file.log,1);
903: fnd_file.put_line (fnd_file.log,error_stack);
904: fnd_file.new_line (fnd_file.log,1);
905: wf_core.clear;
906: END;
899: l_list.DELETE;
900: wf_core.get_error(error_name, error_message, error_stack);
901: fnd_file.put_line (fnd_file.log,error_message);
902: fnd_file.new_line (fnd_file.log,1);
903: fnd_file.put_line (fnd_file.log,error_stack);
904: fnd_file.new_line (fnd_file.log,1);
905: wf_core.clear;
906: END;
907: END IF;
900: wf_core.get_error(error_name, error_message, error_stack);
901: fnd_file.put_line (fnd_file.log,error_message);
902: fnd_file.new_line (fnd_file.log,1);
903: fnd_file.put_line (fnd_file.log,error_stack);
904: fnd_file.new_line (fnd_file.log,1);
905: wf_core.clear;
906: END;
907: END IF;
908: END LOOP;
923:
924: EXCEPTION
925: WHEN OTHERS THEN
926: wf_core.get_error(error_name, error_message, error_stack);
927: fnd_file.put_line (fnd_file.log,error_message);
928: fnd_file.new_line (fnd_file.log,1);
929: fnd_file.put_line (fnd_file.log,error_stack);
930: fnd_file.new_line (fnd_file.log,1);
931: wf_core.clear;
924: EXCEPTION
925: WHEN OTHERS THEN
926: wf_core.get_error(error_name, error_message, error_stack);
927: fnd_file.put_line (fnd_file.log,error_message);
928: fnd_file.new_line (fnd_file.log,1);
929: fnd_file.put_line (fnd_file.log,error_stack);
930: fnd_file.new_line (fnd_file.log,1);
931: wf_core.clear;
932: END;
925: WHEN OTHERS THEN
926: wf_core.get_error(error_name, error_message, error_stack);
927: fnd_file.put_line (fnd_file.log,error_message);
928: fnd_file.new_line (fnd_file.log,1);
929: fnd_file.put_line (fnd_file.log,error_stack);
930: fnd_file.new_line (fnd_file.log,1);
931: wf_core.clear;
932: END;
933: END LOOP;
926: wf_core.get_error(error_name, error_message, error_stack);
927: fnd_file.put_line (fnd_file.log,error_message);
928: fnd_file.new_line (fnd_file.log,1);
929: fnd_file.put_line (fnd_file.log,error_stack);
930: fnd_file.new_line (fnd_file.log,1);
931: wf_core.clear;
932: END;
933: END LOOP;
934: -- Inactivate corresponding wf roles with resource dates
952: EXCEPTION
953: WHEN OTHERS THEN
954: l_list.DELETE;
955: wf_core.get_error(error_name, error_message, error_stack);
956: fnd_file.put_line (fnd_file.log,error_message);
957: fnd_file.new_line (fnd_file.log,1);
958: fnd_file.put_line (fnd_file.log,error_stack);
959: fnd_file.new_line (fnd_file.log,1);
960: wf_core.clear;
953: WHEN OTHERS THEN
954: l_list.DELETE;
955: wf_core.get_error(error_name, error_message, error_stack);
956: fnd_file.put_line (fnd_file.log,error_message);
957: fnd_file.new_line (fnd_file.log,1);
958: fnd_file.put_line (fnd_file.log,error_stack);
959: fnd_file.new_line (fnd_file.log,1);
960: wf_core.clear;
961: END;
954: l_list.DELETE;
955: wf_core.get_error(error_name, error_message, error_stack);
956: fnd_file.put_line (fnd_file.log,error_message);
957: fnd_file.new_line (fnd_file.log,1);
958: fnd_file.put_line (fnd_file.log,error_stack);
959: fnd_file.new_line (fnd_file.log,1);
960: wf_core.clear;
961: END;
962: END IF;
955: wf_core.get_error(error_name, error_message, error_stack);
956: fnd_file.put_line (fnd_file.log,error_message);
957: fnd_file.new_line (fnd_file.log,1);
958: fnd_file.put_line (fnd_file.log,error_stack);
959: fnd_file.new_line (fnd_file.log,1);
960: wf_core.clear;
961: END;
962: END IF;
963: END LOOP;
1003: p_overwrite => TRUE);
1004: EXCEPTION
1005: WHEN OTHERS THEN
1006: wf_core.get_error(error_name, error_message, error_stack);
1007: fnd_file.put_line (fnd_file.log,error_message);
1008: fnd_file.new_line (fnd_file.log,1);
1009: fnd_file.put_line (fnd_file.log,error_stack);
1010: fnd_file.new_line (fnd_file.log,1);
1011: wf_core.clear;
1004: EXCEPTION
1005: WHEN OTHERS THEN
1006: wf_core.get_error(error_name, error_message, error_stack);
1007: fnd_file.put_line (fnd_file.log,error_message);
1008: fnd_file.new_line (fnd_file.log,1);
1009: fnd_file.put_line (fnd_file.log,error_stack);
1010: fnd_file.new_line (fnd_file.log,1);
1011: wf_core.clear;
1012: END;
1005: WHEN OTHERS THEN
1006: wf_core.get_error(error_name, error_message, error_stack);
1007: fnd_file.put_line (fnd_file.log,error_message);
1008: fnd_file.new_line (fnd_file.log,1);
1009: fnd_file.put_line (fnd_file.log,error_stack);
1010: fnd_file.new_line (fnd_file.log,1);
1011: wf_core.clear;
1012: END;
1013: END IF;
1006: wf_core.get_error(error_name, error_message, error_stack);
1007: fnd_file.put_line (fnd_file.log,error_message);
1008: fnd_file.new_line (fnd_file.log,1);
1009: fnd_file.put_line (fnd_file.log,error_stack);
1010: fnd_file.new_line (fnd_file.log,1);
1011: wf_core.clear;
1012: END;
1013: END IF;
1014: END IF;
1052: CLOSE c_wf_role_details;
1053: END IF;
1054: l_list.DELETE;
1055: wf_core.get_error(error_name, error_message, error_stack);
1056: fnd_file.put_line (fnd_file.log,error_message);
1057: fnd_file.new_line (fnd_file.log,1);
1058: fnd_file.put_line (fnd_file.log,error_stack);
1059: fnd_file.new_line (fnd_file.log,1);
1060: wf_core.clear;
1053: END IF;
1054: l_list.DELETE;
1055: wf_core.get_error(error_name, error_message, error_stack);
1056: fnd_file.put_line (fnd_file.log,error_message);
1057: fnd_file.new_line (fnd_file.log,1);
1058: fnd_file.put_line (fnd_file.log,error_stack);
1059: fnd_file.new_line (fnd_file.log,1);
1060: wf_core.clear;
1061: END;
1054: l_list.DELETE;
1055: wf_core.get_error(error_name, error_message, error_stack);
1056: fnd_file.put_line (fnd_file.log,error_message);
1057: fnd_file.new_line (fnd_file.log,1);
1058: fnd_file.put_line (fnd_file.log,error_stack);
1059: fnd_file.new_line (fnd_file.log,1);
1060: wf_core.clear;
1061: END;
1062: END IF;
1055: wf_core.get_error(error_name, error_message, error_stack);
1056: fnd_file.put_line (fnd_file.log,error_message);
1057: fnd_file.new_line (fnd_file.log,1);
1058: fnd_file.put_line (fnd_file.log,error_stack);
1059: fnd_file.new_line (fnd_file.log,1);
1060: wf_core.clear;
1061: END;
1062: END IF;
1063: END IF;
1080: EXCEPTION
1081: WHEN OTHERS THEN
1082: l_list.DELETE;
1083: wf_core.get_error(error_name, error_message, error_stack);
1084: fnd_file.put_line (fnd_file.log,error_message);
1085: fnd_file.new_line (fnd_file.log,1);
1086: fnd_file.put_line (fnd_file.log,error_stack);
1087: fnd_file.new_line (fnd_file.log,1);
1088: wf_core.clear;
1081: WHEN OTHERS THEN
1082: l_list.DELETE;
1083: wf_core.get_error(error_name, error_message, error_stack);
1084: fnd_file.put_line (fnd_file.log,error_message);
1085: fnd_file.new_line (fnd_file.log,1);
1086: fnd_file.put_line (fnd_file.log,error_stack);
1087: fnd_file.new_line (fnd_file.log,1);
1088: wf_core.clear;
1089: END;
1082: l_list.DELETE;
1083: wf_core.get_error(error_name, error_message, error_stack);
1084: fnd_file.put_line (fnd_file.log,error_message);
1085: fnd_file.new_line (fnd_file.log,1);
1086: fnd_file.put_line (fnd_file.log,error_stack);
1087: fnd_file.new_line (fnd_file.log,1);
1088: wf_core.clear;
1089: END;
1090: -- Create Self-Record in wf_local_user_roles for the above record
1083: wf_core.get_error(error_name, error_message, error_stack);
1084: fnd_file.put_line (fnd_file.log,error_message);
1085: fnd_file.new_line (fnd_file.log,1);
1086: fnd_file.put_line (fnd_file.log,error_stack);
1087: fnd_file.new_line (fnd_file.log,1);
1088: wf_core.clear;
1089: END;
1090: -- Create Self-Record in wf_local_user_roles for the above record
1091: BEGIN
1099: p_expiration_date => i.end_date_active);
1100: EXCEPTION
1101: WHEN OTHERS THEN
1102: wf_core.get_error(error_name, error_message, error_stack);
1103: fnd_file.put_line (fnd_file.log,error_message);
1104: fnd_file.new_line (fnd_file.log,1);
1105: fnd_file.put_line (fnd_file.log,error_stack);
1106: fnd_file.new_line (fnd_file.log,1);
1107: wf_core.clear;
1100: EXCEPTION
1101: WHEN OTHERS THEN
1102: wf_core.get_error(error_name, error_message, error_stack);
1103: fnd_file.put_line (fnd_file.log,error_message);
1104: fnd_file.new_line (fnd_file.log,1);
1105: fnd_file.put_line (fnd_file.log,error_stack);
1106: fnd_file.new_line (fnd_file.log,1);
1107: wf_core.clear;
1108: END;
1101: WHEN OTHERS THEN
1102: wf_core.get_error(error_name, error_message, error_stack);
1103: fnd_file.put_line (fnd_file.log,error_message);
1104: fnd_file.new_line (fnd_file.log,1);
1105: fnd_file.put_line (fnd_file.log,error_stack);
1106: fnd_file.new_line (fnd_file.log,1);
1107: wf_core.clear;
1108: END;
1109: END IF;
1102: wf_core.get_error(error_name, error_message, error_stack);
1103: fnd_file.put_line (fnd_file.log,error_message);
1104: fnd_file.new_line (fnd_file.log,1);
1105: fnd_file.put_line (fnd_file.log,error_stack);
1106: fnd_file.new_line (fnd_file.log,1);
1107: wf_core.clear;
1108: END;
1109: END IF;
1110: END IF;
1111: CLOSE c_wf_role_details;
1112: END IF;
1113: END LOOP;
1114:
1115: fnd_file.put_line (fnd_file.log,log_message40);
1116: --fnd_file.put_line (fnd_file.log,'Successfully synchronized Workflow Roles and User Role tables, for all its
1117: --corresponding records in Resources Table. This includes inactivation, updating and creation');
1118: fnd_file.new_line (fnd_file.log,1);
1119:
1112: END IF;
1113: END LOOP;
1114:
1115: fnd_file.put_line (fnd_file.log,log_message40);
1116: --fnd_file.put_line (fnd_file.log,'Successfully synchronized Workflow Roles and User Role tables, for all its
1117: --corresponding records in Resources Table. This includes inactivation, updating and creation');
1118: fnd_file.new_line (fnd_file.log,1);
1119:
1120: END synchronize_resources_wf;
1114:
1115: fnd_file.put_line (fnd_file.log,log_message40);
1116: --fnd_file.put_line (fnd_file.log,'Successfully synchronized Workflow Roles and User Role tables, for all its
1117: --corresponding records in Resources Table. This includes inactivation, updating and creation');
1118: fnd_file.new_line (fnd_file.log,1);
1119:
1120: END synchronize_resources_wf;
1121:
1122:
1234:
1235: log_message30 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG30');
1236: log_message31 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG31');
1237:
1238: fnd_file.put_line (fnd_file.log,log_msg_hdr3);
1239: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Group Members');
1240: fnd_file.put_line (fnd_file.log,'----------------------------------------------------------------');
1241: fnd_file.new_line (fnd_file.log,1);
1242:
1235: log_message30 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG30');
1236: log_message31 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG31');
1237:
1238: fnd_file.put_line (fnd_file.log,log_msg_hdr3);
1239: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Group Members');
1240: fnd_file.put_line (fnd_file.log,'----------------------------------------------------------------');
1241: fnd_file.new_line (fnd_file.log,1);
1242:
1243: --Inactivate all wf user roles which are still active and whose corresponding records
1236: log_message31 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG31');
1237:
1238: fnd_file.put_line (fnd_file.log,log_msg_hdr3);
1239: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Group Members');
1240: fnd_file.put_line (fnd_file.log,'----------------------------------------------------------------');
1241: fnd_file.new_line (fnd_file.log,1);
1242:
1243: --Inactivate all wf user roles which are still active and whose corresponding records
1244: -- in resource group members table have been deleted (delete_flag Y).
1237:
1238: fnd_file.put_line (fnd_file.log,log_msg_hdr3);
1239: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Group Members');
1240: fnd_file.put_line (fnd_file.log,'----------------------------------------------------------------');
1241: fnd_file.new_line (fnd_file.log,1);
1242:
1243: --Inactivate all wf user roles which are still active and whose corresponding records
1244: -- in resource group members table have been deleted (delete_flag Y).
1245: -- Bug10044172 Get User Name from jtf_rs_wf_integration_pub.get_wf_role for group_member.resource_id
1283: p_overwrite => TRUE);
1284: EXCEPTION
1285: WHEN OTHERS THEN
1286: wf_core.get_error(error_name, error_message, error_stack);
1287: fnd_file.put_line (fnd_file.log,error_message);
1288: fnd_file.new_line (fnd_file.log,1);
1289: fnd_file.put_line (fnd_file.log,error_stack);
1290: fnd_file.new_line (fnd_file.log,1);
1291: wf_core.clear;
1284: EXCEPTION
1285: WHEN OTHERS THEN
1286: wf_core.get_error(error_name, error_message, error_stack);
1287: fnd_file.put_line (fnd_file.log,error_message);
1288: fnd_file.new_line (fnd_file.log,1);
1289: fnd_file.put_line (fnd_file.log,error_stack);
1290: fnd_file.new_line (fnd_file.log,1);
1291: wf_core.clear;
1292: END;
1285: WHEN OTHERS THEN
1286: wf_core.get_error(error_name, error_message, error_stack);
1287: fnd_file.put_line (fnd_file.log,error_message);
1288: fnd_file.new_line (fnd_file.log,1);
1289: fnd_file.put_line (fnd_file.log,error_stack);
1290: fnd_file.new_line (fnd_file.log,1);
1291: wf_core.clear;
1292: END;
1293: END IF;
1286: wf_core.get_error(error_name, error_message, error_stack);
1287: fnd_file.put_line (fnd_file.log,error_message);
1288: fnd_file.new_line (fnd_file.log,1);
1289: fnd_file.put_line (fnd_file.log,error_stack);
1290: fnd_file.new_line (fnd_file.log,1);
1291: wf_core.clear;
1292: END;
1293: END IF;
1294: END;
1293: END IF;
1294: END;
1295: END LOOP;
1296:
1297: fnd_file.put_line (fnd_file.log,log_message8);
1298: --fnd_file.put_line (fnd_file.log,'Successfully inactivated all records in Workflow User Roles table,
1299: --whose corresponding records in Resource Group Members table have been deleted.
1300: fnd_file.new_line (fnd_file.log,1);
1301:
1294: END;
1295: END LOOP;
1296:
1297: fnd_file.put_line (fnd_file.log,log_message8);
1298: --fnd_file.put_line (fnd_file.log,'Successfully inactivated all records in Workflow User Roles table,
1299: --whose corresponding records in Resource Group Members table have been deleted.
1300: fnd_file.new_line (fnd_file.log,1);
1301:
1302:
1296:
1297: fnd_file.put_line (fnd_file.log,log_message8);
1298: --fnd_file.put_line (fnd_file.log,'Successfully inactivated all records in Workflow User Roles table,
1299: --whose corresponding records in Resource Group Members table have been deleted.
1300: fnd_file.new_line (fnd_file.log,1);
1301:
1302:
1303: -- Create Workflow User Role for Active Resource Group Members
1304: -- whose Resource Category is OTHER or TBH
1319: p_expiration_date => l_end_date_active);
1320: EXCEPTION
1321: WHEN OTHERS THEN
1322: wf_core.get_error(error_name, error_message, error_stack);
1323: fnd_file.put_line (fnd_file.log,error_message);
1324: fnd_file.new_line (fnd_file.log,1);
1325: fnd_file.put_line (fnd_file.log,error_stack);
1326: fnd_file.new_line (fnd_file.log,1);
1327: wf_core.clear;
1320: EXCEPTION
1321: WHEN OTHERS THEN
1322: wf_core.get_error(error_name, error_message, error_stack);
1323: fnd_file.put_line (fnd_file.log,error_message);
1324: fnd_file.new_line (fnd_file.log,1);
1325: fnd_file.put_line (fnd_file.log,error_stack);
1326: fnd_file.new_line (fnd_file.log,1);
1327: wf_core.clear;
1328: END;
1321: WHEN OTHERS THEN
1322: wf_core.get_error(error_name, error_message, error_stack);
1323: fnd_file.put_line (fnd_file.log,error_message);
1324: fnd_file.new_line (fnd_file.log,1);
1325: fnd_file.put_line (fnd_file.log,error_stack);
1326: fnd_file.new_line (fnd_file.log,1);
1327: wf_core.clear;
1328: END;
1329: END LOOP;
1322: wf_core.get_error(error_name, error_message, error_stack);
1323: fnd_file.put_line (fnd_file.log,error_message);
1324: fnd_file.new_line (fnd_file.log,1);
1325: fnd_file.put_line (fnd_file.log,error_stack);
1326: fnd_file.new_line (fnd_file.log,1);
1327: wf_core.clear;
1328: END;
1329: END LOOP;
1330:
1327: wf_core.clear;
1328: END;
1329: END LOOP;
1330:
1331: fnd_file.put_line (fnd_file.log,log_message30);
1332: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1333: --Groups Members Table. This is for Resources whose category is Other or To be hired.');
1334: fnd_file.new_line (fnd_file.log,1);
1335:
1328: END;
1329: END LOOP;
1330:
1331: fnd_file.put_line (fnd_file.log,log_message30);
1332: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1333: --Groups Members Table. This is for Resources whose category is Other or To be hired.');
1334: fnd_file.new_line (fnd_file.log,1);
1335:
1336:
1330:
1331: fnd_file.put_line (fnd_file.log,log_message30);
1332: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1333: --Groups Members Table. This is for Resources whose category is Other or To be hired.');
1334: fnd_file.new_line (fnd_file.log,1);
1335:
1336:
1337: -- Create Workflow User Role for Active Resource Group Members
1338: -- whose Resource Cateogry is EMPLOYEE, PARTY, PARTNER or SUPPLIER_CONTACT
1348: ,x_orig_system => l_user_orig_system
1349: ,x_orig_system_id => l_user_orig_system_id
1350: );
1351: IF (l_user_orig_system IS NULL OR l_user_orig_system_id IS NULL) THEN
1352: fnd_file.put_line (fnd_file.log,'Not creating Workflow User Roles for corresponding Resource Group Members whose Member
1353: Resource is Resource ID - '||i.resource_id||', Resource Name - '||i.resource_name||' and Resource
1354: Category - '||i.category||', because there was no corresponding User defined in wf_local_roles table');
1355: ELSE
1356: BEGIN
1364: p_expiration_date => l_end_date_active);
1365: EXCEPTION
1366: WHEN OTHERS THEN
1367: wf_core.get_error(error_name, error_message, error_stack);
1368: fnd_file.put_line (fnd_file.log,error_message);
1369: fnd_file.new_line (fnd_file.log,1);
1370: fnd_file.put_line (fnd_file.log,error_stack);
1371: fnd_file.new_line (fnd_file.log,1);
1372: wf_core.clear;
1365: EXCEPTION
1366: WHEN OTHERS THEN
1367: wf_core.get_error(error_name, error_message, error_stack);
1368: fnd_file.put_line (fnd_file.log,error_message);
1369: fnd_file.new_line (fnd_file.log,1);
1370: fnd_file.put_line (fnd_file.log,error_stack);
1371: fnd_file.new_line (fnd_file.log,1);
1372: wf_core.clear;
1373: END;
1366: WHEN OTHERS THEN
1367: wf_core.get_error(error_name, error_message, error_stack);
1368: fnd_file.put_line (fnd_file.log,error_message);
1369: fnd_file.new_line (fnd_file.log,1);
1370: fnd_file.put_line (fnd_file.log,error_stack);
1371: fnd_file.new_line (fnd_file.log,1);
1372: wf_core.clear;
1373: END;
1374: END IF;
1367: wf_core.get_error(error_name, error_message, error_stack);
1368: fnd_file.put_line (fnd_file.log,error_message);
1369: fnd_file.new_line (fnd_file.log,1);
1370: fnd_file.put_line (fnd_file.log,error_stack);
1371: fnd_file.new_line (fnd_file.log,1);
1372: wf_core.clear;
1373: END;
1374: END IF;
1375: END LOOP;
1373: END;
1374: END IF;
1375: END LOOP;
1376:
1377: fnd_file.put_line (fnd_file.log,log_message31);
1378: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1379: --Resource Group Members tables. This is for Resources who category is Employee, Party, Partner or Supplier Contact.');
1380: fnd_file.new_line (fnd_file.log,1);
1381: -- Debug info.
1374: END IF;
1375: END LOOP;
1376:
1377: fnd_file.put_line (fnd_file.log,log_message31);
1378: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1379: --Resource Group Members tables. This is for Resources who category is Employee, Party, Partner or Supplier Contact.');
1380: fnd_file.new_line (fnd_file.log,1);
1381: -- Debug info.
1382: IF fnd_log.level_statement>=fnd_log.g_current_runtime_level THEN
1376:
1377: fnd_file.put_line (fnd_file.log,log_message31);
1378: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1379: --Resource Group Members tables. This is for Resources who category is Employee, Party, Partner or Supplier Contact.');
1380: fnd_file.new_line (fnd_file.log,1);
1381: -- Debug info.
1382: IF fnd_log.level_statement>=fnd_log.g_current_runtime_level THEN
1383: debug(p_message=>'synchronize_group_members_wf (-)',
1384: p_prefix =>l_debug_prefix,
1387:
1388: EXCEPTION
1389: WHEN OTHERS THEN
1390: wf_core.get_error(error_name, error_message, error_stack);
1391: fnd_file.put_line (fnd_file.log,error_message);
1392: fnd_file.new_line (fnd_file.log,1);
1393: fnd_file.put_line (fnd_file.log,error_stack);
1394: fnd_file.new_line (fnd_file.log,1);
1395: wf_core.clear;
1388: EXCEPTION
1389: WHEN OTHERS THEN
1390: wf_core.get_error(error_name, error_message, error_stack);
1391: fnd_file.put_line (fnd_file.log,error_message);
1392: fnd_file.new_line (fnd_file.log,1);
1393: fnd_file.put_line (fnd_file.log,error_stack);
1394: fnd_file.new_line (fnd_file.log,1);
1395: wf_core.clear;
1396:
1389: WHEN OTHERS THEN
1390: wf_core.get_error(error_name, error_message, error_stack);
1391: fnd_file.put_line (fnd_file.log,error_message);
1392: fnd_file.new_line (fnd_file.log,1);
1393: fnd_file.put_line (fnd_file.log,error_stack);
1394: fnd_file.new_line (fnd_file.log,1);
1395: wf_core.clear;
1396:
1397: END synchronize_group_members_wf;
1390: wf_core.get_error(error_name, error_message, error_stack);
1391: fnd_file.put_line (fnd_file.log,error_message);
1392: fnd_file.new_line (fnd_file.log,1);
1393: fnd_file.put_line (fnd_file.log,error_stack);
1394: fnd_file.new_line (fnd_file.log,1);
1395: wf_core.clear;
1396:
1397: END synchronize_group_members_wf;
1398:
1533: log_message33 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG33');
1534: log_message34 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG34');
1535: log_message35 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG35');
1536:
1537: fnd_file.put_line (fnd_file.log,log_msg_hdr5);
1538: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Team Members');
1539: fnd_file.put_line (fnd_file.log,'---------------------------------------------------------------');
1540: fnd_file.new_line (fnd_file.log,1);
1541:
1534: log_message34 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG34');
1535: log_message35 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG35');
1536:
1537: fnd_file.put_line (fnd_file.log,log_msg_hdr5);
1538: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Team Members');
1539: fnd_file.put_line (fnd_file.log,'---------------------------------------------------------------');
1540: fnd_file.new_line (fnd_file.log,1);
1541:
1542: --Inactivate all wf user roles which are still active and whose corresponding records
1535: log_message35 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG35');
1536:
1537: fnd_file.put_line (fnd_file.log,log_msg_hdr5);
1538: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Team Members');
1539: fnd_file.put_line (fnd_file.log,'---------------------------------------------------------------');
1540: fnd_file.new_line (fnd_file.log,1);
1541:
1542: --Inactivate all wf user roles which are still active and whose corresponding records
1543: -- in resource team members table have been deleted (delete_flag Y).
1536:
1537: fnd_file.put_line (fnd_file.log,log_msg_hdr5);
1538: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Team Members');
1539: fnd_file.put_line (fnd_file.log,'---------------------------------------------------------------');
1540: fnd_file.new_line (fnd_file.log,1);
1541:
1542: --Inactivate all wf user roles which are still active and whose corresponding records
1543: -- in resource team members table have been deleted (delete_flag Y).
1544: FOR i IN c_wlur_team_mem_del LOOP
1554: p_overwrite => TRUE);
1555: EXCEPTION
1556: WHEN OTHERS THEN
1557: wf_core.get_error(error_name, error_message, error_stack);
1558: fnd_file.put_line (fnd_file.log,error_message);
1559: fnd_file.new_line (fnd_file.log,1);
1560: fnd_file.put_line (fnd_file.log,error_stack);
1561: fnd_file.new_line (fnd_file.log,1);
1562: wf_core.clear;
1555: EXCEPTION
1556: WHEN OTHERS THEN
1557: wf_core.get_error(error_name, error_message, error_stack);
1558: fnd_file.put_line (fnd_file.log,error_message);
1559: fnd_file.new_line (fnd_file.log,1);
1560: fnd_file.put_line (fnd_file.log,error_stack);
1561: fnd_file.new_line (fnd_file.log,1);
1562: wf_core.clear;
1563: END;
1556: WHEN OTHERS THEN
1557: wf_core.get_error(error_name, error_message, error_stack);
1558: fnd_file.put_line (fnd_file.log,error_message);
1559: fnd_file.new_line (fnd_file.log,1);
1560: fnd_file.put_line (fnd_file.log,error_stack);
1561: fnd_file.new_line (fnd_file.log,1);
1562: wf_core.clear;
1563: END;
1564: END LOOP;
1557: wf_core.get_error(error_name, error_message, error_stack);
1558: fnd_file.put_line (fnd_file.log,error_message);
1559: fnd_file.new_line (fnd_file.log,1);
1560: fnd_file.put_line (fnd_file.log,error_stack);
1561: fnd_file.new_line (fnd_file.log,1);
1562: wf_core.clear;
1563: END;
1564: END LOOP;
1565:
1562: wf_core.clear;
1563: END;
1564: END LOOP;
1565:
1566: fnd_file.put_line (fnd_file.log,log_message32);
1567: --fnd_file.put_line (fnd_file.log,'Successfully inactivated all records in Workflow User Roles table, whose
1568: --corresponding records in Resource Team Members table have been deleted.');
1569: fnd_file.new_line (fnd_file.log,1);
1570:
1563: END;
1564: END LOOP;
1565:
1566: fnd_file.put_line (fnd_file.log,log_message32);
1567: --fnd_file.put_line (fnd_file.log,'Successfully inactivated all records in Workflow User Roles table, whose
1568: --corresponding records in Resource Team Members table have been deleted.');
1569: fnd_file.new_line (fnd_file.log,1);
1570:
1571:
1565:
1566: fnd_file.put_line (fnd_file.log,log_message32);
1567: --fnd_file.put_line (fnd_file.log,'Successfully inactivated all records in Workflow User Roles table, whose
1568: --corresponding records in Resource Team Members table have been deleted.');
1569: fnd_file.new_line (fnd_file.log,1);
1570:
1571:
1572: -- Create Workflow User Role for Active Resource Team Members whose
1573: -- resource_type is INDIVIDUAL and resource category is OTHER or TBH
1588: p_expiration_date => l_end_date_active);
1589: EXCEPTION
1590: WHEN OTHERS THEN
1591: wf_core.get_error(error_name, error_message, error_stack);
1592: fnd_file.put_line (fnd_file.log,error_message);
1593: fnd_file.new_line (fnd_file.log,1);
1594: fnd_file.put_line (fnd_file.log,error_stack);
1595: fnd_file.new_line (fnd_file.log,1);
1596: wf_core.clear;
1589: EXCEPTION
1590: WHEN OTHERS THEN
1591: wf_core.get_error(error_name, error_message, error_stack);
1592: fnd_file.put_line (fnd_file.log,error_message);
1593: fnd_file.new_line (fnd_file.log,1);
1594: fnd_file.put_line (fnd_file.log,error_stack);
1595: fnd_file.new_line (fnd_file.log,1);
1596: wf_core.clear;
1597: END;
1590: WHEN OTHERS THEN
1591: wf_core.get_error(error_name, error_message, error_stack);
1592: fnd_file.put_line (fnd_file.log,error_message);
1593: fnd_file.new_line (fnd_file.log,1);
1594: fnd_file.put_line (fnd_file.log,error_stack);
1595: fnd_file.new_line (fnd_file.log,1);
1596: wf_core.clear;
1597: END;
1598: END LOOP;
1591: wf_core.get_error(error_name, error_message, error_stack);
1592: fnd_file.put_line (fnd_file.log,error_message);
1593: fnd_file.new_line (fnd_file.log,1);
1594: fnd_file.put_line (fnd_file.log,error_stack);
1595: fnd_file.new_line (fnd_file.log,1);
1596: wf_core.clear;
1597: END;
1598: END LOOP;
1599:
1596: wf_core.clear;
1597: END;
1598: END LOOP;
1599:
1600: fnd_file.put_line (fnd_file.log,log_message33);
1601: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1602: --Resource Team Members table of Resource Type Individual. This is for Resources who category is Other or To be hired.');
1603: fnd_file.new_line (fnd_file.log,1);
1604:
1597: END;
1598: END LOOP;
1599:
1600: fnd_file.put_line (fnd_file.log,log_message33);
1601: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1602: --Resource Team Members table of Resource Type Individual. This is for Resources who category is Other or To be hired.');
1603: fnd_file.new_line (fnd_file.log,1);
1604:
1605: -- Create Workflow User Role for Active Resource Team Members whose resource_type is
1599:
1600: fnd_file.put_line (fnd_file.log,log_message33);
1601: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1602: --Resource Team Members table of Resource Type Individual. This is for Resources who category is Other or To be hired.');
1603: fnd_file.new_line (fnd_file.log,1);
1604:
1605: -- Create Workflow User Role for Active Resource Team Members whose resource_type is
1606: -- INDIVIDUAL and resource category is EMPLOYEE, PARTY, PARTNER or SUPPLIER_CONTACT
1607: FOR i IN c_team_mem_wf_epps_crt LOOP
1617: ,x_orig_system => l_user_orig_system
1618: ,x_orig_system_id => l_user_orig_system_id
1619: );
1620: IF (l_user_orig_system IS NULL OR l_user_orig_system_id IS NULL) THEN
1621: fnd_file.put_line (fnd_file.log,'Not creating Workflow User Roles for corresponding Resource Team Members whose Member
1622: Resource is Resource ID - '||i.resource_id||', Resource Name - '||i.resource_name||' and Resource
1623: Category - '||i.category||', because there was no corresponding User defined wf_local_roles table');
1624: ELSE
1625: BEGIN
1633: p_expiration_date => l_end_date_active);
1634: EXCEPTION
1635: WHEN OTHERS THEN
1636: wf_core.get_error(error_name, error_message, error_stack);
1637: fnd_file.put_line (fnd_file.log,error_message);
1638: fnd_file.new_line (fnd_file.log,1);
1639: fnd_file.put_line (fnd_file.log,error_stack);
1640: fnd_file.new_line (fnd_file.log,1);
1641: wf_core.clear;
1634: EXCEPTION
1635: WHEN OTHERS THEN
1636: wf_core.get_error(error_name, error_message, error_stack);
1637: fnd_file.put_line (fnd_file.log,error_message);
1638: fnd_file.new_line (fnd_file.log,1);
1639: fnd_file.put_line (fnd_file.log,error_stack);
1640: fnd_file.new_line (fnd_file.log,1);
1641: wf_core.clear;
1642: END;
1635: WHEN OTHERS THEN
1636: wf_core.get_error(error_name, error_message, error_stack);
1637: fnd_file.put_line (fnd_file.log,error_message);
1638: fnd_file.new_line (fnd_file.log,1);
1639: fnd_file.put_line (fnd_file.log,error_stack);
1640: fnd_file.new_line (fnd_file.log,1);
1641: wf_core.clear;
1642: END;
1643: END IF;
1636: wf_core.get_error(error_name, error_message, error_stack);
1637: fnd_file.put_line (fnd_file.log,error_message);
1638: fnd_file.new_line (fnd_file.log,1);
1639: fnd_file.put_line (fnd_file.log,error_stack);
1640: fnd_file.new_line (fnd_file.log,1);
1641: wf_core.clear;
1642: END;
1643: END IF;
1644: END LOOP;
1642: END;
1643: END IF;
1644: END LOOP;
1645:
1646: fnd_file.put_line (fnd_file.log,log_message34);
1647: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1648: --Resource Team Members tables of Resource Type Individual. This is for Resources who category is Employee, Party,
1649: --Partner or Supplier Contact.');
1650: fnd_file.new_line (fnd_file.log,1);
1643: END IF;
1644: END LOOP;
1645:
1646: fnd_file.put_line (fnd_file.log,log_message34);
1647: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1648: --Resource Team Members tables of Resource Type Individual. This is for Resources who category is Employee, Party,
1649: --Partner or Supplier Contact.');
1650: fnd_file.new_line (fnd_file.log,1);
1651:
1646: fnd_file.put_line (fnd_file.log,log_message34);
1647: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1648: --Resource Team Members tables of Resource Type Individual. This is for Resources who category is Employee, Party,
1649: --Partner or Supplier Contact.');
1650: fnd_file.new_line (fnd_file.log,1);
1651:
1652: -- Create Workflow User Role for Active Resource Team Members ('GROUP' Members)
1653: FOR i IN c_team_mem_grp_wf_crt LOOP
1654: IF i.m_end_date_active = l_fnd_date THEN
1667: p_expiration_date => l_end_date_active);
1668: EXCEPTION
1669: WHEN OTHERS THEN
1670: wf_core.get_error(error_name, error_message, error_stack);
1671: fnd_file.put_line (fnd_file.log,error_message);
1672: fnd_file.new_line (fnd_file.log,1);
1673: fnd_file.put_line (fnd_file.log,error_stack);
1674: fnd_file.new_line (fnd_file.log,1);
1675: wf_core.clear;
1668: EXCEPTION
1669: WHEN OTHERS THEN
1670: wf_core.get_error(error_name, error_message, error_stack);
1671: fnd_file.put_line (fnd_file.log,error_message);
1672: fnd_file.new_line (fnd_file.log,1);
1673: fnd_file.put_line (fnd_file.log,error_stack);
1674: fnd_file.new_line (fnd_file.log,1);
1675: wf_core.clear;
1676: END;
1669: WHEN OTHERS THEN
1670: wf_core.get_error(error_name, error_message, error_stack);
1671: fnd_file.put_line (fnd_file.log,error_message);
1672: fnd_file.new_line (fnd_file.log,1);
1673: fnd_file.put_line (fnd_file.log,error_stack);
1674: fnd_file.new_line (fnd_file.log,1);
1675: wf_core.clear;
1676: END;
1677: END LOOP;
1670: wf_core.get_error(error_name, error_message, error_stack);
1671: fnd_file.put_line (fnd_file.log,error_message);
1672: fnd_file.new_line (fnd_file.log,1);
1673: fnd_file.put_line (fnd_file.log,error_stack);
1674: fnd_file.new_line (fnd_file.log,1);
1675: wf_core.clear;
1676: END;
1677: END LOOP;
1678:
1675: wf_core.clear;
1676: END;
1677: END LOOP;
1678:
1679: fnd_file.put_line (fnd_file.log,log_message35);
1680: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding
1681: --records in Resource Team Members table of Resource Type Group');
1682: fnd_file.new_line (fnd_file.log,1);
1683:
1676: END;
1677: END LOOP;
1678:
1679: fnd_file.put_line (fnd_file.log,log_message35);
1680: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding
1681: --records in Resource Team Members table of Resource Type Group');
1682: fnd_file.new_line (fnd_file.log,1);
1683:
1684: EXCEPTION
1678:
1679: fnd_file.put_line (fnd_file.log,log_message35);
1680: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding
1681: --records in Resource Team Members table of Resource Type Group');
1682: fnd_file.new_line (fnd_file.log,1);
1683:
1684: EXCEPTION
1685: WHEN OTHERS THEN
1686: wf_core.get_error(error_name, error_message, error_stack);
1683:
1684: EXCEPTION
1685: WHEN OTHERS THEN
1686: wf_core.get_error(error_name, error_message, error_stack);
1687: fnd_file.put_line (fnd_file.log,error_message);
1688: fnd_file.new_line (fnd_file.log,1);
1689: fnd_file.put_line (fnd_file.log,error_stack);
1690: fnd_file.new_line (fnd_file.log,1);
1691: wf_core.clear;
1684: EXCEPTION
1685: WHEN OTHERS THEN
1686: wf_core.get_error(error_name, error_message, error_stack);
1687: fnd_file.put_line (fnd_file.log,error_message);
1688: fnd_file.new_line (fnd_file.log,1);
1689: fnd_file.put_line (fnd_file.log,error_stack);
1690: fnd_file.new_line (fnd_file.log,1);
1691: wf_core.clear;
1692:
1685: WHEN OTHERS THEN
1686: wf_core.get_error(error_name, error_message, error_stack);
1687: fnd_file.put_line (fnd_file.log,error_message);
1688: fnd_file.new_line (fnd_file.log,1);
1689: fnd_file.put_line (fnd_file.log,error_stack);
1690: fnd_file.new_line (fnd_file.log,1);
1691: wf_core.clear;
1692:
1693: END synchronize_team_members_wf;
1686: wf_core.get_error(error_name, error_message, error_stack);
1687: fnd_file.put_line (fnd_file.log,error_message);
1688: fnd_file.new_line (fnd_file.log,1);
1689: fnd_file.put_line (fnd_file.log,error_stack);
1690: fnd_file.new_line (fnd_file.log,1);
1691: wf_core.clear;
1692:
1693: END synchronize_team_members_wf;
1694: