1 Package ame_action_api as
2 /* $Header: amatyapi.pkh 120.3 2006/09/28 14:03:56 avarri noship $ */
3 /*#
4 * This package contains API's for maintaining AME actions, action types and
5 * action type usages.
6 * @rep:scope public
7 * @rep:product AME
8 * @rep:displayname Approval Action
9 */
10 --
11 -- ----------------------------------------------------------------------
12 -- |---------------------< create_ame_action_type >---------------------|
13 -- ----------------------------------------------------------------------
14 procedure create_ame_action_type
15 (p_validate in boolean default false
16 ,p_language_code in varchar2 default hr_api.userenv_lang
17 ,p_name in varchar2
18 ,p_procedure_name in varchar2
19 ,p_dynamic_description in varchar2
20 ,p_description in varchar2
21 ,p_description_query in varchar2 default null
22 ,p_rule_type in number default null
23 ,p_approver_type_id in number default null
24 ,p_action_type_id out nocopy number
25 ,p_aty_object_version_number out nocopy number
26 ,p_aty_start_date out nocopy date
27 ,p_aty_end_date out nocopy date
28 ,p_apu_object_version_number out nocopy number
29 ,p_apu_start_date out nocopy date
30 ,p_apu_end_date out nocopy date
31 );
32 -- ----------------------------------------------------------------------
33 -- |---------------------< create_ame_action_type_usage >---------------|
34 -- ----------------------------------------------------------------------
35 procedure create_ame_action_type_usage
36 (p_validate in boolean default false
37 ,p_action_type_id in number
38 ,p_rule_type in number
39 ,p_object_version_number out nocopy number
40 ,p_start_date out nocopy date
41 ,p_end_date out nocopy date
42 );
43 -- ----------------------------------------------------------------------
44 -- |---------------------< create_ame_appr_type_usage >-----------------|
45 -- ----------------------------------------------------------------------
46 procedure create_ame_appr_type_usage
47 (p_validate in boolean default false
48 ,p_action_type_id in number
49 ,p_approver_type_id in number
50 ,p_object_version_number out nocopy number
51 ,p_start_date out nocopy date
52 ,p_end_date out nocopy date
53 );
54 --
55 -- ----------------------------------------------------------------------------
56 -- |-----------------------< create_ame_action_type_conf >--------------------|
57 -- ----------------------------------------------------------------------------
58 --
59 -- {Start Of Comments}
60 /*#
61 * This API creates a new action type config.
62 *
63 * Action type config consists parallelization details of an action type
64 * for a transaction type.
65 *
66 * <p><b>Licensing</b><br>
67 * This API is available for use with any licensed component of the e-business
68 * suite.
69 *
70 * <p><b>Prerequisites</b><br>
71 * Valid action type and valid transaction type should exist.
72 *
73 * <p><b>Post Success</b><br>
74 * The action type config is created successfully.
75 *
76 * <p><b>Post Failure</b><br>
77 * The action type config is not created and an error is raised.
78 *
79 * @param p_validate If true, then validation alone will be performed and the
80 * database will remain unchanged. If false and all validation checks pass,
81 * then the database will be modified.
82 * @param p_action_type_id This uniquely identifies the action type.
83 * @param p_application_id Transaction type id for which action type config
84 * is created.
85 * @param p_voting_regime The voting regime for the action type config.
86 * The valid values are in the lookup type AME_ACT_VOTING_REGIME.
87 * @param p_chain_ordering_mode This represents the order number of
88 * approver chains generated by this action type.
89 * @param p_order_number The order number of the action type in the given
90 * transaction type.
91 * @param p_object_version_number If p_validate is false, then set to
92 * version number of the created action type config. If p_validate is true,
93 * then set to null.
94 * @param p_start_date If p_validate is false, then set to the start date
95 * for the created action type config. If p_validate is true, then set to null.
96 * @param p_end_date It is the date up to, which the action type config is
97 * effective. If p_validate is false, then it is set to 31-Dec-4712.
98 * If p_validate is true, then it is set to null.
99 * @rep:displayname Create Ame Action Type Config
100 * @rep:category BUSINESS_ENTITY AME_ACTION
101 * @rep:lifecycle active
102 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
103 * @rep:scope public
104 */
105 --
106 -- {End Of Comments}
107 --
108 procedure create_ame_action_type_conf
109 (p_validate in boolean default false
110 ,p_action_type_id in number
111 ,p_application_id in number
112 ,p_voting_regime in varchar2 default null
113 ,p_chain_ordering_mode in varchar2 default null
114 ,p_order_number in NUMBER DEFAULT null
115 ,p_object_version_number out nocopy number
116 ,p_start_date out nocopy date
117 ,p_end_date out nocopy date
118 );
119 -- ----------------------------------------------------------------------------
120 -- |---------------------< create_ame_req_attribute >-------------------------|
121 -- ----------------------------------------------------------------------------
122 procedure create_ame_req_attribute
123 (p_validate in boolean default false
124 ,p_action_type_id in number
125 ,p_attribute_id in number
126 ,p_object_version_number out nocopy number
127 ,p_start_date out nocopy date
128 ,p_end_date out nocopy date
129 );
130 --
131 -- ----------------------------------------------------------------------------
132 -- |----------------------------< create_ame_action >-------------------------|
133 -- ----------------------------------------------------------------------------
134 --
135 -- {Start Of Comments}
136 /*#
137 * This API creates a new action for an action type.
138 *
139 * <p><b>Licensing</b><br>
140 * This API is available for use with any licensed component of the e-business
141 * suite.
142 * <p><b>Prerequisites</b><br>
143 * Action type should be valid.
144 *
145 * <p><b>Post Success</b><br>
146 * Action for an action type is created successfully.
147 *
148 * <p><b>Post Failure</b><br>
149 * The action is not created and an error is raised.
150 *
151 * @param p_validate If true, then validation alone will be performed and the
152 * database will remain unchanged. If false and all validation checks pass,
153 * then the database will be modified.
154 * @param p_language_code Specifies to which language the translation values
155 * apply. You can set to the base or any installed language. The default value
156 * of hr_api.userenv_lang is equivalent to the RDBMS userenv('LANG') function
157 * value.
158 * @param p_action_type_id This uniquely identifies the action type.
159 * @param p_parameter This identifies the action uniquely within an
160 * action type. For example, supervisory level for a hierarchy based
161 * action type.
162 * @param p_description This contains the description for the action.
163 * @param p_parameter_two This defines the value part of production action.
164 * @param p_action_id This uniquely identifies the action.
165 * @param p_object_version_number If p_validate is false, then set to
166 * version number of the created action. If p_validate is true, then
167 * set to null.
168 * @param p_start_date If p_validate is false, then set to the start date
169 * for the created action. If p_validate is true, then set to null.
170 * @param p_end_date It is the date up to, which the action is effective.
171 * If p_validate is false, then it is set to 31-Dec-4712. If p_validate is
172 * true, then it is set to null.
173 * @rep:displayname Create Ame Action
174 * @rep:category BUSINESS_ENTITY AME_ACTION
175 * @rep:lifecycle active
176 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
177 * @rep:scope public
178 */
179 --
180 -- {End Of Comments}
181 --
182 procedure create_ame_action
183 (p_validate in boolean default false
184 ,p_language_code in varchar2 default hr_api.userenv_lang
185 ,p_action_type_id in number
186 ,p_parameter in varchar2
187 ,p_description in varchar2
188 ,p_parameter_two in varchar2 default null
189 ,p_action_id out nocopy number
190 ,p_object_version_number out nocopy number
191 ,p_start_date out nocopy date
192 ,p_end_date out nocopy date
193 );
194 --
195 -- ----------------------------------------------------------------------
196 -- |---------------------< update_ame_action_type >---------------------|
197 -- ----------------------------------------------------------------------
198 procedure update_ame_action_type
199 (p_validate in boolean default false,
200 p_language_code in varchar2 default hr_api.userenv_lang,
201 p_action_type_id in number,
202 p_procedure_name in varchar2 default hr_api.g_varchar2,
203 p_description in varchar2 default hr_api.g_varchar2,
204 p_description_query in varchar2 default hr_api.g_varchar2,
205 p_object_version_number in out nocopy number,
206 p_start_date out nocopy date,
207 p_end_date out nocopy date
208 );
209 -- ----------------------------------------------------------------------
210 -- |---------------------< update_ame_action_type_conf >----------------|
211 -- ----------------------------------------------------------------------
212 procedure update_ame_action_type_conf
213 (p_validate in boolean default false,
214 p_action_type_id in number,
215 p_application_id in number,
216 p_voting_regime in varchar2 default hr_api.g_varchar2,
217 p_chain_ordering_mode in varchar2 default hr_api.g_varchar2,
218 p_order_number in number default hr_api.g_number,
219 p_object_version_number in out nocopy number,
220 p_start_date out nocopy date,
221 p_end_date out nocopy date
222 );
223 --
224 -- ----------------------------------------------------------------------------
225 -- |----------------------------< update_ame_action >-------------------------|
226 -- ----------------------------------------------------------------------------
227 --
228 -- {Start Of Comments}
229 /*#
230 * This API updates an action of the action type.
231 *
232 * <p><b>Licensing</b><br>
233 * This API is available for use with any licensed component of the e-business
234 * suite.
235 *
236 * <p><b>Prerequisites</b><br>
237 * Action Id should be valid.
238 *
239 * <p><b>Post Success</b><br>
240 * Action is updated successfully.
241 *
242 * <p><b>Post Failure</b><br>
243 * The action is not updated and an error is raised.
244 *
245 * @param p_validate If true, then validation alone will be performed and the
246 * database will remain unchanged. If false and all validation checks pass,
247 * then the database will be modified.
248 * @param p_language_code Specifies to which language the translation values
249 * apply. You can set to the base or any installed language. The default value
250 * of hr_api.userenv_lang is equivalent to the RDBMS userenv('LANG') function
251 * value.
252 * @param p_action_id This uniquely identifies the action to be updated.
253 * @param p_action_type_id This uniquely identifies the action type of the
254 * action to be updated.
255 * @param p_parameter This identifies the action uniquely within an
256 * action type. For example, supervisory level for a hierarchy based
257 * action type.
261 * version number of the action. If p_validate is true, then set to null.
258 * @param p_parameter_two This defines the value part of production action.
259 * @param p_description This contains the description for the action.
260 * @param p_object_version_number If p_validate is false, then set to
262 * @param p_start_date If p_validate is false, then set to the start date
263 * for the action. If p_validate is true, then set to null.
264 * @param p_end_date It is the date up to, which the action is effective.
265 * If p_validate is false, then it is set to 31-Dec-4712. If p_validate is
266 * true, then it is set to null.
267 * @rep:displayname Update Ame Action
268 * @rep:category BUSINESS_ENTITY AME_ACTION
269 * @rep:lifecycle active
270 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
271 * @rep:scope public
272 */
273 --
274 -- {End Of Comments}
275 --
276 procedure update_ame_action
277 (p_validate in boolean default false,
278 p_language_code in varchar2 default hr_api.userenv_lang,
279 p_action_id in number,
283 p_description in varchar2 default hr_api.g_varchar2,
280 p_action_type_id in number,
281 p_parameter in varchar2 default hr_api.g_varchar2,
282 p_parameter_two in varchar2 default hr_api.g_varchar2,
284 p_object_version_number in out nocopy number,
285 p_start_date out nocopy date,
286 p_end_date out nocopy date
287 );
288 -- ----------------------------------------------------------------------
289 -- |---------------------< delete_ame_action_type >---------------------|
290 -- ----------------------------------------------------------------------
291 procedure delete_ame_action_type
292 (p_validate in boolean default false
293 ,p_action_type_id in number
294 ,p_object_version_number in out nocopy number
295 ,p_start_date out nocopy date
296 ,p_end_date out nocopy date
297 );
298 --
299 -- ----------------------------------------------------------------------------
300 -- |-----------------------< delete_ame_action_type_conf >--------------------|
301 -- ----------------------------------------------------------------------------
302 --
303 -- {Start Of Comments}
304 /*#
305 * This API deletes action type config from the given transaction type.
306 *
307 * <p><b>Licensing</b><br>
308 * This API is available for use with any licensed component of the e-business
309 * suite.
310 *
311 * <p><b>Prerequisites</b><br>
312 * Valid action type and valid transaction type should exist.
313 *
314 * The Action Type should not be in use by any of the active rules in
315 * the transaction type specified by the parameter P_APPLICATION_ID.
316 *
317 * <p><b>Post Success</b><br>
318 * Deletes action type config successfully.
319 *
320 * <p><b>Post Failure</b><br>
321 * The action type config is not deleted and an error is raised.
322 *
323 * @param p_validate If true, then validation alone will be performed and the
324 * database will remain unchanged. If false and all validation checks pass,
325 * then the database will be modified.
326 * @param p_action_type_id This uniquely identifies the action type for
327 * which config is to be deleted.
328 * @param p_application_id Transaction type id for which the action type config
329 * is to be deleted.
330 * @param p_object_version_number If p_validate is false,object version number
331 * is incremented by 1, and then set to p_object_version_number of the
332 * action type config.If p_validate is true, then set to the same
333 * object version number which passed in.
334 * @param p_start_date If p_validate is false, it is set to the date from
335 * which the deleted action type config was effective. If p_validate is true,
336 * it is set to the same date which was passed in.
337 * @param p_end_date If p_validate is false, it is set to present date.
338 * If p_validate is true, it is set to the same date, which was passed in.
339 * If p_validate is false, then it is set to 31-Dec-4712. If p_validate is
340 * true, then it is set to null.
341 * @rep:displayname Delete Action Type Config
342 * @rep:category BUSINESS_ENTITY AME_ACTION
343 * @rep:lifecycle active
344 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
345 * @rep:scope public
346 */
347 --
348 -- {End Of Comments}
349 --
350 procedure delete_ame_action_type_conf
351 (p_validate in boolean default false
352 ,p_action_type_id in number
353 ,p_application_id in number
354 ,p_object_version_number in out nocopy number
355 ,p_start_date out nocopy date
356 ,p_end_date out nocopy date
357 );
358 -- ----------------------------------------------------------------------
359 -- |---------------------< delete_ame_action_type_usage >---------------|
360 -- ----------------------------------------------------------------------
361 procedure delete_ame_action_type_usage
365 ,p_object_version_number in out nocopy number
362 (p_validate in boolean default false
363 ,p_action_type_id in number
364 ,p_rule_type in number
366 ,p_start_date out nocopy date
367 ,p_end_date out nocopy date
368 );
369 -- ----------------------------------------------------------------------
370 -- |---------------------< delete_ame_appr_type_usage >-----------------|
371 -- ----------------------------------------------------------------------
372 procedure delete_ame_appr_type_usage
373 (p_validate in boolean default false
374 ,p_action_type_id in number
375 ,p_approver_type_id in number
376 ,p_object_version_number in out nocopy number
377 ,p_start_date out nocopy date
378 ,p_end_date out nocopy date
379 );
380 -- ----------------------------------------------------------------------
381 -- |---------------------< delete_ame_req_attribute >-------------------|
382 -- ----------------------------------------------------------------------
383 procedure delete_ame_req_attribute
384 (p_validate in boolean default false
385 ,p_action_type_id in number
386 ,p_attribute_id in number
387 ,p_object_version_number in out nocopy number
388 ,p_start_date out nocopy date
389 ,p_end_date out nocopy date
390 );
391 --
392 -- ----------------------------------------------------------------------------
393 -- |----------------------------< delete_ame_action >-------------------------|
394 -- ----------------------------------------------------------------------------
395 --
396 -- {Start Of Comments}
397 /*#
398 * This API deletes the action of an action type.
399 *
400 * <p><b>Licensing</b><br>
401 * This API is available for use with any licensed component of the e-business
402 * suite.
403 *
404 * <p><b>Prerequisites</b><br>
405 * Action Type Id and Action Id should be valid.
406 *
407 * <p><b>Post Success</b><br>
408 * Deletes the action successfully.
409 *
410 * <p><b>Post Failure</b><br>
411 * The action is not deleted and an error is raised.
412 *
413 * @param p_validate If true, then validation alone will be performed and the
414 * database will remain unchanged. If false and all validation checks pass,
415 * then the database will be modified.
416 * @param p_action_id This uniquely identifies the action to be deleted.
417 * @param p_action_type_id This uniquely identifies the action type of the
418 * action to be deleted..
419 * @param p_object_version_number If p_validate is false, object version number
420 * is incremented by 1, and then set to p_object_version_number of the
421 * action. If p_validate is true, then set to the same object version number
422 * which passed in.
423 * @param p_start_date If p_validate is false, it is set to the date from
424 * which the deleted action was effective. If p_validate is true,
425 * it is set to the same date which was passed in.
426 * @param p_end_date If p_validate is false, it is set to present date.
427 * If p_validate is true, it is set to the same date which was passed in.
428 * @rep:displayname Delete Ame Action
429 * @rep:category BUSINESS_ENTITY AME_ACTION
430 * @rep:lifecycle active
431 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
432 * @rep:scope public
433 */
434 --
435 -- {End Of Comments}
436 --
437 procedure delete_ame_action
438 (p_validate in boolean default false
439 ,p_action_id in number
440 ,p_action_type_id in number
441 ,p_object_version_number in out nocopy number
442 ,p_start_date out nocopy date
443 ,p_end_date out nocopy date
444 );
445 end ame_action_api;