37: error_message VARCHAR2(2000);
38: error_stack VARCHAR2(32000);
39: BEGIN
40: wf_core.get_error(error_name, error_message, error_stack);
41: fnd_file.put_line (fnd_file.log,error_message);
42: fnd_file.new_line (fnd_file.log,1);
43: fnd_file.put_line (fnd_file.log,error_stack);
44: fnd_file.new_line (fnd_file.log,1);
45: wf_core.clear;
38: error_stack VARCHAR2(32000);
39: BEGIN
40: wf_core.get_error(error_name, error_message, error_stack);
41: fnd_file.put_line (fnd_file.log,error_message);
42: fnd_file.new_line (fnd_file.log,1);
43: fnd_file.put_line (fnd_file.log,error_stack);
44: fnd_file.new_line (fnd_file.log,1);
45: wf_core.clear;
46: END call_exception;
39: BEGIN
40: wf_core.get_error(error_name, error_message, error_stack);
41: fnd_file.put_line (fnd_file.log,error_message);
42: fnd_file.new_line (fnd_file.log,1);
43: fnd_file.put_line (fnd_file.log,error_stack);
44: fnd_file.new_line (fnd_file.log,1);
45: wf_core.clear;
46: END call_exception;
47:
40: wf_core.get_error(error_name, error_message, error_stack);
41: fnd_file.put_line (fnd_file.log,error_message);
42: fnd_file.new_line (fnd_file.log,1);
43: fnd_file.put_line (fnd_file.log,error_stack);
44: fnd_file.new_line (fnd_file.log,1);
45: wf_core.clear;
46: END call_exception;
47:
48: PROCEDURE synchronize_teams_wf AS
145: log_message14 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG14');
146: log_message36 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG36');
147: log_message37 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG37');
148:
149: fnd_file.new_line (fnd_file.log,1);
150: fnd_file.put_line (fnd_file.log,log_msg_hdr4);
151: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Teams');
152: fnd_file.put_line (fnd_file.log,'-----------------------------------------------------------------');
153: fnd_file.new_line (fnd_file.log,1);
146: log_message36 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG36');
147: log_message37 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG37');
148:
149: fnd_file.new_line (fnd_file.log,1);
150: fnd_file.put_line (fnd_file.log,log_msg_hdr4);
151: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Teams');
152: fnd_file.put_line (fnd_file.log,'-----------------------------------------------------------------');
153: fnd_file.new_line (fnd_file.log,1);
154:
147: log_message37 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG37');
148:
149: fnd_file.new_line (fnd_file.log,1);
150: fnd_file.put_line (fnd_file.log,log_msg_hdr4);
151: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Teams');
152: fnd_file.put_line (fnd_file.log,'-----------------------------------------------------------------');
153: fnd_file.new_line (fnd_file.log,1);
154:
155: wf_core.clear;
148:
149: fnd_file.new_line (fnd_file.log,1);
150: fnd_file.put_line (fnd_file.log,log_msg_hdr4);
151: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Teams');
152: fnd_file.put_line (fnd_file.log,'-----------------------------------------------------------------');
153: fnd_file.new_line (fnd_file.log,1);
154:
155: wf_core.clear;
156:
149: fnd_file.new_line (fnd_file.log,1);
150: fnd_file.put_line (fnd_file.log,log_msg_hdr4);
151: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Teams');
152: fnd_file.put_line (fnd_file.log,'-----------------------------------------------------------------');
153: fnd_file.new_line (fnd_file.log,1);
154:
155: wf_core.clear;
156:
157: -- Inactivate Workflow User Roles (Self and Member) for corresponding Inactive Resource Teams
169:
170: EXCEPTION
171: WHEN OTHERS THEN
172: wf_core.get_error(error_name, error_message, error_stack);
173: fnd_file.put_line (fnd_file.log,error_message);
174: fnd_file.new_line (fnd_file.log,1);
175: fnd_file.put_line (fnd_file.log,error_stack);
176: fnd_file.new_line (fnd_file.log,1);
177: wf_core.clear;
170: EXCEPTION
171: WHEN OTHERS THEN
172: wf_core.get_error(error_name, error_message, error_stack);
173: fnd_file.put_line (fnd_file.log,error_message);
174: fnd_file.new_line (fnd_file.log,1);
175: fnd_file.put_line (fnd_file.log,error_stack);
176: fnd_file.new_line (fnd_file.log,1);
177: wf_core.clear;
178: END;
171: WHEN OTHERS THEN
172: wf_core.get_error(error_name, error_message, error_stack);
173: fnd_file.put_line (fnd_file.log,error_message);
174: fnd_file.new_line (fnd_file.log,1);
175: fnd_file.put_line (fnd_file.log,error_stack);
176: fnd_file.new_line (fnd_file.log,1);
177: wf_core.clear;
178: END;
179: END LOOP;
172: wf_core.get_error(error_name, error_message, error_stack);
173: fnd_file.put_line (fnd_file.log,error_message);
174: fnd_file.new_line (fnd_file.log,1);
175: fnd_file.put_line (fnd_file.log,error_stack);
176: fnd_file.new_line (fnd_file.log,1);
177: wf_core.clear;
178: END;
179: END LOOP;
180:
177: wf_core.clear;
178: END;
179: END LOOP;
180:
181: fnd_file.put_line (fnd_file.log,log_message36);
182: --fnd_file.put_line (fnd_file.log,'Successfully inactivated self and member records in Workflow User Roles table,
183: --for all the corresponding records in Resource Teams table that have been inactivated');
184: fnd_file.new_line (fnd_file.log,1);
185:
178: END;
179: END LOOP;
180:
181: fnd_file.put_line (fnd_file.log,log_message36);
182: --fnd_file.put_line (fnd_file.log,'Successfully inactivated self and member records in Workflow User Roles table,
183: --for all the corresponding records in Resource Teams table that have been inactivated');
184: fnd_file.new_line (fnd_file.log,1);
185:
186: -- Inactivate Workflow Roles for corresponding Inactive Resource Teams
180:
181: fnd_file.put_line (fnd_file.log,log_message36);
182: --fnd_file.put_line (fnd_file.log,'Successfully inactivated self and member records in Workflow User Roles table,
183: --for all the corresponding records in Resource Teams table that have been inactivated');
184: fnd_file.new_line (fnd_file.log,1);
185:
186: -- Inactivate Workflow Roles for corresponding Inactive Resource Teams
187: FOR i IN c_team_wf_del LOOP
188: BEGIN
205: EXCEPTION
206: WHEN OTHERS THEN
207: l_list.DELETE;
208: wf_core.get_error(error_name, error_message, error_stack);
209: fnd_file.put_line (fnd_file.log,error_message);
210: fnd_file.new_line (fnd_file.log,1);
211: fnd_file.put_line (fnd_file.log,error_stack);
212: fnd_file.new_line (fnd_file.log,1);
213: wf_core.clear;
206: WHEN OTHERS THEN
207: l_list.DELETE;
208: wf_core.get_error(error_name, error_message, error_stack);
209: fnd_file.put_line (fnd_file.log,error_message);
210: fnd_file.new_line (fnd_file.log,1);
211: fnd_file.put_line (fnd_file.log,error_stack);
212: fnd_file.new_line (fnd_file.log,1);
213: wf_core.clear;
214: END;
207: l_list.DELETE;
208: wf_core.get_error(error_name, error_message, error_stack);
209: fnd_file.put_line (fnd_file.log,error_message);
210: fnd_file.new_line (fnd_file.log,1);
211: fnd_file.put_line (fnd_file.log,error_stack);
212: fnd_file.new_line (fnd_file.log,1);
213: wf_core.clear;
214: END;
215: END LOOP;
208: wf_core.get_error(error_name, error_message, error_stack);
209: fnd_file.put_line (fnd_file.log,error_message);
210: fnd_file.new_line (fnd_file.log,1);
211: fnd_file.put_line (fnd_file.log,error_stack);
212: fnd_file.new_line (fnd_file.log,1);
213: wf_core.clear;
214: END;
215: END LOOP;
216:
213: wf_core.clear;
214: END;
215: END LOOP;
216:
217: fnd_file.put_line (fnd_file.log,log_message12);
218: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow Roles table,
219: --for all the records in Resource Teams table that have been inactivated');
220: fnd_file.new_line (fnd_file.log,1);
221:
214: END;
215: END LOOP;
216:
217: fnd_file.put_line (fnd_file.log,log_message12);
218: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow Roles table,
219: --for all the records in Resource Teams table that have been inactivated');
220: fnd_file.new_line (fnd_file.log,1);
221:
222: -- Update Workflow Roles for corresponding Updated and Active Resource Teams
216:
217: fnd_file.put_line (fnd_file.log,log_message12);
218: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow Roles table,
219: --for all the records in Resource Teams table that have been inactivated');
220: fnd_file.new_line (fnd_file.log,1);
221:
222: -- Update Workflow Roles for corresponding Updated and Active Resource Teams
223: FOR i IN c_team_wf_upd LOOP
224: BEGIN
244: EXCEPTION
245: WHEN OTHERS THEN
246: l_list.DELETE;
247: wf_core.get_error(error_name, error_message, error_stack);
248: fnd_file.put_line (fnd_file.log,error_message);
249: fnd_file.new_line (fnd_file.log,1);
250: fnd_file.put_line (fnd_file.log,error_stack);
251: fnd_file.new_line (fnd_file.log,1);
252: wf_core.clear;
245: WHEN OTHERS THEN
246: l_list.DELETE;
247: wf_core.get_error(error_name, error_message, error_stack);
248: fnd_file.put_line (fnd_file.log,error_message);
249: fnd_file.new_line (fnd_file.log,1);
250: fnd_file.put_line (fnd_file.log,error_stack);
251: fnd_file.new_line (fnd_file.log,1);
252: wf_core.clear;
253: END;
246: l_list.DELETE;
247: wf_core.get_error(error_name, error_message, error_stack);
248: fnd_file.put_line (fnd_file.log,error_message);
249: fnd_file.new_line (fnd_file.log,1);
250: fnd_file.put_line (fnd_file.log,error_stack);
251: fnd_file.new_line (fnd_file.log,1);
252: wf_core.clear;
253: END;
254:
247: wf_core.get_error(error_name, error_message, error_stack);
248: fnd_file.put_line (fnd_file.log,error_message);
249: fnd_file.new_line (fnd_file.log,1);
250: fnd_file.put_line (fnd_file.log,error_stack);
251: fnd_file.new_line (fnd_file.log,1);
252: wf_core.clear;
253: END;
254:
255: IF (i.wlr_start_date IS NULL OR
271:
272: EXCEPTION
273: WHEN OTHERS THEN
274: wf_core.get_error(error_name, error_message, error_stack);
275: fnd_file.put_line (fnd_file.log,error_message);
276: fnd_file.new_line (fnd_file.log,1);
277: fnd_file.put_line (fnd_file.log,error_stack);
278: fnd_file.new_line (fnd_file.log,1);
279: wf_core.clear;
272: EXCEPTION
273: WHEN OTHERS THEN
274: wf_core.get_error(error_name, error_message, error_stack);
275: fnd_file.put_line (fnd_file.log,error_message);
276: fnd_file.new_line (fnd_file.log,1);
277: fnd_file.put_line (fnd_file.log,error_stack);
278: fnd_file.new_line (fnd_file.log,1);
279: wf_core.clear;
280: END;
273: WHEN OTHERS THEN
274: wf_core.get_error(error_name, error_message, error_stack);
275: fnd_file.put_line (fnd_file.log,error_message);
276: fnd_file.new_line (fnd_file.log,1);
277: fnd_file.put_line (fnd_file.log,error_stack);
278: fnd_file.new_line (fnd_file.log,1);
279: wf_core.clear;
280: END;
281: END IF;
274: wf_core.get_error(error_name, error_message, error_stack);
275: fnd_file.put_line (fnd_file.log,error_message);
276: fnd_file.new_line (fnd_file.log,1);
277: fnd_file.put_line (fnd_file.log,error_stack);
278: fnd_file.new_line (fnd_file.log,1);
279: wf_core.clear;
280: END;
281: END IF;
282:
281: END IF;
282:
283: END LOOP;
284:
285: fnd_file.put_line (fnd_file.log,log_message13);
286: --fnd_file.put_line (fnd_file.log,'Successfully updated records in Workflow Roles and User Roles tables,
287: --whose corresponding records in Resource Teams table have been updated');
288: fnd_file.new_line (fnd_file.log,1);
289:
282:
283: END LOOP;
284:
285: fnd_file.put_line (fnd_file.log,log_message13);
286: --fnd_file.put_line (fnd_file.log,'Successfully updated records in Workflow Roles and User Roles tables,
287: --whose corresponding records in Resource Teams table have been updated');
288: fnd_file.new_line (fnd_file.log,1);
289:
290: -- Update Workflow User Roles (Self and Member Records) for corresponding Updated/Active Resource Teams
284:
285: fnd_file.put_line (fnd_file.log,log_message13);
286: --fnd_file.put_line (fnd_file.log,'Successfully updated records in Workflow Roles and User Roles tables,
287: --whose corresponding records in Resource Teams table have been updated');
288: fnd_file.new_line (fnd_file.log,1);
289:
290: -- Update Workflow User Roles (Self and Member Records) for corresponding Updated/Active Resource Teams
291: FOR i IN c_team_wf_ur_upd LOOP
292: BEGIN
302:
303: EXCEPTION
304: WHEN OTHERS THEN
305: wf_core.get_error(error_name, error_message, error_stack);
306: fnd_file.put_line (fnd_file.log,error_message);
307: fnd_file.new_line (fnd_file.log,1);
308: fnd_file.put_line (fnd_file.log,error_stack);
309: fnd_file.new_line (fnd_file.log,1);
310: wf_core.clear;
303: EXCEPTION
304: WHEN OTHERS THEN
305: wf_core.get_error(error_name, error_message, error_stack);
306: fnd_file.put_line (fnd_file.log,error_message);
307: fnd_file.new_line (fnd_file.log,1);
308: fnd_file.put_line (fnd_file.log,error_stack);
309: fnd_file.new_line (fnd_file.log,1);
310: wf_core.clear;
311: END;
304: WHEN OTHERS THEN
305: wf_core.get_error(error_name, error_message, error_stack);
306: fnd_file.put_line (fnd_file.log,error_message);
307: fnd_file.new_line (fnd_file.log,1);
308: fnd_file.put_line (fnd_file.log,error_stack);
309: fnd_file.new_line (fnd_file.log,1);
310: wf_core.clear;
311: END;
312: END LOOP;
305: wf_core.get_error(error_name, error_message, error_stack);
306: fnd_file.put_line (fnd_file.log,error_message);
307: fnd_file.new_line (fnd_file.log,1);
308: fnd_file.put_line (fnd_file.log,error_stack);
309: fnd_file.new_line (fnd_file.log,1);
310: wf_core.clear;
311: END;
312: END LOOP;
313:
310: wf_core.clear;
311: END;
312: END LOOP;
313:
314: fnd_file.put_line (fnd_file.log,log_message37);
315: --fnd_file.put_line (fnd_file.log,'Successfully updated dates for records in Workflow User Roles table,
316: --whose corresponding records in Resource Teams table have different dates');
317: fnd_file.new_line (fnd_file.log,1);
318:
311: END;
312: END LOOP;
313:
314: fnd_file.put_line (fnd_file.log,log_message37);
315: --fnd_file.put_line (fnd_file.log,'Successfully updated dates for records in Workflow User Roles table,
316: --whose corresponding records in Resource Teams table have different dates');
317: fnd_file.new_line (fnd_file.log,1);
318:
319: -- Create Workflow Roles for Active Resource Teams, if they don't exist
313:
314: fnd_file.put_line (fnd_file.log,log_message37);
315: --fnd_file.put_line (fnd_file.log,'Successfully updated dates for records in Workflow User Roles table,
316: --whose corresponding records in Resource Teams table have different dates');
317: fnd_file.new_line (fnd_file.log,1);
318:
319: -- Create Workflow Roles for Active Resource Teams, if they don't exist
320: FOR i IN c_team_wf_crt LOOP
321: BEGIN
337: EXCEPTION
338: WHEN OTHERS THEN
339: l_list.DELETE;
340: wf_core.get_error(error_name, error_message, error_stack);
341: fnd_file.put_line (fnd_file.log,error_message);
342: fnd_file.new_line (fnd_file.log,1);
343: fnd_file.put_line (fnd_file.log,error_stack);
344: fnd_file.new_line (fnd_file.log,1);
345: wf_core.clear;
338: WHEN OTHERS THEN
339: l_list.DELETE;
340: wf_core.get_error(error_name, error_message, error_stack);
341: fnd_file.put_line (fnd_file.log,error_message);
342: fnd_file.new_line (fnd_file.log,1);
343: fnd_file.put_line (fnd_file.log,error_stack);
344: fnd_file.new_line (fnd_file.log,1);
345: wf_core.clear;
346: END;
339: l_list.DELETE;
340: wf_core.get_error(error_name, error_message, error_stack);
341: fnd_file.put_line (fnd_file.log,error_message);
342: fnd_file.new_line (fnd_file.log,1);
343: fnd_file.put_line (fnd_file.log,error_stack);
344: fnd_file.new_line (fnd_file.log,1);
345: wf_core.clear;
346: END;
347:
340: wf_core.get_error(error_name, error_message, error_stack);
341: fnd_file.put_line (fnd_file.log,error_message);
342: fnd_file.new_line (fnd_file.log,1);
343: fnd_file.put_line (fnd_file.log,error_stack);
344: fnd_file.new_line (fnd_file.log,1);
345: wf_core.clear;
346: END;
347:
348: -- Create Self-Record in wf_local_user_roles for the above record
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_message14);
371: --fnd_file.put_line (fnd_file.log,'Successfully created records in Workflow Roles table, for all the records in
372: --Resource Teams table that dont exist as roles. Corresponding self records also created in Workflow User Roles');
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_message14);
371: --fnd_file.put_line (fnd_file.log,'Successfully created records in Workflow Roles table, for all the records in
372: --Resource Teams table that dont exist as roles. Corresponding self records also created in Workflow User Roles');
373: fnd_file.new_line (fnd_file.log,1);
374:
375: EXCEPTION
369:
370: fnd_file.put_line (fnd_file.log,log_message14);
371: --fnd_file.put_line (fnd_file.log,'Successfully created records in Workflow Roles table, for all the records in
372: --Resource Teams table that dont exist as roles. Corresponding self records also created in Workflow User Roles');
373: fnd_file.new_line (fnd_file.log,1);
374:
375: EXCEPTION
376: WHEN OTHERS THEN
377: wf_core.get_error(error_name, error_message, error_stack);
374:
375: EXCEPTION
376: WHEN OTHERS THEN
377: wf_core.get_error(error_name, error_message, error_stack);
378: fnd_file.put_line (fnd_file.log,error_message);
379: fnd_file.new_line (fnd_file.log,1);
380: fnd_file.put_line (fnd_file.log,error_stack);
381: fnd_file.new_line (fnd_file.log,1);
382: wf_core.clear;
375: EXCEPTION
376: WHEN OTHERS THEN
377: wf_core.get_error(error_name, error_message, error_stack);
378: fnd_file.put_line (fnd_file.log,error_message);
379: fnd_file.new_line (fnd_file.log,1);
380: fnd_file.put_line (fnd_file.log,error_stack);
381: fnd_file.new_line (fnd_file.log,1);
382: wf_core.clear;
383:
376: WHEN OTHERS THEN
377: wf_core.get_error(error_name, error_message, error_stack);
378: fnd_file.put_line (fnd_file.log,error_message);
379: fnd_file.new_line (fnd_file.log,1);
380: fnd_file.put_line (fnd_file.log,error_stack);
381: fnd_file.new_line (fnd_file.log,1);
382: wf_core.clear;
383:
384: END synchronize_teams_wf;
377: wf_core.get_error(error_name, error_message, error_stack);
378: fnd_file.put_line (fnd_file.log,error_message);
379: fnd_file.new_line (fnd_file.log,1);
380: fnd_file.put_line (fnd_file.log,error_stack);
381: fnd_file.new_line (fnd_file.log,1);
382: wf_core.clear;
383:
384: END synchronize_teams_wf;
385:
498: log_message3 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG3');
499: log_message38:= fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG38');
500: log_message39:= fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG39');
501:
502: fnd_file.new_line (fnd_file.log,1);
503: fnd_file.put_line (fnd_file.log,log_msg_hdr1);
504: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Groups');
505: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------------');
506: fnd_file.new_line (fnd_file.log,1);
499: log_message38:= fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG38');
500: log_message39:= fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG39');
501:
502: fnd_file.new_line (fnd_file.log,1);
503: fnd_file.put_line (fnd_file.log,log_msg_hdr1);
504: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Groups');
505: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------------');
506: fnd_file.new_line (fnd_file.log,1);
507:
500: log_message39:= fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG39');
501:
502: fnd_file.new_line (fnd_file.log,1);
503: fnd_file.put_line (fnd_file.log,log_msg_hdr1);
504: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Groups');
505: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------------');
506: fnd_file.new_line (fnd_file.log,1);
507:
508: wf_core.clear;
501:
502: fnd_file.new_line (fnd_file.log,1);
503: fnd_file.put_line (fnd_file.log,log_msg_hdr1);
504: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Groups');
505: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------------');
506: fnd_file.new_line (fnd_file.log,1);
507:
508: wf_core.clear;
509:
502: fnd_file.new_line (fnd_file.log,1);
503: fnd_file.put_line (fnd_file.log,log_msg_hdr1);
504: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resource Groups');
505: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------------');
506: fnd_file.new_line (fnd_file.log,1);
507:
508: wf_core.clear;
509:
510: -- Inactivate Workflow User Roles (Self-Records) for corresponding Inactive Resource Groups
522:
523: EXCEPTION
524: WHEN OTHERS THEN
525: wf_core.get_error(error_name, error_message, error_stack);
526: fnd_file.put_line (fnd_file.log,error_message);
527: fnd_file.new_line (fnd_file.log,1);
528: fnd_file.put_line (fnd_file.log,error_stack);
529: fnd_file.new_line (fnd_file.log,1);
530: wf_core.clear;
523: EXCEPTION
524: WHEN OTHERS THEN
525: wf_core.get_error(error_name, error_message, error_stack);
526: fnd_file.put_line (fnd_file.log,error_message);
527: fnd_file.new_line (fnd_file.log,1);
528: fnd_file.put_line (fnd_file.log,error_stack);
529: fnd_file.new_line (fnd_file.log,1);
530: wf_core.clear;
531: END;
524: WHEN OTHERS THEN
525: wf_core.get_error(error_name, error_message, error_stack);
526: fnd_file.put_line (fnd_file.log,error_message);
527: fnd_file.new_line (fnd_file.log,1);
528: fnd_file.put_line (fnd_file.log,error_stack);
529: fnd_file.new_line (fnd_file.log,1);
530: wf_core.clear;
531: END;
532: END LOOP;
525: wf_core.get_error(error_name, error_message, error_stack);
526: fnd_file.put_line (fnd_file.log,error_message);
527: fnd_file.new_line (fnd_file.log,1);
528: fnd_file.put_line (fnd_file.log,error_stack);
529: fnd_file.new_line (fnd_file.log,1);
530: wf_core.clear;
531: END;
532: END LOOP;
533:
530: wf_core.clear;
531: END;
532: END LOOP;
533:
534: fnd_file.put_line (fnd_file.log,log_message38);
535: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow User Roles table, for both self and
536: --group member records, whose corresponding records in Resource Groups table that have been inactivated');
537: fnd_file.new_line (fnd_file.log,1);
538:
531: END;
532: END LOOP;
533:
534: fnd_file.put_line (fnd_file.log,log_message38);
535: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow User Roles table, for both self and
536: --group member records, whose corresponding records in Resource Groups table that have been inactivated');
537: fnd_file.new_line (fnd_file.log,1);
538:
539: -- Inactivate Workflow Roles for corresponding Inactive Resource Groups
533:
534: fnd_file.put_line (fnd_file.log,log_message38);
535: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow User Roles table, for both self and
536: --group member records, whose corresponding records in Resource Groups table that have been inactivated');
537: fnd_file.new_line (fnd_file.log,1);
538:
539: -- Inactivate Workflow Roles for corresponding Inactive Resource Groups
540: FOR i IN c_grp_wf_del LOOP
541: BEGIN
558: EXCEPTION
559: WHEN OTHERS THEN
560: l_list.DELETE;
561: wf_core.get_error(error_name, error_message, error_stack);
562: fnd_file.put_line (fnd_file.log,error_message);
563: fnd_file.new_line (fnd_file.log,1);
564: fnd_file.put_line (fnd_file.log,error_stack);
565: fnd_file.new_line (fnd_file.log,1);
566: wf_core.clear;
559: WHEN OTHERS THEN
560: l_list.DELETE;
561: wf_core.get_error(error_name, error_message, error_stack);
562: fnd_file.put_line (fnd_file.log,error_message);
563: fnd_file.new_line (fnd_file.log,1);
564: fnd_file.put_line (fnd_file.log,error_stack);
565: fnd_file.new_line (fnd_file.log,1);
566: wf_core.clear;
567: END;
560: l_list.DELETE;
561: wf_core.get_error(error_name, error_message, error_stack);
562: fnd_file.put_line (fnd_file.log,error_message);
563: fnd_file.new_line (fnd_file.log,1);
564: fnd_file.put_line (fnd_file.log,error_stack);
565: fnd_file.new_line (fnd_file.log,1);
566: wf_core.clear;
567: END;
568: END LOOP;
561: wf_core.get_error(error_name, error_message, error_stack);
562: fnd_file.put_line (fnd_file.log,error_message);
563: fnd_file.new_line (fnd_file.log,1);
564: fnd_file.put_line (fnd_file.log,error_stack);
565: fnd_file.new_line (fnd_file.log,1);
566: wf_core.clear;
567: END;
568: END LOOP;
569:
566: wf_core.clear;
567: END;
568: END LOOP;
569:
570: fnd_file.put_line (fnd_file.log,log_message1);
571: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow Roles table,
572: --for all the records in Resource Groups table that have been inactivated');
573: fnd_file.new_line (fnd_file.log,1);
574:
567: END;
568: END LOOP;
569:
570: fnd_file.put_line (fnd_file.log,log_message1);
571: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow Roles table,
572: --for all the records in Resource Groups table that have been inactivated');
573: fnd_file.new_line (fnd_file.log,1);
574:
575: -- Update Workflow Roles for corresponding Updated and Active Resource Groups
569:
570: fnd_file.put_line (fnd_file.log,log_message1);
571: --fnd_file.put_line (fnd_file.log,'Successfully inactivated records in Workflow Roles table,
572: --for all the records in Resource Groups table that have been inactivated');
573: fnd_file.new_line (fnd_file.log,1);
574:
575: -- Update Workflow Roles for corresponding Updated and Active Resource Groups
576: FOR i IN c_grp_wf_upd LOOP
577: BEGIN
597: EXCEPTION
598: WHEN OTHERS THEN
599: l_list.DELETE;
600: wf_core.get_error(error_name, error_message, error_stack);
601: fnd_file.put_line (fnd_file.log,error_message);
602: fnd_file.new_line (fnd_file.log,1);
603: fnd_file.put_line (fnd_file.log,error_stack);
604: fnd_file.new_line (fnd_file.log,1);
605: wf_core.clear;
598: WHEN OTHERS THEN
599: l_list.DELETE;
600: wf_core.get_error(error_name, error_message, error_stack);
601: fnd_file.put_line (fnd_file.log,error_message);
602: fnd_file.new_line (fnd_file.log,1);
603: fnd_file.put_line (fnd_file.log,error_stack);
604: fnd_file.new_line (fnd_file.log,1);
605: wf_core.clear;
606: END;
599: l_list.DELETE;
600: wf_core.get_error(error_name, error_message, error_stack);
601: fnd_file.put_line (fnd_file.log,error_message);
602: fnd_file.new_line (fnd_file.log,1);
603: fnd_file.put_line (fnd_file.log,error_stack);
604: fnd_file.new_line (fnd_file.log,1);
605: wf_core.clear;
606: END;
607:
600: wf_core.get_error(error_name, error_message, error_stack);
601: fnd_file.put_line (fnd_file.log,error_message);
602: fnd_file.new_line (fnd_file.log,1);
603: fnd_file.put_line (fnd_file.log,error_stack);
604: fnd_file.new_line (fnd_file.log,1);
605: wf_core.clear;
606: END;
607:
608: IF (i.wlr_start_date IS NULL OR
624:
625: EXCEPTION
626: WHEN OTHERS THEN
627: wf_core.get_error(error_name, error_message, error_stack);
628: fnd_file.put_line (fnd_file.log,error_message);
629: fnd_file.new_line (fnd_file.log,1);
630: fnd_file.put_line (fnd_file.log,error_stack);
631: fnd_file.new_line (fnd_file.log,1);
632: wf_core.clear;
625: EXCEPTION
626: WHEN OTHERS THEN
627: wf_core.get_error(error_name, error_message, error_stack);
628: fnd_file.put_line (fnd_file.log,error_message);
629: fnd_file.new_line (fnd_file.log,1);
630: fnd_file.put_line (fnd_file.log,error_stack);
631: fnd_file.new_line (fnd_file.log,1);
632: wf_core.clear;
633: END;
626: WHEN OTHERS THEN
627: wf_core.get_error(error_name, error_message, error_stack);
628: fnd_file.put_line (fnd_file.log,error_message);
629: fnd_file.new_line (fnd_file.log,1);
630: fnd_file.put_line (fnd_file.log,error_stack);
631: fnd_file.new_line (fnd_file.log,1);
632: wf_core.clear;
633: END;
634: END IF;
627: wf_core.get_error(error_name, error_message, error_stack);
628: fnd_file.put_line (fnd_file.log,error_message);
629: fnd_file.new_line (fnd_file.log,1);
630: fnd_file.put_line (fnd_file.log,error_stack);
631: fnd_file.new_line (fnd_file.log,1);
632: wf_core.clear;
633: END;
634: END IF;
635:
634: END IF;
635:
636: END LOOP;
637:
638: fnd_file.put_line (fnd_file.log,log_message2);
639: --fnd_file.put_line (fnd_file.log,'Successfully updated records in Workflow Roles and User Roles table,
640: --whose corresponding records in Resource Groups table have been updated');
641: fnd_file.new_line (fnd_file.log,1);
642:
635:
636: END LOOP;
637:
638: fnd_file.put_line (fnd_file.log,log_message2);
639: --fnd_file.put_line (fnd_file.log,'Successfully updated records in Workflow Roles and User Roles table,
640: --whose corresponding records in Resource Groups table have been updated');
641: fnd_file.new_line (fnd_file.log,1);
642:
643: -- Update Workflow User Roles (Self and Member Records) for correspoding Updated/Active Resource Groups
637:
638: fnd_file.put_line (fnd_file.log,log_message2);
639: --fnd_file.put_line (fnd_file.log,'Successfully updated records in Workflow Roles and User Roles table,
640: --whose corresponding records in Resource Groups table have been updated');
641: fnd_file.new_line (fnd_file.log,1);
642:
643: -- Update Workflow User Roles (Self and Member Records) for correspoding Updated/Active Resource Groups
644: FOR i IN c_grp_wf_ur_upd LOOP
645: BEGIN
655:
656: EXCEPTION
657: WHEN OTHERS THEN
658: wf_core.get_error(error_name, error_message, error_stack);
659: fnd_file.put_line (fnd_file.log,error_message);
660: fnd_file.new_line (fnd_file.log,1);
661: fnd_file.put_line (fnd_file.log,error_stack);
662: fnd_file.new_line (fnd_file.log,1);
663: wf_core.clear;
656: EXCEPTION
657: WHEN OTHERS THEN
658: wf_core.get_error(error_name, error_message, error_stack);
659: fnd_file.put_line (fnd_file.log,error_message);
660: fnd_file.new_line (fnd_file.log,1);
661: fnd_file.put_line (fnd_file.log,error_stack);
662: fnd_file.new_line (fnd_file.log,1);
663: wf_core.clear;
664: END;
657: WHEN OTHERS THEN
658: wf_core.get_error(error_name, error_message, error_stack);
659: fnd_file.put_line (fnd_file.log,error_message);
660: fnd_file.new_line (fnd_file.log,1);
661: fnd_file.put_line (fnd_file.log,error_stack);
662: fnd_file.new_line (fnd_file.log,1);
663: wf_core.clear;
664: END;
665: END LOOP;
658: wf_core.get_error(error_name, error_message, error_stack);
659: fnd_file.put_line (fnd_file.log,error_message);
660: fnd_file.new_line (fnd_file.log,1);
661: fnd_file.put_line (fnd_file.log,error_stack);
662: fnd_file.new_line (fnd_file.log,1);
663: wf_core.clear;
664: END;
665: END LOOP;
666:
663: wf_core.clear;
664: END;
665: END LOOP;
666:
667: fnd_file.put_line (fnd_file.log,log_message39);
668: --fnd_file.put_line (fnd_file.log,'Successfully updated dates for all self and member records in Workflow
669: --User Roles table, whose corresponding records in Resource Groups table have been updated');
670: fnd_file.new_line (fnd_file.log,1);
671:
664: END;
665: END LOOP;
666:
667: fnd_file.put_line (fnd_file.log,log_message39);
668: --fnd_file.put_line (fnd_file.log,'Successfully updated dates for all self and member records in Workflow
669: --User Roles table, whose corresponding records in Resource Groups table have been updated');
670: fnd_file.new_line (fnd_file.log,1);
671:
672: -- Create Workflow Roles for Active Resource Groups, if they don't exist
666:
667: fnd_file.put_line (fnd_file.log,log_message39);
668: --fnd_file.put_line (fnd_file.log,'Successfully updated dates for all self and member records in Workflow
669: --User Roles table, whose corresponding records in Resource Groups table have been updated');
670: fnd_file.new_line (fnd_file.log,1);
671:
672: -- Create Workflow Roles for Active Resource Groups, if they don't exist
673: FOR i IN c_grp_wf_crt LOOP
674: BEGIN
689: EXCEPTION
690: WHEN OTHERS THEN
691: l_list.DELETE;
692: wf_core.get_error(error_name, error_message, error_stack);
693: fnd_file.put_line (fnd_file.log,error_message);
694: fnd_file.new_line (fnd_file.log,1);
695: fnd_file.put_line (fnd_file.log,error_stack);
696: fnd_file.new_line (fnd_file.log,1);
697: wf_core.clear;
690: WHEN OTHERS THEN
691: l_list.DELETE;
692: wf_core.get_error(error_name, error_message, error_stack);
693: fnd_file.put_line (fnd_file.log,error_message);
694: fnd_file.new_line (fnd_file.log,1);
695: fnd_file.put_line (fnd_file.log,error_stack);
696: fnd_file.new_line (fnd_file.log,1);
697: wf_core.clear;
698: END;
691: l_list.DELETE;
692: wf_core.get_error(error_name, error_message, error_stack);
693: fnd_file.put_line (fnd_file.log,error_message);
694: fnd_file.new_line (fnd_file.log,1);
695: fnd_file.put_line (fnd_file.log,error_stack);
696: fnd_file.new_line (fnd_file.log,1);
697: wf_core.clear;
698: END;
699:
692: wf_core.get_error(error_name, error_message, error_stack);
693: fnd_file.put_line (fnd_file.log,error_message);
694: fnd_file.new_line (fnd_file.log,1);
695: fnd_file.put_line (fnd_file.log,error_stack);
696: fnd_file.new_line (fnd_file.log,1);
697: wf_core.clear;
698: END;
699:
700: -- Create Self-Record in wf_local_user_roles for the above record
709: p_expiration_date => i.end_date_active);
710: EXCEPTION
711: WHEN OTHERS THEN
712: wf_core.get_error(error_name, error_message, error_stack);
713: fnd_file.put_line (fnd_file.log,error_message);
714: fnd_file.new_line (fnd_file.log,1);
715: fnd_file.put_line (fnd_file.log,error_stack);
716: fnd_file.new_line (fnd_file.log,1);
717: wf_core.clear;
710: EXCEPTION
711: WHEN OTHERS THEN
712: wf_core.get_error(error_name, error_message, error_stack);
713: fnd_file.put_line (fnd_file.log,error_message);
714: fnd_file.new_line (fnd_file.log,1);
715: fnd_file.put_line (fnd_file.log,error_stack);
716: fnd_file.new_line (fnd_file.log,1);
717: wf_core.clear;
718: END;
711: WHEN OTHERS THEN
712: wf_core.get_error(error_name, error_message, error_stack);
713: fnd_file.put_line (fnd_file.log,error_message);
714: fnd_file.new_line (fnd_file.log,1);
715: fnd_file.put_line (fnd_file.log,error_stack);
716: fnd_file.new_line (fnd_file.log,1);
717: wf_core.clear;
718: END;
719: END LOOP;
712: wf_core.get_error(error_name, error_message, error_stack);
713: fnd_file.put_line (fnd_file.log,error_message);
714: fnd_file.new_line (fnd_file.log,1);
715: fnd_file.put_line (fnd_file.log,error_stack);
716: fnd_file.new_line (fnd_file.log,1);
717: wf_core.clear;
718: END;
719: END LOOP;
720:
717: wf_core.clear;
718: END;
719: END LOOP;
720:
721: fnd_file.put_line (fnd_file.log,log_message3);
722: --fnd_file.put_line (fnd_file.log,'Successfully created records in Workflow Roles table, for all the records in
723: --Resource Groups table that dont exist as roles. Corresponding records also created in Workflow User Roles');
724: fnd_file.new_line (fnd_file.log,1);
725:
718: END;
719: END LOOP;
720:
721: fnd_file.put_line (fnd_file.log,log_message3);
722: --fnd_file.put_line (fnd_file.log,'Successfully created records in Workflow Roles table, for all the records in
723: --Resource Groups table that dont exist as roles. Corresponding records also created in Workflow User Roles');
724: fnd_file.new_line (fnd_file.log,1);
725:
726: EXCEPTION
720:
721: fnd_file.put_line (fnd_file.log,log_message3);
722: --fnd_file.put_line (fnd_file.log,'Successfully created records in Workflow Roles table, for all the records in
723: --Resource Groups table that dont exist as roles. Corresponding records also created in Workflow User Roles');
724: fnd_file.new_line (fnd_file.log,1);
725:
726: EXCEPTION
727: WHEN OTHERS THEN
728: wf_core.get_error(error_name, error_message, error_stack);
725:
726: EXCEPTION
727: WHEN OTHERS THEN
728: wf_core.get_error(error_name, error_message, error_stack);
729: fnd_file.put_line (fnd_file.log,error_message);
730: fnd_file.new_line (fnd_file.log,1);
731: fnd_file.put_line (fnd_file.log,error_stack);
732: fnd_file.new_line (fnd_file.log,1);
733: wf_core.clear;
726: EXCEPTION
727: WHEN OTHERS THEN
728: wf_core.get_error(error_name, error_message, error_stack);
729: fnd_file.put_line (fnd_file.log,error_message);
730: fnd_file.new_line (fnd_file.log,1);
731: fnd_file.put_line (fnd_file.log,error_stack);
732: fnd_file.new_line (fnd_file.log,1);
733: wf_core.clear;
734:
727: WHEN OTHERS THEN
728: wf_core.get_error(error_name, error_message, error_stack);
729: fnd_file.put_line (fnd_file.log,error_message);
730: fnd_file.new_line (fnd_file.log,1);
731: fnd_file.put_line (fnd_file.log,error_stack);
732: fnd_file.new_line (fnd_file.log,1);
733: wf_core.clear;
734:
735: END synchronize_groups_wf;
728: wf_core.get_error(error_name, error_message, error_stack);
729: fnd_file.put_line (fnd_file.log,error_message);
730: fnd_file.new_line (fnd_file.log,1);
731: fnd_file.put_line (fnd_file.log,error_stack);
732: fnd_file.new_line (fnd_file.log,1);
733: wf_core.clear;
734:
735: END synchronize_groups_wf;
736:
788:
789: log_msg_hdr2 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_HDR2');
790: log_message40 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG40');
791:
792: fnd_file.put_line (fnd_file.log,log_msg_hdr2);
793: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resources');
794: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------');
795: fnd_file.new_line (fnd_file.log,1);
796:
789: log_msg_hdr2 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_HDR2');
790: log_message40 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG40');
791:
792: fnd_file.put_line (fnd_file.log,log_msg_hdr2);
793: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resources');
794: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------');
795: fnd_file.new_line (fnd_file.log,1);
796:
797: FOR i IN c_res_details LOOP
790: log_message40 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG40');
791:
792: fnd_file.put_line (fnd_file.log,log_msg_hdr2);
793: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resources');
794: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------');
795: fnd_file.new_line (fnd_file.log,1);
796:
797: FOR i IN c_res_details LOOP
798: l_ind_user_name := l_ind_orig_system ||':'|| TO_CHAR (i.resource_id);
791:
792: fnd_file.put_line (fnd_file.log,log_msg_hdr2);
793: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Resources');
794: fnd_file.put_line (fnd_file.log,'------------------------------------------------------------');
795: fnd_file.new_line (fnd_file.log,1);
796:
797: FOR i IN c_res_details LOOP
798: l_ind_user_name := l_ind_orig_system ||':'|| TO_CHAR (i.resource_id);
799: IF (i.category IN ('EMPLOYEE','PARTY','PARTNER','SUPPLIER_CONTACT')) THEN
811: p_overwrite => TRUE);
812: EXCEPTION
813: WHEN OTHERS THEN
814: wf_core.get_error(error_name, error_message, error_stack);
815: fnd_file.put_line (fnd_file.log,error_message);
816: fnd_file.new_line (fnd_file.log,1);
817: fnd_file.put_line (fnd_file.log,error_stack);
818: fnd_file.new_line (fnd_file.log,1);
819: wf_core.clear;
812: EXCEPTION
813: WHEN OTHERS THEN
814: wf_core.get_error(error_name, error_message, error_stack);
815: fnd_file.put_line (fnd_file.log,error_message);
816: fnd_file.new_line (fnd_file.log,1);
817: fnd_file.put_line (fnd_file.log,error_stack);
818: fnd_file.new_line (fnd_file.log,1);
819: wf_core.clear;
820: END;
813: WHEN OTHERS THEN
814: wf_core.get_error(error_name, error_message, error_stack);
815: fnd_file.put_line (fnd_file.log,error_message);
816: fnd_file.new_line (fnd_file.log,1);
817: fnd_file.put_line (fnd_file.log,error_stack);
818: fnd_file.new_line (fnd_file.log,1);
819: wf_core.clear;
820: END;
821: END LOOP;
814: wf_core.get_error(error_name, error_message, error_stack);
815: fnd_file.put_line (fnd_file.log,error_message);
816: fnd_file.new_line (fnd_file.log,1);
817: fnd_file.put_line (fnd_file.log,error_stack);
818: fnd_file.new_line (fnd_file.log,1);
819: wf_core.clear;
820: END;
821: END LOOP;
822: -- Get all wf roles still defined as JRES_IND and Active.
841: EXCEPTION
842: WHEN OTHERS THEN
843: l_list.DELETE;
844: wf_core.get_error(error_name, error_message, error_stack);
845: fnd_file.put_line (fnd_file.log,error_message);
846: fnd_file.new_line (fnd_file.log,1);
847: fnd_file.put_line (fnd_file.log,error_stack);
848: fnd_file.new_line (fnd_file.log,1);
849: wf_core.clear;
842: WHEN OTHERS THEN
843: l_list.DELETE;
844: wf_core.get_error(error_name, error_message, error_stack);
845: fnd_file.put_line (fnd_file.log,error_message);
846: fnd_file.new_line (fnd_file.log,1);
847: fnd_file.put_line (fnd_file.log,error_stack);
848: fnd_file.new_line (fnd_file.log,1);
849: wf_core.clear;
850: END;
843: l_list.DELETE;
844: wf_core.get_error(error_name, error_message, error_stack);
845: fnd_file.put_line (fnd_file.log,error_message);
846: fnd_file.new_line (fnd_file.log,1);
847: fnd_file.put_line (fnd_file.log,error_stack);
848: fnd_file.new_line (fnd_file.log,1);
849: wf_core.clear;
850: END;
851: END IF;
844: wf_core.get_error(error_name, error_message, error_stack);
845: fnd_file.put_line (fnd_file.log,error_message);
846: fnd_file.new_line (fnd_file.log,1);
847: fnd_file.put_line (fnd_file.log,error_stack);
848: fnd_file.new_line (fnd_file.log,1);
849: wf_core.clear;
850: END;
851: END IF;
852: END LOOP;
867:
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: -- Inactivate corresponding wf roles with resource dates
896: EXCEPTION
897: WHEN OTHERS THEN
898: l_list.DELETE;
899: wf_core.get_error(error_name, error_message, error_stack);
900: fnd_file.put_line (fnd_file.log,error_message);
901: fnd_file.new_line (fnd_file.log,1);
902: fnd_file.put_line (fnd_file.log,error_stack);
903: fnd_file.new_line (fnd_file.log,1);
904: wf_core.clear;
897: WHEN OTHERS THEN
898: l_list.DELETE;
899: wf_core.get_error(error_name, error_message, error_stack);
900: fnd_file.put_line (fnd_file.log,error_message);
901: fnd_file.new_line (fnd_file.log,1);
902: fnd_file.put_line (fnd_file.log,error_stack);
903: fnd_file.new_line (fnd_file.log,1);
904: wf_core.clear;
905: END;
898: l_list.DELETE;
899: wf_core.get_error(error_name, error_message, error_stack);
900: fnd_file.put_line (fnd_file.log,error_message);
901: fnd_file.new_line (fnd_file.log,1);
902: fnd_file.put_line (fnd_file.log,error_stack);
903: fnd_file.new_line (fnd_file.log,1);
904: wf_core.clear;
905: END;
906: END IF;
899: wf_core.get_error(error_name, error_message, error_stack);
900: fnd_file.put_line (fnd_file.log,error_message);
901: fnd_file.new_line (fnd_file.log,1);
902: fnd_file.put_line (fnd_file.log,error_stack);
903: fnd_file.new_line (fnd_file.log,1);
904: wf_core.clear;
905: END;
906: END IF;
907: END LOOP;
947: p_overwrite => TRUE);
948: EXCEPTION
949: WHEN OTHERS THEN
950: wf_core.get_error(error_name, error_message, error_stack);
951: fnd_file.put_line (fnd_file.log,error_message);
952: fnd_file.new_line (fnd_file.log,1);
953: fnd_file.put_line (fnd_file.log,error_stack);
954: fnd_file.new_line (fnd_file.log,1);
955: wf_core.clear;
948: EXCEPTION
949: WHEN OTHERS THEN
950: wf_core.get_error(error_name, error_message, error_stack);
951: fnd_file.put_line (fnd_file.log,error_message);
952: fnd_file.new_line (fnd_file.log,1);
953: fnd_file.put_line (fnd_file.log,error_stack);
954: fnd_file.new_line (fnd_file.log,1);
955: wf_core.clear;
956: END;
949: WHEN OTHERS THEN
950: wf_core.get_error(error_name, error_message, error_stack);
951: fnd_file.put_line (fnd_file.log,error_message);
952: fnd_file.new_line (fnd_file.log,1);
953: fnd_file.put_line (fnd_file.log,error_stack);
954: fnd_file.new_line (fnd_file.log,1);
955: wf_core.clear;
956: END;
957: END IF;
950: wf_core.get_error(error_name, error_message, error_stack);
951: fnd_file.put_line (fnd_file.log,error_message);
952: fnd_file.new_line (fnd_file.log,1);
953: fnd_file.put_line (fnd_file.log,error_stack);
954: fnd_file.new_line (fnd_file.log,1);
955: wf_core.clear;
956: END;
957: END IF;
958: END IF;
996: CLOSE c_wf_role_details;
997: END IF;
998: l_list.DELETE;
999: wf_core.get_error(error_name, error_message, error_stack);
1000: fnd_file.put_line (fnd_file.log,error_message);
1001: fnd_file.new_line (fnd_file.log,1);
1002: fnd_file.put_line (fnd_file.log,error_stack);
1003: fnd_file.new_line (fnd_file.log,1);
1004: wf_core.clear;
997: END IF;
998: l_list.DELETE;
999: wf_core.get_error(error_name, error_message, error_stack);
1000: fnd_file.put_line (fnd_file.log,error_message);
1001: fnd_file.new_line (fnd_file.log,1);
1002: fnd_file.put_line (fnd_file.log,error_stack);
1003: fnd_file.new_line (fnd_file.log,1);
1004: wf_core.clear;
1005: END;
998: l_list.DELETE;
999: wf_core.get_error(error_name, error_message, error_stack);
1000: fnd_file.put_line (fnd_file.log,error_message);
1001: fnd_file.new_line (fnd_file.log,1);
1002: fnd_file.put_line (fnd_file.log,error_stack);
1003: fnd_file.new_line (fnd_file.log,1);
1004: wf_core.clear;
1005: END;
1006: END IF;
999: wf_core.get_error(error_name, error_message, error_stack);
1000: fnd_file.put_line (fnd_file.log,error_message);
1001: fnd_file.new_line (fnd_file.log,1);
1002: fnd_file.put_line (fnd_file.log,error_stack);
1003: fnd_file.new_line (fnd_file.log,1);
1004: wf_core.clear;
1005: END;
1006: END IF;
1007: END IF;
1024: EXCEPTION
1025: WHEN OTHERS THEN
1026: l_list.DELETE;
1027: wf_core.get_error(error_name, error_message, error_stack);
1028: fnd_file.put_line (fnd_file.log,error_message);
1029: fnd_file.new_line (fnd_file.log,1);
1030: fnd_file.put_line (fnd_file.log,error_stack);
1031: fnd_file.new_line (fnd_file.log,1);
1032: wf_core.clear;
1025: WHEN OTHERS THEN
1026: l_list.DELETE;
1027: wf_core.get_error(error_name, error_message, error_stack);
1028: fnd_file.put_line (fnd_file.log,error_message);
1029: fnd_file.new_line (fnd_file.log,1);
1030: fnd_file.put_line (fnd_file.log,error_stack);
1031: fnd_file.new_line (fnd_file.log,1);
1032: wf_core.clear;
1033: END;
1026: l_list.DELETE;
1027: wf_core.get_error(error_name, error_message, error_stack);
1028: fnd_file.put_line (fnd_file.log,error_message);
1029: fnd_file.new_line (fnd_file.log,1);
1030: fnd_file.put_line (fnd_file.log,error_stack);
1031: fnd_file.new_line (fnd_file.log,1);
1032: wf_core.clear;
1033: END;
1034: -- Create Self-Record in wf_local_user_roles for the above record
1027: wf_core.get_error(error_name, error_message, error_stack);
1028: fnd_file.put_line (fnd_file.log,error_message);
1029: fnd_file.new_line (fnd_file.log,1);
1030: fnd_file.put_line (fnd_file.log,error_stack);
1031: fnd_file.new_line (fnd_file.log,1);
1032: wf_core.clear;
1033: END;
1034: -- Create Self-Record in wf_local_user_roles for the above record
1035: BEGIN
1043: p_expiration_date => i.end_date_active);
1044: EXCEPTION
1045: WHEN OTHERS THEN
1046: wf_core.get_error(error_name, error_message, error_stack);
1047: fnd_file.put_line (fnd_file.log,error_message);
1048: fnd_file.new_line (fnd_file.log,1);
1049: fnd_file.put_line (fnd_file.log,error_stack);
1050: fnd_file.new_line (fnd_file.log,1);
1051: wf_core.clear;
1044: EXCEPTION
1045: WHEN OTHERS THEN
1046: wf_core.get_error(error_name, error_message, error_stack);
1047: fnd_file.put_line (fnd_file.log,error_message);
1048: fnd_file.new_line (fnd_file.log,1);
1049: fnd_file.put_line (fnd_file.log,error_stack);
1050: fnd_file.new_line (fnd_file.log,1);
1051: wf_core.clear;
1052: END;
1045: WHEN OTHERS THEN
1046: wf_core.get_error(error_name, error_message, error_stack);
1047: fnd_file.put_line (fnd_file.log,error_message);
1048: fnd_file.new_line (fnd_file.log,1);
1049: fnd_file.put_line (fnd_file.log,error_stack);
1050: fnd_file.new_line (fnd_file.log,1);
1051: wf_core.clear;
1052: END;
1053: END IF;
1046: wf_core.get_error(error_name, error_message, error_stack);
1047: fnd_file.put_line (fnd_file.log,error_message);
1048: fnd_file.new_line (fnd_file.log,1);
1049: fnd_file.put_line (fnd_file.log,error_stack);
1050: fnd_file.new_line (fnd_file.log,1);
1051: wf_core.clear;
1052: END;
1053: END IF;
1054: END IF;
1055: CLOSE c_wf_role_details;
1056: END IF;
1057: END LOOP;
1058:
1059: fnd_file.put_line (fnd_file.log,log_message40);
1060: --fnd_file.put_line (fnd_file.log,'Successfully synchronized Workflow Roles and User Role tables, for all its
1061: --corresponding records in Resources Table. This includes inactivation, updating and creation');
1062: fnd_file.new_line (fnd_file.log,1);
1063:
1056: END IF;
1057: END LOOP;
1058:
1059: fnd_file.put_line (fnd_file.log,log_message40);
1060: --fnd_file.put_line (fnd_file.log,'Successfully synchronized Workflow Roles and User Role tables, for all its
1061: --corresponding records in Resources Table. This includes inactivation, updating and creation');
1062: fnd_file.new_line (fnd_file.log,1);
1063:
1064: END synchronize_resources_wf;
1058:
1059: fnd_file.put_line (fnd_file.log,log_message40);
1060: --fnd_file.put_line (fnd_file.log,'Successfully synchronized Workflow Roles and User Role tables, for all its
1061: --corresponding records in Resources Table. This includes inactivation, updating and creation');
1062: fnd_file.new_line (fnd_file.log,1);
1063:
1064: END synchronize_resources_wf;
1065:
1066:
1171:
1172: log_message30 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG30');
1173: log_message31 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG31');
1174:
1175: fnd_file.put_line (fnd_file.log,log_msg_hdr3);
1176: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Group Members');
1177: fnd_file.put_line (fnd_file.log,'----------------------------------------------------------------');
1178: fnd_file.new_line (fnd_file.log,1);
1179:
1172: log_message30 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG30');
1173: log_message31 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG31');
1174:
1175: fnd_file.put_line (fnd_file.log,log_msg_hdr3);
1176: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Group Members');
1177: fnd_file.put_line (fnd_file.log,'----------------------------------------------------------------');
1178: fnd_file.new_line (fnd_file.log,1);
1179:
1180: --Inactivate all wf user roles which are still active and whose corresponding records
1173: log_message31 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG31');
1174:
1175: fnd_file.put_line (fnd_file.log,log_msg_hdr3);
1176: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Group Members');
1177: fnd_file.put_line (fnd_file.log,'----------------------------------------------------------------');
1178: fnd_file.new_line (fnd_file.log,1);
1179:
1180: --Inactivate all wf user roles which are still active and whose corresponding records
1181: -- in resource group members table have been deleted (delete_flag Y).
1174:
1175: fnd_file.put_line (fnd_file.log,log_msg_hdr3);
1176: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Group Members');
1177: fnd_file.put_line (fnd_file.log,'----------------------------------------------------------------');
1178: fnd_file.new_line (fnd_file.log,1);
1179:
1180: --Inactivate all wf user roles which are still active and whose corresponding records
1181: -- in resource group members table have been deleted (delete_flag Y).
1182: FOR i IN c_wlur_grp_mem_del LOOP
1192: p_overwrite => TRUE);
1193: EXCEPTION
1194: WHEN OTHERS THEN
1195: wf_core.get_error(error_name, error_message, error_stack);
1196: fnd_file.put_line (fnd_file.log,error_message);
1197: fnd_file.new_line (fnd_file.log,1);
1198: fnd_file.put_line (fnd_file.log,error_stack);
1199: fnd_file.new_line (fnd_file.log,1);
1200: wf_core.clear;
1193: EXCEPTION
1194: WHEN OTHERS THEN
1195: wf_core.get_error(error_name, error_message, error_stack);
1196: fnd_file.put_line (fnd_file.log,error_message);
1197: fnd_file.new_line (fnd_file.log,1);
1198: fnd_file.put_line (fnd_file.log,error_stack);
1199: fnd_file.new_line (fnd_file.log,1);
1200: wf_core.clear;
1201: END;
1194: WHEN OTHERS THEN
1195: wf_core.get_error(error_name, error_message, error_stack);
1196: fnd_file.put_line (fnd_file.log,error_message);
1197: fnd_file.new_line (fnd_file.log,1);
1198: fnd_file.put_line (fnd_file.log,error_stack);
1199: fnd_file.new_line (fnd_file.log,1);
1200: wf_core.clear;
1201: END;
1202: END LOOP;
1195: wf_core.get_error(error_name, error_message, error_stack);
1196: fnd_file.put_line (fnd_file.log,error_message);
1197: fnd_file.new_line (fnd_file.log,1);
1198: fnd_file.put_line (fnd_file.log,error_stack);
1199: fnd_file.new_line (fnd_file.log,1);
1200: wf_core.clear;
1201: END;
1202: END LOOP;
1203:
1200: wf_core.clear;
1201: END;
1202: END LOOP;
1203:
1204: fnd_file.put_line (fnd_file.log,log_message8);
1205: --fnd_file.put_line (fnd_file.log,'Successfully inactivated all records in Workflow User Roles table,
1206: --whose corresponding records in Resource Group Members table have been deleted.
1207: fnd_file.new_line (fnd_file.log,1);
1208:
1201: END;
1202: END LOOP;
1203:
1204: fnd_file.put_line (fnd_file.log,log_message8);
1205: --fnd_file.put_line (fnd_file.log,'Successfully inactivated all records in Workflow User Roles table,
1206: --whose corresponding records in Resource Group Members table have been deleted.
1207: fnd_file.new_line (fnd_file.log,1);
1208:
1209:
1203:
1204: fnd_file.put_line (fnd_file.log,log_message8);
1205: --fnd_file.put_line (fnd_file.log,'Successfully inactivated all records in Workflow User Roles table,
1206: --whose corresponding records in Resource Group Members table have been deleted.
1207: fnd_file.new_line (fnd_file.log,1);
1208:
1209:
1210: -- Create Workflow User Role for Active Resource Group Members
1211: -- whose Resource Category is OTHER or TBH
1226: p_expiration_date => l_end_date_active);
1227: EXCEPTION
1228: WHEN OTHERS THEN
1229: wf_core.get_error(error_name, error_message, error_stack);
1230: fnd_file.put_line (fnd_file.log,error_message);
1231: fnd_file.new_line (fnd_file.log,1);
1232: fnd_file.put_line (fnd_file.log,error_stack);
1233: fnd_file.new_line (fnd_file.log,1);
1234: wf_core.clear;
1227: EXCEPTION
1228: WHEN OTHERS THEN
1229: wf_core.get_error(error_name, error_message, error_stack);
1230: fnd_file.put_line (fnd_file.log,error_message);
1231: fnd_file.new_line (fnd_file.log,1);
1232: fnd_file.put_line (fnd_file.log,error_stack);
1233: fnd_file.new_line (fnd_file.log,1);
1234: wf_core.clear;
1235: END;
1228: WHEN OTHERS THEN
1229: wf_core.get_error(error_name, error_message, error_stack);
1230: fnd_file.put_line (fnd_file.log,error_message);
1231: fnd_file.new_line (fnd_file.log,1);
1232: fnd_file.put_line (fnd_file.log,error_stack);
1233: fnd_file.new_line (fnd_file.log,1);
1234: wf_core.clear;
1235: END;
1236: END LOOP;
1229: wf_core.get_error(error_name, error_message, error_stack);
1230: fnd_file.put_line (fnd_file.log,error_message);
1231: fnd_file.new_line (fnd_file.log,1);
1232: fnd_file.put_line (fnd_file.log,error_stack);
1233: fnd_file.new_line (fnd_file.log,1);
1234: wf_core.clear;
1235: END;
1236: END LOOP;
1237:
1234: wf_core.clear;
1235: END;
1236: END LOOP;
1237:
1238: fnd_file.put_line (fnd_file.log,log_message30);
1239: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1240: --Groups Members Table. This is for Resources whose category is Other or To be hired.');
1241: fnd_file.new_line (fnd_file.log,1);
1242:
1235: END;
1236: END LOOP;
1237:
1238: fnd_file.put_line (fnd_file.log,log_message30);
1239: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1240: --Groups Members Table. This is for Resources whose category is Other or To be hired.');
1241: fnd_file.new_line (fnd_file.log,1);
1242:
1243:
1237:
1238: fnd_file.put_line (fnd_file.log,log_message30);
1239: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1240: --Groups Members Table. This is for Resources whose category is Other or To be hired.');
1241: fnd_file.new_line (fnd_file.log,1);
1242:
1243:
1244: -- Create Workflow User Role for Active Resource Group Members
1245: -- whose Resource Cateogry is EMPLOYEE, PARTY, PARTNER or SUPPLIER_CONTACT
1255: ,x_orig_system => l_user_orig_system
1256: ,x_orig_system_id => l_user_orig_system_id
1257: );
1258: IF (l_user_orig_system IS NULL OR l_user_orig_system_id IS NULL) THEN
1259: fnd_file.put_line (fnd_file.log,'Not creating Workflow User Roles for corresponding Resource Group Members whose Member
1260: Resource is Resource ID - '||i.resource_id||', Resource Name - '||i.resource_name||' and Resource
1261: Category - '||i.category||', because there was no corresponding User defined in wf_local_roles table');
1262: ELSE
1263: BEGIN
1271: p_expiration_date => l_end_date_active);
1272: EXCEPTION
1273: WHEN OTHERS THEN
1274: wf_core.get_error(error_name, error_message, error_stack);
1275: fnd_file.put_line (fnd_file.log,error_message);
1276: fnd_file.new_line (fnd_file.log,1);
1277: fnd_file.put_line (fnd_file.log,error_stack);
1278: fnd_file.new_line (fnd_file.log,1);
1279: wf_core.clear;
1272: EXCEPTION
1273: WHEN OTHERS THEN
1274: wf_core.get_error(error_name, error_message, error_stack);
1275: fnd_file.put_line (fnd_file.log,error_message);
1276: fnd_file.new_line (fnd_file.log,1);
1277: fnd_file.put_line (fnd_file.log,error_stack);
1278: fnd_file.new_line (fnd_file.log,1);
1279: wf_core.clear;
1280: END;
1273: WHEN OTHERS THEN
1274: wf_core.get_error(error_name, error_message, error_stack);
1275: fnd_file.put_line (fnd_file.log,error_message);
1276: fnd_file.new_line (fnd_file.log,1);
1277: fnd_file.put_line (fnd_file.log,error_stack);
1278: fnd_file.new_line (fnd_file.log,1);
1279: wf_core.clear;
1280: END;
1281: END IF;
1274: wf_core.get_error(error_name, error_message, error_stack);
1275: fnd_file.put_line (fnd_file.log,error_message);
1276: fnd_file.new_line (fnd_file.log,1);
1277: fnd_file.put_line (fnd_file.log,error_stack);
1278: fnd_file.new_line (fnd_file.log,1);
1279: wf_core.clear;
1280: END;
1281: END IF;
1282: END LOOP;
1280: END;
1281: END IF;
1282: END LOOP;
1283:
1284: fnd_file.put_line (fnd_file.log,log_message31);
1285: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1286: --Resource Group Members tables. This is for Resources who category is Employee, Party, Partner or Supplier Contact.');
1287: fnd_file.new_line (fnd_file.log,1);
1288:
1281: END IF;
1282: END LOOP;
1283:
1284: fnd_file.put_line (fnd_file.log,log_message31);
1285: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1286: --Resource Group Members tables. This is for Resources who category is Employee, Party, Partner or Supplier Contact.');
1287: fnd_file.new_line (fnd_file.log,1);
1288:
1289:
1283:
1284: fnd_file.put_line (fnd_file.log,log_message31);
1285: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1286: --Resource Group Members tables. This is for Resources who category is Employee, Party, Partner or Supplier Contact.');
1287: fnd_file.new_line (fnd_file.log,1);
1288:
1289:
1290: EXCEPTION
1291: WHEN OTHERS THEN
1289:
1290: EXCEPTION
1291: WHEN OTHERS THEN
1292: wf_core.get_error(error_name, error_message, error_stack);
1293: fnd_file.put_line (fnd_file.log,error_message);
1294: fnd_file.new_line (fnd_file.log,1);
1295: fnd_file.put_line (fnd_file.log,error_stack);
1296: fnd_file.new_line (fnd_file.log,1);
1297: wf_core.clear;
1290: EXCEPTION
1291: WHEN OTHERS THEN
1292: wf_core.get_error(error_name, error_message, error_stack);
1293: fnd_file.put_line (fnd_file.log,error_message);
1294: fnd_file.new_line (fnd_file.log,1);
1295: fnd_file.put_line (fnd_file.log,error_stack);
1296: fnd_file.new_line (fnd_file.log,1);
1297: wf_core.clear;
1298:
1291: WHEN OTHERS THEN
1292: wf_core.get_error(error_name, error_message, error_stack);
1293: fnd_file.put_line (fnd_file.log,error_message);
1294: fnd_file.new_line (fnd_file.log,1);
1295: fnd_file.put_line (fnd_file.log,error_stack);
1296: fnd_file.new_line (fnd_file.log,1);
1297: wf_core.clear;
1298:
1299: END synchronize_group_members_wf;
1292: wf_core.get_error(error_name, error_message, error_stack);
1293: fnd_file.put_line (fnd_file.log,error_message);
1294: fnd_file.new_line (fnd_file.log,1);
1295: fnd_file.put_line (fnd_file.log,error_stack);
1296: fnd_file.new_line (fnd_file.log,1);
1297: wf_core.clear;
1298:
1299: END synchronize_group_members_wf;
1300:
1435: log_message33 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG33');
1436: log_message34 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG34');
1437: log_message35 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG35');
1438:
1439: fnd_file.put_line (fnd_file.log,log_msg_hdr5);
1440: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Team Members');
1441: fnd_file.put_line (fnd_file.log,'---------------------------------------------------------------');
1442: fnd_file.new_line (fnd_file.log,1);
1443:
1436: log_message34 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG34');
1437: log_message35 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG35');
1438:
1439: fnd_file.put_line (fnd_file.log,log_msg_hdr5);
1440: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Team Members');
1441: fnd_file.put_line (fnd_file.log,'---------------------------------------------------------------');
1442: fnd_file.new_line (fnd_file.log,1);
1443:
1444: --Inactivate all wf user roles which are still active and whose corresponding records
1437: log_message35 := fnd_message.get_string ('JTF','JTF_RS_WF_ROLE_SYNC_LOG_MSG35');
1438:
1439: fnd_file.put_line (fnd_file.log,log_msg_hdr5);
1440: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Team Members');
1441: fnd_file.put_line (fnd_file.log,'---------------------------------------------------------------');
1442: fnd_file.new_line (fnd_file.log,1);
1443:
1444: --Inactivate all wf user roles which are still active and whose corresponding records
1445: -- in resource team members table have been deleted (delete_flag Y).
1438:
1439: fnd_file.put_line (fnd_file.log,log_msg_hdr5);
1440: --fnd_file.put_line (fnd_file.log,'Beginning of Resource Workflow Synchronization for Team Members');
1441: fnd_file.put_line (fnd_file.log,'---------------------------------------------------------------');
1442: fnd_file.new_line (fnd_file.log,1);
1443:
1444: --Inactivate all wf user roles which are still active and whose corresponding records
1445: -- in resource team members table have been deleted (delete_flag Y).
1446: FOR i IN c_wlur_team_mem_del LOOP
1456: p_overwrite => TRUE);
1457: EXCEPTION
1458: WHEN OTHERS THEN
1459: wf_core.get_error(error_name, error_message, error_stack);
1460: fnd_file.put_line (fnd_file.log,error_message);
1461: fnd_file.new_line (fnd_file.log,1);
1462: fnd_file.put_line (fnd_file.log,error_stack);
1463: fnd_file.new_line (fnd_file.log,1);
1464: wf_core.clear;
1457: EXCEPTION
1458: WHEN OTHERS THEN
1459: wf_core.get_error(error_name, error_message, error_stack);
1460: fnd_file.put_line (fnd_file.log,error_message);
1461: fnd_file.new_line (fnd_file.log,1);
1462: fnd_file.put_line (fnd_file.log,error_stack);
1463: fnd_file.new_line (fnd_file.log,1);
1464: wf_core.clear;
1465: END;
1458: WHEN OTHERS THEN
1459: wf_core.get_error(error_name, error_message, error_stack);
1460: fnd_file.put_line (fnd_file.log,error_message);
1461: fnd_file.new_line (fnd_file.log,1);
1462: fnd_file.put_line (fnd_file.log,error_stack);
1463: fnd_file.new_line (fnd_file.log,1);
1464: wf_core.clear;
1465: END;
1466: END LOOP;
1459: wf_core.get_error(error_name, error_message, error_stack);
1460: fnd_file.put_line (fnd_file.log,error_message);
1461: fnd_file.new_line (fnd_file.log,1);
1462: fnd_file.put_line (fnd_file.log,error_stack);
1463: fnd_file.new_line (fnd_file.log,1);
1464: wf_core.clear;
1465: END;
1466: END LOOP;
1467:
1464: wf_core.clear;
1465: END;
1466: END LOOP;
1467:
1468: fnd_file.put_line (fnd_file.log,log_message32);
1469: --fnd_file.put_line (fnd_file.log,'Successfully inactivated all records in Workflow User Roles table, whose
1470: --corresponding records in Resource Team Members table have been deleted.');
1471: fnd_file.new_line (fnd_file.log,1);
1472:
1465: END;
1466: END LOOP;
1467:
1468: fnd_file.put_line (fnd_file.log,log_message32);
1469: --fnd_file.put_line (fnd_file.log,'Successfully inactivated all records in Workflow User Roles table, whose
1470: --corresponding records in Resource Team Members table have been deleted.');
1471: fnd_file.new_line (fnd_file.log,1);
1472:
1473:
1467:
1468: fnd_file.put_line (fnd_file.log,log_message32);
1469: --fnd_file.put_line (fnd_file.log,'Successfully inactivated all records in Workflow User Roles table, whose
1470: --corresponding records in Resource Team Members table have been deleted.');
1471: fnd_file.new_line (fnd_file.log,1);
1472:
1473:
1474: -- Create Workflow User Role for Active Resource Team Members whose
1475: -- resource_type is INDIVIDUAL and resource category is OTHER or TBH
1490: p_expiration_date => l_end_date_active);
1491: EXCEPTION
1492: WHEN OTHERS THEN
1493: wf_core.get_error(error_name, error_message, error_stack);
1494: fnd_file.put_line (fnd_file.log,error_message);
1495: fnd_file.new_line (fnd_file.log,1);
1496: fnd_file.put_line (fnd_file.log,error_stack);
1497: fnd_file.new_line (fnd_file.log,1);
1498: wf_core.clear;
1491: EXCEPTION
1492: WHEN OTHERS THEN
1493: wf_core.get_error(error_name, error_message, error_stack);
1494: fnd_file.put_line (fnd_file.log,error_message);
1495: fnd_file.new_line (fnd_file.log,1);
1496: fnd_file.put_line (fnd_file.log,error_stack);
1497: fnd_file.new_line (fnd_file.log,1);
1498: wf_core.clear;
1499: END;
1492: WHEN OTHERS THEN
1493: wf_core.get_error(error_name, error_message, error_stack);
1494: fnd_file.put_line (fnd_file.log,error_message);
1495: fnd_file.new_line (fnd_file.log,1);
1496: fnd_file.put_line (fnd_file.log,error_stack);
1497: fnd_file.new_line (fnd_file.log,1);
1498: wf_core.clear;
1499: END;
1500: END LOOP;
1493: wf_core.get_error(error_name, error_message, error_stack);
1494: fnd_file.put_line (fnd_file.log,error_message);
1495: fnd_file.new_line (fnd_file.log,1);
1496: fnd_file.put_line (fnd_file.log,error_stack);
1497: fnd_file.new_line (fnd_file.log,1);
1498: wf_core.clear;
1499: END;
1500: END LOOP;
1501:
1498: wf_core.clear;
1499: END;
1500: END LOOP;
1501:
1502: fnd_file.put_line (fnd_file.log,log_message33);
1503: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1504: --Resource Team Members table of Resource Type Individual. This is for Resources who category is Other or To be hired.');
1505: fnd_file.new_line (fnd_file.log,1);
1506:
1499: END;
1500: END LOOP;
1501:
1502: fnd_file.put_line (fnd_file.log,log_message33);
1503: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1504: --Resource Team Members table of Resource Type Individual. This is for Resources who category is Other or To be hired.');
1505: fnd_file.new_line (fnd_file.log,1);
1506:
1507: -- Create Workflow User Role for Active Resource Team Members whose resource_type is
1501:
1502: fnd_file.put_line (fnd_file.log,log_message33);
1503: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1504: --Resource Team Members table of Resource Type Individual. This is for Resources who category is Other or To be hired.');
1505: fnd_file.new_line (fnd_file.log,1);
1506:
1507: -- Create Workflow User Role for Active Resource Team Members whose resource_type is
1508: -- INDIVIDUAL and resource category is EMPLOYEE, PARTY, PARTNER or SUPPLIER_CONTACT
1509: FOR i IN c_team_mem_wf_epps_crt LOOP
1519: ,x_orig_system => l_user_orig_system
1520: ,x_orig_system_id => l_user_orig_system_id
1521: );
1522: IF (l_user_orig_system IS NULL OR l_user_orig_system_id IS NULL) THEN
1523: fnd_file.put_line (fnd_file.log,'Not creating Workflow User Roles for corresponding Resource Team Members whose Member
1524: Resource is Resource ID - '||i.resource_id||', Resource Name - '||i.resource_name||' and Resource
1525: Category - '||i.category||', because there was no corresponding User defined wf_local_roles table');
1526: ELSE
1527: BEGIN
1535: p_expiration_date => l_end_date_active);
1536: EXCEPTION
1537: WHEN OTHERS THEN
1538: wf_core.get_error(error_name, error_message, error_stack);
1539: fnd_file.put_line (fnd_file.log,error_message);
1540: fnd_file.new_line (fnd_file.log,1);
1541: fnd_file.put_line (fnd_file.log,error_stack);
1542: fnd_file.new_line (fnd_file.log,1);
1543: wf_core.clear;
1536: EXCEPTION
1537: WHEN OTHERS THEN
1538: wf_core.get_error(error_name, error_message, error_stack);
1539: fnd_file.put_line (fnd_file.log,error_message);
1540: fnd_file.new_line (fnd_file.log,1);
1541: fnd_file.put_line (fnd_file.log,error_stack);
1542: fnd_file.new_line (fnd_file.log,1);
1543: wf_core.clear;
1544: END;
1537: WHEN OTHERS THEN
1538: wf_core.get_error(error_name, error_message, error_stack);
1539: fnd_file.put_line (fnd_file.log,error_message);
1540: fnd_file.new_line (fnd_file.log,1);
1541: fnd_file.put_line (fnd_file.log,error_stack);
1542: fnd_file.new_line (fnd_file.log,1);
1543: wf_core.clear;
1544: END;
1545: END IF;
1538: wf_core.get_error(error_name, error_message, error_stack);
1539: fnd_file.put_line (fnd_file.log,error_message);
1540: fnd_file.new_line (fnd_file.log,1);
1541: fnd_file.put_line (fnd_file.log,error_stack);
1542: fnd_file.new_line (fnd_file.log,1);
1543: wf_core.clear;
1544: END;
1545: END IF;
1546: END LOOP;
1544: END;
1545: END IF;
1546: END LOOP;
1547:
1548: fnd_file.put_line (fnd_file.log,log_message34);
1549: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1550: --Resource Team Members tables of Resource Type Individual. This is for Resources who category is Employee, Party,
1551: --Partner or Supplier Contact.');
1552: fnd_file.new_line (fnd_file.log,1);
1545: END IF;
1546: END LOOP;
1547:
1548: fnd_file.put_line (fnd_file.log,log_message34);
1549: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1550: --Resource Team Members tables of Resource Type Individual. This is for Resources who category is Employee, Party,
1551: --Partner or Supplier Contact.');
1552: fnd_file.new_line (fnd_file.log,1);
1553:
1548: fnd_file.put_line (fnd_file.log,log_message34);
1549: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding records in
1550: --Resource Team Members tables of Resource Type Individual. This is for Resources who category is Employee, Party,
1551: --Partner or Supplier Contact.');
1552: fnd_file.new_line (fnd_file.log,1);
1553:
1554: -- Create Workflow User Role for Active Resource Team Members ('GROUP' Members)
1555: FOR i IN c_team_mem_grp_wf_crt LOOP
1556: IF i.m_end_date_active = l_fnd_date THEN
1569: p_expiration_date => l_end_date_active);
1570: EXCEPTION
1571: WHEN OTHERS THEN
1572: wf_core.get_error(error_name, error_message, error_stack);
1573: fnd_file.put_line (fnd_file.log,error_message);
1574: fnd_file.new_line (fnd_file.log,1);
1575: fnd_file.put_line (fnd_file.log,error_stack);
1576: fnd_file.new_line (fnd_file.log,1);
1577: wf_core.clear;
1570: EXCEPTION
1571: WHEN OTHERS THEN
1572: wf_core.get_error(error_name, error_message, error_stack);
1573: fnd_file.put_line (fnd_file.log,error_message);
1574: fnd_file.new_line (fnd_file.log,1);
1575: fnd_file.put_line (fnd_file.log,error_stack);
1576: fnd_file.new_line (fnd_file.log,1);
1577: wf_core.clear;
1578: END;
1571: WHEN OTHERS THEN
1572: wf_core.get_error(error_name, error_message, error_stack);
1573: fnd_file.put_line (fnd_file.log,error_message);
1574: fnd_file.new_line (fnd_file.log,1);
1575: fnd_file.put_line (fnd_file.log,error_stack);
1576: fnd_file.new_line (fnd_file.log,1);
1577: wf_core.clear;
1578: END;
1579: END LOOP;
1572: wf_core.get_error(error_name, error_message, error_stack);
1573: fnd_file.put_line (fnd_file.log,error_message);
1574: fnd_file.new_line (fnd_file.log,1);
1575: fnd_file.put_line (fnd_file.log,error_stack);
1576: fnd_file.new_line (fnd_file.log,1);
1577: wf_core.clear;
1578: END;
1579: END LOOP;
1580:
1577: wf_core.clear;
1578: END;
1579: END LOOP;
1580:
1581: fnd_file.put_line (fnd_file.log,log_message35);
1582: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding
1583: --records in Resource Team Members table of Resource Type Group');
1584: fnd_file.new_line (fnd_file.log,1);
1585:
1578: END;
1579: END LOOP;
1580:
1581: fnd_file.put_line (fnd_file.log,log_message35);
1582: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding
1583: --records in Resource Team Members table of Resource Type Group');
1584: fnd_file.new_line (fnd_file.log,1);
1585:
1586: EXCEPTION
1580:
1581: fnd_file.put_line (fnd_file.log,log_message35);
1582: --fnd_file.put_line (fnd_file.log,'Successfully created Workflow User Role Records, for its corresponding
1583: --records in Resource Team Members table of Resource Type Group');
1584: fnd_file.new_line (fnd_file.log,1);
1585:
1586: EXCEPTION
1587: WHEN OTHERS THEN
1588: wf_core.get_error(error_name, error_message, error_stack);
1585:
1586: EXCEPTION
1587: WHEN OTHERS THEN
1588: wf_core.get_error(error_name, error_message, error_stack);
1589: fnd_file.put_line (fnd_file.log,error_message);
1590: fnd_file.new_line (fnd_file.log,1);
1591: fnd_file.put_line (fnd_file.log,error_stack);
1592: fnd_file.new_line (fnd_file.log,1);
1593: wf_core.clear;
1586: EXCEPTION
1587: WHEN OTHERS THEN
1588: wf_core.get_error(error_name, error_message, error_stack);
1589: fnd_file.put_line (fnd_file.log,error_message);
1590: fnd_file.new_line (fnd_file.log,1);
1591: fnd_file.put_line (fnd_file.log,error_stack);
1592: fnd_file.new_line (fnd_file.log,1);
1593: wf_core.clear;
1594:
1587: WHEN OTHERS THEN
1588: wf_core.get_error(error_name, error_message, error_stack);
1589: fnd_file.put_line (fnd_file.log,error_message);
1590: fnd_file.new_line (fnd_file.log,1);
1591: fnd_file.put_line (fnd_file.log,error_stack);
1592: fnd_file.new_line (fnd_file.log,1);
1593: wf_core.clear;
1594:
1595: END synchronize_team_members_wf;
1588: wf_core.get_error(error_name, error_message, error_stack);
1589: fnd_file.put_line (fnd_file.log,error_message);
1590: fnd_file.new_line (fnd_file.log,1);
1591: fnd_file.put_line (fnd_file.log,error_stack);
1592: fnd_file.new_line (fnd_file.log,1);
1593: wf_core.clear;
1594:
1595: END synchronize_team_members_wf;
1596: