1 PACKAGE IGI_ITR_APPROVAL_PKG AUTHID CURRENT_USER AS
2 -- $Header: igiitrws.pls 120.4.12020000.1 2012/06/27 10:59:13 appldev ship $
3 --
4
5 --
6 -- Package
7 -- IGI_ITR_APPROVAL_PKG
8 -- Purpose
9 -- Functions for ITR approval workflow
10 -- History
11 -- 27-SEP-2000 S Brewer Created
12 --
13 -- Public variables
14 diagn_msg_flag BOOLEAN := TRUE; -- Determines if diagnostic messages are displayed
15
16 --
17 -- Procedure
18 -- Start_Approval_Workflow
19 -- Purpose
20 -- Start approval workflow for a process.
21 -- History
22 -- 27-SEP-2000 S Brewer Created
23 -- Arguments
24 -- p_cc_id ID of cross charge (JE_UK_ITR_CHARGE_LINES.IT_HEADER_ID)
25 -- p_cc_line_num line number of cross charge line(JE_UK_ITR_CHARGE_LINES.IT_LINE_NUM)
26 -- p_preparer_fnd_user_id FND UserID of preparer (JE_UK_ITR_CHARGE_HEADERS.CREATED_BY)
27 -- p_cc_name cross charge name (JE_UK_ITR_CHARGE_HEADERS.NAME)
28 -- p_prep_auth does preparer have approval authority (parameter)
29 -- p_sec_apprv_fnd_id secondary approver id (if one was selected by preparer)
30 -- Example
31 -- ITR_APPROVAL_PKG.Start_Approval_Workflow (42789,1,1045,'charge1','Y',1021);
32 --
33 -- Notes
34 -- Called from ITR enter charges form
35 -- Must be called after a cross charge and all it's headers and lines have
36 -- been inserted into the DB.
37 --
38 PROCEDURE start_approval_workflow ( p_cc_id IN NUMBER,
39 p_cc_line_num IN NUMBER,
40 p_preparer_fnd_user_id IN NUMBER,
41 p_cc_name IN VARCHAR2,
42 p_prep_auth IN VARCHAR2,
43 p_sec_apprv_fnd_id IN NUMBER);
44
45
46
47 --
48 -- Procedure
49 -- Get_SOB_Attributes
50 -- Purpose
51 -- Copy information about the SOB to worklow tables
52 -- History
53 -- 27-SEP-2000 S Brewer Created
54 -- Arguments
55 -- itemtype Workflow item type (Cross Charge)
56 -- itemkey ID of cross charge/cross charge line num
57 -- actid ID of activity, provided by workflow engine
58 -- (not used in this procedure)
59 -- funcmode Function mode (RUN or CANCEL)
60 -- Example
61 -- N/A (not user-callable)
62 --
63 -- Notes
64 -- This procedure is called from the Oracle Workflow engine
65 -- It retrieves data elements about the Set of Books (identified by the itemkey
66 -- argument) and stores them in the workflow tables to make them available
67 -- for messages and subsequent procedures.
68 --
69 PROCEDURE get_sob_attributes (itemtype IN VARCHAR2,
70 itemkey IN VARCHAR2,
71 actid IN NUMBER,
72 funcmode IN VARCHAR2,
73 result OUT NOCOPY VARCHAR2 );
74
75
76
77 --
78 -- Procedure
79 -- Get_cc_Attributes
80 -- Purpose
81 -- Copy information about cross charge to worklow tables
82 -- History
83 -- 27-SEP-2000 S Brewer Created.
84 -- Arguments
85 -- itemtype Workflow item type (Cross charge)
86 -- itemkey ID of cross charge/cross charge line num
87 -- actid ID of activity, provided by workflow engine
88 -- (not used in this procedure)
89 -- funcmode Function mode (RUN or CANCEL)
90 -- result Result code
91 -- Example
92 -- N/A (not user-callable)
93 --
94 -- Notes
95 -- This procedure is called from the Oracle Workflow engine
96 -- It retrieves data elements about the cross charge (identified by the itemkey
97 -- argument) and stores them in the workflow tables to make them available
98 -- for messages and subsequent procedures: cross charge name
99 -- , preparer's name,
100 -- total cross charge line amount and the functional currency code.
101 --
102 PROCEDURE get_cc_attributes (itemtype IN VARCHAR2,
103 itemkey IN VARCHAR2,
104 actid IN NUMBER,
105 funcmode IN VARCHAR2,
106 result OUT NOCOPY VARCHAR2 );
107
108
109 --
110 -- Procedure
111 -- did_preparer_approve
112 -- Purpose
113 -- Checks whether the preparer had authority to finally approve cross
114 -- charge.
115 -- History
116 -- 27-SEP-2000 S Brewer Created.
117 -- Arguments
118 -- itemtype Workflow item type (ITR Approval)
119 -- itemkey ID of cross charge/cross charge line/wkf run id
120 -- actid ID of activity, provided by workflow engine
121 -- (not used in this procedure)
122 -- funcmode Function mode (RUN or CANCEL)
123 -- result Result code
124 -- Example
125 -- N/A (not user-callable)
126 --
127 -- Notes
128 -- This procedure is called from the Oracle Workflow engine
129 -- It checks whether the preparer had authority to finally approve cross
130 -- charge and returns a value of 'Y' or 'N'
131 --
132
133 PROCEDURE did_preparer_approve( itemtype IN VARCHAR2,
134 itemkey IN VARCHAR2,
135 actid IN NUMBER,
136 funcmode IN VARCHAR2,
137 result OUT NOCOPY VARCHAR2 );
138
139 --
140 -- Procedure
141 -- set_approver_name_to_prep
142 -- Purpose
143 -- Sets the workflow 'APPROVER' attributes to the values for the preparer
144 -- History
145 -- 27-SEP-2000 S Brewer Created.
146 -- Arguments
147 -- itemtype Workflow item type (ITR Approval)
148 -- itemkey ID of cross charge/cross charge line/wkf run id
149 -- actid ID of activity, provided by workflow engine
150 -- (not used in this procedure)
151 -- funcmode Function mode (RUN or CANCEL)
152 -- result Result code
153 -- Example
154 -- N/A (not user-callable)
155 --
156 -- Notes
157 -- This procedure is called from the Oracle Workflow engine
158 -- It sets the workflow 'APPROVER' attributes to the values for the
159 -- preparer.
160 --
161
162 PROCEDURE set_approver_name_to_prep( itemtype IN VARCHAR2,
163 itemkey IN VARCHAR2,
164 actid IN NUMBER,
165 funcmode IN VARCHAR2,
166 result OUT NOCOPY VARCHAR2 );
167
168
169 --
170 -- Procedure
171 -- secondary_approver_selected
172 -- Purpose
173 -- Checks whether a secondary approver was selected for the cross charge
174 -- History
175 -- 27-SEP-2000 S Brewer Created.
176 -- Arguments
177 -- itemtype Workflow item type (ITR Approval)
178 -- itemkey ID of cross charge/cross charge line/wkf run id
179 -- actid ID of activity, provided by workflow engine
180 -- (not used in this procedure)
181 -- funcmode Function mode (RUN or CANCEL)
182 -- result Result code
183 -- Example
184 -- N/A (not user-callable)
185 --
186 -- Notes
187 -- This procedure is called from the Oracle Workflow engine
188 -- It checks whether a secondary approver was selected for the cross charge
189 --
190
191 PROCEDURE secondary_approver_selected( itemtype IN VARCHAR2,
192 itemkey IN VARCHAR2,
193 actid IN NUMBER,
194 funcmode IN VARCHAR2,
195 result OUT NOCOPY VARCHAR2 );
196
197
198
199 --
200 -- Procedure
201 -- set_approver_name_to_sec_app
202 -- Purpose
203 -- Sets the 'APPROVER' attributes to the values for the secondary approver
204 -- History
205 -- 27-SEP-2000 S Brewer Created.
206 -- Arguments
207 -- itemtype Workflow item type (ITR Approval)
208 -- itemkey ID of cross charge/cross charge line/wkf run id
209 -- actid ID of activity, provided by workflow engine
210 -- (not used in this procedure)
211 -- funcmode Function mode (RUN or CANCEL)
212 -- result Result code
213 -- Example
214 -- N/A (not user-callable)
215 --
216 -- Notes
217 -- This procedure is called from the Oracle Workflow engine
218 -- It sets the workflow 'APPROVER' attributes to the values for the
219 -- secondary approver
220 --
221
222 PROCEDURE set_approver_name_to_sec_app( itemtype IN VARCHAR2,
223 itemkey IN VARCHAR2,
224 actid IN NUMBER,
225 funcmode IN VARCHAR2,
226 result OUT NOCOPY VARCHAR2 );
227
228
229
230 --
231 -- Procedure
232 -- maintain_history
233 -- Purpose
234 -- Inserts a row into the ITR action history table to maintain
235 -- an approval history of the actions performed
236 -- History
237 -- 09-Mar-2001 S Brewer Created.
238 -- Arguments
239 -- itemtype Workflow item type (ITR Approval)
240 -- itemkey ID of cross charge/cross charge line/wkf run id
241 -- actid ID of activity, provided by workflow engine
242 -- funcmode Function mode (RUN or CANCEL)
243 -- result Result code
244 -- Example
245 -- N/A (not user-callable)
246 --
247 -- Notes
248 -- This procedure is called from the Oracle Workflow engine
249 -- It is used to maintain an approval history (in the ITR action
250 -- history table) for the service line. It stores such things as
251 -- the action performed (e.g. approval or rejection) and the user who
252 -- performed the action.
253 --
254
255 PROCEDURE maintain_history( itemtype IN VARCHAR2,
256 itemkey IN VARCHAR2,
257 actid IN NUMBER,
258 funcmode IN VARCHAR2,
259 result OUT NOCOPY VARCHAR2 );
260
261
262
263 --
264 -- Procedure
265 -- submit_cc_line
266 -- Purpose
267 -- Sets cross charge line status to 'submitted' and sends to receiving
268 -- department
269 -- History
270 -- 27-SEP-2000 S Brewer Created.
271 -- Arguments
272 -- itemtype Workflow item type (ITR Approval)
273 -- itemkey ID of cross charge/cross charge line/wkf run id
274 -- actid ID of activity, provided by workflow engine
275 -- (not used in this procedure)
276 -- funcmode Function mode (RUN or CANCEL)
277 -- result Result code
278 -- Example
279 -- N/A (not user-callable)
280 --
281 -- Notes
282 -- This procedure is called from the Oracle Workflow engine
283 -- It sets the cross charge line status to 'submitted' and sends to
284 -- receiving department
285 --
286
287 PROCEDURE submit_cc_line( itemtype IN VARCHAR2,
288 itemkey IN VARCHAR2,
289 actid IN NUMBER,
290 funcmode IN VARCHAR2,
291 result OUT NOCOPY VARCHAR2 );
292
293
294 --
295 -- Procedure
296 -- no_submit_cc_line
297 -- Purpose
298 -- Sets cross charge line status to 'not submitted'
299 -- History
300 -- 27-SEP-2000 S Brewer Created.
301 -- Arguments
302 -- itemtype Workflow item type (ITR Approval)
303 -- itemkey ID of cross charge/cross charge line/wkf run id
304 -- actid ID of activity, provided by workflow engine
305 -- (not used in this procedure)
306 -- funcmode Function mode (RUN or CANCEL)
307 -- result Result code
308 -- Example
309 -- N/A (not user-callable)
310 --
311 -- Notes
312 -- This procedure is called from the Oracle Workflow engine
313 -- It sets the cross charge line status to 'not submitted'
314 --
315
316 PROCEDURE no_submit_cc_line( itemtype IN VARCHAR2,
317 itemkey IN VARCHAR2,
318 actid IN NUMBER,
319 funcmode IN VARCHAR2,
320 result OUT NOCOPY VARCHAR2 );
321
322
323
324 --
325 -- Procedure
326 -- find_cc_receiver
327 -- Purpose
328 -- Find the first receiver for approval of the cross charge line
329 -- History
330 -- 27-SEP-2000 S Brewer Created.
331 -- Arguments
332 -- itemtype Workflow item type (ITR Approval)
333 -- itemkey ID of cross charge/cross charge line
334 -- actid ID of activity, provided by workflow engine
335 -- (not used in this procedure)
336 -- funcmode Function mode (RUN or CANCEL)
337 -- result Result code
338 -- Example
339 -- N/A (not user-callable)
340 --
341 -- Notes
342 -- This procedure is called from the Oracle Workflow engine
343 -- It finds the first receiver for approval of the cross charge line
344 -- based upon the charge center and sets the 'RECEIVER%' workflow
345 -- attributes
346 --
347
348 PROCEDURE find_cc_receiver( itemtype IN VARCHAR2,
349 itemkey IN VARCHAR2,
350 actid IN NUMBER,
351 funcmode IN VARCHAR2,
352 result OUT NOCOPY VARCHAR2 );
353
354
355
356
357 --
358 -- Procedure
359 -- Set_Approver_Name_to_rec
360 -- Purpose
361 -- Sets the workflow 'APPROVER' attributes to the values for the
362 -- Receiver
363 -- History
364 -- 27-SEP-2000 S Brewer Created
365 -- Arguments
369 -- (not used in this procedure)
366 -- itemtype Workflow item type (Cross Charge)
367 -- itemkey ID of cross charge/cross charge line
368 -- actid ID of activity, provided by workflow engine
370 -- funcmode Function mode (RUN or CANCEL)
371 -- Example
372 -- N/A (not user-callable)
373 --
374 -- Notes
375 -- This procedure is called from the Oracle Workflow engine.
376 -- It sets the approver name equal to the receiver name
377 --
378 PROCEDURE set_approver_name_to_rec( itemtype IN VARCHAR2,
379 itemkey IN VARCHAR2,
380 actid IN NUMBER,
381 funcmode IN VARCHAR2,
382 result OUT NOCOPY VARCHAR2 );
383
384
385 --
386 -- Procedure
387 -- Double_Timeout
388 -- Purpose
389 -- Checks if the double timeout option is enabled
390 -- History
391 -- 26-FEB-2001 S Brewer Created
392 -- Arguments
393 -- itemtype Workflow item type (Cross Charge)
394 -- itemkey ID of cross charge/cross charge line
395 -- actid ID of activity, provided by workflow engine
396 -- (not used in this procedure)
397 -- funcmode Function mode (RUN or CANCEL)
398 -- Example
399 -- N/A (not user-callable)
400 --
401 -- Notes
402 -- This procedure is called from the Oracle Workflow engine.
403 -- Checks if the double timeout option is enabled for the final
404 -- approver
405 --
406 PROCEDURE double_timeout( itemtype IN VARCHAR2,
407 itemkey IN VARCHAR2,
408 actid IN NUMBER,
409 funcmode IN VARCHAR2,
410 result OUT NOCOPY VARCHAR2 );
411
412 --
413 -- Procedure
414 -- Final_Approver
415 -- Purpose
416 -- Checks if this is the final approver
417 -- History
418 -- 27-SEP-2000 S Brewer Created
419 -- Arguments
420 -- itemtype Workflow item type (Cross Charge)
421 -- itemkey ID of cross charge/cross charge line
422 -- actid ID of activity, provided by workflow engine
423 -- (not used in this procedure)
424 -- funcmode Function mode (RUN or CANCEL)
425 -- Example
426 -- N/A (not user-callable)
427 --
428 -- Notes
429 -- This procedure is called from the Oracle Workflow engine.
430 -- Checks if this is the final approver
431 --
432 PROCEDURE final_approver( itemtype IN VARCHAR2,
433 itemkey IN VARCHAR2,
434 actid IN NUMBER,
435 funcmode IN VARCHAR2,
436 result OUT NOCOPY VARCHAR2 );
437
438
439 --
440 -- Procedure
441 -- Is_Receiver_Final_Approver
442 -- Purpose
443 -- Checks if the final approver is the receiver
444 -- History
445 -- 27-SEP-2000 S Brewer Created
446 -- Arguments
447 -- itemtype Workflow item type (Cross Charge)
448 -- itemkey ID of cross charge/cross charge line
449 -- actid ID of activity, provided by workflow engine
450 -- (not used in this procedure)
451 -- funcmode Function mode (RUN or CANCEL)
452 -- Example
453 -- N/A (not user-callable)
454 --
455 -- Notes
456 -- This procedure is called from the Oracle Workflow engine.
457 -- Checks if the final approver is the receiver
458 --
459 PROCEDURE is_receiver_final_approver( itemtype IN VARCHAR2,
460 itemkey IN VARCHAR2,
461 actid IN NUMBER,
462 funcmode IN VARCHAR2,
463 result OUT NOCOPY VARCHAR2 );
464
465
466
467 --
468 -- Procedure
469 -- Verify_Authority
470 -- Purpose
471 -- Hook to perform additional authoritization checks.
472 -- History
473 -- 27-SEP-2000 S Brewer Created
474 -- Arguments
475 -- itemtype Workflow item type (Cross charge)
476 -- itemkey ID of Cross Charge /cross charge line num
477 -- actid ID of activity, provided by workflow engine
478 -- (not used in this procedure)
479 -- funcmode Function mode (RUN or CANCEL)
480 -- result Result of activity (PASS or FAIL)
481 -- N/A (not user-callable)
482 --
483 -- Notes
484 -- This procedure is called from the Oracle Workflow engine.
485 -- It performs additional checks to determine if the approver has sufficient
486 -- authority.
487 --
488 PROCEDURE verify_authority( itemtype IN VARCHAR2,
489 itemkey IN VARCHAR2,
490 actid IN NUMBER,
491 funcmode IN VARCHAR2,
492 result OUT NOCOPY VARCHAR2 );
493 --
494 -- Procedure
495 -- Approve_cc_line
496 -- Purpose
497 -- Approve cross charge line.
498 -- History
499 -- 27-SEP-2000 S Brewer Created
500 -- Arguments
501 -- itemtype Workflow item type ( Cross Charge)
502 -- itemkey ID of cross charge /cross charge line
503 -- actid ID of activity, provided by workflow engine
504 -- (not used in this procedure)
505 -- funcmode Function mode (RUN or CANCEL)
506 -- result Result of activity (not used in this procedure)
507 -- Example
508 -- N/A (not user-callable)
509 --
510 -- Notes
511 -- This procedure is called from the Oracle Workflow engine.
512 -- It updates the cross charge status to 'Approved'.
513
514 PROCEDURE approve_cc_line( itemtype IN VARCHAR2,
518 result OUT NOCOPY VARCHAR2 );
515 itemkey IN VARCHAR2,
516 actid IN NUMBER,
517 funcmode IN VARCHAR2,
519
520 --
521 -- Procedure
522 -- Reject_cc_line
523 -- Purpose
524 -- Reject cross charge line.
525 -- History
526 -- 27-SEP-2000 S Brewer Created
527 -- Arguments
528 -- itemtype Workflow item type (Cross Charge)
529 -- itemkey ID of Cross Charge /cross charge line num
530 -- actid ID of activity, provided by workflow engine
531 -- (not used in this procedure)
532 -- funcmode Function mode (RUN or CANCEL)
533 -- Example
534 -- N/A (not user-callable)
535 --
536 -- Notes
537 -- This procedure is called from the Oracle Workflow engine.
538 -- It sets the cross charge line status to 'Rejected' by updating the
539 -- corresponding record in JE_UK_ITR_CHARGE_LINES.
540 --
541
542 PROCEDURE reject_cc_line( itemtype IN VARCHAR2,
543 itemkey IN VARCHAR2,
544 actid IN NUMBER,
545 funcmode IN VARCHAR2,
546 result OUT NOCOPY VARCHAR2 );
547
548
549
550
551 --
552 -- Procedure
553 -- GetManager
554 -- Purpose
555 -- Gets the manager of the given employee id
556 -- History
557 -- 27-SEP-2000 S Brewer Created
558 -- Arguments
559 -- employee_id employee_id whose manager is to be retrieved
560 -- manager_id manager_id of the given employee_id
561 -- Example
562 -- N/A (not user-callable)
563 --
564 --
565 PROCEDURE getmanager( employee_id IN NUMBER,
566 manager_id OUT NOCOPY NUMBER) ;
567
568
569
570 --
571 -- Procedure
572 -- setpersonas
573 -- Purpose
574 -- Set the given manager_id as either tha manager or the approver
575 -- based upon the manager_target
576 -- History
577 -- 27-SEP-2000 S Brewer Created
578 -- Arguments
579 -- manager_id manager_id
580 -- item_type Workflow item type (Cross Charge)
581 -- itemkey ID of Cross Charge/cross charge line num
582 -- manager_target value it should be set to i.e. either a MANAGER
583 -- or APPROVER.
584 -- Example
585 -- N/A (not user-callable)
586 --
587 PROCEDURE setpersonas( manager_id IN NUMBER,
588 item_type IN VARCHAR2,
589 item_key IN VARCHAR2,
590 manager_target IN VARCHAR2) ;
591
592
593 --
594 -- Procedure
595 -- getfinalapprover
596 -- Purpose
597 -- Get the final approver for a given employee id
598 -- History
599 -- 27-SEP-2000 S Brewer Created
600 -- Arguments
601 -- p_employee_id Employee ID
602 -- p_approval_amount Amount that needs to be approved
603 -- p_item_type Workflow Item Type
604 -- p_final_approver_id Approver's ID
605 -- Example
606 -- N/A (not user-callable)
607 --
608 PROCEDURE getfinalapprover( p_employee_id IN NUMBER,
609 p_set_of_books_id IN NUMBER,
610 p_approval_amount IN NUMBER,
611 p_item_type IN VARCHAR2,
612 p_final_approver_id OUT NOCOPY NUMBER) ;
613
614
615
616 --
617 -- Procedure
618 -- getapprover
619 -- Purpose
620 -- Get the approver for a given employee id based upon the
621 -- find_approver_method
622 -- History
623 -- 27-SEP-2000 S Brewer Created
624 -- Arguments
625 -- employee_id Employee ID
626 -- approval_amount Approval Amount
627 -- item_type Workflow item type
628 -- curr_approver_id Current Approver ID
629 -- find_approver_method Find Approver Method
630 -- next_approver_id Next approver ID that the procedure computes.
631 --
632 PROCEDURE getapprover( employee_id IN NUMBER,
633 approval_amount IN NUMBER,
634 item_type IN VARCHAR2,
635 item_key IN VARCHAR2,
636 curr_approver_id IN NUMBER,
637 find_approver_method IN VARCHAR2,
638 next_approver_id IN OUT NOCOPY NUMBER );
639
640
641
642 --
643 -- Procedure
644 -- find_approver
645 -- Purpose
646 -- Find the approver for the preparer of the journal entry
647 -- History
648 -- 27-SEP-2000 S Brewer Created
649 -- Arguments
650 -- itemtype Workflow item type (Cross Charge)
651 -- itemkey ID of Cross Charge /cross charge line num
652 -- actid ID of activity, provided by workflow engine
653 -- (not used in this procedure)
654 -- funcmode Function mode (RUN or CANCEL)
655 -- Example
656 -- N/A (not user-callable)
657 --
658 -- Notes
659 -- This procedure is called from the Oracle Workflow engine.
660 -- It finds the approver for the receiver of the cross charge.
661 --
662 PROCEDURE find_approver( item_type IN VARCHAR2,
663 item_key IN VARCHAR2,
664 actid IN NUMBER,
665 funmode IN VARCHAR2,
666 result OUT NOCOPY VARCHAR2) ;
667
668
669
670 --
671 -- Procedure
672 -- record_forward_from_info
673 -- Purpose
674 -- Record the forward from info i.e. the approver from whom the entry
675 -- is being forwarded from.
676 -- History
680 -- itemkey ID of Cross Charge/cross charge line num
677 -- 27-SEP-2000 S Brewer Created
678 -- Arguments
679 -- itemtype Workflow item type ( Cross Charge)
681 -- actid ID of activity, provided by workflow engine
682 -- (not used in this procedure)
683 -- funcmode Function mode (RUN or CANCEL)
684 -- Example
685 -- N/A (not user-callable)
686 --
687 -- Notes
688 -- This procedure is called from the Oracle Workflow engine.
689 -- It records the forward from info.
690 --
691 PROCEDURE record_forward_from_info( p_item_type IN VARCHAR2,
692 p_item_key IN VARCHAR2,
693 p_actid IN NUMBER,
694 p_funmode IN VARCHAR2,
695 p_result OUT NOCOPY VARCHAR2) ;
696
697
698
699 --
700 -- Procedure
701 -- mgr_equalto_aprv
702 -- Purpose
703 -- Checks if the approver is the direct manager
704 -- History
705 -- 27-SEP-2000 S Brewer Created
706 -- Arguments
707 -- itemtype Workflow item type ( Cross Charge)
708 -- itemkey ID of Cross Charge/cross charge line num
709 -- actid ID of activity, provided by workflow engine
710 -- (not used in this procedure)
711 -- funcmode Function mode (RUN or CANCEL)
712 -- Example
713 -- N/A (not user-callable)
714 --
715 -- Notes
716 -- This procedure is called from the Oracle Workflow engine.
717 -- It checks if the approver is the direct manager.
718 --
719 PROCEDURE mgr_equalto_aprv( p_item_type IN VARCHAR2,
720 p_item_key IN VARCHAR2,
721 p_actid IN NUMBER,
722 p_funmode IN VARCHAR2,
723 p_result OUT NOCOPY VARCHAR2) ;
724
725
726
727 --
728 -- Procedure
729 -- first_approver
730 -- Purpose
731 -- Finds out NOCOPY if this is the first approver
732 -- History
733 -- 27-SEP-2000 S Brewer Created
734 -- Arguments
735 -- itemtype Workflow item type ( Cross Charge)
736 -- itemkey ID of Cross Charge/cross charge line num
737 -- actid ID of activity, provided by workflow engine
738 -- (not used in this procedure)
739 -- funcmode Function mode (RUN or CANCEL)
740 -- Example
741 -- N/A (not user-callable)
742 --
743 -- Notes
744 -- This procedure is called from the Oracle Workflow engine.
745 -- Finds out NOCOPY if this is the first approver
746 --
747 PROCEDURE first_approver( p_item_type IN VARCHAR2,
748 p_item_key IN VARCHAR2,
749 p_actid IN NUMBER,
750 p_funmode IN VARCHAR2,
751 p_result OUT NOCOPY VARCHAR2) ;
752
753
754
755 --
756 -- Procedure
757 -- set_employee_name_to_prep
758 -- Purpose
759 -- Sets workflow employee attributes to Preparer so that the find_approver
760 -- procedure can be used for the Creation Approval Process and the
761 -- Receiving Approval Process.
762 -- History
763 -- 27-SEP-2000 S Brewer Created
764 -- Arguments
765 -- itemtype Workflow item type ( Cross Charge)
766 -- itemkey ID of Cross Charge/cross charge line num
767 -- actid ID of activity, provided by workflow engine
768 -- (not used in this procedure)
769 -- funcmode Function mode (RUN or CANCEL)
770 -- Example
771 -- N/A (not user-callable)
772 --
773 -- Notes
774 -- This procedure is called from the Oracle Workflow engine.
775 -- It sets workflow employee attributes to preparer so that the
776 -- find_approver procedure can be used for the Creation Approval Process and
777 -- the Receiving Approval Process.
778 --
779 PROCEDURE set_employee_name_to_prep(itemtype IN VARCHAR2,
780 itemkey IN VARCHAR2,
781 actid IN NUMBER,
782 funcmode IN VARCHAR2,
783 result OUT NOCOPY VARCHAR2) ;
784
785
786 --
787 -- Procedure
788 -- set_employee_name_to_rec
789 -- Purpose
790 -- Sets workflow employee attributes to receiver so that the find_approver
791 -- procedure can be used for the Creation Approval Process and the
792 -- Receiving Approval Process.
793 -- History
794 -- 27-SEP-2000 S Brewer Created
795 -- Arguments
796 -- itemtype Workflow item type ( Cross Charge)
797 -- itemkey ID of Cross Charge/cross charge line num
798 -- actid ID of activity, provided by workflow engine
799 -- (not used in this procedure)
800 -- funcmode Function mode (RUN or CANCEL)
801 -- Example
802 -- N/A (not user-callable)
803 --
804 -- Notes
805 -- This procedure is called from the Oracle Workflow engine.
806 -- It sets workflow employee attributes to receiver so that the
807 -- find_approver procedure can be used for the Creation Approval Process and
808 -- the Receiving Approval Process.
809 --
810 PROCEDURE set_employee_name_to_rec( itemtype IN VARCHAR2,
811 itemkey IN VARCHAR2,
812 actid IN NUMBER,
813 funcmode IN VARCHAR2,
814 result OUT NOCOPY VARCHAR2) ;
815
816
817
818 --
819 -- Procedure
820 -- reset_approval_attributes
821 -- Purpose
822 -- Resets workflow approval attributes for the Receiving Approval
823 -- Process.
824 -- History
825 -- 27-SEP-2000 S Brewer Created
826 -- Arguments
830 -- (not used in this procedure)
827 -- itemtype Workflow item type ( Cross Charge)
828 -- itemkey ID of Cross Charge/cross charge line num
829 -- actid ID of activity, provided by workflow engine
831 -- funcmode Function mode (RUN or CANCEL)
832 -- Example
833 -- N/A (not user-callable)
834 --
835 -- Notes
836 -- This procedure is called from the Oracle Workflow engine.
837 -- It resets the workflow approval attributes for the Receiving Approval
838 -- Process.
839 --
840 PROCEDURE reset_approval_attributes( itemtype IN VARCHAR2,
841 itemkey IN VARCHAR2,
842 actid IN NUMBER,
843 funcmode IN VARCHAR2,
844 result OUT NOCOPY VARCHAR2) ;
845
846
847
848 END IGI_ITR_APPROVAL_PKG;