DBA Data[Home] [Help]

PACKAGE: APPS.IRC_NOTIFICATION_HELPER_PKG

Source


1 PACKAGE irc_notification_helper_pkg AUTHID CURRENT_USER AS
2 /* $Header: irnothlp.pkh 120.1.12010000.3 2009/04/22 12:08:00 prasashe ship $ */
3 --
4 Type g_document_ids is table of number index by binary_integer;
5 -- -- --------------------------------------------------------------------- *
6 -- Name    : get_job_seekers_role
7 -- -- --------------------------------------------------------------------- *
8 -- {Start Of Comments}
9 --
10 -- Description:
11 --    This function returns a user_name based on fnd_user.user_name.
12 --
13 -- Pre Conditions:
14 --   None.
15 --
16 -- In Parameters:
17 --     p_person_id   NUMBER      id of the person to obtain a user name for.
18 -- Post Success:
19 --   a username is returned
20 --
21 -- Post Failure:
22 --   null will be returned
23 --
24 -- Access Status:
25 --   Internal HRMS Development
26 --
27 -- {End Of Comments}
28 -- -- --------------------------------------------------------------------- *
29 FUNCTION get_job_seekers_role
30 (p_person_id    per_all_people_f.person_id%type
31 ) RETURN varchar2 ;
32 -- ----------------------------------------------------------------------------
33 -- |------------------------< send_notification (overloaded) >----------------|
34 -- ----------------------------------------------------------------------------
35 -- {Start Of Comments}
36 --
37 -- Description:
38 --    This function sends an email notification to an email address.  This is
39 --    done by creating a new ad hoc wf user.
40 --
41 -- Pre Conditions:
42 --   None.
43 --
44 -- In Parameters:
45 --     p_email_address  VARCHAR2  email_address to send the notification to
46 --     p_subject    VARCHAR2    Text to write in the SUBJECT line of the email
47 --     p_html_body  VARCHAR2    HTML Text to be the body of the email. Used
48 --                              if the recipient can accept HTML
49 --     p_text_body  VARCHAR2    Plain Text to be the body of the email. Used
50 --                              if the recipient can't accept HTML.
51 --     p_from_role  VARCHAR2    Contains the name of the person who sent the
52 --                              Notification
53 -- Note: If only p_text_body is passed in, and the recipients email system does
54 --       accept HTML, they won't see any body in their email (Workflow doesn't
55 --       substitute the text body for the html body).
56 --       Both p_html_body and p_text_body should be passed in to handle all situations
57 -- Post Success:
58 --   The notification_id relating to the notification that has just been
59 --   sent will be passed out.
60 --
61 -- Post Failure:
62 --
63 -- Developer Implementation Notes:
64 --
65 -- Access Status:
66 --   Internal HRMS Development
67 --
68 -- {End Of Comments}
69 FUNCTION send_notification
70     ( p_email_address IN  varchar2
71     , p_subject       IN  varchar2
72     , p_html_body     IN  varchar2 DEFAULT null
73     , p_text_body     IN  varchar2 DEFAULT null
74     , p_from_role     IN  varchar2 DEFAULT null
75     ) return number;
76 -- ----------------------------------------------------------------------------
77 -- |------------------------< send_notification (overloaded) >----------------|
78 -- ----------------------------------------------------------------------------
79 -- {Start Of Comments}
80 --
81 -- Description:
82 --    This function sends an email notification to a party.  The email
83 --    address to use is obtained by searching for the role associated
84 --
85 -- Pre Conditions:
86 --   None.
87 --
88 -- In Parameters:
89 --     p_user_name  NUMBER      fnd_user.user_name of the user
90 --     p_subject    VARCHAR2    Text to write in the SUBJECT line of the email
91 --     p_html_body  VARCHAR2    HTML Text to be the body of the email. Used
92 --                              if the recipient can accept HTML
93 --     p_text_body  VARCHAR2    Plain Text to be the body of the email. Used
94 --                              if the recipient can't accept HTML.
95 --     p_from_role  VARCHAR2    Contains the name of the person who sent the
96 --                              Notification
97 -- Note: If only p_text_body is passed in, and the recipients email system does
98 --       accept HTML, they won't see any body in their email (Workflow doesn't
99 --       substitute the text body for the html body).
100 --       Both p_html_body and p_text_body should be passed in to handle all situations
101 -- Post Success:
102 --   The notification_id relating to the notification that has just been
103 --   sent will be passed out.
104 --
105 -- Post Failure:
106 --   A exception will be raised if the party_id passed in doesn't have an
107 --   associated role.  The role is obtained from fnd_user
108 --   An exception can also occur if there is a problem with the WF message
109 --   and associated WF notification not being in the database as expected.
110 --
111 -- Developer Implementation Notes:
112 --    Note: This procedure could be enhanced by having another flag which
113 --    indiates whether it is ok if >1 role is found for the party, and
114 --    what to do if this situation arises (error, send to first role, warn).
115 --    It could also check if the role has > 1 email address associated with it.
116 --   (However, this situation can't occur at the moment because of how the
117 --    email address is being retrieved).
118 --
119 -- Access Status:
120 --   Internal HRMS Development
121 --
122 -- {End Of Comments}
123 FUNCTION send_notification
124     ( p_user_name     IN  varchar2
125     , p_subject       IN  varchar2
126     , p_html_body     IN  varchar2 DEFAULT null
127     , p_text_body     IN  varchar2 DEFAULT null
128     , p_from_role     IN  varchar2 DEFAULT null
129     ) return number;
130 -- ----------------------------------------------------------------------------
131 -- |------------------< send_notification (overloaded) >----------------------|
132 -- ----------------------------------------------------------------------------
133 -- {Start Of Comments}
134 --
135 -- Description:
136 --    This function sends an email notification to a party.  The email
137 --    address to use is obtained by searching for the role associated
138 --
139 -- Pre Conditions:
140 --   None.
141 --
142 -- In Parameters:
143 --     p_person_id  NUMBER      ID of the person to send the email too
144 --     p_subject    VARCHAR2    Text to write in the SUBJECT line of the email
145 --     p_html_body  VARCHAR2    HTML Text to be the body of the email. Used
146 --                              if the recipient can accept HTML
147 --     p_text_body  VARCHAR2    Plain Text to be the body of the email. Used
148 --                              if the recipient can't accept HTML.
149 --     p_from_role  VARCHAR2    Contains the name of the person who sent the
150 --                              Notification
151 -- Note: If only p_text_body is passed in, and the recipients email system does
152 --       accept HTML, they won't see any body in their email (Workflow doesn't
153 --       substitute the text body for the html body).
154 --       Both p_html_body and p_text_body should be passed in to handle all situations
155 -- Post Success:
156 --   The notification_id relating to the notification that has just been
157 --   sent will be passed out.
158 --
159 -- Post Failure:
160 --   A exception will be raised if the party_id passed in doesn't have an
161 --   associated role.  The role is obtained from fnd_user
162 --   An exception can also occur if there is a problem with the WF message
163 --   and associated WF notification not being in the database as expected.
164 --
165 -- Developer Implementation Notes:
166 --    Note: This procedure could be enhanced by having another flag which
167 --    indiates whether it is ok if >1 role is found for the party, and
168 --    what to do if this situation arises (error, send to first role, warn).
169 --    It could also check if the role has > 1 email address associated with it.
170 --   (However, this situation can't occur at the moment because of how the
171 --    email address is being retrieved).
172 --
173 -- Access Status:
174 --   Internal HRMS Development
175 --
176 -- {End Of Comments}
177 FUNCTION send_notification
178     ( p_person_id     IN  number
179     , p_subject       IN  varchar2
180     , p_html_body     IN  varchar2 DEFAULT null
181     , p_text_body     IN  varchar2 DEFAULT null
182     , p_from_role     IN  varchar2 DEFAULT null
183     ) return number;
184 -- ----------------------------------------------------------------------------
185 -- |------------------< get_doc >---------------------------------------------|
186 -- ----------------------------------------------------------------------------
187 -- {Start Of Comments}
188 --
189 -- Description:
190 --    This procedure is called from the attribute IRC_DOCUMENT_1
191 --    to IRC_DOCUMENT_8 which is of type Document. This attribute
192 --    is present in message IRC_GENERAL_NOTIFICATION_MSG
193 --
194 -- Pre Conditions:
195 --   None.
196 --
197 -- In Parameters:
198 --     document_id   VARCHAR2    A string that uniquely identifies a document.
199 --     display_type  VARCHAR2    Display type for the document.
200 --     document      VARCHAR2    The outbound text buffer where up to 32K
201 --                               of document text is returned.
202 --     document_type VARCHAR2    The outbound text buffer where the document
203 --                               content type is returned
204 -- Post Success:
205 --   The value in the attribute HTML_BODY_1 to HTML_BODY_8 will be set
206 --   to IRC_DOCUMENT_1 to IRC_DOCUMENT_8
207 --
208 -- Post Failure:
209 --    None.
210 --
211 -- Developer Implementation Notes:
212 --    Note:
213 --
214 -- Access Status:
215 --   Internal HRMS Development
216 --
217 -- {End Of Comments}
218 procedure get_doc (document_id in varchar2
219                   ,display_type in varchar2
220                   ,document in out nocopy varchar2
221                   ,document_type in out nocopy varchar2);
222 
223 --
224 -- ----------------------------------------------------------------------------
225 -- |------------------------< attach_resumes_notification >--------------------|
226 -- ----------------------------------------------------------------------------
227 -- {Start Of Comments}
228 --
229 -- Description:
230 --    This function sends an email notification to a party.  The email
231 --    address to use is obtained by searching for the role associated
232 --
233 -- Pre Conditions:
234 --   None.
235 --
236 -- In Parameters:
237 --     p_user_name  NUMBER      fnd_user.user_name of the user
238 --     p_subject    VARCHAR2    Text to write in the SUBJECT line of the email
239 --     p_text_body  VARCHAR2    Plain Text to be the body of the email. Used
240 --                              if the recipient can't accept HTML.
241 --     p_from_role  VARCHAR2    Contains the name of the person who sent the
242 --                              Notification
243 --     p_person_ids VARCHAR2    Contains the personIds of all person to be
244 --                              referred in Notification
245 -- Post Success:
246 --   The notification_id relating to the notification that has just been
247 --   sent will be passed out.
248 --
249 -- Post Failure:
250 --   An exception can occur if there is a problem with the WF message
251 --   and associated WF notification not being in the database as expected.
252 --
253 -- Developer Implementation Notes:
254 --    Note: This procedure could be enhanced by having another flag which
255 --    indiates whether it is ok if >1 role is found for the party, and
256 --    what to do if this situation arises (error, send to first role, warn).
257 --    It could also check if the role has > 1 email address associated with it.
258 --   (However, this situation can't occur at the moment because of how the
259 --    email address is being retrieved).
260 --
261 -- Access Status:
262 --   Internal HRMS Development
263 --
264 -- {End Of Comments}
265 function attach_resumes_notification(p_user_name  in  varchar2
266                                     ,p_subject    in  varchar2
267                                     ,p_html_body  in  varchar2 default null
268                                     ,p_from_role  in  varchar2 default null
269                                     ,p_person_ids in  varchar2 default null)
270 return number;
271 --
272 --
273 -- ----------------------------------------------------------------------------
274 -- |------------------< show_resume >---------------------------------------------|
275 -- ----------------------------------------------------------------------------
276 -- {Start Of Comments}
277 --
278 -- Description:
279 --    This procedure is called from the attribute IRC_RESUME_1
280 --    to IRC_RESUME_10 which is of type Document. This attribute
281 --    is present in message IRC_TEXT_RESUME_MSG_<N>
282 --
283 -- Pre Conditions:
284 --   None.
285 --
286 -- In Parameters:
287 --     document_id   VARCHAR2    A string that uniquely identifies a document.
288 --     display_type  VARCHAR2    Display type for the document.
289 --     document      VARCHAR2    The outbound text buffer where up to 32K
290 --                               of document text is returned.
291 --     document_type VARCHAR2    The outbound text buffer where the document
292 --                               content type is returned
293 -- Post Success:
294 --  None
295 --
296 -- Post Failure:
297 --    None.
298 --
299 -- Developer Implementation Notes:
300 --    Note:
301 --
302 -- Access Status:
303 --   Internal HRMS Development
304 --
305 -- {End Of Comments}
306 
307 procedure show_resume (document_id    in varchar2
308                        ,display_type  in varchar2
309                        ,document      in out nocopy blob
310                        ,document_type in out nocopy varchar2
311                        )
312 ;
313 -- Name : set_v2_attributes
314 -- Purpose: The wf text attributes values can only be 1950chars in length.
315 --          This procedure converts the possible 15600 plsql varchar2 value
316 --          to multiple 1950 char sql value chunks that can be held
317 --          as attributes in the database.
318 -- (internal)
319 -- --------------------------------------------------------------------- *
320 PROCEDURE set_v2_attributes
321   (p_wf_attribute_value  VARCHAR2
322   ,p_wf_attribute_name   VARCHAR2
323   ,p_nid                 NUMBER
324   );
325 --
326 --
330                           , params         in clob);
327 PROCEDURE raiseNotifyEvent( p_eventName    in varchar2
328                           , p_assignmentId in number
329                           , p_personId     in number
331 --
332 -- Global variable --
333 g_package constant varchar2(100) := 'irc_notification_helper_pkg';
334 --
335 END irc_notification_helper_pkg;