DBA Data[Home] [Help]

PACKAGE: APPS.HR_EMP_ERROR_UTILITY

Source


1 package hr_emp_error_utility as
2 /* $Header: hreruweb.pkh 120.1 2005/09/23 14:51:02 svittal noship $ */
3 -- ---------------------------------------------------------------------------
4 -- |----------------------< raise_system_error >-----------------------------|
5 -- ---------------------------------------------------------------------------
6 -- {Start Of Comments}
7 --
8 -- Description:
9 --   Procedure to set a specified activity to error.
10 --
11 -- Pre-Requisities:
12 --   None.
13 --
14 -- In Parameters:
15 --   p_item_type -> The internal name for the item type.
16 --   p_item_key  -> A string that represents a primary key generated by
17 --                  the application for the item type. The string uniquely
18 --                  identifies the item within an item type.
19 --   p_transaction_step_id     -> transaction identifier for transaction
20 --   p_actid     -> Unique identifier for the activity instance.
21 --   p_set_error_status  -> Boolean to define the status of the activity.
22 --
23 -- Post Success:
24 --   The specified activity instance now has an 'ERROR' status.
25 --
26 -- Post Failure:
27 --   None
28 --
29 -- Developer Implementation Notes:
30 --   None
31 --
32 -- Access Status:
33 --   Public.
34 --
35 -- {End Of Comments}
36 -- ---------------------------------------------------------------------------
37 procedure raise_system_error
38   (p_item_type in varchar2
39   ,p_item_key  in varchar2
40   ,p_actid     in number
41   ,p_set_error_status in boolean default true);
42 -- ---------------------------------------------------------------------------
43 -- |---------------------< abort_process_in_error >--------------------------|
44 -- ---------------------------------------------------------------------------
45 -- {Start Of Comments}
46 --
47 -- Description:
48 --   Will abort the process in error with an engine status of #Exception
49 --
50 -- Pre-Requisities:
51 --
52 -- In Parameters:
53 --   itemtype -> The internal name for the item type.
54 --   itemkey  -> A string that represents a primary key generated by
55 --               the application for the item type. The string uniquely
56 --               identifies the item within an item type.
57 --   actid    -> Unique identifier for the activity.
58 --   funmode  -> Functional mode of the activity as defined by workflow.
59 --
60 -- Post Success:
61 --   If the root process is aborted 'SUCCESS' is returned else, 'ERROR' is
62 --   returned.
63 --
64 -- Post Failure:
65 --   None.
66 --
67 -- Developer Implementation Notes:
68 --   None
69 --
70 -- Access Status:
71 --   Public.
72 --
73 -- {End Of Comments}
74 -- ---------------------------------------------------------------------------
75 procedure abort_process_in_error
76   (itemtype in     varchar2
77   ,itemkey  in     varchar2
78   ,actid    in     number
79   ,funmode  in     varchar2
80   ,result      out nocopy varchar2);
81 -- ---------------------------------------------------------------------------
82 -- |------------------------< reset_workflow >-------------------------------|
83 -- ---------------------------------------------------------------------------
84 -- {Start Of Comments}
85 --
86 -- Description:
87 --   Attempts to handle a workflow activity which is in error.
88 --
89 -- Pre-Requisities:
90 --
91 -- In Parameters:
92 --   itemtype -> The internal name for the item type.
93 --   itemkey  -> A string that represents a primary key generated by
94 --               the application for the item type. The string uniquely
95 --               identifies the item within an item type.
96 --   actid    -> Unique identifier for the activity.
97 --   funmode  -> Functional mode of the activity as defined by workflow.
98 --
99 -- Post Success:
100 --   Result is always NULL
101 --
102 -- Post Failure:
103 --   None.
104 --
105 -- Developer Implementation Notes:
106 --   None
107 --
108 -- Access Status:
109 --   Public.
110 --
111 -- {End Of Comments}
112 -- ---------------------------------------------------------------------------
113 procedure reset_workflow
114   (itemtype in     varchar2
115   ,itemkey  in     varchar2
116   ,actid    in     number
117   ,funmode  in     varchar2
118   ,result      out nocopy varchar2);
119 -- ---------------------------------------------------------------------------
120 -- |--------------------< initialise_system_error >--------------------------|
121 -- ---------------------------------------------------------------------------
122 -- {Start Of Comments}
123 --
124 -- Description:
125 --   Sets all system error attributes related to the person using the
126 --   system. Searches to see if all system error attributes are set. If
127 --   not creates the required attributes. Once the whole process is done
128 --   then result is set to 'COMPLETE'.
129 --
130 -- Pre-Requisities:
131 --
132 -- In Parameters:
133 --   itemtype -> The internal name for the item type.
134 --   itemkey  -> A string that represents a primary key generated by
135 --               the application for the item type. The string uniquely
136 --               identifies the item within an item type.
137 --   actid    -> Unique identifier for the activity.
138 --   funmode  -> Functional mode of the activity as defined by workflow.
139 --
140 -- Post Success:
141 --   result    -> The workflow status of the activity upon completion.
142 --
143 -- Post Failure:
144 --   None.
145 --
146 -- Developer Implementation Notes:
147 --   None
148 --
149 -- Access Status:
150 --   Public.
151 --
152 -- {End Of Comments}
153 -- ---------------------------------------------------------------------------
154 procedure initialise_system_error
155   (itemtype in     varchar2
156   ,itemkey  in     varchar2
157   ,actid    in     number
158   ,funmode  in     varchar2
159   ,result      out nocopy varchar2);
160 -- ---------------------------------------------------------------------------^M
161 -- |--------------------< clr_transact_step_messages >-----------------------|^M
162 -- ---------------------------------------------------------------------------^M
163 -- {Start Of Comments} ^M
164 -- ^M
165 -- Description:^M
166 --   Sets all error/warning text for a given transaction step ^M
167 --   in a workflow item attribute to NULL.^M
168 -- ^M
169 -- Pre-Requisities: ^M
170 -- ^M
171 -- In Parameters:^M
172 --   p_item_type -> The internal name for the item type.^M
173 --   p_item_key  -> A string that represents a primary key generated by^M
174 --                  the application for the item type. The string uniquely ^M
175 --                  identifies the item within an item type.^M
176 --   p_transaction_step_id ^M
177 --               -> transaction identifier for transaction ^M
178 -- ^M
179 -- Post Success: ^M
180 --   The error/warning text is cleared for the transaction step^M
181 -- ^M
182 -- Post Failure: ^M
183 --   None. ^M
184 -- ^M
185 -- Developer Implementation Notes: ^M
186 --   None^M
187 --^M
188 -- Access Status: ^M
189 --   Public. ^M
190 -- ^M
191 -- {End Of Comments} ^M
192 -- ---------------------------------------------------------------------------^M
193 PROCEDURE clr_transact_step_messages
194   (p_item_type           IN wf_items.item_type%TYPE
195   ,p_item_key            IN wf_items.item_key%TYPE
196   ,p_transaction_step_id IN NUMBER);
197 -- ---------------------------------------------------------------------
198 -- |--------------------< clr_activity_messages >-----------------------|
199 -- ---------------------------------------------------------------------
200 -- {Start Of Comments}
201 --
202 -- Description:
203 --   Sets all error/warning text for a given activity
204 --   in a workflow item attribute to NULL.
205 --
206 -- Pre-Requisities:
207 --
208 -- In Parameters:
209 --   p_item_type -> The internal name for the item type.
210 --   p_item_key  -> A string that represents a primary key generated by
211 --                  the application for the item type. The string uniquely
212 --                  identifies the item within an item type.
213 --   p_actid     -> Activity idenifier to have it's message wiped
214 --
215 -- Post Success:
216 --   The error/warning text is cleared for the transaction step
217 --
218 -- Post Failure:
219 --   None.
220 --
221 -- Developer Implementation Notes:
222 --   None
223 --
224 -- Access Status:
225 --   Public.
226 --
227 -- {End Of Comments}
228 -- ---------------------------------------------------------------------------
229 PROCEDURE clr_activity_messages
230   (p_item_type           IN wf_items.item_type%TYPE
231   ,p_item_key            IN wf_items.item_key%TYPE
232   ,p_actid          IN wf_process_activities.instance_id%TYPE);
233 -- ---------------------------------------------------------------------------
234 -- |---------------------------< set_transact_step_error_text >--------------|
235 -- ---------------------------------------------------------------------------
236 -- {Start Of Comments}
237 --
238 -- Description:
239 --   Sets the error text for a given transaction step in a workflow
240 --   item attribute.
241 --
242 -- Pre-Requisities:
243 --
244 -- In Parameters:
245 --   p_item_type -> The internal name for the item type.
246 --   p_item_key  -> A string that represents a primary key generated by
247 --                  the application for the item type. The string uniquely
248 --                  identifies the item within an item type.
249 --   p_transaction_step_id     => transaction identifier for transaction
250 --   p_error_text         => Error Text for the transaction
251 --
252 -- Post Success:
253 --   The error text is stored for the transaction step
254 --
255 -- Post Failure:
256 --   None.
257 --
258 -- Developer Implementation Notes:
259 --   None
260 --
261 -- Access Status:
262 --   Public.
263 --
264 -- {End Of Comments}
265 -- ---------------------------------------------------------------------------
266 PROCEDURE set_transact_step_error_text
267   (p_item_type           IN wf_items.item_type%TYPE
268   ,p_item_key            IN wf_items.item_key%TYPE
269   ,p_transaction_step_id IN NUMBER
270   ,p_error_text          IN VARCHAR2);
271 -- ---------------------------------------------------------------------------
272 -- |-----------------------< exists_error_text >----------------------------|
273 -- ---------------------------------------------------------------------------
274 -- {Start Of Comments}
275 --
276 -- Description:
277 --   Tests if error text exists for a given activity.
278 --
279 -- Pre-Requisities:
280 --
281 -- In Parameters:
282 --   p_item_type -> The internal name for the item type.
283 --   p_item_key  -> A string that represents a primary key generated by
284 --                  the application for the item type. The string uniquely
285 --                  identifies the item within an item type.
286 --   p_actid     -> The ID number of the activity that this procedure is
287 --                  called from.
288 --
289 -- Post Success:
290 --   Returns true if error text exists for a given activity false otherwise.
291 --
292 -- Post Failure:
293 --   None.
294 --
295 -- Developer Implementation Notes:
296 --   None
297 --
298 -- Access Status:
299 --   Public.
300 --
301 -- {End Of Comments}
302 -- ---------------------------------------------------------------------------
303 FUNCTION exists_error_text
304   (p_item_type      IN wf_items.item_type%TYPE
305   ,p_item_key       IN wf_items.item_key%TYPE
306   ,p_actid          IN wf_process_activities.instance_id%TYPE)
307     RETURN BOOLEAN;
308 -- ---------------------------------------------------------------------------
309 -- |-----------------------< exists_error_text >----------------------------|
310 -- ---------------------------------------------------------------------------
311 -- {Start Of Comments}
312 --
313 -- Description:
314 --   Tests if error text exists for a given activity.
315 --
316 -- Pre-Requisities:
317 --
318 -- In Parameters:
319 --   p_item_type -> The internal name for the item type.
320 --   p_item_key  -> A string that represents a primary key generated by
321 --                  the application for the item type. The string uniquely
322 --                  identifies the item within an item type.
323 --   p_actid     -> The ID number of the activity that this procedure is
324 --                  called from.
325 --   p_transaction_step_id -> transaction step id with in the activity
326 --
327 -- Post Success:
328 --   Returns true if error text exists for a given activity false otherwise.
329 --
330 -- Post Failure:
331 --   None.
332 --
333 -- Developer Implementation Notes:
334 --   None
335 --
336 -- Access Status:
337 --   Public.
338 --
339 -- {End Of Comments}
340 -- ---------------------------------------------------------------------------
341 FUNCTION exists_error_text
342   (p_item_type      IN wf_items.item_type%TYPE
343   ,p_item_key       IN wf_items.item_key%TYPE
344   ,p_actid          IN wf_process_activities.instance_id%TYPE
345   ,p_transaction_step_id IN hr_api_transaction_steps.transaction_step_id%TYPE)
346     RETURN BOOLEAN;
347 -- ---------------------------------------------------------------------------
348 -- |------------------------< set_transact_step_warning_text >-----------------|
349 -- ---------------------------------------------------------------------------
350 -- {Start Of Comments}
351 --
352 -- Description:
353 --   Sets the warning text for a given transaction step in a workflow
354 --   item attribute.
355 --
356 -- Pre-Requisities:
357 --
358 -- In Parameters:
359 --   p_item_type -> The internal name for the item type.
360 --   p_item_key  -> A string that represents a primary key generated by
361 --                  the application for the item type. The string uniquely
362 --                  identifies the item within an item type.
363 --   p_transaction_step_id     => transaction identifier for transaction
364 --   p_error_text         => Warning Text for the transaction
365 --
366 -- Post Success:
367 --   The error text is stored for the transaction step
368 --
369 -- Post Failure:
370 --   None.
371 --
372 -- Developer Implementation Notes:
373 --   None
374 --
375 -- Access Status:
376 --   Public.
377 --
378 -- {End Of Comments}
379 -- ---------------------------------------------------------------------------
380 PROCEDURE set_transact_step_warning_text
381   (p_item_type           IN wf_items.item_type%TYPE
382   ,p_item_key            IN wf_items.item_key%TYPE
383   ,p_transaction_step_id IN NUMBER
384   ,p_error_text          IN VARCHAR2);
385 -- ---------------------------------------------------------------------------
386 FUNCTION exists_warning_text
387   (p_item_type      IN wf_items.item_type%TYPE
388   ,p_item_key       IN wf_items.item_key%TYPE
389   ,p_actid          IN wf_process_activities.instance_id%TYPE)
390     RETURN BOOLEAN;
391 -- ---------------------------------------------------------------------------
392 -- |-----------------------< exists_warning_text >----------------------------|
393 -- ---------------------------------------------------------------------------
394 -- {Start Of Comments}
395 --
396 -- Description:
397 --   Returns true if warning text exists for a given activity.
398 --
399 -- Pre-Requisities:
400 --
401 -- In Parameters:
402 --   p_item_type -> The internal name for the item type.
403 --   p_item_key  -> A string that represents a primary key generated by
404 --                  the application for the item type. The string uniquely
405 --                  identifies the item within an item type.
406 --   p_actid     -> The ID number of the activity that this procedure is
410 -- Post Success:
407 --                  called from.
408 --   p_transaction_step_id -> transaction step id with in the activity
409 --
411 --    Returns true if warning text exists for a given activity
412 --    otherwise returns false.
413 --
414 -- Post Failure:
415 --   None.
416 --
417 -- Developer Implementation Notes:
418 --   None
419 --
420 -- Access Status:
421 --   Public.
422 --
423 -- {End Of Comments}
424 -- ---------------------------------------------------------------------------
425 FUNCTION exists_warning_text
426   (p_item_type      IN wf_items.item_type%TYPE
427   ,p_item_key       IN wf_items.item_key%TYPE
428   ,p_actid          IN wf_process_activities.instance_id%TYPE
429   ,p_transaction_step_id IN hr_api_transaction_steps.transaction_step_id%TYPE)
430     RETURN BOOLEAN;
431 --
432 end hr_emp_error_utility;