135: p_threads => l_threads,
136: p_max_errors => g_max_errors_allowed,
137: p_benefit_action_id => p_benefit_action_id);
138: --
139: l_actn := 'Calling ben_batch_utils.ini...';
140: ben_batch_utils.ini;
141: --
142: -- Copy benefit action id to global in benutils package
143: --
136: p_max_errors => g_max_errors_allowed,
137: p_benefit_action_id => p_benefit_action_id);
138: --
139: l_actn := 'Calling ben_batch_utils.ini...';
140: ben_batch_utils.ini;
141: --
142: -- Copy benefit action id to global in benutils package
143: --
144: benutils.g_benefit_action_id := p_benefit_action_id;
148: open c_parameter;
149: fetch c_parameter into l_parm;
150: close c_parameter;
151: --
152: l_actn := 'Calling ben_batch_utils.print_parameters...';
153: --
154: ben_batch_utils.print_parameters
155: (p_thread_id => p_thread_id
156: ,p_benefit_action_id => p_benefit_action_id
150: close c_parameter;
151: --
152: l_actn := 'Calling ben_batch_utils.print_parameters...';
153: --
154: ben_batch_utils.print_parameters
155: (p_thread_id => p_thread_id
156: ,p_benefit_action_id => p_benefit_action_id
157: ,p_validate => p_validate
158: ,p_business_group_id => p_business_group_id
272: hr_utility.set_location('End of loops',70);
273: benutils.write_table_and_file(p_table => TRUE, p_file => FALSE);
274: --
275: l_actn := 'Calling Log_statistics...';
276: ben_batch_utils.write_logfile(p_num_pers_processed => g_persons_processed
277: ,p_num_pers_errored => g_persons_errored
278: );
279: hr_utility.set_location ('Leaving '||l_proc,70);
280: Exception
278: );
279: hr_utility.set_location ('Leaving '||l_proc,70);
280: Exception
281: When others then
282: ben_batch_utils.rpt_error(p_proc => l_proc
283: ,p_last_actn => l_actn
284: ,p_rpt_flag => TRUE
285: );
286: ben_batch_utils.write_logfile(p_num_pers_processed => g_persons_processed
282: ben_batch_utils.rpt_error(p_proc => l_proc
283: ,p_last_actn => l_actn
284: ,p_rpt_flag => TRUE
285: );
286: ben_batch_utils.write_logfile(p_num_pers_processed => g_persons_processed
287: ,p_num_pers_errored => g_persons_errored
288: );
289: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
290: hr_utility.set_location ('HR_6153_ALL_PROCEDURE_FAIL',05);
371: l_effective_date := trunc(fnd_date.canonical_to_date(p_effective_date));
372: l_first_day_of_month := trunc(fnd_date.canonical_to_date(p_first_day_of_month));
373: --
374: --
375: --?? l_actn := 'Initialize the ben_batch_utils cache...';
376: --?? ben_batch_utils.ini;
377: --?? l_actn := 'Initialize the ben_batch_utils cache...';
378: --?? ben_batch_utils.ini(p_actn_cd => 'PROC_INFO');
379: --
372: l_first_day_of_month := trunc(fnd_date.canonical_to_date(p_first_day_of_month));
373: --
374: --
375: --?? l_actn := 'Initialize the ben_batch_utils cache...';
376: --?? ben_batch_utils.ini;
377: --?? l_actn := 'Initialize the ben_batch_utils cache...';
378: --?? ben_batch_utils.ini(p_actn_cd => 'PROC_INFO');
379: --
380: --
373: --
374: --
375: --?? l_actn := 'Initialize the ben_batch_utils cache...';
376: --?? ben_batch_utils.ini;
377: --?? l_actn := 'Initialize the ben_batch_utils cache...';
378: --?? ben_batch_utils.ini(p_actn_cd => 'PROC_INFO');
379: --
380: --
381: -- Create actions if we are not doing a restart.
374: --
375: --?? l_actn := 'Initialize the ben_batch_utils cache...';
376: --?? ben_batch_utils.ini;
377: --?? l_actn := 'Initialize the ben_batch_utils cache...';
378: --?? ben_batch_utils.ini(p_actn_cd => 'PROC_INFO');
379: --
380: --
381: -- Create actions if we are not doing a restart.
382: --
395: Loop
396: fetch c_prems into l_prems;
397: Exit when c_prems%notfound;
398: l_cnt := l_cnt + 1;
399: l_actn := 'Calling ben_batch_utils.comp_obj_selection_rule...';
400: hr_utility.set_location('l_actl_prem_id='||to_char(l_prems.actl_prem_id)||
401: ' l_cnt='||to_char(l_cnt),18);
402: --
403: -- if comp_obj_selection_rule is pass, test rule.
546: l_num_range := l_num_range + 1;
547: End if;
548: Else
549: hr_utility.set_location('This is a RESTART',42);
550: l_actn := 'Calling Ben_batch_utils.create_restart_person_actions...';
551: Ben_batch_utils.create_restart_person_actions
552: (p_benefit_action_id => p_benefit_action_id
553: ,p_effective_date => l_effective_date
554: ,p_chunk_size => p_chunk_size
547: End if;
548: Else
549: hr_utility.set_location('This is a RESTART',42);
550: l_actn := 'Calling Ben_batch_utils.create_restart_person_actions...';
551: Ben_batch_utils.create_restart_person_actions
552: (p_benefit_action_id => p_benefit_action_id
553: ,p_effective_date => l_effective_date
554: ,p_chunk_size => p_chunk_size
555: ,p_threads => p_threads
585: );
586: --
587: -- Store the request id of the concurrent request
588: --
589: ben_batch_utils.g_num_processes := ben_batch_utils.g_num_processes + 1;
590: ben_batch_utils.g_processes_tbl(ben_batch_utils.g_num_processes)
591: := l_request_id;
592: End loop;
593: Elsif (l_num_range = 0 ) then
586: --
587: -- Store the request id of the concurrent request
588: --
589: ben_batch_utils.g_num_processes := ben_batch_utils.g_num_processes + 1;
590: ben_batch_utils.g_processes_tbl(ben_batch_utils.g_num_processes)
591: := l_request_id;
592: End loop;
593: Elsif (l_num_range = 0 ) then
594: l_actn := 'Calling Ben_batch_utils.print_parameters...';
590: ben_batch_utils.g_processes_tbl(ben_batch_utils.g_num_processes)
591: := l_request_id;
592: End loop;
593: Elsif (l_num_range = 0 ) then
594: l_actn := 'Calling Ben_batch_utils.print_parameters...';
595: hr_utility.set_location('Calling Ben_batch_utils.print_parameters ',56);
596: Ben_batch_utils.print_parameters
597: (p_thread_id => 99
598: ,p_benefit_action_id => l_benefit_action_id
591: := l_request_id;
592: End loop;
593: Elsif (l_num_range = 0 ) then
594: l_actn := 'Calling Ben_batch_utils.print_parameters...';
595: hr_utility.set_location('Calling Ben_batch_utils.print_parameters ',56);
596: Ben_batch_utils.print_parameters
597: (p_thread_id => 99
598: ,p_benefit_action_id => l_benefit_action_id
599: ,p_validate => p_validate
592: End loop;
593: Elsif (l_num_range = 0 ) then
594: l_actn := 'Calling Ben_batch_utils.print_parameters...';
595: hr_utility.set_location('Calling Ben_batch_utils.print_parameters ',56);
596: Ben_batch_utils.print_parameters
597: (p_thread_id => 99
598: ,p_benefit_action_id => l_benefit_action_id
599: ,p_validate => p_validate
600: ,p_business_group_id => p_business_group_id
618:
619: -- Because there are other processes to run, do not error if first process finds
620: -- noone to process.
621:
622: Ben_batch_utils.write(p_text =>
623: '<< No Process Premiums were selected with above selection criteria >>' );
624: --fnd_message.set_name('BEN','BEN_92453_NO_PREMS_TO_PROCESS');
625: --fnd_message.raise_error;
626: End if;
639: ,p_mo_num => p_mo_num
640: ,p_yr_num => p_yr_num
641: ,p_first_day_of_month => p_first_day_of_month
642: );
643: l_actn := 'Calling ben_batch_utils.check_all_slaves_finished...';
644:
645: hr_utility.set_location('Calling ben_batch_utils.check_all_slaves_finished ',64);
646: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
647: ben_batch_utils.end_process(p_benefit_action_id => l_benefit_action_id
641: ,p_first_day_of_month => p_first_day_of_month
642: );
643: l_actn := 'Calling ben_batch_utils.check_all_slaves_finished...';
644:
645: hr_utility.set_location('Calling ben_batch_utils.check_all_slaves_finished ',64);
646: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
647: ben_batch_utils.end_process(p_benefit_action_id => l_benefit_action_id
648: ,p_person_selected => l_person_cnt
649: ,p_business_group_id => p_business_group_id
642: );
643: l_actn := 'Calling ben_batch_utils.check_all_slaves_finished...';
644:
645: hr_utility.set_location('Calling ben_batch_utils.check_all_slaves_finished ',64);
646: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
647: ben_batch_utils.end_process(p_benefit_action_id => l_benefit_action_id
648: ,p_person_selected => l_person_cnt
649: ,p_business_group_id => p_business_group_id
650: ,p_non_person_cd => 'PREM');
643: l_actn := 'Calling ben_batch_utils.check_all_slaves_finished...';
644:
645: hr_utility.set_location('Calling ben_batch_utils.check_all_slaves_finished ',64);
646: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
647: ben_batch_utils.end_process(p_benefit_action_id => l_benefit_action_id
648: ,p_person_selected => l_person_cnt
649: ,p_business_group_id => p_business_group_id
650: ,p_non_person_cd => 'PREM');
651: end if;
652: hr_utility.set_location ('Leaving '||l_proc,99);
653: --
654: Exception
655: when others then
656: ben_batch_utils.rpt_error(p_proc => l_proc
657: ,p_last_actn => l_actn
658: ,p_rpt_flag => TRUE );
659: --
660: benutils.write(p_text => fnd_message.get);
661: benutils.write(p_text => sqlerrm);
662: benutils.write(p_text => 'Big Error Occured');
663: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
664: If (l_num_range > 0) then
665: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
666: ben_batch_utils.end_process(p_benefit_action_id => l_benefit_action_id
667: ,p_person_selected => l_person_cnt
668: ,p_business_group_id => p_business_group_id
669: ) ;
662: benutils.write(p_text => 'Big Error Occured');
663: benutils.write_table_and_file(p_table => TRUE, p_file => TRUE);
664: If (l_num_range > 0) then
665: ben_batch_utils.check_all_slaves_finished(p_rpt_flag => TRUE);
666: ben_batch_utils.end_process(p_benefit_action_id => l_benefit_action_id
667: ,p_person_selected => l_person_cnt
668: ,p_business_group_id => p_business_group_id
669: ) ;
670: End if;