1 Package pqh_RULE_SETS_api as
2 /* $Header: pqrstapi.pkh 120.2 2005/10/28 17:59:06 deenath noship $ */
3 /*#
4 * This package contains rule set APIs.
5 * @rep:scope public
6 * @rep:product per
7 * @rep:displayname Rule Set
8 */
9 --
10 -- ----------------------------------------------------------------------------
11 -- |-----------------------------< create_rule_set >--------------------------|
12 -- ----------------------------------------------------------------------------
13 --
14 -- {Start Of Comments}
15 /*#
16 * This API creates a rule set containing one or more business rules.
17 *
18 * When creating a new rule set, the user can define the process level of rules
19 * in the rule set to display a warning, halt processing, or ignore validation
20 * failures. Also, the rule set can be defined at either the global level or
21 * business group level or organization hierarchy level or organization level.
22 * Business rules configured at the organization level take precedence over
23 * those configured at the organization hierarchy/starting organization level.
24 * If the application finds no configuration rule for the organization or its
25 * organization hierarchy, the application uses the rules associated with the
26 * business group. Finding no configured rules, the application uses the global
27 * default status of Warning.
28 *
29 * <p><b>Licensing</b><br>
30 * This API is licensed for use with Human Resources.
31 *
32 * <p><b>Prerequisites</b><br>
33 * The business group/organization hierarchy/organization for which the rules
34 * are to be configured must already exist. The pre-defined rule sets must
35 * already exist for referencing in rule category 'Assignment Modification' and
36 * 'Budget Preparation'.
37 *
38 * <p><b>Post Success</b><br>
39 * The rule set will be successfully created in the database.
40 *
41 * <p><b>Post Failure</b><br>
42 * The rule set will not be created and an error will be raised.
43 * @param p_validate If true, then validation alone will be performed and the
44 * database will remain unchanged. If false and all validation checks pass,
45 * then the database will be modified.
46 * @param p_business_group_id Business group of the record
47 * @param p_rule_set_id If p_validate is false, then this uniquely identifies
48 * the rule set created. If p_validate is true, then set to null.
49 * @param p_rule_set_name Unique rule set name
50 * @param p_description Obsolete parameter, do not use.
51 * @param p_organization_structure_id {@rep:casecolumn
52 * PQH_RULE_SETS.ORGANIZATION_STRUCTURE_ID}
53 * @param p_organization_id If the organization hierarchy is specified, then
54 * this identifies the starting node of the organization hierarchy to which the
55 * business rules in a rule set are applied. If the organization hierarchy is
56 * not specified, then this identifies the organization to which the business
57 * rule in a rule set are applied.
58 * @param p_referenced_rule_set_id {@rep:casecolumn
59 * PQH_RULE_SETS.REFERENCED_RULE_SET_ID}
60 * @param p_rule_level_cd Identifies the error level of the business rules in
61 * the rule set. Valid values are defined by 'PQH_RULE_LEVEL' lookup type.
62 * @param p_object_version_number If p_validate is false, then set to the
63 * version number of the created rule set. If p_validate is true, then the
64 * value will be null.
65 * @param p_short_name Short name of rule set.
66 * @param p_effective_date Reference date for validating lookup values are
67 * applicable during the start to end active date range. This date does not
68 * determine when the changes take effect.
69 * @param p_language_code Specifies to which language the translation values
70 * apply. You can set to the base or any installed language. The default value
71 * of hr_api.userenv_lang is equivalent to the RDBMS userenv('LANG') function
72 * value.
73 * @param p_rule_applicability Identifies whether the rule applies only to
74 * over-budgeted entities (Donors) or to under-budgeted entities (Receivers) in
75 * a budget reallocation transaction. Valid values are defined by
76 * 'PQH_CBR_APPLICABILITY' lookup type.
77 * @param p_rule_category Identifies the target system for which the rule is
78 * applicable.
79 * @param p_starting_organization_id Starting organization for the Organization
80 * Hierarchy defined.
81 * @param p_seeded_rule_flag Indicates if the rule set was seeded.
82 * @param p_status Indicates whether Budget Reallocation rule definition is
83 * Complete or Incomplete.
84 * @rep:displayname Create Rule Set
85 * @rep:category BUSINESS_ENTITY PQH_POS_CTRL_BUSINESS_RULE
86 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
87 * @rep:scope public
88 * @rep:lifecycle active
89 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
90 */
91 --
92 -- {End Of Comments}
93 --
94 procedure create_RULE_SET
95 (
96 p_validate in boolean default false
97 ,p_business_group_id in number
98 ,p_rule_set_id out nocopy number
99 ,p_rule_set_name in varchar2
100 ,p_description in varchar2
101 ,p_organization_structure_id in number default null
102 ,p_organization_id in number default null
103 ,p_referenced_rule_set_id in number default null
104 ,p_rule_level_cd in varchar2
105 ,p_object_version_number out nocopy number
106 ,p_short_name in varchar2
107 ,p_effective_date in date
108 ,p_language_code in varchar2 default hr_api.userenv_lang
109 ,p_rule_applicability in varchar2
110 ,p_rule_category in varchar2
111 ,p_starting_organization_id in number default null
112 ,p_seeded_rule_flag in varchar2 default 'N'
113 ,p_status in varchar2 default null
114 );
115 --
116 -- ----------------------------------------------------------------------------
117 -- |-----------------------------< update_rule_set >--------------------------|
118 -- ----------------------------------------------------------------------------
119 --
120 -- {Start Of Comments}
121 /*#
122 * This API updates the rule set details.
123 *
124 * The scope of the rule set and the error level of the business rules can be
125 * updated.
126 *
127 * <p><b>Licensing</b><br>
128 * This API is licensed for use with Human Resources.
129 *
130 * <p><b>Prerequisites</b><br>
131 * The rule set to be updated must already exist. The business
132 * group/organization hierarchy/organization for which the rules are to be
133 * configured must already exist.
134 *
135 * <p><b>Post Success</b><br>
136 * The rule set is updated successfully in the database.
137 *
138 * <p><b>Post Failure</b><br>
139 * The rule set is not updated and an error is raised.
140 * @param p_validate If true, then validation alone will be performed and the
141 * database will remain unchanged. If false and all validation checks pass,
142 * then the database will be modified.
143 * @param p_business_group_id Business group of record
144 * @param p_rule_set_id Identifies uniquely the rule set to be modified.
145 * @param p_rule_set_name Unique rule set name.
146 * @param p_description Obsolete parameter, do not use.
147 * @param p_organization_structure_id {@rep:casecolumn
148 * PQH_RULE_SETS.ORGANIZATION_STRUCTURE_ID}
149 * @param p_organization_id If the organization hierarchy is specified, then
150 * this identifies the starting node of the organization hierarchy to which the
151 * business rules in a rule set are applied. If the organization hierarchy is
152 * not specified, then this identifies the organization to which the business
153 * rule in a rule set are applied.
154 * @param p_referenced_rule_set_id {@rep:casecolumn
155 * PQH_RULE_SETS.REFERENCED_RULE_SET_ID}
156 * @param p_rule_level_cd Identifies the error level of the business rules in
157 * the rule set. Valid values are defined by 'PQH_RULE_LEVEL' lookup type.
158 * @param p_object_version_number Pass in the current version number of the
159 * rule set to be updated. When the API completes if p_validate is false, will
160 * be set to the new version number of the updated rule set. If p_validate is
161 * true will be set to the same value which was passed in.
162 * @param p_short_name Short name of rule set.
163 * @param p_effective_date Reference date for validating lookup values are
164 * applicable during the start to end active date range. This date does not
165 * determine when the changes take effect.
166 * @param p_language_code Specifies to which language the translation values
167 * apply. You can set to the base or any installed language. The default value
168 * of hr_api.userenv_lang is equivalent to the RDBMS userenv('LANG') function
169 * value.
170 * @param p_rule_applicability Identifies whether the rule applies only to
171 * over-budgeted entities (Donors) or to under-budgeted entities (Receivers) in
172 * a budget reallocation transaction. Valid values are defined by
173 * 'PQH_CBR_APPLICABILITY' lookup type.
174 * @param p_rule_category Identifies the target system for which the rule is
175 * applicable.
176 * @param p_starting_organization_id Starting organization for the Organization
177 * Hierarchy defined.
178 * @param p_seeded_rule_flag Indicates if the rule set was seeded.
179 * @param p_status Indicates whether Budget Reallocation rule definition is
180 * Complete or Incomplete.
181 * @rep:displayname Update Rule Set
182 * @rep:category BUSINESS_ENTITY PQH_POS_CTRL_BUSINESS_RULE
183 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
184 * @rep:scope public
185 * @rep:lifecycle active
186 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
187 */
188 --
189 -- {End Of Comments}
190 --
191 procedure update_RULE_SET
192 (
193 p_validate in boolean default false
194 ,p_business_group_id in number default hr_api.g_number
195 ,p_rule_set_id in number
196 ,p_rule_set_name in varchar2 default hr_api.g_varchar2
197 ,p_description in varchar2 default hr_api.g_varchar2
198 ,p_organization_structure_id in number default hr_api.g_number
199 ,p_organization_id in number default hr_api.g_number
200 ,p_referenced_rule_set_id in number default hr_api.g_number
201 ,p_rule_level_cd in varchar2 default hr_api.g_varchar2
202 ,p_object_version_number in out nocopy number
203 ,p_short_name in varchar2 default hr_api.g_varchar2
204 ,p_effective_date in date
205 ,p_language_code in varchar2 default hr_api.userenv_lang
206 ,p_rule_applicability in varchar2 default hr_api.g_varchar2
207 ,p_rule_category in varchar2 default hr_api.g_varchar2
208 ,p_starting_organization_id in number default hr_api.g_number
209 ,p_seeded_rule_flag in varchar2 default hr_api.g_varchar2
210 ,p_status in varchar2 default hr_api.g_varchar2
211 );
212 --
213 -- ----------------------------------------------------------------------------
214 -- |-----------------------------< delete_rule_set >--------------------------|
215 -- ----------------------------------------------------------------------------
216 --
217 -- {Start Of Comments}
218 /*#
219 * This API deletes a rule set.
220 *
221 * The seeded global rule sets cannot be deleted.
222 *
223 * <p><b>Licensing</b><br>
224 * This API is licensed for use with Human Resources.
225 *
226 * <p><b>Prerequisites</b><br>
227 * The rule set to be deleted must already exist.
228 *
229 * <p><b>Post Success</b><br>
230 * The rule set is deleted successfully from the database.
231 *
232 * <p><b>Post Failure</b><br>
233 * The rule set is not deleted and an error is raised.
234 * @param p_validate If true, then validation alone will be performed and the
235 * database will remain unchanged. If false and all validation checks pass,
236 * then the database will be modified.
237 * @param p_rule_set_id Identifies uniquely the rule set to be deleted.
238 * @param p_object_version_number Current version number of the rule set to be
239 * deleted.
240 * @param p_effective_date Reference date for validating lookup values are
241 * applicable during the start to end active date range. This date does not
242 * determine when the changes take effect.
243 * @rep:displayname Delete Rule Set
244 * @rep:category BUSINESS_ENTITY PQH_POS_CTRL_BUSINESS_RULE
245 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
246 * @rep:scope public
247 * @rep:lifecycle active
248 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
249 */
250 --
251 -- {End Of Comments}
252 --
253 procedure delete_RULE_SET
254 (
255 p_validate in boolean default false
256 ,p_rule_set_id in number
257 ,p_object_version_number in number
258 ,p_effective_date in date
259 );
260 --
261 end pqh_RULE_SETS_api;