DBA Data[Home] [Help]

PACKAGE: APPS.HR_PERF_MGMT_PLAN_INTERNAL

Source


1 Package HR_PERF_MGMT_PLAN_INTERNAL  as
2 /* $Header: pepmpbsi.pkh 120.8.12010000.3 2008/11/21 09:49:49 psugumar ship $ */
3   --
4   -- Package global constants.
5   --
6   g_NO_DEBUG     CONSTANT NUMBER := 0;
7   g_PIPE         CONSTANT NUMBER := 1;
8   g_FND_LOG      CONSTANT NUMBER := 2;
9   --
10   g_REGULAR_LOG  CONSTANT NUMBER := 1;
11   g_DEBUG_LOG  CONSTANT NUMBER   := 2;
12   --
13 
14   SUCCESS CONSTANT NUMBER := 0;
15   WARNING CONSTANT NUMBER := 1;
16   ERROR   CONSTANT NUMBER := 2;
17   --
18   -- Package global variables.
19   --
20   g_errbuf        VARCHAR2(2000);
21   g_retcode       NUMBER;
22 
23 /*
24   function get_appraisal_config_params(p_appr_initiator_code in per_appraisal_periods.initiator_code%TYPE,
25                                     p_function_id in out nocopy fnd_form_functions.function_id%TYPE,
26                                     p_function_name in out nocopy fnd_form_functions.function_name%TYPE,
27                                     p_func_parameters in out nocopy fnd_form_functions.parameters%TYPE,
28                                    p_appraisal_sys_type in out nocopy per_appraisals.appraisal_system_status%TYPE)
29   return boolean;
30 */
31 
32 --
33 -- ----------------------------------------------------------------------------
34 -- |---------------------------< get_plan_action >----------------------------|
35 -- ----------------------------------------------------------------------------
36 -- {Start Of Comments}
37 --
38 -- Description: Publish Performance Management Plan workflow process calls this
39 --              function to read the WPM_PLAN_ACTION attribute value.
40 --
41 --
42 -- Prerequisites:
43 --
44 --
45 -- In Parameters:
46 --   Name                           Reqd Type     Description
47 --
48 --
49 -- Post Success:
50 --
51 --
52 --   Name                           Type     Description
53 --
54 -- Post Failure:
55 --
56 --
57 -- Access Status:
58 --   Internal Development Use Only.
59 --
60 -- {End Of Comments}
61 --
62 procedure get_plan_action(itemtype  in varchar2,
63                           itemkey   in varchar2,
64                           actid     in number,
65                           funcmode  in varchar2,
66                           resultout out nocopy varchar2);
67 --
68 --
69 -- ----------------------------------------------------------------------------
70 -- |---------------------------< get_plan_method >----------------------------|
71 -- ----------------------------------------------------------------------------
72 -- {Start Of Comments}
73 --
74 -- Description: Publish Performance Management Plan workflow process calls this
75 --              function to read the WPM_PLAN_METHOD attribute value.
76 --
77 --
78 -- Prerequisites:
79 --
80 --
81 -- In Parameters:
82 --   Name                           Reqd Type     Description
83 --
84 --
85 -- Post Success:
86 --
87 --
88 --   Name                           Type     Description
89 --
90 -- Post Failure:
91 --
92 --
93 -- Access Status:
94 --   Internal Development Use Only.
95 --
96 -- {End Of Comments}
97 --
98 procedure get_plan_method(itemtype  in varchar2,
99                           itemkey   in varchar2,
100                           actid     in number,
101                           funcmode  in varchar2,
102                           resultout out nocopy varchar2);
103 --
104 --
105 -- ----------------------------------------------------------------------------
106 -- |----------------------< populate_plan_members_cache >---------------------|
107 -- ----------------------------------------------------------------------------
108 -- {Start Of Comments}
109 --
110 -- Description: Publish Performance Management Plan workflow process calls this
111 --              function to populate the plan population in plsql cache.
112 --
113 --
114 -- Prerequisites:
115 --
116 --
117 -- In Parameters:
118 --   Name                           Reqd Type     Description
119 --
120 --
121 -- Post Success:
122 --
123 --
124 --   Name                           Type     Description
125 --
126 -- Post Failure:
127 --
128 --
129 -- Access Status:
130 --   Internal Development Use Only.
131 --
132 -- {End Of Comments}
133 --
134 procedure populate_plan_members_cache(itemtype  in varchar2,
135                                       itemkey   in varchar2,
136                                       actid     in number,
137                                       funcmode  in varchar2,
138                                       resultout out nocopy varchar2);
139 --
140 --
141 -- ----------------------------------------------------------------------------
142 -- |---------------------------< get_plan_member >----------------------------|
143 -- ----------------------------------------------------------------------------
144 -- {Start Of Comments}
145 --
146 -- Description: Publish Performance Management Plan workflow process calls this
147 --              function to get first or next the plan member.
148 --
149 --
150 -- Prerequisites:
151 --
152 --
153 -- In Parameters:
154 --   Name                           Reqd Type     Description
155 --
156 --
157 -- Post Success:
158 --
159 --
160 --   Name                           Type     Description
161 --
162 -- Post Failure:
163 --
164 --
165 -- Access Status:
166 --   Internal Development Use Only.
167 --
168 -- {End Of Comments}
169 --
170 procedure get_plan_member(itemtype  in varchar2,
171                           itemkey   in varchar2,
172                           actid     in number,
173                           funcmode  in varchar2,
174                           resultout out nocopy varchar2);
175 --
176 --
177 -- ----------------------------------------------------------------------------
178 -- |------------------------< get_top_plan_member >--------------------------|
179 -- ----------------------------------------------------------------------------
180 -- {Start Of Comments}
181 --
182 -- Description: Publish Performance Management Plan workflow process calls this
183 --              function to get first or next the plan member from top of the
184 --              plan population hierarchy.
185 --
186 --
187 -- Prerequisites:
188 --
189 --
190 -- In Parameters:
191 --   Name                           Reqd Type     Description
192 --
193 --
194 -- Post Success:
195 --
196 --
197 --   Name                           Type     Description
198 --
199 -- Post Failure:
200 --
201 --
202 -- Access Status:
203 --   Internal Development Use Only.
204 --
205 -- {End Of Comments}
206 --
207 procedure get_top_plan_member(itemtype  in varchar2,
208                               itemkey   in varchar2,
209                               actid     in number,
210                               funcmode  in varchar2,
211                               resultout out nocopy varchar2);
212 --
213 --
214 -- ----------------------------------------------------------------------------
215 -- |----------------------< get_non_top_plan_member >-------------------------|
216 -- ----------------------------------------------------------------------------
217 -- {Start Of Comments}
218 --
219 -- Description: Publish Performance Management Plan workflow process calls this
220 --              function to get first or next the plan member that is does not
221 --              exist in top population of the plan population hierarchy.
222 --
223 --
224 -- Prerequisites:
225 --
226 --
227 -- In Parameters:
228 --   Name                           Reqd Type     Description
229 --
230 --
231 -- Post Success:
232 --
233 --
234 --   Name                           Type     Description
235 --
236 -- Post Failure:
237 --
238 --
239 -- Access Status:
240 --   Internal Development Use Only.
241 --
242 -- {End Of Comments}
243 --
244 procedure get_non_top_plan_member(itemtype  in varchar2,
245                                   itemkey   in varchar2,
246                                   actid     in number,
247                                   funcmode  in varchar2,
248                                   resultout out nocopy varchar2);
249 
250 --
251 -- ----------------------------------------------------------------------------
252 -- |---------------------< submit_publish_plan_cp >---------------------------|
253 -- ----------------------------------------------------------------------------
254 -- {Start Of Comments}
255 --
256 -- Description: The procedure submits Publish Performance Management Plan
257 --              concurrent program and updated the plan status to SUBMITTED.
258 --
259 --
260 -- Prerequisites:
261 --
262 --
263 -- In Parameters:
264 --   Name                           Reqd Type     Description
265 --
266 --
267 -- Post Success:
268 --
269 --
270 --   Name                           Type     Description
271 --
272 -- Post Failure:
273 --
274 --
275 -- Access Status:
276 --   Internal Development Use Only.
277 --
278 -- {End Of Comments}
279 --
280 procedure submit_publish_plan_cp(p_effective_date        in     varchar2
281                                 ,p_plan_id               in     number
282                                 ,p_reverse_mode          in     varchar2
283                                 ,p_item_type             in     varchar2
284                                 ,p_wf_process            in     varchar2
285                                 ,p_object_version_number in out nocopy number
286                                 ,p_status_code           in out nocopy varchar2);
287 --
288 --
289 -- ----------------------------------------------------------------------------
290 -- |---------------------------< publish_plan_cp >----------------------------|
291 -- ----------------------------------------------------------------------------
292 -- {Start Of Comments}
293 --
294 -- Description: Publish Performance Management Plan concurrent program calls
295 --              procedure.
296 --
297 --
298 -- Prerequisites:
299 --
300 --
301 -- In Parameters:
302 --   Name                           Reqd Type     Description
303 --
304 --
305 -- Post Success:
306 --
307 --
308 --   Name                           Type     Description
309 --
310 -- Post Failure:
311 --
312 --
313 -- Access Status:
314 --   Internal Development Use Only.
315 --
316 -- {End Of Comments}
317 --
318 procedure publish_plan_cp
319   (errbuf                      out  nocopy varchar2
320   ,retcode                     out  nocopy number
321   ,p_effective_date            in   varchar2
322   ,p_plan_id                   in   number
323   ,p_reverse_mode              in   varchar2    default 'N'
324   ,p_what_if                   in   varchar2    default 'N'
325   ,p_log_output                in   varchar2    default 'N'
326   ,p_action_parameter_group_id in   number      default NULL
327   ,p_item_type                 in   varchar2    default 'HRWPM'
328   ,p_wf_process                in   varchar2    default 'HR_NOTIFY_WPM_PLAN_POP_PRC'
329   );
330 
331 --
332 --
333 -- ----------------------------------------------------------------------------
334 -- |-----------------------------< publish_plan >-----------------------------|
335 -- ----------------------------------------------------------------------------
336 -- {Start Of Comments}
337 --
338 -- Description: Publish Performance Management Plan APIs and concurrent program
339 --              calls this procedure.
340 --
341 --
342 -- Prerequisites:
343 --
344 --
345 -- In Parameters:
346 --   Name                           Reqd Type     Description
347 --
348 --
349 -- Post Success:
350 --
351 --
352 --   Name                           Type     Description
353 --
354 -- Post Failure:
355 --
356 --
357 -- Access Status:
358 --   Internal Development Use Only.
359 --
360 -- {End Of Comments}
361 --
362 procedure publish_plan
363   (p_effective_date            in   date
364   ,p_plan_id                   in   number
365   ,p_object_version_number     in out nocopy number
366   ,p_reverse_mode              in   varchar2    default 'N'
367   ,p_what_if                   in   varchar2    default 'N'
368   ,p_log_output                in   varchar2    default 'N'
369   ,p_action_parameter_group_id in   number      default NULL
370   ,p_item_type                 in   varchar2    default 'HRWPM'
371   ,p_wf_process                in   varchar2    default 'HR_NOTIFY_WPM_PLAN_POP_PRC'
372   );
373 --
374 -- ----------------------------------------------------------------------------
375 -- |----------------------------< send_fyi_ntf >------------------------------|
376 -- ----------------------------------------------------------------------------
377 --
378 procedure SEND_FYI_NTF
379   (itemtype   in varchar2
380   ,itemkey    in varchar2
381   ,actid      in number
382   ,funcmode   in varchar2
383   ,resultout  out nocopy varchar2);
384 --
385 -- ----------------------------------------------------------------------------
386 -- |--------------------------< send_fyi_ntf_admin >--------------------------|
387 -- ----------------------------------------------------------------------------
388 --
389 procedure SEND_FYI_NTF_ADMIN
390   (itemtype   in varchar2
391   ,itemkey    in varchar2
392   ,actid      in number
393   ,funcmode   in varchar2
394   ,resultout  out nocopy varchar2);
395 --
396 procedure SEND_FYI_ADMIN
397   (p_plan_rec           in  per_perf_mgmt_plans%ROWTYPE
398   ,p_status             in  varchar2
399   ,p_request_id         in  number
400   );
401 -- ----------------------------------------------------------------------------
402 -- |----------------------------< copy_past_objectives >----------------------|
403 -- ----------------------------------------------------------------------------
404 -- {Start Of Comments}
405 --
406 -- Description:
407 --   Copy objectives from previous plan to the current plan being published.
408 --
409 -- Prerequisites:
410 --   None.
411 --
412 -- In Arguments:
413 --
414 --
415 -- Post Success:
416 --  Processing continues if objective(s) is created.
417 --
418 -- Post Failure:
419 --  An application error is raised if objective is not created.
420 --
421 -- Access Status:
422 --   Internal Only.
423 --
424 -- {End Of Comments}
425 -- ----------------------------------------------------------------------------
426 procedure copy_past_objectives
427   (p_effective_date            in  date
428   ,p_business_group_id         in  number
429   ,p_person_id                 in  number
430   ,p_scorecard_id              in  number
431   ,p_start_date                in  date
432   ,p_end_date                  in  date
433   ,p_target_date               in  date default null
434   ,p_assignemnt_id             in  number
435   ,p_prev_plan_id              in  number
436   ,p_curr_plan_id              in  number
437   );
438 -- ----------------------------------------------------------------------------
439 -- |----------------------------< is_supervisor_in_org >----------------------|
440 ---------------------------------------------------------------------
441 --{Start Of Comments}
442 --
443 -- Description:
444 --   return true if the person is the topmost supervisor
445 --
446 -- Prerequisites:
447 --   None.
448 --
449 -- In Arguments:
450 --
451 --
452 -- Post Success:
453 --  signifies that this is the top supervisor in the organization.
454 --
455 -- Post Failure:
456 --
457 --
458 -- Access Status:
459 --   Internal Only.
460 --
461 -- {End Of Comments}
462  ---------------------------------------------------------------------
463   FUNCTION is_supervisor_in_org
464 
465   (p_top_organization_id       in  number
466   ,p_person_id                 in  number
467 
468   )RETURN NUMBER;
469 -- ----------------------------------------------------------------------------
470 -- |----------------------------< change_plan_active_status >----------------------|
471 ---------------------------------------------------------------------
472 --{Start Of Comments}
473 --
474 -- Description:
475 --   updates the plan status and swaps the status to Inactive/published if teh current status is published/inactive
476 --
477 -- Prerequisites:
478 --   None.
479 --
480 -- In Arguments:
481 -- Plan ID
482 --
483 -- Post Success:
484 --  Plan status updated to Inactive/Published
485 --
486 -- Post Failure:
487 --
488 --
489 -- Access Status:
490 --   Internal Only.
491 --
492 -- {End Of Comments}
493  ---------------------------------------------------------------------
494 
495 procedure change_plan_active_status
496 
497   (p_plan_id       in  number
498   );
499 
500 -- ----------------------------------------------------------------------------
501 -- |--------------------------< backout_perf_mgmt_plan>----------------------|
502 -- ----------------------------------------------------------------------------
503 -- {Start Of Comments}
504 --
505 -- Description:
506 --   This procedure backs out the Performance Management Plan that is
507 --   published to a given population. Deletes all the score cards, appraisals
508 --   that are created during the plan publish. This is an irreversible process.
509 -- Prerequisites:
510 --   None.
511 --
512 -- In Arguments:
513 --
514 --
515 -- Post Success:
516 --  All data that is created as part of the plan publish. The plan will be set
517 --  to status Draft, so that the further updates can be made to the plan and
518 --  the same can be republished.
519 --
520 -- Post Failure:
521 --  Plan data will be intact.
522 --
523 -- Access Status:
524 --   Internal Only.
525 --
526 -- {End Of Comments}
527 -- ----------------------------------------------------------------------------
528   PROCEDURE backout_perf_mgmt_plan
529   (errbuf                      out  nocopy varchar2
530   ,retcode                     out  nocopy number
531   ,p_effective_date            in   Varchar2
532   ,p_plan_id                   in   number
533   ,p_report_only               in   VARCHAR2 DEFAULT 'Y');
534 --
535 -- -----------------------------------------------------------------------
536 -- |----------< backout_perf_mgmt_plan_cp>----------------------|
537 -- ----------------------------------------------------------------------------
538 -- {Start Of Comments}
539 --
540 -- Description:
541 --   This function submit the concurrent job that backs out the Performance
542 --   Management Plan that is published to a given population. Deletes all the
543 --   score cards, appraisals that are created during the plan publish. This is
544 --   an irreversible process.
545 -- Prerequisites:
546 --   None.
547 --
548 -- In Arguments:
549 --
550 --
551 -- Post Success:
552 -- Returns the request_id of the concurrent request that is submitted.
553 --
554 -- Post Failure:
555 --  Plan will not be backed out.
556 --
557 -- Access Status:
558 --   Internal Only.
559 --
560 -- {End Of Comments}
561 -- ----------------------------------------------------------------------------
562 FUNCTION backout_perf_mgmt_plan_cp(p_effective_date            in   date
563                                   ,p_plan_id                   in   number
564                                   ,p_report_only               in   VARCHAR2
565 DEFAULT 'Y')
566                                   RETURN NUMBER ;
567 --
568 -- ----------------------------------------------------------------------------
569 -- |--------------------------< plan_admin_actions_cp>----------------------|
570 -- ----------------------------------------------------------------------------
571 -- {Start Of Comments}
572 --
573 -- Description:
574 --   This function submits the concurrent job that performs the selected
575 --   task on the given list of employees. This is used in the new
576 --   plan administration area for Performance Mgmt administrators.
577 -- Prerequisites:
578 --   None.
579 --
580 -- In Arguments:
581 --
582 --
583 -- Post Success:
584 -- Returns the request_id of the concurrent request that is submitted.
585 --
586 -- Post Failure:
587 --  No request will be returned and error raised
588 --
589 -- Access Status:
590 --   Internal Only.
591 --
592 -- {End Of Comments}
593 -- ----------------------------------------------------------------------------
594 FUNCTION plan_admin_actions_cp    (p_effective_date            in   date
595                                   ,p_plan_id                   in   number
596                                   ,p_selected_entities_list    in   varchar2
597                                   ,p_task_code                 in   varchar2)
598                                   RETURN NUMBER ;
599 -- ----------------------------------------------------------------------------
600 -- |--------------------------< plan_admin_actions>----------------------|
601 -- ----------------------------------------------------------------------------
602 -- {Start Of Comments}
603 --
604 -- Description:
605 --   This procedure performs the selected task on the given list of employees.
606 --   This is used in the new plan administration area for Performance Mgmt
607 --   administrators.
608 -- Prerequisites:
609 --   None.
610 --
611 -- In Arguments:
612 --
613 --
614 -- Post Success:
615 -- Performs the requested action all the selected persons..
616 --
617 -- Post Failure:
618 --  No action would be performed and appropriate error message(s) logged.
619 --
620 -- Access Status:
621 --   Internal Only.
622 --
623 -- {End Of Comments}
624 -- ----------------------------------------------------------------------------
625 PROCEDURE plan_admin_actions   (
626                                 errbuf                      OUT nocopy VARCHAR2
627                                ,retcode                     OUT nocopy  NUMBER
628                                ,p_effective_date            in   varchar2
629                                ,p_plan_id                   in   number
630                                ,p_selected_entities_list    in   varchar2
631                                ,p_task_code                 in   varchar2);
632 
633 PROCEDURE send_message_notification (p_person_id in number,
634 p_message varchar2,
635 p_plan_id per_perf_mgmt_plans.plan_id%type default null,
636 p_full_name per_all_people_f.full_name%type
637 ) ;
638 
639 FUNCTION get_manager_id ( p_person_id in per_all_assignments_f.person_id%TYPE , p_assignment_id per_all_assignments_f.assignment_id%type)
640 RETURN number;
641 
642 
643 end HR_PERF_MGMT_PLAN_INTERNAL;
644 
645 
646