1 PACKAGE po_approve_sv AUTHID CURRENT_USER AS
2 /* $Header: POXAPAPS.pls 115.4 2003/08/07 05:57:22 zxzhang ship $*/
3
4 /*===========================================================================
5 PROCEDURE NAME: get_approval_path
6
7 DESCRIPTION: This procedure gets the default approval path.
8
9 PARAMETERS: x_default_approval_path_id IN NUMBER,
10 x_forward_from_id IN NUMBER,
11 x_object_id IN NUMBER,
12 x_document_type_code IN VARCHAR2,
13 x_document_subtype IN VARCHAR2,
14 x_approval_path OUT NOCOPY VARCHAR2,
15 x_approval_path_id OUT NOCOPY NUMBER
16
17 DESIGN REFERENCES: POXDOAPP.dd
18
19 ALGORITHM: Gets default approval path as follows:
20 - If this is not the first action on this document,
21 use the same approval path as the previous action
22 on this document.
23 - If this is the first action on the document, use
24 the default_approval_path_id only if the forward_from
25 person belongs to the same path
26 - If this is the first action on the document and the
27 foward_from person does not belong to
28 default_approval_path_id, then do not default
29 in approval path.
30
31 NOTES:
32
33 OPEN ISSUES:
34
35 CLOSED ISSUES:
36
37 CHANGE HISTORY: cmok 5/1 created
38 ===========================================================================*/
39
40 PROCEDURE test_get_approval_path ( x_default_approval_path_id IN NUMBER,
41 x_forward_from_id IN NUMBER,
42 x_object_id IN NUMBER,
43 x_document_type_code IN VARCHAR2,
44 x_document_subtype IN VARCHAR2);
45
46 PROCEDURE get_approval_path (
47 x_default_approval_path_id IN NUMBER,
48 x_forward_from_id IN NUMBER,
49 x_object_id IN NUMBER,
50 x_document_type_code IN VARCHAR2,
51 x_document_subtype IN VARCHAR2,
52 x_approval_path OUT NOCOPY VARCHAR2,
53 x_approval_path_id OUT NOCOPY NUMBER);
54
55 /*===========================================================================
56 PROCEDURE NAME: get_document_types
57
58 DESCRIPTION: This procedure gets values required at startup from
59 the table po_document_types.
60
61 PARAMETERS: x_document_type_code IN VARCHAR2,
62 x_document_subtype IN VARCHAR2,
63 x_can_change_forward_from_flag IN OUT VARCHAR2,
64 x_can_change_forward_to_flag IN OUT VARCHAR2,
65 x_can_change_approval_path IN OUT VARCHAR2,
66 x_default_approval_path_id IN OUT NUMBER,
67 x_can_preparer_approve_flag IN OUT VARCHAR2,
68 x_can_approver_modify_flag IN OUT VARCHAR2
69
70 DESIGN REFERENCES: POXDOAPP.dd
71
72 ALGORITHM:
73
74 NOTES:
75
76 OPEN ISSUES:
77
78 CLOSED ISSUES:
79
80 CHANGE HISTORY: cmok 5/1 created
81 ===========================================================================*/
82
83 PROCEDURE test_get_document_types (x_document_type_code IN VARCHAR2,
84 x_document_subtype IN VARCHAR2);
85
86 PROCEDURE get_document_types (
87 x_document_type_code IN VARCHAR2,
88 x_document_subtype IN VARCHAR2,
89 x_can_change_forward_from_flag IN OUT NOCOPY VARCHAR2,
90 x_can_change_forward_to_flag IN OUT NOCOPY VARCHAR2,
91 x_can_change_approval_path IN OUT NOCOPY VARCHAR2,
92 x_default_approval_path_id IN OUT NOCOPY NUMBER,
93 x_can_preparer_approve_flag IN OUT NOCOPY VARCHAR2,
94 x_can_approver_modify_flag IN OUT NOCOPY VARCHAR2);
95
96 /* RETROACTIVE FPI START*/
97 /*===========================================================================
98 PROCEDURE NAME: get_document_types
99
100 DESCRIPTION: This procedure gets values required at startup from
101 the table po_document_types. This procedure is
102 overloaded with all the columns from po_document_types
103 as output parameters.
104
105 PARAMETERS: p_document_type_code - Document Type (PO/RELEASE ..)
106 p_document_subtype - Document Subtype - (STANDARD ..)
107 x_can_change_forward_from_flag - Can user change forward
108 From flag
109 x_can_change_forward_to_flag - Can user change forward
110 To Flag
111 x_can_change_approval_path - Can user change Approval
112 Path
113 x_default_approval_path_id - Default Approval Path
114 x_can_preparer_approve_flag - Can owner approve.
115 x_can_approver_modify_flag - Can approver modify
116 document
117 x_forwarding_mode_code - Document Forward Method
118 x_wf_approval_itemtype - Item Type for the document
119 x_wf_approval_process - Approval Process defined for
120 the document.
121
122
123 Description: Select the workflow relavent parameters from po_document_types
124 for a given document_type and document_subtype.
125 NOTES:
126
127 OPEN ISSUES:
128
129 CLOSED ISSUES:
130
131 CHANGE HISTORY: pparthas 21-oct-2002 created
132 ===========================================================================*/
133
134 PROCEDURE get_document_types (
135 p_document_type_code IN VARCHAR2,
136 p_document_subtype IN VARCHAR2,
137 x_can_change_forward_from_flag OUT NOCOPY VARCHAR2,
138 x_can_change_forward_to_flag OUT NOCOPY VARCHAR2,
139 x_can_change_approval_path OUT NOCOPY VARCHAR2,
140 x_default_approval_path_id OUT NOCOPY NUMBER,
141 x_can_preparer_approve_flag OUT NOCOPY VARCHAR2,
142 x_can_approver_modify_flag OUT NOCOPY VARCHAR2,
143 x_forwarding_mode_code OUT NOCOPY VARCHAR2,
144 x_wf_approval_itemtype OUT NOCOPY VARCHAR2,
145 x_wf_approval_process OUT NOCOPY VARCHAR2,
146 x_type_name OUT NOCOPY VARCHAR2);
147 /* RETROACTIVE FPI END*/
148
149 -- <FPJ Redesign Approval Window START>
150 PROCEDURE get_change_summary(p_document_type_code IN VARCHAR2,
151 p_document_header_id IN NUMBER,
152 x_change_summary OUT NOCOPY VARCHAR2);
153 -- <FPJ Redesign Approval Window END>
154
155 END PO_APPROVE_SV;