1 package WF_MAIL as
2 /* $Header: wfmlrs.pls 120.12.12010000.1 2008/07/25 14:43:30 appldev ship $ */
3 /*#
4 * Provides APIs to access the Oracle Workflow message subsystem and send messages through e-mail.
5 * @rep:scope public
6 * @rep:product OWF
7 * @rep:displayname Workflow Message Subsystem
8 * @rep:lifecycle active
9 * @rep:category BUSINESS_ENTITY WF_NOTIFICATION
10 * @rep:compatibility S
11 */
12 --
13 -- Global table to store the url content.
14 --
15 type url_content_array is table of varchar2(2000) index by binary_integer;
16 content_array url_content_array;
17
18 -- bug 2437782
19 -- record type to store the response attribute information
20 TYPE resp_attr_rec IS RECORD
21 (
22 attr_prompt varchar2(80),
23 attr_type varchar2(8),
24 attr_name varchar2(30),
25 attr_format varchar2(240)
26 );
27
28 TYPE resp_attrs_t IS TABLE OF resp_attr_rec INDEX BY BINARY_INTEGER;
29
30 -- Test flag. Internal use only
31 test_flag boolean := FALSE;
32
33 --
34 -- E-mail notification recipient record
35 -- Name - Name of the recipient
36 -- Address - Valid e-mail address
37 -- Recipient_Type - TO or CC or BCC
38 TYPE wf_recipient_rec_t IS RECORD
39 (
40 NAME VARCHAR2(360),
41 ADDRESS VARCHAR2(320),
42 RECIPIENT_TYPE VARCHAR2(4)
43 );
44
45
46
47 -- Global variable to hold a static stylesheet definition
48 g_newLine varchar2(1) := wf_core.newLine;
49 g_template_style varchar2(32000) :=
50 'body,html,td, p { top-margin:0; padding:0; font-family:Tahoma; font-size:9pt; color:#3c3c3c; }'||g_newline||
51 'H2.OraHeader{ color:#343434; padding:0px 0px 0px 0px; font-family:Arial; font-weight:bold; font-size:9pt; vertical-align:middle; }'||g_newline||
52 '.OraHeaderSub,.x3w {margin-bottom:0px;color:#426ca7;font-family:Arial;font-weight:bold;font-size:92%;vertical-align:middle;border-bottom:1px solid #aabed5;margin:5px 0px 0px 0px}'||g_newline||
53 '.OraHeaderBar,.x6z {color:#3c3c3c;font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;background-repeat:repeat-x;padding:0px 0px 0px 8px;font-weight:bold;font-size:8pt;vertical-align:middle;'||
54 'border-style:solid;border-width:1px 1px 1px 1px;border-color:#a3bed8;margin-top:5px;margin-bottom:0px}'||g_newline||
55 '.OraLink:link,.xd:link,.OraLink:active,.xd:active,.OraLink:visited,.xd:visited,.OraBulletedList A,.xj A,.OraCopyright A,.xv A,'||
56 '.OraPrivacy A,.xw A,.OraAbout A,.xx A,.OraLinkText,.x2v,.OraVLinkText,.x2w,.OraALinkText,.x2x,.OraHGridNavRowActiveLink,.x3u,.OraShuttleLinkText,.x4a,.OraSubTab A,.x4h A,.p_OraTreeRow A:link,.x5c A:link,'||
57 '.p_OraTreeRow A:active,.x5c A:active,.p_OraTreeRow A:visited,.x5c A:visited {font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;font-size:x-small;color:#2da0cb}'||g_newline||
58 '.OraContentContainerHeader,.xp {background-color:#d6f5ff;margin:5px 0px 0px 0px;padding:0px 0px 0px 8px;font-weight:bold;font-size:8pt;vertical-align:middle;border-bottom:1px solid #aabed5;'||
59 'margin-top:5px;margin-bottom:0px;font-family:Tahoma;color:#343434}'||g_newline||
60 '.OraTipLabel,.x55 {font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;font-weight:bold;color:#426ca7;font-size:8pt}'||
61 '.OraTipText,.x56 {font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;color:#3a5a87;font-size:8pt}'||g_newline||
62 '.OraTableColumnHeader, .x1r, .OraTableRowHeader, .x1u { text-align:left;vertical-align:bottom;font-family:Tahoma,Arial,Helvetica,Geneva,'||
63 'sans-serif;font-weight:bold;background-color:#cfe0f1;color:#3c3c3c;border-color:#c9cbd3;font-size:8pt }'||g_newline||
64 '.OraTableCellText, .x1l { color:#3c3c3c;vertical-align:baseline;font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;border-color:#c9cbd3;font-size:9pt;background-color:#f2f2f5 }'||g_newline||
65 '.OraTableContent,.x1h {border-color:#c9cbd3;border-style:solid;border-width:1px;border-collapse:collapse}'||g_newline||
66 '.OraTableHeaderLink,.x24 {text-decoration:none;text-align:left;vertical-align:bottom;font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;font-weight:bold;background-color:#cfe0f1;'||
67 'color:#3c3c3c;border-color:#c9cbd3;font-size:8pt}'||g_newline||
68 '.OraInstructionTextStrong,.x1,.OraDataText,.x2 {font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;font-size:x-small;font-weight:bold;color:#3c3c3c} '||g_newline||
69 '.OraPromptText,.x8 {font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;font-size:8pt;text-align:right;color:#000000;font-weight:normal} '||g_newline||
70 '.OraTableBorder0001,.x4j {border-style:solid;border-width:0px 0px 0px 1px}'||g_newline||
71 '.OraTableBorder1000,.x4q {border-style:solid;border-width:1px 0px 0px}'||g_newline||
72 '.OraTableBorder1111,.x4x {border-style:solid;border-width:1px}';
73
74 -- Defining explicit formatting values for whatever output that requires it
75 -- Header attributes
76 g_th_bgcolor varchar2(7) := '#cfe0f1';
77 g_th_fontcolor varchar2(7) := '#3c3c3c';
78 g_th_fontface varchar2(80) := 'Tahoma, Arial, Helvetica, Geneva, sans-serif';
79 g_th_fontsize varchar2(2) := '2';
80
81 -- Cell attributes
82 g_td_bgcolor varchar2(7) := '#f2f2f5';
83 g_td_fontcolor varchar2(7) := '#3c3c3c';
84 g_td_fontface varchar2(80) := 'Tahoma, Arial, Helvetica, Geneva, sans-serif';
85 g_td_fontsize varchar2(2) := '2';
86
87 -- Table of recipient record
88 TYPE wf_recipient_list_t IS TABLE OF wf_recipient_rec_t INDEX BY BINARY_INTEGER;
89
90 -- UpdateStatus
91 -- Update mail status and close any notification with no response.
92 -- Handle error.
93 -- IN
94 -- notification id
95 -- status
96 -- error name (null if error is in WF_CORE)
97 procedure UpdateStatus(
98 nid in number,
99 status in varchar2,
100 error_name in varchar2 default null);
101
102 -- UpdateStatus2
103 -- Update mail status and close any notification with no response.
104 -- Handle error.
105 -- IN
106 -- nid notification id
107 -- status Status to set the notification
108 -- autoclose Flag to specify whether the notification should be closed
109 -- automitically
110 -- error name (null if error is in WF_CORE)
111 -- external_error Any error message that can not be reflected or captured
112 -- through the wf_core.context facilty ie Java.
113 procedure UpdateStatus2(
114 nid in number,
115 status in varchar2,
116 autoclose in varchar2,
117 error_name in varchar2 default null,
118 external_error in varchar2 default null);
119
120 -- ResetFailed
121 -- Update mail status from FAILED to MAIL.
122 -- IN
123 -- Queue number
124 procedure ResetFailed(p_queue varchar2 default '1');
125
126 -- HandleSendError
127 -- Call any callback in error mode if error occurs in sending mail.
128 -- IN
129 -- notification id
130 -- error name (null if error is in WF_CORE)
131 -- external_error Any error message that can not be reflected or captured
132 -- through the wf_core.context facilty ie Java.
133 procedure HandleSendError(
134 nid in number,
135 status in varchar2,
136 error_name in varchar2 default null,
137 external_error in varchar2 default null);
138
139
140 -- UpdateRecipient
141 -- Updates the recipient of a notification to DISABLED where
142 -- there has been a failure to deliver to their email address.
143 -- This function is triggered by the oracle.apps.wf.notification.send.failure
144 -- event.
145 function Disable_Recipient_Ntf_Pref(p_subscription_guid in raw,
146 p_event in out NOCOPY WF_EVENT_T) return varchar2;
147
148 -- HandleResponseError (PRIVATE) handle exception in response
149 --
150 -- Sets the MAIL_ERROR error message attribute, then sets the
151 -- notification status to INVALID.
152 --
153 -- IN
154 -- notification id
155 -- lookup type
156 -- value found
157
158 procedure HandleResponseError(nid in number,
159 lk_type in varchar2,
160 lk_meaning in varchar2,
161 error_result in out NOCOPY varchar2);
162
163
164 -- WordWrap (PRIVATE)
165 -- Insert newlines to word wrap a line buffer.
166 -- Inputs:
167 -- text - text buffer
168 -- indent - number of tabs to indent each line by
169 -- Returns:
170 -- buffer contents with newlines and tabs embedded
171 function WordWrap(
172 text in varchar2,
173 indent in number default 0) return varchar2;
174
175 -- GetWarning - get warning messages
176 --
177 -- IN
178 -- Template
179 -- unsolicited from
180 -- unsolicited subject
181 -- unsolicited body
182 -- OUT
183 -- message subject
184 -- message body (text)
185 -- message body (html)
186 procedure GetWarning(
187 template in varchar2,
188 ufrom in varchar2,
189 usubject in varchar2,
190 ubody in varchar2,
191 subject out NOCOPY varchar2,
192 text_body_text out NOCOPY varchar2,
193 html_body_text out NOCOPY varchar2) ;
194
195 -- GetWarning - get warning messages
196 --
197 -- IN
198 -- unsolicited from
199 -- unsolicited subject
200 -- unsolicited body
201 -- OUT
202 -- message subject
203 -- message body (text)
204 -- message body (html)
205 procedure GetWarning(
206 ufrom in varchar2,
207 usubject in varchar2,
208 ubody in varchar2,
209 subject out NOCOPY varchar2,
210 text_body_text out NOCOPY varchar2,
211 html_body_text out NOCOPY varchar2) ;
212
213 -- GetSummary - get summary messages for one role
214 -- where the summary body can be a LOB
215 -- Bug# 2358498
216 --
217 -- IN
218 -- role name
219 -- role display name
220 -- mailer node name
221 -- OUT
222 -- message subject
223 -- message body (text)
224 -- message body (html)
225 -- lob (Y or N)
226 procedure GetSummary(
227 role in varchar2,
228 dname in varchar2,
229 node in varchar2,
230 subject out NOCOPY varchar2,
231 body_text out NOCOPY varchar2,
232 lob out NOCOPY varchar2);
233
234 -- GetSummary - get summary messages for one role
235 --
236 -- IN
237 -- role name
238 -- role display name
239 -- mailer node name
240 -- OUT
241 -- message subject
242 -- message body (text)
243 -- message body (html)
244 procedure GetSummary(
245 role in varchar2,
246 dname in varchar2,
247 node in varchar2,
248 subject out NOCOPY varchar2,
249 body_text out NOCOPY varchar2);
250
251 -- GetSummary2 - get summary messages for one role
252 -- Support the render flag for Applications Framework.
253 -- If set, no body will be rendered as it will be
254 -- deferred to the middle tier.
255 -- IN
256 -- role name
257 -- role display name
258 -- mailer node name
259 -- content type
260 -- OUT
261 -- message subject
262 -- message body (text)
263 -- message body (html)
264 -- lob (Y or N)
265 procedure GetSummary2(
266 role in varchar2,
267 dname in varchar2,
268 node in varchar2,
269 renderBody in varchar2,
270 contType in varchar2,
271 subject out NOCOPY varchar2,
272 body_text out NOCOPY varchar2,
273 lob out NOCOPY varchar2);
274
275 -- GetMessage - get email message data
276 --
277 -- IN
278 -- notification id
279 -- mailer node name
280 -- web agent path
281 -- Replyto Address
282 -- DIRECT_RESPONSE Flag
283 -- OUT
284 -- message subject
285 -- message body (text)
286 -- message body (html)
287 -- message attachments
288 procedure GetMessage(
289 nid in number,
290 node in varchar2,
291 agent in varchar2,
292 replyto in varchar2,
293 subject out NOCOPY varchar2,
294 text_body out NOCOPY varchar2,
295 html_body out NOCOPY varchar2,
296 body_atth out NOCOPY varchar2,
297 error_result in out NOCOPY varchar2);
298
299 --
300 -- setContext (PRIVATE)
301 -- Set the context by executing the selector function
302 -- IN
303 -- nid - Notification id
304 --
305 procedure setContext(nid NUMBER);
306
307 -- GetLOBMessage3 - get email message data
308 --
309 -- IN
310 -- notification id
311 -- mailer node name
312 -- web agent path
313 -- Replyto Address
314 -- recipient role
315 -- language
316 -- territory
317 -- notification preference
318 -- email address
319 -- display name
320 -- render body flag
321 -- OUT
322 -- message subject
323 -- message attachments
324 -- bodyToken a flag to indicate if there is a BODY token in the
325 -- main message template
326 procedure GetLOBMessage3(
327 nid in number,
328 node in varchar2,
329 agent in varchar2,
330 replyto in varchar2,
331 recipient in varchar2,
332 language in varchar2,
333 territory in varchar2,
334 ntf_pref in varchar2,
335 email in varchar2,
336 dname in varchar2,
337 renderbody in varchar2,
338 subject out NOCOPY varchar2,
339 body_atth out NOCOPY varchar2,
340 error_result in out NOCOPY varchar2,
341 bodyToken in out NOCOPY varchar2);
342
343 -- GetLOBMessage2 - get email message data
344 --
345 -- IN
346 -- notification id
347 -- mailer node name
348 -- web agent path
349 -- Replyto Address
350 -- recipient role
351 -- language
352 -- territory
353 -- notification preference
354 -- email address
355 -- display name
356 -- OUT
357 -- message subject
358 -- message attachments
359 procedure GetLOBMessage2(
360 nid in number,
361 node in varchar2,
362 agent in varchar2,
363 replyto in varchar2,
364 recipient in varchar2,
365 language in varchar2,
366 territory in varchar2,
367 ntf_pref in varchar2,
368 email in varchar2,
369 dname in varchar2,
370 subject out NOCOPY varchar2,
371 body_atth out NOCOPY varchar2,
372 error_result in out NOCOPY varchar2);
373
374 -- GetLOBMessage - get email message data
375 --
376 -- IN
377 -- notification id
378 -- mailer node name
379 -- web agent path
380 -- Replyto Address
381 -- DIRECT_RESPONSE Flag
382 -- OUT
383 -- message subject
384 -- message attachments
385 procedure GetLOBMessage(
386 nid in number,
387 node in varchar2,
388 agent in varchar2,
389 replyto in varchar2,
390 subject out NOCOPY varchar2,
391 body_atth out NOCOPY varchar2,
392 error_result in out NOCOPY varchar2);
393
394 -- initFetchLOB
395 --
396 -- IN
397 -- type - Document type (TEXT or HTML)
398 --
399 procedure InitFetchLOB(doc_type VARCHAR2 default WF_NOTIFICATION.doc_text,
400 doc_length OUT NOCOPY NUMBER);
401
402
403 -- FetchLOBContent
404 --
405 -- IN
406 -- type of document to fetch TEXT/HTML
407 -- End of LOB marker
408 -- OUT
409 -- 32K chunk of the LOB
410 --
411 -- Use the API in the following manner
412 -- WF_MAIL.InitFetchLob(WF_NOTIFICATION.doc_text)
413 -- while not clob_end loop
414 -- WF_MAIL.FetchLobContent(cBuf, WF_NOTIFICATION.doc_text, clob_end);
415 -- ...
416 -- end loop;
417 --
418 procedure FetchLOBContent(buffer OUT NOCOPY VARCHAR2,
419 doc_type IN VARCHAR2 DEFAULT WF_NOTIFICATION.doc_text,
420 end_of_clob IN OUT NOCOPY NUMBER);
421 -- CloseLOB - Close the message LOBs ready for use again later
422 --
423 -- IN
424 -- Document type
425 procedure CloseLOB(doc_type in VARCHAR2);
426
427 -- CloseLOB - Close the message LOBs ready for use again later
428 --
429 procedure CloseLOB;
430
431 -- FetchUrlContent - Fetched the content from the global buffer which
432 -- populated by GetUrlContent().
433 --
434 -- IN
435 -- piece_count - the index to the url_content_array.
436 -- OUT
437 -- piece_value - the data stored in the global content_array table.
438 function FetchUrlContent(piece_count in number,
439 error_result in out NOCOPY varchar2) return varchar2;
440
441 -- GetUrlContent - get URL content
442 --
443 -- IN
444 -- url address id
445 -- OUT
446 -- piece_count
447 -- error result
448 procedure GetUrlContent(
449 url in varchar2,
450 piece_count out NOCOPY number,
451 error_result in out NOCOPY varchar2);
452
453 -- GetDocContent - get Document content
454 --
455 -- IN
456 -- notification id
457 -- document attribute name
458 -- display type
459 -- OUT
460 -- document content
461 -- error result
462 procedure GetDocContent(
463 nid in number,
464 docattrname in varchar2,
465 disptype in varchar2,
466 doccontent out NOCOPY varchar2,
467 error_result in out NOCOPY varchar2);
468
469 -- GetLOBDocContent - get LOB Document content
470 --
471 -- IN
472 -- notification id
473 -- document attribute name
474 -- display type
475 -- OUT
476 -- document content
477 -- error result
478 procedure GetLOBDocContent(
479 nid in number,
480 docattrname in varchar2,
481 disptype in varchar2,
482 error_result in out NOCOPY varchar2);
483
484 -- GetLOBDocContent - get LOB Document content
485 -- Returns the document type of the PLSQLCLOB document
486 --
487 -- IN
488 -- notification id
489 -- document attribute name
490 -- display type
491 -- OUT
492 -- document type
493 -- document content
494 -- error result
495 procedure GetLOBDocContent(
496 nid in number,
497 docattrname in varchar2,
498 disptype in varchar2,
499 doctype out NOCOPY varchar2,
500 error_result in out NOCOPY varchar2);
501
502 -- GetLovMeaning (PRIVATE)
503 -- Return the displayed meaning of a lookup
504 -- Inputs:
505 -- lk_type - lookup type
506 -- lk_code - lookup code
507 -- Returns:
508 -- lookup meaning
509 function GetLovMeaning(
510 lk_type in varchar2,
511 lk_code in varchar2) return varchar2;
512
513 -- GetLovCode (PRIVATE) Return the hidden code of a lookup
514 --
515 -- IN
516 -- lookup type
517 -- lookup meaning
518 -- RETURN
519 -- lookup code
520 function GetLovCode(
521 lk_type in varchar2,
522 lk_meaning in varchar2)
523 return varchar2;
524
525
526 -- PutMessage - response processing
527 --
528 -- IN
529 -- notification id
530 -- node name
531 -- response body
532 -- from address
533 procedure PutMessage(
534 nid in number,
535 node in varchar2,
536 resp_body in varchar2,
537 from_addr in varchar2,
538 error_result in out NOCOPY varchar2);
539
540 -- PutDirectMessage - direct response processing
541 --
542 -- IN
543 -- notification id
544 -- node name
545 -- response body
546 -- from address
547 procedure PutDirectMessage(
548 nid in number,
549 node in varchar2,
550 resp_body in varchar2,
551 from_addr in varchar2,
552 error_result in out NOCOPY varchar2);
553
554 -- More Info Feature - bug 2282139
555 -- PutMoreInfoRequest
556 -- Reply processor. Read body of a request for more information
557 -- parse the body for the role to send the request to.
558 -- Used by the notification mail response processor.
559 -- IN
560 -- notification id
561 -- mailer node name
562 -- response body text
563 -- email 'from' address
564 procedure PutMoreInfoRequest(
565 nid in number,
566 node in varchar2,
567 resp_body in varchar2,
568 from_addr in varchar2,
569 error_result in out NOCOPY varchar2);
570
571 -- PutMoreInfoMessage
572 -- Reply processor. Read body of a reply for more information
573 -- request, parse the body for the comments from the user and
574 -- update wf_notification and wf_comments apropriately
575 -- Used by the notification mail response processor.
576 -- IN
577 -- notification id
578 -- mailer node name
579 -- response body text
580 -- email 'from' address
581 procedure PutMoreInfoMessage(
582 nid in number,
583 node in varchar2,
584 resp_body in varchar2,
585 from_addr in varchar2,
586 error_result in out NOCOPY varchar2);
587
588 -- direct_response - Return the value of the direct response flag
589 --
590 -- OUT
591 -- Direct Response as [TRUE|FALSE]
592 function direct_response return boolean;
593
594 -- send_accesskey - Return the value of the send access key flag
595 --
596 -- OUT
597 -- Direct Response as [TRUE|FALSE]
598 function send_accesskey return boolean;
599
600 -- Autoclose_FYI - Return the value of the Autoclose FYI flag
601 --
602 -- OUT
603 -- AUTOCLOSE_FYI as [TRUE|FALSE]
604 function Autoclose_FYI return boolean;
605
606 -- Autoclose_FYI_on - Set the Autoclose flag to TRUE
607 --
608 -- OUT
609 procedure Autoclose_FYI_On;
610
611 -- Autoclose_FYI_off - Set the Autoclose flag to TRUE
612 --
613 -- OUT
614 procedure Autoclose_FYI_Off;
615
616 -- direct_response_on - Set the value of the direct response flag to TRUE
617 --
618 procedure direct_response_on;
619
620 -- direct_response - Set the value of the direct response flag to FALSE
621 --
622 procedure direct_response_off;
623
624 -- send_accesskey - Set the value of the send acces key flag to TRUE
625 --
626 procedure send_access_key_on;
627
628 -- send_accesskey - Set the value of the send acces key flag to FALSE
629 --
630 procedure send_access_key_off;
631
632
633 function UrlEncode(in_string varchar2) return varchar2;
634 pragma restrict_references(UrlEncode, WNDS);
635
636 procedure GetUrlAttachment (nid in number,
637 buffer out NOCOPY varchar2,
638 error_result out NOCOPY varchar2);
639
640 -- set_template - Set the mail template
641 -- if nothing is specify, it will clear the mail template value.
642 procedure set_template(name in varchar2 default null);
643
644 --
645 -- GetCharset (PRIVATE)
646 -- Get the character set base of the language and territory info.
647 -- NOTE
648 -- We may do more in the future to find the character set.
649 --
650 procedure GetCharset(lang in varchar2,
651 terr in varchar2 default null,
655 -- Get the session language and territory for the
652 charset out NOCOPY varchar2);
653
654 -- GetSessionLanguage
656 -- current session
657 --
658 -- OUT
659 -- Language
660 -- Territory
661 -- codeset
662 procedure GetSessionLanguage(lang out NOCOPY varchar2,
663 terr out NOCOPY varchar2,
664 codeset out NOCOPY varchar2);
665
666 -- Bug 2375920
667 -- GetSignaturePolicy (PUBLIC)
668 -- Get the signature policy for the notification from
669 -- the notification attribute
670 -- IN
671 -- nid - Notification id
672 -- OUT
673 -- sig_policy - Signature policy
674
675 procedure GetSignaturePolicy(nid in number,
676 sig_policy out NOCOPY varchar2);
677
678 -- gets the size of the current LOB table
679 function getLobTableSize return number;
680
681 -- GetTemplateName (For Internal Use only)
682 -- Get the template type and name based on the status of the
683 -- notification and whether, or not, name has been overridden
684 -- in the configuration parameters or on the message definition
685 -- itself.
686 --
687 -- IN
688 -- Notification ID
689 -- Notification status
690 -- Notification Mail status
691 -- OUT
692 -- Item type for template
693 -- Message name for template
694
695 procedure getTemplateName(nid in number, n_status in varchar2,
696 n_mstatus in varchar2, t_type out NOCOPY varchar2,
697 t_name out NOCOPY varchar2);
698
699 -- ProcessSecurityPolicy
700 -- Processes the security policy for the notification. The security policy
701 -- is determined by the #WF_SECURITY_POLICY.
702 -- IN
703 -- p_nid - Notification id
704 -- OUT
705 -- p_email - Determines whether content is secure or not
706 -- p_message_name - If the notification is not to be sent through email,
707 -- suggest a template to use.
708 procedure ProcessSecurityPolicy(p_nid in number,
709 p_email out NOCOPY varchar2,
710 p_message_name out NOCOPY varchar2);
711
712 -- get_Ntf_Function_URL (For internal use only)
713 -- Returns the Applications Framework URL
714 -- IN
715 -- Notification ID
716 -- Notification Access Key
717 -- Signature policy
718 function get_Ntf_Function_URL(nid in number,
719 n_key in varchar2,
720 n_sig_policy in varchar2,
721 n_override_agent in varchar2 default null)
722 return varchar2;
723
724 -- Set_FYI_Flag (Private)
725 -- Sets a global flag to identify if the current e-mail being processed is a
726 -- FYI notification
727 -- IN
728 -- p_fyi boolean
729 procedure Set_FYI_Flag(p_fyi in boolean);
730
731 -- Get_FYI_Flag (Private)
732 -- Returns a global flag to identify if the current e-mail being processed is
733 -- a FYI notification
734 -- OUT
735 -- Boolean value
736 function Get_FYI_Flag return boolean;
737
738 -- Get_Ntf_Language (PRIVATE)
739 -- Overrides the language and territory setting for the notification based
740 -- on the #WFM_LANGUAGE and #WFM_TERRITORY attributes. If neither user's
741 -- preference nor the notification level setting are valid, the base NLS
742 -- setting is used-- IN
743 -- p_nid - Notification Id
744 -- IN OUT
745 -- p_language - NLS Language
746 -- p_territory - NLS Territory
747 -- p_codeset - NLS Codeset
748 procedure Get_Ntf_Language(p_nid in number,
749 p_language in out nocopy varchar2,
750 p_territory in out nocopy varchar2,
751 p_codeset in out nocopy varchar2);
752
753 --
754 -- Generic mailer routines
755 --
756 -- Send
757 -- Sends a e-mail notification to the specified list of recipients.
758 -- This API unlike wf_notification.send does not require workflow
759 -- message or workflow roles to send a notification.
760 /*#
761 * Sends a message to be dispatched through e-mail by the Oracle Workflow
762 * Notification Mailer. The message content and recipients provided in the
763 * parameters do not need to be associated with any workflow process or
764 * directory service roles. The message content must be complete,
765 * preformatted, and email-ready, and should conform to the content type
766 * specified in the p_content_type parameter. Where possible, Oracle
767 * recommends setting only the required parameters and using the default
768 * values for the optional parameters.
769 * @param p_subject The Subject header value
770 * @paraminfo {@rep:required}
771 * @param p_message The message content
772 * @paraminfo {@rep:required}
773 * @param p_recipient_list The list of recipients to whom the message should be sent
774 * @paraminfo {@rep:innertype WF_MAIL#wf_recipient_list_t} {@rep:required}
775 * @param p_module The program or application to which the message belongs
776 * @paraminfo {@rep:required}
777 * @param p_idstring An optional identifier for the message, used in response processing
778 * @param p_from An optional From header value
779 * @param p_replyto An optional Reply-To header value
780 * @param p_language An optional language setting for the message
781 * @param p_territory An optional territory setting for the message
782 * @param p_codeset An optional codeset encoding specification for the message
783 * @param p_content_type An optional Content-Type header value
784 * @param p_callback_event The event raised to enable further processing, if needed, after the message is dispatched
785 * @param p_event_key The key that identifies the message when the message is enqueued for dispatch
786 * @param p_fyi_flag A flag to indicate whether the message is for your information (FYI) or requires a response
787 *
788 * @rep:displayname Send Message
789 * @rep:businessevent oracle.apps.wf.notification.send
790 * @rep:scope public
791 * @rep:lifecycle active
792 * @rep:compatibility S
793 *
794 */
795 procedure send(p_subject in varchar2,
796 p_message in out nocopy clob,
797 p_recipient_list in wf_recipient_list_t,
798 p_module in varchar2,
799 p_idstring in varchar2 default null,
800 p_from in varchar2 default null,
801 p_replyto in varchar2 default null,
802 p_language in varchar2 default 'AMERICAN',
803 p_territory in varchar2 default 'AMERICA',
804 p_codeset in varchar2 default 'UTF8',
805 p_content_type in varchar2 default 'text/plain',
806 p_callback_event in varchar2 default null,
807 p_event_key in varchar2 default null,
808 p_fyi_flag in varchar2 default null);
809
810
811 --
812 -- SendMoreInfoResponseWarning
813 -- procedure to send a warning notification about the answer for a More
814 -- Informantion request that has already been answered.
815 -- IN
816 -- p_nid - Notification Id
817 -- p_from_email - Email address of the responder
818
819 procedure SendMoreInfoResponseWarning(p_nid IN NUMBER,
820 p_from_email IN VARCHAR2 default null);
821
822 -- SetNtfEventsSubStatus
823 -- This procedure sets the status of seeded subscription to the event group
824 -- oracle.apps.wf.notification.send.group. This subscription is responsible
825 -- for notification XML message generation and presenting it to the mailer for
826 -- e-mail dispatch. Disabling this subscription causes e-mails not to be sent.
827 --
828 -- ENABLED - E-mails are sent
829 -- DISABLED - E-mails are not sent
830 -- IN
831 -- p_status - Subscription status (Either ENABLED or DISABLED)
832 procedure SetNtfEventsSubStatus(p_status in varchar2);
833
834 -- SetResponseDelimiters
835 -- Sets the package level variables with one procedure call. The
836 -- response delimiters are used to determine the free form text
837 -- values in email notification responses.
838 --
839 -- IN
840 -- open_text - Opening text/plain delimiter
841 -- close_text - Closing text/plain delimiter
842 -- open_html - Opening text/html delimiter
843 -- close_html - Closing text/html delimiter
844 procedure SetResponseDelimiters(open_text in varchar2,
845 close_text in varchar2,
846 open_html in varchar2,
847 close_html in varchar2);
848
849 end WF_MAIL;