1 PACKAGE OKC_TERMS_TMPL_APPROVAL_PVT AUTHID CURRENT_USER as
2 /* $Header: OKCVTMPLAPPS.pls 120.0.12000000.2 2007/10/10 12:36:28 kkolukul ship $ */
3
4 --
5 --
6 -- Procedure
7 -- selector
8 --
9 -- Description
10 --
11 -- IN
12 -- itemtype - A valid item type from (WF_ITEM_TYPES table).
13 -- itemkey - A string generated from the application object's primary key.
14 -- itemuserkey - A string generated from the application object user-friendly
15 -- primary key.
16 -- actid - The function activity(instance id).
17 -- processowner - The username owner for this item instance.
18 -- funcmode - Run/Cancel
19 -- OUT
20 -- resultout - Name of workflow process to run
21 --
22 PROCEDURE selector (
23 itemtype in varchar2,
24 itemkey in varchar2,
25 actid in number,
26 funcmode in varchar2,
27 resultout out nocopy varchar2 );
28
29
30 /* added 2 new IN params and 1 out param
31 p_validation_level : 'A' or 'E' do all checks or checks with severity = E
32 p_check_for_drafts : 'Y' or 'N' if Y checks for drafts and inserts them
33 in the OKC_TMPL_DRAFT_CLAUSES table
34 x_sequence_id : contains the sequence id for table OKC_QA_ERRORS_T
35 that contains the validation results
36
37 Existing out param x_qa_return_status will change to
38 have the following statues
39 x_qa_return_status : S if the template was succesfully submitted
40 W if qa check resulted in warnings. Use x_sequence_id
41 to display the qa results.
42 E if qa check resulted in errors. Use x_sequence_id
43 to display the qa results
44 D if there are draft articles and the user should be
45 redirected to the new submit page. Use x_sequence_id
46 if not null, to display a warnings link on the
47 new submit page.
48
49 p_validation_level p_check_for_drafts
50 Search/View/Update : A Y
51 New Submit Page : A N
52 Validation Page : E N
53
54 */
55 PROCEDURE start_approval (
56 p_api_version IN Number,
57 p_init_msg_list IN Varchar2 default FND_API.G_FALSE,
58 p_commit IN Varchar2 default FND_API.G_FALSE,
59 p_template_id IN Number,
60 p_object_version_number IN Number default NULL,
61 x_return_status OUT NOCOPY Varchar2,
62 x_msg_data OUT NOCOPY Varchar2,
63 x_msg_count OUT NOCOPY Number,
64 x_qa_return_status OUT NOCOPY Varchar2,
65
66 p_validation_level IN VARCHAR2 DEFAULT 'A',
67 p_check_for_drafts IN VARCHAR2 DEFAULT 'N',
68 x_sequence_id OUT NOCOPY NUMBER);
69
70 --
71 -- Procedure
72 -- Approve_Template
73 --
74 -- Description
75 --
76 -- IN
77 -- itemtype - A valid item type from (WF_ITEM_TYPES table).
78 -- itemkey - A string generated from the application object's primary key.
79 -- itemuserkey - A string generated from the application object user-friendly
80 -- primary key.
81 -- actid - The function activity(instance id).
82 -- processowner - The username owner for this item instance.
83 -- funcmode - Run/Cancel
84 -- OUT
85 -- resultout - Name of workflow process to run
86 --
87 PROCEDURE approve_template (
88 itemtype in varchar2,
89 itemkey in varchar2,
90 actid in number,
91 funcmode in varchar2,
92 resultout out nocopy varchar2 );
93
94 --
95 -- Procedure
96 -- Reject_Template
97 --
98 -- Description
99 --
100 -- IN
101 -- itemtype - A valid item type from (WF_ITEM_TYPES table).
102 -- itemkey - A string generated from the application object's primary key.
103 -- itemuserkey - A string generated from the application object user-friendly
104 -- primary key.
105 -- actid - The function activity(instance id).
106 -- processowner - The username owner for this item instance.
107 -- funcmode - Run/Cancel
108 -- OUT
109 -- resultout - Name of workflow process to run
110 --
111 PROCEDURE reject_template (
112 itemtype in varchar2,
113 itemkey in varchar2,
114 actid in number,
115 funcmode in varchar2,
116 resultout out nocopy varchar2 );
117
118 --
119 -- SelectApprover
120 -- IN
121 -- itemtype - A valid item type from (WF_ITEM_TYPES table).
122 -- itemkey - A string generated from the application object's primary key.
123 -- actid - The function activity(instance id).
124 -- funcmode - Run/Cancel
125 -- OUT
126 -- Resultout - 'COMPLETE:T' if employee has a manager
127 -- - 'COMPLETE:F' if employee does not have a manager
128 --
129 -- USED BY ACTIVITIES
130 -- <ITEM_TYPE> <ACTIVITY>
131 --
132 PROCEDURE select_approver (
133 itemtype in varchar2,
134 itemkey in varchar2,
135 actid in number,
136 funcmode in varchar2,
137 resultout out nocopy varchar2 );
138
139
140 PROCEDURE attachment_exists (
141 itemtype in varchar2,
142 itemkey in varchar2,
143 actid in number,
144 funcmode in varchar2,
145 resultout out nocopy varchar2 );
146
147 PROCEDURE layout_template_exists (
148 itemtype in varchar2,
149 itemkey in varchar2,
150 actid in number,
151 funcmode in varchar2,
152 resultout out nocopy varchar2 );
153
154 /* 11.5.10+
155 new procedure to change the status of articles submitted with a template
156 Fecthes the article versions from table OKC_TMPL_DRAFT_CLAUSES and then
157 calls article bulk api's to do the actual status changes.
158
159 The following status changes are allowed
160 DRAFT -> PENDING_APPROVAL
161 PENDING_APPROVAL -> APPROVED/REJECTED
162
163 p_template_id Maps to document_id column in table OKC_TMPL_DRAFT_CLAUSES.
164 p_wf_seq_id Maps to WF_SEQ_ID column in table OKC_TMPL_DRAFT_CLAUSES.
165 p_status The status that the articles should be updated to,
166 can be one of 3 values - 'PENDING_APPROVAL', 'APPROVED', 'REJECTED'.
167 Error is thrown if the status is something else.
168
169 p_validation_level meaningful only for p_status = PENDING_APPROVAL.
170 The pending approval blk api accepts a validation level parameter
171 to either do complete or no validation. Passed as it is to the
172 pending approval blk api.
173
174 x_validation_results If for any clauses fail the validation check the results
175 are returned in this table
176 */
177 PROCEDURE change_clause_status (
178 p_api_version IN NUMBER,
179 p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
180 p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
181
182 x_return_status OUT NOCOPY VARCHAR2,
183 x_msg_data OUT NOCOPY VARCHAR2,
184 x_msg_count OUT NOCOPY NUMBER,
185
186 p_template_id IN NUMBER,
187 p_wf_seq_id IN NUMBER DEFAULT NULL,
188 p_status IN VARCHAR2,
189 p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
190 x_validation_results OUT NOCOPY OKC_ART_BLK_PVT.validation_tbl_type);
191
192 FUNCTION get_error_string(
193 l_validation_results IN OKC_ART_BLK_PVT.validation_tbl_type) RETURN VARCHAR2 ;
194
195 /* 11.5.10+ */
196 PROCEDURE set_notified_list(
197 itemtype in varchar2,
198 itemkey in varchar2,
199 actid in number,
200 funcmode in varchar2,
201 resultout out nocopy varchar2);
202
203 /* 11.5.10+ */
204 PROCEDURE set_notified(
205 itemtype in varchar2,
206 itemkey in varchar2,
207 actid in number,
208 funcmode in varchar2,
209 resultout out nocopy varchar2);
210
211 /* 11.5.10+ */
212 PROCEDURE decrement_counter(
213 itemtype in varchar2,
214 itemkey in varchar2,
215 actid in number,
216 funcmode in varchar2,
217 resultout out nocopy varchar2);
218
219 /* 11.5.10+ */
220 PROCEDURE global_articles_exist(
221 itemtype in varchar2,
222 itemkey in varchar2,
223 actid in number,
224 funcmode in varchar2,
225 resultout out nocopy varchar2);
226
227 /* 11.5.10+ */
228 PROCEDURE select_draft_clauses(
229 p_api_version IN NUMBER,
230 p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
231 p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
232
233 x_return_status OUT NOCOPY VARCHAR2,
234 x_msg_data OUT NOCOPY VARCHAR2,
235 x_msg_count OUT NOCOPY NUMBER,
236
237 p_template_id IN NUMBER);
238
239 /*Bug 6329229*/
240
241 PROCEDURE set_context_info(
242 itemtype in varchar2,
243 itemkey in varchar2,
244 actid in number,
245 funcmode in varchar2,
246 resultout out nocopy varchar2);
247
248
249 END OKC_TERMS_TMPL_APPROVAL_PVT;