4
1 Package hr_transaction_api AUTHID CURRENT_USER as
2 /* $Header: petrnapi.pkh 120.4.12000000.2 2007/05/04 18:39:47 srajakum ship $ */
3
5 --Global Variables
6 g_update_flag varchar2(10) ; --ns
7
8 -- ----------------------------------------------------------------------------
9 -- |----------------------< get_transaction_step_info >-----------------------|
10 -- ----------------------------------------------------------------------------
11 -- {Start Of Comments}
12 --
13 -- Description:
14 -- This API retrieves the transaction step information. If the transaction step does not exist
15 -- null is returned, else a corresponding value for the transaction step is returned.
16 --
17 -- Prerequisites:
18 -- None.
19 --
20 -- In Parameters:
21 -- Name Reqd Type Description
22 -- p_item_type yes varchar2 Identifies the item type.
23 -- p_item_key yes varchar2 Identifies the item key.
24 -- p_activity_id yes number Identifies the activity id.
25 --
26 -- Post Success:
27 -- The transaction step information is successfully retrieved.
28 -- Name Type Description
29 -- p_transaction_step_id number Identifies the transaction step.
30 -- p_object_version_number number Identifies the corresponding object version number.
31 --
32 -- Post Failure:
33 -- None.
34 --
35 -- Access Status:
36 -- Internal Development Use Only.
37 --
38 -- {End Of Comments}
39 --
40 procedure get_transaction_step_info
41 (p_item_type in varchar2
42 ,p_item_key in varchar2
43 ,p_activity_id in number
44 ,p_transaction_step_id out nocopy number
45 ,p_object_version_number out nocopy number);
46 -- --------------------------------------------------------------------
47 -- ------------------<< get_transaction_step_info >>-------------------
48 -- --------------------------------------------------------------------
49 -- {Start Of Comments}
50 --
51 -- Description:
52 -- This API retrieves the transaction step data, where there may be more than
53 -- one transaction steps existing.
54 --
55 -- Prerequisites:
56 -- None
57 --
58 -- In Parameters:
59 -- Name Reqd Type Description
60 -- p_item_type yes varchar2 Identifies the item type.
61 -- p_item_key yes varchar2 Identifies the item key.
62 -- p_activity_id yes number Identifies the activity id.
63 --
64 -- Post Success:
65 -- The transaction step information is successfully retrieved.
66 -- Name Type Description
67 -- p_transaction_step_id hr_util_web.g_varchar2_tab_type Identifies the transactions steps
68 -- p_object_version_number hr_util_web.g_varchar2_tab_type Identifies the corresponding object version numbers.
69 -- p_rows number Identifies the number of transaction steps returned.
70 --
71 -- Post Failure:
72 -- None.
73 --
74 -- Access Status:
75 -- Internal Development Use Only.
76 --
77 -- {End Of Comments}
78 --
79 procedure get_transaction_step_info
80 (p_item_type in varchar2
81 ,p_item_key in varchar2
82 ,p_activity_id in number
83 ,p_transaction_step_id out nocopy hr_util_web.g_varchar2_tab_type
84 ,p_object_version_number out nocopy hr_util_web.g_varchar2_tab_type
85 ,p_rows out nocopy number);
86 -- --------------------------------------------------------------------
87 -- ------------------<< get_transaction_step_info >>-------------------
88 -- --------------------------------------------------------------------
89 -- {Start Of Comments}
90 --
91 -- Description:
92 -- This API retrieves the transaction step data, where there may be more than
93 -- one transaction steps existing.
94 --
95 -- Prerequisites:
96 -- None
97 --
98 -- In Parameters:
99 -- Name Reqd Type Description
100 -- p_item_type yes varchar2 Identifies the item type.
101 -- p_item_key yes varchar2 Identifies the item key.
102 --
103 -- Post Success:
104 -- The transaction step information is successfully retrieved.
105 -- Name Type Description
106 -- p_transaction_step_id hr_util_web.g_varchar2_tab_type Identifies the transactions steps
107 -- p_object_version_number hr_util_web.g_varchar2_tab_type Identifies the corresponding object version numbers.
111 -- None.
108 -- p_rows number Identifies the number of transaction steps returned.
109 --
110 -- Post Failure:
112 --
113 -- Access Status:
114 -- Internal Development Use Only.
115 --
116 -- {End Of Comments}
117 --
118 procedure get_transaction_step_info
119 (p_item_type in varchar2
120 ,p_item_key in varchar2
121 ,p_transaction_step_id out nocopy hr_util_web.g_varchar2_tab_type
122 ,p_object_version_number out nocopy hr_util_web.g_varchar2_tab_type
123 ,p_rows out nocopy number);
124 -- ----------------------------------------------------------------------------
125 -- |----------------------< get_transaction_step_info >-----------------------|
126 -- ----------------------------------------------------------------------------
127 -- {Start Of Comments}
128 --
129 -- Description:
130 -- This API retrieves the transaction step information when transaction step id is provided.
131 --
132 -- Prerequisites:
133 -- The transaction step must exist.
134 --
135 -- In Parameters:
136 -- Name Reqd Type Description
137 -- p_transaction_step_id yes number Identifies the transaction step.
138 --
139 -- Post Success:
140 -- The transaction step information is successfully retrieved.
141 -- Name Type Description
142 -- p_item_type varchar2 Identifies the item type.
143 -- p_item_key varchar2 Identifies the item key.
144 -- p_activity_id number Identifies the activity id.
145 --
146 -- Post Failure:
147 -- None.
148 --
149 -- Access Status:
150 -- Internal Development Use Only.
151 --
152 -- {End Of Comments}
153 --
154 procedure get_transaction_step_info
155 (p_transaction_step_id in number
156 ,p_item_type out nocopy varchar2
157 ,p_item_key out nocopy varchar2
158 ,p_activity_id out nocopy number);
159 -- --------------------------------------------------------------------
160 -- ------------------<< get_transaction_step_info >>-------------------
161 -- --------------------------------------------------------------------
162 -- {Start Of Comments}
163 --
164 -- Description:
165 -- This API retrieves the transaction step data, where there may be more than
166 -- one transaction steps existing. The input activity id may be null.
167 --
168 -- Prerequisites:
169 -- None
170 --
171 -- In Parameters:
172 -- Name Reqd Type Description
173 -- p_item_type yes varchar2 Identifies the item type.
174 -- p_item_key yes varchar2 Identifies the item key.
175 -- p_activity_id no number Identifies the activity id.
176 --
177 -- Post Success:
178 -- The transaction step information is successfully retrieved.
179 -- Name Type Description
180 -- p_transaction_step_id hr_util_web.g_varchar2_tab_type Identifies the transactions steps
181 -- p_api_name out nocopy hr_util_web.g_varchar2_tab_type Identifies the corresponding API for the transaction steps.
182 -- p_rows number Identifies the number of transaction steps returned.
183 --
184 -- Post Failure:
185 -- None.
186 --
187 -- Access Status:
188 -- Internal Development Use Only.
189 --
190 -- {End Of Comments}
191 --
192 procedure get_transaction_step_info
193 (p_item_type in varchar2
194 ,p_item_key in varchar2
195 ,p_activity_id in number default null
196 ,p_transaction_step_id out nocopy hr_util_web.g_varchar2_tab_type
197 ,p_api_name out nocopy hr_util_web.g_varchar2_tab_type
198 ,p_rows out nocopy number);
199 -- ----------------------------------------------------------------------------
200 -- |-----------------------< transaction_step_exist >-------------------------|
201 -- ----------------------------------------------------------------------------
202 -- {Start Of Comments}
203 --
204 -- Description:
205 -- This function returns true if a transaction step exists corresponding to the input parameters.
206 --
207 -- Prerequisites:
208 -- None
209 --
210 -- In Parameters:
211 -- Name Reqd Type Description
212 -- p_item_type yes varchar2 Identifies the item type.
213 -- p_item_key yes varchar2 Identifies the item key.
214 -- p_activity_id yes number Identifies the activity id.
215 --
216 -- Post Success:
217 -- The function returns a true if the transaction step exists else returns a false.
218 --
219 -- Post Failure:
220 -- None.
221 --
222 -- Access Status:
223 -- Internal Development Use Only.
224 --
225 -- {End Of Comments}
226 --
227 function transaction_step_exist
228 (p_item_type in varchar2
229 ,p_item_key in varchar2
230 ,p_activity_id in number) return boolean;
231 -- ----------------------------------------------------------------------------
232 -- |---------------------------< create_transaction >-------------------------|
233 -- ----------------------------------------------------------------------------
234 -- {Start Of Comments}
235 --
236 -- Description:
237 -- This API creates a new transaction.
238 --
239 -- Prerequisites:
240 -- None
241 --
242 -- In Parameters:
243 -- Name Reqd Type Description
244 -- p_validate no boolean If true, then validation alone will be performed and
248 -- p_transaction_privilege yes varchar2 Identifies the transaction privilege.
245 -- the database will remain unchanged. If false and all
246 -- validation checks pass, then the database will be modified.
247 -- p_creator_person_id yes number Identifies the person creating the transaction.
249 --
250 -- Post Success:
251 -- A transaction is created.
252 -- Name Type Description
253 -- p_transaction_id number Identifies the new transaction created.
254 --
255 -- Post Failure:
256 -- The transaction is not created and an error is raised.
257 --
258 -- Access Status:
259 -- Internal Development Use Only.
260 --
261 -- {End Of Comments}
262 --
263 procedure create_transaction
264 (p_validate in boolean default false
265 ,p_creator_person_id in number
266 ,p_transaction_privilege in varchar2
267 ,p_transaction_id out nocopy number);
268 -- ----------------------------------------------------------------------------
269 -- |-----------------------< create_trans_step >-------------------------------|
270 -- ----------------------------------------------------------------------------
271 -- {Start Of Comments}
272 --
273 -- Description:
274 -- This API creates a transaction step.
275 --
276 -- Prerequisites:
277 -- None
278 --
279 -- In Parameters:
280 -- Name Reqd Type Description
281 -- p_validate no boolean If true, then validation alone will be performed and
282 -- the database will remain unchanged. If false and all
283 -- validation checks pass, then the database will be modified.
284 -- p_creator_person_id yes number Identifies the person creating the transaction.
285 -- p_transaction_id yes number Identifies the base transaction.
286 -- p_api_name yes varchar2 Identifies the API name.
287 -- p_api_display_name no varchar2 Identifies the API display name.
288 -- p_item_type no varchar2 Identifies the Item Type.
289 -- p_item_key no varchar2 Identifies the Item Key.
290 -- p_activity_id no number Identifies the Activity Id.
291 -- p_processing_order no number Identifies the processing order.
292 --
293 -- Post Success:
294 -- A transaction step is created.
295 -- Name Type Description
296 -- p_transaction_step_id number Identifies the transaction step.
297 -- p_object_version_number number Identifies the corresponding object version number.
298 --
299 -- Post Failure:
300 -- Transaction step is not created and an error is raised.
301 --
302 -- Access Status:
303 -- Internal Development Use Only.
304 --
305 -- {End Of Comments}
306 --
307 procedure create_trans_step
308 (p_validate in boolean default false
309 ,p_creator_person_id in number
310 ,p_transaction_id in number
311 ,p_api_name in varchar2
312 ,p_api_display_name in varchar2 default null
313 ,p_item_type in varchar2 default null
314 ,p_item_key in varchar2 default null
315 ,p_activity_id in number default null
316 ,p_processing_order in number default null
317 ,p_transaction_step_id out nocopy number
318 ,p_object_version_number out nocopy number);
319 -- ----------------------------------------------------------------------------
320 -- |-----------------------< create_transaction_step >------------------------|
321 -- ----------------------------------------------------------------------------
322 -- {Start Of Comments}
323 --
324 -- Description:
325 -- This API creates a transaction step.
326 --
327 -- Prerequisites:
328 -- None
329 --
330 -- In Parameters:
331 -- Name Reqd Type Description
332 -- p_validate no boolean If true, then validation alone will be performed and
333 -- the database will remain unchanged. If false and all
334 -- validation checks pass, then the database will be modified.
335 -- p_creator_person_id yes number Identifies the person creating the transaction.
336 -- p_transaction_id yes number Identifies the base transaction.
337 -- p_api_name yes varchar2 Identifies the API name.
338 -- p_api_display_name no varchar2 Identifies the API display name.
339 -- p_item_type no varchar2 Identifies the Item Type.
340 -- p_item_key no varchar2 Identifies the Item Key.
341 -- p_activity_id no number Identifies the Activity Id.
342 --
343 -- Post Success:
344 -- A transaction step is created.
345 -- Name Type Description
346 -- p_transaction_step_id number Identifies the transaction step.
347 -- p_object_version_number number Identifies the corresponding object version number.
348 --
349 -- Post Failure:
350 -- None.
351 --
352 -- Access Status:
353 -- Internal Development Use Only.
354 --
355 -- {End Of Comments}
356 --
357 procedure create_transaction_step
358 (p_validate in boolean default false
362 ,p_api_display_name in varchar2 default null
359 ,p_creator_person_id in number
360 ,p_transaction_id in number
361 ,p_api_name in varchar2
363 ,p_item_type in varchar2 default null
364 ,p_item_key in varchar2 default null
365 ,p_activity_id in number default null
366 ,p_transaction_step_id out nocopy number
367 ,p_object_version_number out nocopy number);
368 -- ----------------------------------------------------------------------------
369 -- |-----------------------< update_transaction_step >------------------------|
370 -- ----------------------------------------------------------------------------
371 -- {Start Of Comments}
372 --
373 -- Description:
374 -- This API updates a transaction step.
375 --
376 -- Prerequisites:
377 -- None
378 --
379 -- In Parameters:
380 -- Name Reqd Type Description
381 -- p_validate no boolean If true, then validation alone will be performed and
382 -- the database will remain unchanged. If false and all
383 -- validation checks pass, then the database will be modified.
384 -- p_transaction_step_id yes number Identifies the transaction step.
385 -- p_update_person_id yes number Identifies the person updating the transaction.
386 --
387 -- Post Success:
388 -- The API returns the updated object version number.
389 --
390 -- Name Type Description
391 -- p_object_version_number number Identifies the new object version no.
392 --
393 -- Post Failure:
394 -- Transaction step is not updated and an error is raised.
395 --
396 -- Access Status:
397 -- Internal Development Use Only.
398 --
399 -- {End Of Comments}
400 --
401 procedure update_transaction_step
402 (p_validate in boolean default false
403 ,p_transaction_step_id in number
404 ,p_update_person_id in number
405 ,p_object_version_number in out nocopy number);
406 -- ----------------------------------------------------------------------------
407 -- |-----------------------< delete_transaction_step >------------------------|
408 -- ----------------------------------------------------------------------------
409 -- {Start Of Comments}
410 --
411 -- Description:
412 -- This API deletes the transaction step.
413 --
414 -- Prerequisites:
415 -- None
416 --
417 -- In Parameters:
418 -- Name Reqd Type Description
419 -- p_validate no boolean If true, then validation alone will be performed and
420 -- the database will remain unchanged. If false and all
421 -- validation checks pass, then the database will be modified.
422 -- p_transaction_step_id yes number Identifies the transaction step.
423 -- p_update_person_id yes number Identifies the person updating the transaction.
424 -- p_object_version_number yes number Identifies the object version number.
425 --
426 -- Post Success:
427 -- The transaction step is deleted.
428 --
429 -- Post Failure:
430 -- The transaction step is not deleted and an error is raised.
431 --
432 -- Access Status:
433 -- Internal Development Use Only.
434 --
435 -- {End Of Comments}
436 --
437 procedure delete_transaction_step
438 (p_validate in boolean default false
439 ,p_transaction_step_id in number
440 ,p_person_id in number
441 ,p_object_version_number in number);
442 -- ----------------------------------------------------------------------------
443 -- |---------------------------< set_varchar2_value >-------------------------|
444 -- ----------------------------------------------------------------------------
445 -- {Start Of Comments}
446 --
447 -- Description:
448 -- This API saves a varchar2 value for a transaction step.
449 --
450 -- Prerequisites:
451 -- None
452 --
453 -- In Parameters:
454 -- Name Reqd Type Description
455 -- p_validate no boolean If true, then validation alone will be performed and
456 -- the database will remain unchanged. If false and all
457 -- validation checks pass, then the database will be modified.
458 -- p_transaction_step_id yes number Identifies the transaction step.
459 -- p_person_id yes number Identifies the person acting on the transaction.
460 -- p_name yes varchar2 Identifies the varchar2 field.
461 -- p_value no varchar2 Identifies the value to be saved for the field.
462 -- p_original_value no varchar2 Identifies the original value of the field.
463 --
464 --
465 -- Post Success:
466 -- The value is saved for a transaction step.
467 --
468 -- Post Failure:
469 --
470 --
471 -- Access Status:
472 -- Internal Development Use Only.
473 --
474 -- {End Of Comments}
475 --
476 procedure set_varchar2_value
477 (p_validate in boolean default false
478 ,p_transaction_step_id in number
479 ,p_person_id in number
480 ,p_name in varchar2
481 ,p_value in varchar2 default null
485 -- ----------------------------------------------------------------------------
482 ,p_original_value in varchar2 default null ); --ns
483 -- ----------------------------------------------------------------------------
484 -- |---------------------------< set_number_value >---------------------------|
486 -- {Start Of Comments}
487 --
488 -- Description:
489 -- This API saves a number type value for a transaction step.
490 --
491 -- Prerequisites:
492 -- None
493 --
494 -- In Parameters:
495 -- Name Reqd Type Description
496 -- p_validate no boolean If true, then validation alone will be performed and
497 -- the database will remain unchanged. If false and all
498 -- validation checks pass, then the database will be modified.
499 -- p_transaction_step_id yes number Identifies the transaction step.
500 -- p_person_id yes number Identifies the person acting on the transaction.
501 -- p_name yes varchar2 Identifies the number field.
502 -- p_value no number Identifies the value to be saved for the field.
503 -- p_original_value no number Identifies the original value of the field.
504 --
505 -- Post Success:
506 -- The value is saved for a transaction step.
507 --
508 -- Post Failure:
509 -- None
510 --
511 -- Access Status:
512 -- Internal Development Use Only.
513 --
514 -- {End Of Comments}
515 --
516 procedure set_number_value
517 (p_validate in boolean default false
518 ,p_transaction_step_id in number
519 ,p_person_id in number
520 ,p_name in varchar2
521 ,p_value in number default null
522 ,p_original_value in number default null ); --ns
523 -- ----------------------------------------------------------------------------
524 -- |-----------------------------< set_date_value >---------------------------|
525 -- ----------------------------------------------------------------------------
526 -- {Start Of Comments}
527 --
528 -- Description:
529 -- This API saves a date type value for a transaction step.
530 --
531 -- Prerequisites:
532 -- None
533 --
534 -- In Parameters:
535 -- Name Reqd Type Description
536 -- p_validate no boolean If true, then validation alone will be performed and
537 -- the database will remain unchanged. If false and all
538 -- validation checks pass, then the database will be modified.
539 -- p_transaction_step_id yes number Identifies the transaction step.
540 -- p_person_id yes number Identifies the person acting on the transaction.
541 -- p_name yes varchar2 Identifies the number type field.
542 -- p_value no date Identifies the value to be saved for the field.
543 -- p_original_value no date Identifies the original value of the field.
544 --
545 --
546 -- Post Success:
547 -- The value is saved for a transaction step.
548 --
549 -- Post Failure:
550 -- None
551 --
552 -- Access Status:
553 -- Internal Development Use Only.
554 --
555 -- {End Of Comments}
556 --
557 procedure set_date_value
558 (p_validate in boolean default false
559 ,p_transaction_step_id in number
560 ,p_person_id in number
561 ,p_name in varchar2
562 ,p_value in date default null
563 ,p_original_value in date default null ); --ns
564 -- ----------------------------------------------------------------------------
565 -- |--------------------------< set_boolean_value >---------------------------|
566 -- ----------------------------------------------------------------------------
567 -- {Start Of Comments}
568 --
569 -- Description:
570 -- This API saves a boolean type value for a transaction step.
571 --
572 -- Prerequisites:
573 -- None
574 --
575 -- In Parameters:
576 -- Name Reqd Type Description
577 -- p_validate no boolean If true, then validation alone will be performed and
578 -- the database will remain unchanged. If false and all
579 -- validation checks pass, then the database will be modified.
580 -- p_transaction_step_id yes number Identifies the transaction step.
581 -- p_person_id yes number Identifies the person acting on the transaction.
582 -- p_name yes varchar2 Identifies the boolean type field.
583 -- p_value no boolean Identifies the value to be saved for the field.
584 -- p_original_value no boolean Identifies the original value of the field.
585 --
586 -- Post Success:
587 -- The value is saved for the transaction step.
588 --
589 -- Post Failure:
590 -- None
591 --
592 -- Access Status:
593 -- Internal Development Use Only.
594 --
595 -- {End Of Comments}
596 --
597 procedure set_boolean_value
598 (p_validate in boolean default false
599 ,p_transaction_step_id in number
600 ,p_person_id in number
604 -- ----------------------------------------------------------------------------
601 ,p_name in varchar2
602 ,p_value in boolean default null
603 ,p_original_value in boolean default null ); --ns
605 -- |------------------------------< get_value >-------------------------------|
606 -- ----------------------------------------------------------------------------
607 -- {Start Of Comments}
608 --
609 -- Description:
610 -- This API returns a value for a particular parameter depending on its Type for the transaction step.
611 --
612 -- Prerequisites:
613 -- The transaction step should exist.
614 --
615 -- In Parameters:
616 -- Name Reqd Type Description
617 -- p_transaction_step_id yes number Identifies the transaction step.
618 -- p_name yes varchar2 Identifies the parameter name.
619 --
620 --
621 -- Post Success:
622 --
623 -- Name Type Description
624 -- p_varchar2_value varchar2 Identifies the parameter varchar2 type value.
625 -- p_number_value number Identifies the parameter number type value.
626 -- p_date_value date Identifies the parameter date type value.
627 --
628 -- Post Failure:
629 -- None
630 --
631 -- Access Status:
632 -- Internal Development Use Only.
633 --
634 -- {End Of Comments}
635 --
636 procedure get_value
637 (p_transaction_step_id in number
638 ,p_name in varchar2
639 ,p_datatype out nocopy varchar2
640 ,p_varchar2_value out nocopy varchar2
641 ,p_number_value out nocopy number
642 ,p_date_value out nocopy date);
643 -- ----------------------------------------------------------------------------
644 -- |---------------------------< get_varchar2_value >-------------------------|
645 -- ----------------------------------------------------------------------------
646 -- {Start Of Comments}
647 --
648 -- Description:
649 -- This function returns a varchar2 type value for a particular parameter for the transaction step.
650 --
651 -- Prerequisites:
652 -- The transaction step should exist.
653 --
654 -- In Parameters:
655 -- Name Reqd Type Description
656 -- p_transaction_step_id yes number Identifies the transaction step.
657 -- p_name yes varchar2 Identifies the parameter name.
658 --
659 --
660 -- Post Success:
661 -- A varchar2 type value is returned.
662 --
663 -- Post Failure:
664 -- None
665 --
666 -- Access Status:
667 -- Internal Development Use Only.
668 --
669 -- {End Of Comments}
670 function get_varchar2_value
671 (p_transaction_step_id in number
672 ,p_name in varchar2) return varchar2;
673 -- ----------------------------------------------------------------------------
674 -- |-----------------------------< get_number_value >-------------------------|
675 -- ----------------------------------------------------------------------------
676 -- {Start Of Comments}
677 --
678 -- Description:
679 -- This function returns a number value for a particular parameter for the transaction step.
680 --
681 -- Prerequisites:
682 -- The transaction step should exist.
683 --
684 -- In Parameters:
685 -- Name Reqd Type Description
686 -- p_transaction_step_id yes number Identifies the transaction step.
687 -- p_name yes varchar2 Identifies the parameter name.
688 --
689 --
690 -- Post Success:
691 -- A number type value is returned.
692 --
693 -- Post Failure:
694 -- None
695 --
696 -- Access Status:
697 -- Internal Development Use Only.
698 --
699 -- {End Of Comments}
700 --
701 function get_number_value
702 (p_transaction_step_id in number
703 ,p_name in varchar2) return number;
704 -- ----------------------------------------------------------------------------
705 -- |-------------------------------< get_date_value >-------------------------|
706 -- ----------------------------------------------------------------------------
707 --- {Start Of Comments}
708 --
709 -- Description:
710 -- This function returns a date value for a particular parameter for the transaction step.
711 --
712 -- Prerequisites:
713 -- The transaction step should exist.
714 --
715 -- In Parameters:
716 -- Name Reqd Type Description
717 -- p_transaction_step_id yes number Identifies the transaction step.
718 -- p_name yes varchar2 Identifies the parameter name.
719 --
720 --
721 -- Post Success:
722 -- A date value is returned.
723 --
724 -- Post Failure:
725 -- None
726 --
727 -- Access Status:
728 -- Internal Development Use Only.
729 --
730 -- {End Of Comments}
731 --
732 function get_date_value
733 (p_transaction_step_id in number
734 ,p_name in varchar2) return date;
735 --
736 -- 11/12/1997 Change Begins
737 -- ----------------------------------------------------------------------------
738 -- |-------------------------< get_date2char_value >--------------------------|
742 -- Description:
739 -- ----------------------------------------------------------------------------
740 -- {Start Of Comments}
741 --
743 -- This function returns a date value in a preferred format.
744 --
745 -- Prerequisites:
746 -- The transaction step should exist.
747 --
748 -- In Parameters:
749 -- Name Reqd Type Description
750 -- p_transaction_step_id yes number Identifies the transaction step.
751 -- p_name yes varchar2 Identifies the parameter name.
752 -- p_date_format yes varchar2 Identifies the date format.
753 --
754 -- Post Success:
755 -- A date in the prefered format is returned.
756 --
757 -- Post Failure:
758 -- None
759 --
760 -- Access Status:
761 -- Internal Development Use Only.
762 --
763 -- {End Of Comments}
764 --
765 function get_date2char_value
766 (p_transaction_step_id in number
767 ,p_name in varchar2
768 ,p_date_format in varchar2) return varchar2;
769 --
770 -- 11/12/1997 Change Ends
771 --
772 -- ----------------------------------------------------------------------------
773 -- |----------------------------< get_boolean_value >-------------------------|
774 -- ----------------------------------------------------------------------------
775 --- {Start Of Comments}
776 --
777 -- Description:
778 -- This function returns a boolean value for a particular parameter for the transaction step.
779 --
780 -- Prerequisites:
781 -- The transaction step should exist.
782 --
783 -- In Parameters:
784 -- Name Reqd Type Description
785 -- p_transaction_step_id yes number Identifies the transaction step.
786 -- p_name yes varchar2 Identifies the parameter name.
787 --
788 --
789 -- Post Success:
790 -- A boolean value is returned.
791 --
792 -- Post Failure:
793 -- None
794 --
795 -- Access Status:
796 -- Internal Development Use Only.
797 --
798 -- {End Of Comments}
799 --
800 function get_boolean_value
801 (p_transaction_step_id in number
802 ,p_name in varchar2) return boolean;
803 -- ----------------------------------------------------------------------------
804 -- |------------------------------< get_original_value >----------------------|
805 -- ----------------------------------------------------------------------------
806 -- {Start Of Comments}
807 --
808 -- Description:
809 -- This API returns the original value for a parameter.
810 --
811 -- Prerequisites:
812 -- None
813 --
814 -- In Parameters:
815 -- Name Reqd Type Description
816 -- p_transaction_step_id yes number Identifies the transaction step.
817 -- p_name yes varchar2 Identifies the parameter.
818 --
819 --
820 -- Post Success:
821 -- An original value is returned.
822 -- Name Type Description
823 -- p_datatype varchar2 Identifies the datatype.
824 -- p_original_varchar2_value varchar2 Identifies a varchar2 type value.
825 -- p_original_number_value number Identifies a number type value.
826 -- p_original_date_value date Identifies a date type value.
827 --
828 -- Post Failure:
829 -- None.
830 --
831 -- Access Status:
832 -- Internal Development Use Only.
833 --
834 -- {End Of Comments}
835 --
836 procedure get_original_value
837 (p_transaction_step_id in number
838 ,p_name in varchar2
839 ,p_datatype out nocopy varchar2
840 ,p_original_varchar2_value out nocopy varchar2
841 ,p_original_number_value out nocopy number
842 ,p_original_date_value out nocopy date);
843 -- ----------------------------------------------------------------------------
844 -- |---------------------------< get_original_varchar2_value >----------------|
845 -- ----------------------------------------------------------------------------
846 -- {Start Of Comments}
847 --
848 -- Description:
849 -- This function returns the original varchar2 type value for a parameter.
850 --
851 -- Prerequisites:
852 -- The transaction step should exist.
853 --
854 -- In Parameters:
855 -- Name Reqd Type Description
856 -- p_transaction_step_id yes number Identifies the transaction step.
857 -- p_name yes varchar2 Identifies the parameter.
858 --
859 --
860 -- Post Success:
861 -- An original varchar2 type value is returned.
862 --
863 -- Post Failure:
864 -- None.
865 --
866 -- Access Status:
867 -- Internal Development Use Only.
868 --
869 -- {End Of Comments}
870 --
871 function get_original_varchar2_value
872 (p_transaction_step_id in number
873 ,p_name in varchar2) return varchar2;
874 -- ----------------------------------------------------------------------------
875 -- |--------------------< get_original_number_value >-------------------------|
876 -- ----------------------------------------------------------------------------
877 -- {Start Of Comments}
878 --
879 -- Description:
880 -- This function returns the number type value for a parameter.
881 --
882 -- Prerequisites:
883 -- The transaction step should exist.
884 --
885 -- In Parameters:
886 -- Name Reqd Type Description
890 --
887 -- p_transaction_step_id yes number Identifies the transaction step.
888 -- p_name yes varchar2 Identifies the parameter.
889 --
891 -- Post Success:
892 -- An original number type value is returned.
893 --
894 -- Post Failure:
895 -- None.
896 --
897 -- Access Status:
898 -- Internal Development Use Only.
899 --
900 -- {End Of Comments}
901 --
902 function get_original_number_value
903 (p_transaction_step_id in number
904 ,p_name in varchar2) return number;
905 -- ----------------------------------------------------------------------------
906 -- |----------------------< get_original_date_value >-------------------------|
907 -- ----------------------------------------------------------------------------
908 -- {Start Of Comments}
909 --
910 -- Description:
911 -- This function returns the original date type value for a parameter.
912 --
913 -- Prerequisites:
914 -- The transaction step should exist.
915 --
916 -- In Parameters:
917 -- Name Reqd Type Description
918 -- p_transaction_step_id yes number Identifies the transaction step.
919 -- p_name yes varchar2 Identifies the parameter.
920 --
921 -- Post Success:
922 -- An original date type value is returned.
923 --
924 -- Post Failure:
925 -- None.
926 --
927 -- Access Status:
928 -- Internal Development Use Only.
929 --
930 -- {End Of Comments}
931 function get_original_date_value
932 (p_transaction_step_id in number
933 ,p_name in varchar2) return date;
934 -- ----------------------------------------------------------------------------
935 -- |-------------------< get_original_boolean_value >-------------------------|
936 -- ----------------------------------------------------------------------------
937 -- {Start Of Comments}
938 --
939 -- Description:
940 -- This function returns the original boolean type value for a parameter.
941 --
942 -- Prerequisites:
943 -- The transaction step should exist.
944 --
945 -- In Parameters:
946 -- Name Reqd Type Description
947 -- p_transaction_step_id yes number Identifies the transaction step.
948 -- p_name yes varchar2 Identifies the parameter.
949 --
950 -- Post Success:
951 -- An original boolen type value is returned.
952 --
953 -- Post Failure:
954 -- None.
955 --
956 -- Access Status:
957 -- Internal Development Use Only.
958 --
959 -- {End Of Comments}
960 --
961 function get_original_boolean_value
962 (p_transaction_step_id in number
963 ,p_name in varchar2) return boolean;
964 -- ----------------------------------------------------------------------------
965 -- |----------------------------< rollback_transaction >----------------------|
966 -- ----------------------------------------------------------------------------
967 -- {Start Of Comments}
968 --
969 -- Description:
970 -- This API reverts back the transaction.
971 --
972 -- Prerequisites:
973 -- The transaction must exist.
974 --
975 -- In Parameters:
976 -- Name Reqd Type Description
977 -- p_transaction_id yes number Identifies the transaction.
978 -- p_validate no boolean If true, then validation alone will be performed and
979 -- the database will remain unchanged. If false and all
980 -- validation checks pass, then the database will be modified.
981 --
982 -- Post Success:
983 -- The transaction is deleted.
984 --
985 -- Post Failure:
986 -- An exception is raised and the transaction is not rolled back.
987 --
988 -- Access Status:
989 -- Internal Development Use Only.
990 --
991 -- {End Of Comments}
992 --
993 procedure rollback_transaction
994 (p_transaction_id in number
995 ,p_validate in boolean default false);
996 --
997 ------------------------------------------------------------------------
998 ----------------------- Get_Last_Process_Order--------------------------
999 ------------------------------------------------------------------------
1000 -- {Start Of Comments}
1001 --
1002 -- Description:
1003 -- This function retrieves the last process order delimited by '%' from the process order string.
1004 --
1005 -- Prerequisites:
1006 -- None
1007 -- In Parameters:
1008 -- Name Reqd Type Description
1009 -- p_process_order_str yes varchar2 Identifies the process order string.
1010 --
1011 -- Post Success:
1012 -- The Last Process order is retrieved.
1013 --
1014 -- Post Failure:
1015 -- None.
1016 --
1017 -- Access Status:
1018 -- Internal Development Use Only.
1019 --
1020 -- {End Of Comments}
1021 --
1022 function Get_Last_Process_Order
1023 (p_process_order_str in varchar2)
1024 return varchar2;
1025 --
1026 ------------------------------------------------------------------------
1027 ----------------------- Set_Process_Order_String------------------------
1028 ------------------------------------------------------------------------
1029 -- {Start Of Comments}
1030 --
1031 -- Description:
1032 -- This API constructs a string to concatenate activity id and a corresponding process order.
1033 --
1034 -- Prerequisites:
1035 -- None
1036 --
1037 -- In Parameters:
1038 -- Name Reqd Type Description
1042 --
1039 -- p_item_type yes Varchar2(8) Identifies the item type.
1040 -- p_item_key yes Varchar2(240) Identifies teh item key.
1041 -- p_actid yes Number Identifies the activity id.
1043 -- Post Success:
1044 -- A corrsponding string is set. in wf attribute for PROCESS_ORDER_STRING.
1045 --
1046 -- Post Failure:
1047 -- An error is raised.
1048 --
1049 -- Access Status:
1050 -- Internal Development Use Only.
1051 --
1052 -- {End Of Comments}
1053 --
1054 procedure Set_Process_Order_String
1055 (p_item_type in wf_items.item_type%type
1056 ,p_item_key in wf_items.item_key%type
1057 ,p_actid in wf_activity_attr_values.process_activity_id%type
1058 );
1059 --
1060 -- ----------------------------------------------------------------------------
1061 -- |---------------------------< Get_Process_Order >---------------------------|
1062 -- ----------------------------------------------------------------------------
1063 -- {Start Of Comments}
1064 --
1065 -- Description:
1066 -- This function gets the process order from the string stored in wf
1067 -- attribute PROCESS_ORDER_STRING for the passed in activity id.
1068 --
1069 -- Prerequisites:
1070 -- The activity id should exist.
1071 --
1072 -- In Parameters:
1073 -- Name Reqd Type Description
1074 -- p_item_type yes Varchar2(8) Identifies the item type.
1075 -- p_item_key yes Varchar2(240) Identifies teh item key.
1076 -- p_actid yes Number Identifies the activity id.
1077 --
1078 -- Post Success:
1079 -- The process order is retrieved.
1080 --
1081 -- Post Failure:
1082 -- An exception is raised.
1083 --
1084 -- Access Status:
1085 -- Internal Development Use Only.
1086 --
1087 -- {End Of Comments}
1088 --
1089 function Get_Process_Order
1090 (p_item_type in wf_items.item_type%type
1091 ,p_item_key in wf_items.item_key%type
1092 ,p_actid in wf_activity_attr_values.process_activity_id%type
1093 )
1094 return varchar2;
1095 --
1096 -- ----------------------------------------------------------------------------
1097 -- |---------------------------< create_transaction >-------------------------|
1098 -- ----------------------------------------------------------------------------
1099 -- {Start Of Comments}
1100 --
1101 -- Description:
1102 -- This API creates a transaction.
1103 --
1104 -- Prerequisites:
1105 -- None
1106 -- In Parameters:
1107 -- Name Reqd Type Description
1108 -- p_validate no boolean If true, then validation alone will be performed and
1109 -- the database will remain unchanged. If false and all
1110 -- validation checks pass, then the database will be modified.
1111 -- p_creator_person_id yes number
1112 -- p_transaction_privilege yes varchar2
1113 -- p_product_code no varchar2
1114 -- p_url no varchar2
1115 -- p_status no varchar2
1116 -- p_section_display_name no varchar2
1117 -- p_function_id yes number
1118 -- p_transaction_ref_table no varchar2
1119 -- p_transaction_ref_id no number
1120 -- p_transaction_type no varchar2
1121 -- p_assignment_id no number
1122 -- p_api_addtnl_info no varchar2
1123 -- p_selected_person_id no number
1124 -- p_item_type no varchar2
1125 -- p_item_key no varchar2
1126 -- p_transaction_effective_date no date
1127 -- p_process_name no varchar2
1128 -- p_plan_id no number
1129 -- p_rptg_grp_id no number
1130 -- p_effective_date_option no varchar2
1131 --
1132 --
1133 -- Post Success:
1134 -- A transaction is created and saved successfully.
1135 -- Name Type Description
1136 -- p_transaction_id number Identifies the new transaction created.
1137 --
1138 -- Post Failure:
1139 -- An exception is raised and a transaction is not created.
1140 --
1141 -- Access Status:
1142 -- Internal Development Use Only.
1143 --
1144 -- {End Of Comments}
1145 --
1146 procedure create_transaction
1147 (p_validate in boolean default false
1148 ,p_creator_person_id in number
1149 ,p_transaction_privilege in varchar2
1150 ,p_product_code in varchar2 default null
1151 ,p_url in varchar2 default null
1152 ,p_status in varchar2 default null
1153 ,p_section_display_name in varchar2 default null
1154 ,p_function_id in number
1155 ,p_transaction_ref_table in varchar2 default null
1156 ,p_transaction_ref_id in number default null
1157 ,p_transaction_type in varchar2 default null
1158 ,p_assignment_id in number default null
1159 ,p_api_addtnl_info in varchar2 default null
1160 ,p_selected_person_id in number default null
1161 ,p_item_type in varchar2 default null
1162 ,p_item_key in varchar2 default null
1163 ,p_transaction_effective_date in date default null
1164 ,p_process_name in varchar2 default null
1168 ,p_transaction_id out nocopy number) ;
1165 ,p_plan_id in number default null
1166 ,p_rptg_grp_id in number default null
1167 ,p_effective_date_option in varchar2 default null
1169 --
1170 -- p_plan_id, p_rptg_grp_id, p_effective_date_option added by sanej
1171
1172 --ns start
1173 -- New procedure to accept transaction state as a parameter
1174 --
1175 -- ----------------------------------------------------------------------------
1176 -- |---------------------------< update_transaction >-------------------------|
1177 -- ----------------------------------------------------------------------------
1178 -- {Start Of Comments}
1179 --
1180 -- Description:
1181 -- This API updates a transaction with the transaction state and/or date_option.
1182 --
1183 -- Prerequisites:
1184 -- None
1185 --
1186 -- In Parameters:
1187 -- Name Reqd Type Description
1188 -- p_validate no boolean If true, then validation alone will be performed and
1189 -- the database will remain unchanged. If false and all
1190 -- validation checks pass, then the database will be modified.
1191 -- p_transaction_id yes number Identifies the transaction to be updated.
1192 -- p_status no varchar2 Identifies the status.
1193 -- p_transaction_state no varchar2 Identifies teh transaction status.
1194 -- p_transaction_effective_date no date Identifies the transaction effective date.
1195 -- p_effective_date_option no varchar2 Identifies the effective date option.
1196 -- p_item_key no varchar2 Identifies the Item Key.
1197 --
1198 -- Post Success:
1199 -- The transaction is successfully updated.
1200 --
1201 -- Post Failure:
1202 -- None.
1203 --
1204 -- Access Status:
1205 -- Internal Development Use Only.
1206 --
1207 -- {End Of Comments}
1208 --
1209 procedure update_transaction
1210 (p_validate in boolean default false
1211 ,p_transaction_id in number
1212 ,p_status in varchar2 default hr_api.g_varchar2
1213 ,p_transaction_state in varchar2 default hr_api.g_varchar2
1214 ,p_transaction_effective_date in date default hr_api.g_date
1215 ,p_effective_date_option in varchar2 default hr_api.g_varchar2
1216 ,p_item_key in varchar2 default hr_api.g_varchar2
1217 ) ;
1218 --ns end
1219 --
1220 -- ----------------------------------------------------------------------------
1221 -- |---------------------------< finalize_transaction >-------------------------|
1222 -- ----------------------------------------------------------------------------
1223 -- {Start Of Comments}
1224 --
1225 -- Description:
1226 -- This API finalizes a transaction by calling a desired API before a deletion or rollback.
1227 --
1228 -- Prerequisites:
1229 -- In Parameters:
1230 -- Name Reqd Type Description
1231 -- p_transaction_id Yes Number Identifies the transaction.
1232 -- p_event Yes Varchar2 Identifies the event.
1233 --
1234 -- Post Success:
1235 --
1236 -- Name Type Description
1237 -- P_RETURN_STATUS VARCHAR2 Identifies the return status.of the API call
1238 --
1239 -- Post Failure:
1240 -- None
1241 --
1242 -- Access Status:
1243 -- Internal Development Use Only.
1244 --
1245 -- {End Of Comments}
1246 --
1247 Procedure finalize_transaction (
1248 P_TRANSACTION_ID in NUMBER
1249 ,P_EVENT in VARCHAR2
1250 ,P_RETURN_STATUS out nocopy VARCHAR2
1251 );
1252
1253 end hr_transaction_api;