1 Package hxc_app_comp_notifications_api as
2 /* $Header: hxchanapi.pkh 120.0 2006/06/19 06:54:25 gsirigin noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |--------------------------< create_app_comp_notification>----------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 --
11 -- This API creates the Approval Component Notifications.
12 --
13 -- Prerequisites:
14 --
15 -- None.
16 --
17 -- In Parameters:
18 -- Name Reqd Type Description
19 -- p_comp_notification_id Yes table of number Primary key of the new
20 -- notification
21 -- p_object_version_number No number of number Object version number for the
22 -- new notification
23 -- p_notification_number_retries Yes number Number of retries
24 -- p_notification_timeout_value Yes number Timeout value
25 -- p_notification_action_code Yes varchar2 Action Code
26 -- p_notification_recipient_code Yes varchar2 Recipient Code
27 -- p_approval_style_name No varchar2 Approval style name
28 -- p_time_recipient_name No varchar2 Time recipient name
29 -- p_approval_component_id No number Approval component id
30 --
31 -- Post Success:
32 --
33 -- The OUT PARAMETERS set,after the notification record has been created
34 -- successfully,are:
35 --
36 -- Name Type Description
37 --
38 -- p_comp_notification_id table of number Primary key of the new
39 -- notification
40 -- p_object_version_number number of number Object version number for the
41 -- new notification
42 --
43 -- Post Failure:
44 --
45 -- The notification record will not be created and an application error will be
46 -- raised.
47 --
48 -- Access Status:
49 -- Public.
50 --
51 -- {End Of Comments}
52
53 TYPE id_type IS TABLE OF number(15);
54 TYPE ovn_type IS TABLE OF number(9);
55
56 C_ACTION_APPROVED CONSTANT VARCHAR2(30) := 'APPROVED';
57 C_ACTION_AUTO_APPROVE CONSTANT VARCHAR2(30) := 'AUTO-APPROVE';
58 C_ACTION_ERROR CONSTANT VARCHAR2(30) := 'ERROR';
59 C_ACTION_REJECTED CONSTANT VARCHAR2(30) := 'REJECTED';
60 C_ACTION_REQUEST_APPROVAL CONSTANT VARCHAR2(30) := 'REQUEST-APPROVAL';
61 C_ACTION_REQUEST_APPR_RESEND CONSTANT VARCHAR2(30) := 'REQUEST-APPROVAL-RESEND';
62 C_ACTION_SUBMISSION CONSTANT VARCHAR2(30) := 'SUBMISSION';
63 C_ACTION_TRANSFER CONSTANT VARCHAR2(30) := 'TRANSFER';
64 C_RECIPIENT_ADMIN CONSTANT VARCHAR2(30) := 'ADMIN';
65 C_RECIPIENT_APPROVER CONSTANT VARCHAR2(30) := 'APPROVER';
66 C_RECIPIENT_ERROR_ADMIN CONSTANT VARCHAR2(30) := 'ERROR-ADMIN';
67 C_RECIPIENT_PREPARER CONSTANT VARCHAR2(30) := 'PREPARER';
68 C_RECIPIENT_SUPERVISOR CONSTANT VARCHAR2(30) := 'SUPERVISOR';
69 C_RECIPIENT_WORKER CONSTANT VARCHAR2(30) := 'WORKER';
70
71
72 procedure create_app_comp_notification
73 (
74 p_notification_number_retries in number,
75 p_notification_timeout_value in number,
76 p_notification_action_code in varchar2,
77 p_notification_recipient_code in varchar2,
78 p_approval_style_name in varchar2,
79 p_time_recipient_name in varchar2,
80 p_approval_component_id in number,
81 p_comp_notification_id in out nocopy id_type,
82 p_object_version_number in out nocopy ovn_type
83 );
84
85
86 --
87 -- ----------------------------------------------------------------------------
88 -- |------------------------<update_app_comp_notification>--------------------------|
89 -- ----------------------------------------------------------------------------
90 --
91 -- {Start Of Comments}
92 --
93 -- Description:
94 --
95 -- This API updates an existing Component Notifications.
96 --
97 -- Prerequisites:
98 --
99 -- None
100 --
101 -- In Parameters:
102 -- Name Reqd Type Description
103 --
104 -- p_comp_notification_id Yes number Primary key of the new
105 -- notification
106 -- p_object_version_number number Object version number for the
107 -- new notification
108 -- p_notification_number_retries No number Number of retries
109 -- p_notification_timeout_value No number Timeout value
110 --
111 -- Post Success:
112 --
113 -- when the approval style has been updated successfully the following
114 -- out parameters are set.
115 --
116 -- Name Type Description
117 --
118 -- p_object_version_number Number Object version number for the
119 -- updated approval style
120 --
121 -- Post Failure:
122 --
123 -- The notification record will not be updated and an application error raised
124 --
125 -- Access Status:
126 -- Public.
127 --
128 -- {End Of Comments}
129 --
130
131 procedure update_app_comp_notification
132 (
133 p_comp_notification_id in number,
134 p_object_version_number in out nocopy number,
135 p_notification_number_retries in number default hr_api.g_number,
136 p_notification_timeout_value in number default hr_api.g_number
137 );
138
139 --
140 -- ----------------------------------------------------------------------------
141 -- |------------------------< delete_app_comp_notification >------------------------|
142 -- ----------------------------------------------------------------------------
143 --
144 -- {Start Of Comments}
145 --
146 -- Description:
147 --
148 -- This API deactivates the usage record for all the approval component notifications.
149 --
150 -- Prerequisites:
151 --
152 -- None
153 --
154 -- In Parameters:
155 -- Name Reqd Type Description
156 --
157 -- p_comp_notification_id Yes number Primary Key for entity
158 -- p_object_version_number Yes number Object Version Number
159 --
160 -- Post Success:
161 --
162 -- when the notification record has been deactivated successfully the process
163 -- completes with success.
164 --
165 -- Post Failure:
166 --
167 -- The notification record will not be deactivated and an application error raised
168 --
169 -- Access Status:
170 -- Public.
171 --
172 -- {End Of Comments}
173 --
174
175 procedure delete_app_comp_notification
176 (
177 p_comp_notification_id in number
178 ,p_object_version_number in number
179 );
180
181 --
182 -- ----------------------------------------------------------------------------
183 -- |------------------------< purge_comp_notification >------------------------|
184 -- ----------------------------------------------------------------------------
185 --
186 -- {Start Of Comments}
187 --
188 -- Description:
189 --
190 -- This API deletes the usage records of the notification followed by the
191 -- notification itself.
192 --
193 -- Prerequisites:
194 --
195 -- None
196 --
197 -- In Parameters:
198 -- Name Reqd Type Description
199 --
200 -- p_comp_notification_id Yes number Primary Key for entity
201 -- p_object_version_number Yes number Object Version Number
202 --
203 -- Post Success:
204 -- Usages records and notification records will be deleted
205 --
206 --
207 -- Post Failure:
208 -- Usages records and notification records will be not deleted
209 --
210 --
211 -- Access Status:
212 -- Public.
213 --
214 -- {End Of Comments}
215 --
216
217 procedure purge_comp_notification
218 (
219 p_comp_notification_id in number
220 ,p_object_version_number in number
221 );
222
223
224 --
225 -- ----------------------------------------------------------------------------
226 -- |------------------------< disable_timeout_notifications >------------------------|
227 -- ----------------------------------------------------------------------------
228 --
229 -- {Start Of Comments}
230 --
231 -- Description:
232 --
233 -- This API deselcts the usage records for the REQUEST-APPROVAL-RESEND action type
234 -- notifications
235 --
236 -- Prerequisites:
237 --
238 -- None
239 --
240 -- In Parameters:
241 -- Name Reqd Type Description
242 --
243 -- p_approval_style_name Yes varchar2 Approval Style Name
244 --
245 -- Post Success:
246 -- This API deselcts the usage records for the REQUEST-APPROVAL-RESEND action type
247 -- notifications
248 --
249 -- Post Failure:
250 --
251 --
252 --
253 -- Access Status:
254 -- Public.
255 --
256 -- {End Of Comments}
257 --
258 procedure disable_timeout_notifications
259 (
260 p_approval_style_name in varchar2
261 );
262
263 end hxc_app_comp_notifications_api;