DBA Data[Home] [Help]

PACKAGE: APPS.PV_PG_NOTIF_UTILITY_PVT

Source


1 PACKAGE PV_PG_NOTIF_UTILITY_PVT AUTHID CURRENT_USER as
2 /* $Header: pvxvpnus.pls 115.13 2003/12/01 19:17:59 pukken ship $ */
3 
4 ------------------------------------------------------------------------------
5 -- HISTORY
6 --    20-SEP-2002   rdsharma  Created
7 --    11-NOV-2002   SVEERAVE  Since the package pv_pgp_notif_pvt is changed to
8 --                            pv_ge_party_notif_pvt, all the references are changed
9 --                            accordingly. Since pv_ge_party_notifications table
10 --                            is changd to have partner_id column instead of partner_party_id
11 --                            set_pgp_notif procedure is changed to capture partner_id
12 --    11-NOV-2002   SVEERAVE  get_Notification_Body function is added.
13 --    04-AUG-2003   SVEERAVE  Added set_msg_doc for bug# 3072153.
14 --    10/18/2003    pukken    Added new procedure Send_Workflow_Notification to send the notifications
15 ------------------------------------------------------------------------------
16 
17 g_number       CONSTANT NUMBER := 1;  -- data type is number
18 g_varchar2     CONSTANT NUMBER := 2;  -- data type is varchar2
19 g_pv_lookups  CONSTANT VARCHAR2(12) :=  'FND_LOOKUPS';
20 
21 resource_locked EXCEPTION;
22 pragma EXCEPTION_INIT(resource_locked, -54);
23 
24 TYPE user_notify_rec_type is RECORD
25 (
26     USER_ID             NUMBER,
27     USER_NAME           VARCHAR2(360),
28     USER_RESOURCE_ID    NUMBER
29 );
30 
31 g_miss_user_notify_rec_type user_notify_rec_type;
32 TYPE user_notify_rec_tbl_type IS TABLE OF user_notify_rec_type INDEX BY BINARY_INTEGER;
33 
34 TYPE mbrship_chng_rec_type is RECORD
35 (
36     ID                      NUMBER,
37     PARTNER_ID              NUMBER,
38     RESOURCE_ID      NUMBER,
39     NOTIF_TYPE              VARCHAR2(240),
40     MESSAGE_SUBJ            VARCHAR2(240),
41     MESSAGE_BODY        VARCHAR2(2000)
42 );
43 
44 g_miss_mbrship_chng_rec_type mbrship_chng_rec_type;
45 
46 /*============================================================================*/
47 -- Start of Comments
48 -- PROCEDURE
49 --    get_enrl_requests_details
50 --
51 -- PURPOSE
52 --    This procedure will return enrollment request details
53 --    from PV_PG_ENRL_REQUESTS table for a given enrl_requests_id
54 -- Called By
55 -- NOTES
56 -- End of Comments
57 /*============================================================================*/
58 PROCEDURE get_enrl_requests_details(
59     p_enrl_request_id       IN NUMBER,
60     x_req_submission_date   OUT NOCOPY DATE,
61     x_partner_program_id    OUT NOCOPY NUMBER,
62     x_partner_program       OUT NOCOPY VARCHAR2,
63     x_enrollment_duration   OUT NOCOPY VARCHAR2,
64     x_enrollment_type       OUT NOCOPY VARCHAR2,
65     x_req_resource_id       OUT NOCOPY NUMBER,
66     x_prtnr_vndr_relship_id OUT NOCOPY NUMBER,
67     x_return_status         OUT NOCOPY VARCHAR2
68 );
69 
70 /*============================================================================*/
71 -- Start of Comments
72 -- PROCEDURE
73 --    get_requestor_details
74 --
75 -- PURPOSE
76 --    This procedure will return enrollment requestor details from
77 --    JTF_RS_RESOURCE_EXTNS table for a given resource_id
78 -- Called By
79 -- NOTES
80 -- End of Comments
81 /*============================================================================*/
82 PROCEDURE get_requestor_details(
83     p_req_resource_id  IN NUMBER,
84     x_user_id               OUT NOCOPY NUMBER,
85     x_source_name           OUT NOCOPY VARCHAR2,
86     x_user_name             OUT NOCOPY VARCHAR2,
87     x_return_status         OUT NOCOPY VARCHAR2
88 );
89 
90 /*============================================================================*/
91 -- Start of Comments
92 -- PROCEDURE
93 --    get_prtnr_vendor_details
94 --
95 -- PURPOSE
96 --    This procedure will return partner and vendor details
97 --    for a given relationship_id  between Partner and the Vendor
98 -- Called By
99 -- NOTES
100 -- End of Comments
101 /*============================================================================*/
102 PROCEDURE get_prtnr_vendor_details(
103     p_enrl_request_id       IN NUMBER,
104     x_vendor_party_id       OUT NOCOPY NUMBER,
105     x_vendor_name           OUT NOCOPY VARCHAR2,
106     x_partner_party_id      OUT NOCOPY NUMBER,
107     x_partner_comp_name     OUT NOCOPY VARCHAR2,
108     x_return_status         OUT NOCOPY VARCHAR2
109 );
110 
111 /*============================================================================*/
112 -- Start of Comments
113 -- PROCEDURE
114 --    get_membership_details
115 --
116 -- PURPOSE
117 --    This procedure will return all the membership details for a
118 --    partner user enrolled for a program for a given membership_id
119 -- Called By
120 -- NOTES
121 -- End of Comments
122 /*============================================================================*/
123 PROCEDURE get_membership_details(
124     p_membership_id         IN NUMBER,
125     x_req_submission_date   OUT NOCOPY DATE,
126     x_partner_program_id    OUT NOCOPY NUMBER,
127     x_partner_program       OUT NOCOPY VARCHAR2,
128     x_enrl_request_id       OUT NOCOPY NUMBER,
129     x_enrollment_start_date OUT NOCOPY DATE,
130     x_enrollment_end_date   OUT NOCOPY DATE,
131     x_req_resource_id       OUT NOCOPY NUMBER,
132     x_prtnr_vndr_relship_id OUT NOCOPY NUMBER,
133     x_enrollment_type       OUT NOCOPY VARCHAR2,
134     x_return_status         OUT NOCOPY VARCHAR2
135 );
136 /*============================================================================*/
137 -- Start of Comments
138 -- NAME
139 --   Get_Users_List
140 --
141 -- PURPOSE
142 --   This Procedure will be return all the users for a given partner Vendor
143 --   relationship id and the requestor resourse id.
144 --
145 -- Called By
146 -- NOTES
147 -- End of Comments
148 
149 /*============================================================================*/
150 
151 PROCEDURE get_users_list
152    (  p_partner_id          IN     NUMBER,
153       x_user_notify_rec_tbl OUT NOCOPY    user_notify_rec_tbl_type ,
154       x_user_count          OUT NOCOPY    NUMBER,
155       x_return_status       OUT NOCOPY    VARCHAR2
156 );
157 
158 /*============================================================================*/
159 -- Start of Comments
160 -- NAME
161 --   Get_Resource_Role
162 --
163 -- PURPOSE
164 --   This Procedure will be return the workflow user role for
165 --   the resourceid sent
166 -- Called By
167 -- NOTES
168 -- End of Comments
169 
170 /*============================================================================*/
171 
172 PROCEDURE get_resource_role
173    (  p_resource_id        IN     NUMBER,
174       x_role_name          OUT NOCOPY    VARCHAR2,
175       x_role_display_name  OUT NOCOPY    VARCHAR2 ,
176       x_return_status      OUT NOCOPY    VARCHAR2
177 );
178 
179 /*============================================================================
180 -- Start of Comments
181 -- NAME
182 --   Get_Notification_Name
183 --
184 -- PURPOSE
185 --   This Procedure will be return the Notification name by slecting the
186 --   meaning  for
187 --   the resourceid sent
188 -- Called By
189 -- NOTES
190 -- End of Comments
191 
192 =============================================================================*/
193 
194 FUNCTION get_Notification_Name( p_notif_code    IN    VARCHAR2 )
195 RETURN VARCHAR2;
196 
197 /*============================================================================
198 -- Start of Comments
199 -- NAME
200 --   Check_Notif_Rule_Active
201 --
202 -- PURPOSE
203 --   This Procedure will return the ACTIVE_FLAG value for the Notification
204 --   rule set for the given Program Id and Notification Type.
205 --
206 -- Called By
207 -- NOTES
208 -- End of Comments
209 
210 =============================================================================*/
211 
212 FUNCTION check_Notif_Rule_Active( p_program_id    IN    NUMBER ,
213 				  p_notif_type	  IN	VARCHAR2 )
214 RETURN VARCHAR2;
215 
216 /*============================================================================*/
217 -- Start of Comments
218 -- NAME
219 --   Validate_Enrl_Requests
220 --
221 -- PURPOSE
222 --   This procedure validate the ENRL_REQUEST_ID or REQUESTOR_RESOURCE_ID
223 --
224 -- Called By
225 --
226 -- NOTES
227 --
228 -- End of Comments
229 
230 /*============================================================================*/
231 PROCEDURE Validate_Enrl_Requests (
232     p_item_id        IN  NUMBER ,
233     p_item_name         IN  VARCHAR2,
234     x_return_status     OUT NOCOPY VARCHAR2
235 );
236 
237 /*============================================================================*/
238 -- Start of Comments
239 -- NAME
240 --   Set_Pgp_Notif
241 --
242 -- PURPOSE
243 --   This procedure set the proper values in pgp_notif_rec, before calling the
244 --  Create_Pgp_Notif procedure.
245 --
246 -- Called By
247 --
248 -- NOTES
249 --
250 -- End of Comments
251 
252 /*============================================================================*/
253 PROCEDURE Set_Pgp_Notif (
254     p_notif_id         IN   NUMBER,
255     p_object_version   IN   NUMBER,
256     p_partner_id IN   NUMBER,
257     p_user_id          IN   NUMBER,
258     p_arc_notif_for_entity_code IN VARCHAR2,
259     p_notif_for_entity_id  IN   NUMBER,
260     p_notif_type_code   IN VARCHAR2,
261     x_return_status     OUT NOCOPY VARCHAR2 ,
262     x_pgp_notif_rec     OUT NOCOPY pv_ge_party_notif_pvt.pgp_notif_rec_type
263 );
264 
265 
266 /*============================================================================
267 -- Start of comments
268 --	API name 	: send_thnkyou_notif
269 --	Type		: Private.
270 --	Function	: This API compiles and sends the Thank you notification to a
271 --                partner, once the partner user successfully enrolled to a
272 --                partner program.
273 --	Pre-reqs	: None.
274 --	Parameters	:
275 --	IN		:	p_api_version          IN NUMBER	Required
276 --				p_init_msg_list        IN VARCHAR2 	Optional
277 --					Default = FND_API.G_FALSE
278 --				p_commit               IN VARCHAR2	Optional
279 --					Default = FND_API.G_FALSE
280 --				p_validation_level     IN NUMBER	Optional
281 --					Default = FND_API.G_VALID_LEVEL_FULL
282 --				p_enrl_request_id      IN NUMBER    Required
283 --
284 --	OUT		:	x_return_status		OUT	VARCHAR2(1)
285 --				x_msg_count			OUT	NUMBER
286 --				x_msg_data			OUT	VARCHAR2(2000)
287 --				.
288 --	Version	: Current version	1.0
289 --			  Initial version 	1.0
290 --
291 --	Notes		: Note text
292 --
293 -- End of comments
294 ============================================================================*/
295 
296 PROCEDURE send_thnkyou_notif(
297     p_api_version       IN	NUMBER ,
298   	p_init_msg_list		IN	VARCHAR2 := FND_API.G_FALSE	,
299 	p_commit	    	IN  VARCHAR2 := FND_API.G_FALSE	,
300 	p_validation_level	IN  NUMBER	 := FND_API.G_VALID_LEVEL_FULL	,
301 	x_return_status	 OUT NOCOPY VARCHAR2 ,
302 	x_msg_count		 OUT NOCOPY NUMBER ,
303 	x_msg_data		 OUT NOCOPY VARCHAR2 ,
304     p_enrl_request_id   IN  NUMBER
305  );
306 
307 /*============================================================================
308 -- Start of comments
309 --	API name 	: send_welcome_notif
310 --	Type		: Private.
311 --	Function	: This API compiles and sends the Welcome Notification to a
312 --                partner, once the partner user's  enrollment request is
313 --                approved by the approver.
314 --	Pre-reqs	: None.
315 --	Parameters	:
316 --	IN		:	p_api_version          IN NUMBER	Required
317 --				p_init_msg_list        IN VARCHAR2 	Optional
318 --					Default = FND_API.G_FALSE
319 --				p_commit               IN VARCHAR2	Optional
320 --					Default = FND_API.G_FALSE
321 --				p_validation_level     IN NUMBER	Optional
322 --					Default = FND_API.G_VALID_LEVEL_FULL
323 --				p_membership_id        IN NUMBER    Required
324 --
325 --	OUT		:	x_return_status		OUT	VARCHAR2(1)
326 --				x_msg_count			OUT	NUMBER
327 --				x_msg_data			OUT	VARCHAR2(2000)
328 --
329 --	Version	: Current version	1.0
330 --			  Initial version 	1.0
331 --
332 --	Notes		: Note text
333 --
334 -- End of comments
335 ============================================================================*/
336 PROCEDURE send_welcome_notif (
337     p_api_version       IN	NUMBER ,
338   	p_init_msg_list		IN	VARCHAR2 := FND_API.G_FALSE	,
339 	p_commit	    	IN  VARCHAR2 := FND_API.G_FALSE	,
340 	p_validation_level	IN  NUMBER	:= 	FND_API.G_VALID_LEVEL_FULL	,
341 	x_return_status	 OUT NOCOPY VARCHAR2 ,
342 	x_msg_count		 OUT NOCOPY NUMBER ,
343 	x_msg_data		 OUT NOCOPY VARCHAR2 ,
344     p_membership_id     IN  NUMBER
345  );
346 
347 /*============================================================================
348 -- Start of comments
349 --	API name 	: send_rejection_notif
350 --	Type		: Private.
351 --	Function	: This API compiles and sends the rejection notification to a
352 --                partner, once the partner user's enrollment request for a
353 --                partner program is rejected by the approver.
354 --	Pre-reqs	: None.
355 --	Parameters	:
356 --	IN		:	p_api_version          IN NUMBER	Required
357 --				p_init_msg_list        IN VARCHAR2 	Optional
358 --					Default = FND_API.G_FALSE
359 --				p_commit               IN VARCHAR2	Optional
360 --					Default = FND_API.G_FALSE
361 --				p_validation_level     IN NUMBER	Optional
362 --					Default = FND_API.G_VALID_LEVEL_FULL
363 --				p_enrl_request_id      IN NUMBER    Required
364 --
365 --	OUT		:	x_return_status		OUT	VARCHAR2(1)
366 --				x_msg_count			OUT	NUMBER
367 --				x_msg_data			OUT	VARCHAR2(2000)
368 --
369 --	Version	: Current version	1.0
370 --			  Initial version 	1.0
371 --
372 --	Notes		: Note text
373 --
374 -- End of comments
375 ============================================================================*/
376 
377 PROCEDURE send_rejection_notif (
378     p_api_version       IN	NUMBER ,
379   	p_init_msg_list		IN	VARCHAR2 := FND_API.G_FALSE	,
380 	p_commit	    	IN  VARCHAR2 := FND_API.G_FALSE	,
381 	p_validation_level	IN  NUMBER	:= 	FND_API.G_VALID_LEVEL_FULL	,
382 	x_return_status	 OUT NOCOPY VARCHAR2 ,
383 	x_msg_count		 OUT NOCOPY NUMBER ,
384 	x_msg_data		 OUT NOCOPY VARCHAR2 ,
385     p_enrl_request_id   IN  NUMBER
386  );
387 
388 /*============================================================================
389 -- Start of comments
390 --	API name 	: send_cntrct_notrcvd_notif
391 --	Type		: Private.
392 --	Function	: This API compiles and sends the 'Signed Contract is not received'
393 --                notification to a partner, when there signed copy of contract is
394 --                not received by the vendor, which is required for approval the
395 --                enrollment request.
396 --	Pre-reqs	: None.
397 --	Parameters	:
398 --	IN		:	p_api_version          IN NUMBER	Required
399 --				p_init_msg_list        IN VARCHAR2 	Optional
400 --					Default = FND_API.G_FALSE
401 --				p_commit               IN VARCHAR2	Optional
402 --					Default = FND_API.G_FALSE
403 --				p_validation_level     IN NUMBER	Optional
404 --					Default = FND_API.G_VALID_LEVEL_FULL
405 --				p_enrl_request_id      IN NUMBER    Required
406 --
407 --	OUT		:	x_return_status		OUT	VARCHAR2(1)
408 --				x_msg_count			OUT	NUMBER
409 --				x_msg_data			OUT	VARCHAR2(2000)
410 --
411 --	Version	: Current version	1.0
412 --			  Initial version 	1.0
413 --
414 --	Notes		: Note text
415 --
416 -- End of comments
417 ============================================================================*/
418 
419 PROCEDURE send_cntrct_notrcvd_notif (
420     p_api_version       IN	NUMBER ,
421   	p_init_msg_list		IN	VARCHAR2 := FND_API.G_FALSE	,
422 	p_commit	    	IN  VARCHAR2 := FND_API.G_FALSE	,
423 	p_validation_level	IN  NUMBER	:= 	FND_API.G_VALID_LEVEL_FULL	,
424 	x_return_status	 OUT NOCOPY VARCHAR2 ,
425 	x_msg_count		 OUT NOCOPY NUMBER ,
426 	x_msg_data		 OUT NOCOPY VARCHAR2 ,
427     p_enrl_request_id   IN  NUMBER
428  );
429 
430 /*============================================================================
431 -- Start of comments
432 --	API name 	: send_mbrship_exp_notif
433 --	Type		: Private.
434 --	Function	: This API compiles and sends the 'Membership Expiry' Notification
435 --                to a partner, once the partner user's  enrollment is going to
436 --                expire in near future.
437 --	Pre-reqs	: None.
438 --	Parameters	:
439 --	IN		:	p_api_version          IN NUMBER	Required
440 --				p_init_msg_list        IN VARCHAR2 	Optional
441 --					Default = FND_API.G_FALSE
442 --				p_commit               IN VARCHAR2	Optional
443 --					Default = FND_API.G_FALSE
444 --				p_validation_level     IN NUMBER	Optional
445 --					Default = FND_API.G_VALID_LEVEL_FULL
446 --				p_membership_id        IN NUMBER    Required
447 --
448 --	OUT		:	x_return_status		OUT	VARCHAR2(1)
449 --				x_msg_count			OUT	NUMBER
450 --				x_msg_data			OUT	VARCHAR2(2000)
451 --
452 --	Version	: Current version	1.0
453 --			  Initial version 	1.0
454 --
455 --	Notes		: Note text
456 --
457 -- End of comments
458 ============================================================================*/
459  PROCEDURE send_mbrship_exp_notif (
460     p_api_version       IN	NUMBER ,
464 	x_return_status	 OUT NOCOPY VARCHAR2 ,
461   	p_init_msg_list		IN	VARCHAR2 := FND_API.G_FALSE	,
462 	p_commit	    	IN  VARCHAR2 := FND_API.G_FALSE	,
463 	p_validation_level	IN  NUMBER	:= 	FND_API.G_VALID_LEVEL_FULL	,
465 	x_msg_count		 OUT NOCOPY NUMBER ,
466 	x_msg_data		 OUT NOCOPY VARCHAR2 ,
467     p_membership_id     IN  NUMBER
468  );
469 
470  /*============================================================================
471 -- Start of comments
472 --	API name 	: send_membership_chng_notif
473 --	Type		: Private.
474 --	Function	: This API compiles and sends the 'Upgrade Membership level'
475 --                Notification to all the selected partners, from one membership
476 --                level to another within a program.
477 --	Pre-reqs	: None.
478 --	Parameters	:
479 --	IN		:	p_api_version          IN NUMBER	Required
480 --				p_init_msg_list        IN VARCHAR2 	Optional
481 --					Default = FND_API.G_FALSE
482 --				p_commit               IN VARCHAR2	Optional
483 --					Default = FND_API.G_FALSE
484 --				p_validation_level     IN NUMBER	Optional
485 --					Default = FND_API.G_VALID_LEVEL_FULL
486 --				p_mbr_upgrade_rec      IN
487 --                  PV_PG_NOTIF_UTILITY_PVT.mbrship_upg_rec_type    Required
488 --
489 --	OUT		:	x_return_status		OUT	VARCHAR2(1)
490 --				x_msg_count			OUT	NUMBER
491 --				x_msg_data			OUT	VARCHAR2(2000)
492 --				x_notif_id          OUT NUMBER
493 --
494 --	Version	: Current version	1.0
495 --			  Initial version 	1.0
496 --
497 --	Notes		: Note text
498 --
499 -- End of comments
500 ============================================================================*/
501  PROCEDURE send_mbrship_chng_notif (
502     p_api_version       IN	NUMBER ,
503   	p_init_msg_list		IN	VARCHAR2 := FND_API.G_FALSE	,
504 	p_commit	    	IN  VARCHAR2 := FND_API.G_FALSE	,
505 	p_validation_level	IN  NUMBER	:= 	FND_API.G_VALID_LEVEL_FULL	,
506 	x_return_status	 OUT NOCOPY VARCHAR2 ,
507 	x_msg_count		 OUT NOCOPY NUMBER ,
508 	x_msg_data		 OUT NOCOPY VARCHAR2 ,
509     p_mbrship_chng_rec  IN  PV_PG_NOTIF_UTILITY_PVT.mbrship_chng_rec_type
510  );
511 
512 /*============================================================================
513 -- Start of Comments
514 -- PROCEDURE
515 --    send_ini_rmdr_notif
516 --
517 -- PURPOSE
518 --  This procedure send the initial or a reminder notification.
519 --
520 -- Called By
521 -- NOTES
522 -- End of Comments
523 ============================================================================*/
524 PROCEDURE send_ini_rmdr_notif(
525     ITEMTYPE    IN  VARCHAR2,
526     ITEMKEY     IN  VARCHAR2,
527     ACTID 		IN  NUMBER,
528     FUNCMODE    IN  VARCHAR2,
529     RESULTOUT   OUT NOCOPY VARCHAR2
530 ) ;
531 
532 /*============================================================================
533 -- Start of Comments
534 -- PROCEDURE
535 --    check_for_rmdr_notif
536 --
537 -- PURPOSE
538 --  This procedure checks, whether, is there any need to send a reminder notification
539 --
540 -- Called By
541 -- NOTES
542 -- End of Comments
543 ============================================================================*/
544 
545 PROCEDURE check_for_rmdr_notif(
546     ITEMTYPE    IN  VARCHAR2,
547     ITEMKEY     IN  VARCHAR2,
548     ACTID 		IN  NUMBER,
549     FUNCMODE    IN  VARCHAR2,
550     RESULTOUT   OUT NOCOPY VARCHAR2
551 ) ;
552 
553 /*============================================================================
554 -- Start of Comments
555 -- PROCEDURE
556 --    Prtnr_Prgm_Enrl_notif
557 --
558 -- PURPOSE
559 --  This procedure is called from the Concurrent Request program for sending the
560 --  Membership Expiry notification.
561 --
562 -- Called By
563 -- NOTES
564 -- End of Comments
565 ============================================================================*/
566 Procedure Prtnr_Prgm_Enrl_notif(
567         ERRBUF  OUT NOCOPY     varchar2,
568         RETCODE OUT NOCOPY     varchar2);
569 
570 /*============================================================================
571 -- Start of Comments
572 -- PROCEDURE
573 --    Expire_Memberships
574 --
575 -- PURPOSE
576 --  This procedure updates the membership status either to EXPIRE or RENEW based
577 --  on the status criteria.
578 --
579 -- Called By
580 -- NOTES
581 -- End of Comments
582 ============================================================================*/
583 PROCEDURE Expire_Memberships(
584         ERRBUF  OUT NOCOPY     VARCHAR2,
585         RETCODE OUT NOCOPY     VARCHAR2 );
586 
587 
588    --------------------------------------------------------------------------
592    -- PURPOSE
589    -- PROCEDURE
590    --   get_Notification_Body
591    --
593    --   Gets Notification Body in HTML from Workflow.
594    -- IN
595    --   notification_id NUMBER
596    -- OUT
597    --   Notification body in HTML
598    -- USED BY
599    --   Notifications Detail screen from partner portal
600    -- HISTORY
601    --   12/05/2002        sveerave        CREATION
602    --------------------------------------------------------------------------
603 FUNCTION get_Notification_Body(p_notif_id IN  number)
604 RETURN VARCHAR2;
605 
606 
607    --------------------------------------------------------------------------
608    -- PROCEDURE
609    --   set_msg_doc
610    --
611    -- PURPOSE
612    --   Sets Message Document for PL/SQL Document.
613    -- IN -- as per PL/SQL Notification Document stadards
614    --   document_id     IN       VARCHAR2
615    --   display_type    IN       VARCHAR2
616    --
617    -- OUT
618    --   document        IN OUT NOCOPY   VARCHAR2
619    --   document_type   IN OUT NOCOPY   VARCHAR2   -- USED BY
620 
621    -- HISTORY
622    --   08/04/2003        sveerave        CREATION
623    --------------------------------------------------------------------------
624 
625   PROCEDURE set_msg_doc (
626         document_id     IN       VARCHAR2
627       , display_type    IN       VARCHAR2
628       , document        IN OUT NOCOPY   VARCHAR2
629       , document_type   IN OUT NOCOPY   VARCHAR2
630   );
631 
632 PROCEDURE Send_Workflow_Notification
633 (
634    p_api_version_number    IN  NUMBER
635    , p_init_msg_list       IN  VARCHAR2 := FND_API.G_FALSE
636    , p_commit              IN  VARCHAR2 := FND_API.G_FALSE
637    , p_validation_level    IN  NUMBER   := FND_API.G_VALID_LEVEL_FULL
638    , p_context_id          IN  NUMBER   -- context_id ( this could be partner_id, vendor id , depending on who is sending the notifictaion
639    , p_context_code        IN  VARCHAR2 -- who is senting the notification validated against pv_entity_notif_category
640    , p_target_ctgry        IN  VARCHAR  -- to whom the notification be sent 'PARTNER', 'VAD', 'GLOBAL', 'SUBSIDIARY' --validated against pv_entity_notif_category
641    , p_target_ctgry_pt_id  IN  NUMBER   -- pass partner_id of the partner to whom notifiction needs to be sent,
642    , p_notif_event_code    IN  VARCHAR  -- the event due to which this is being called validated against PV_NOTIFICATION_EVENT_TYPE
643    , p_entity_id           IN  NUMBER   -- if the notification is related to program enrollment pass enrl_request_id. else pass corressponfing entity ids depending on what entity you are sending the notification for
644    , p_entity_code         IN  VARCHAR2 -- pass 'ENRQ' for enrollment related, PARTNER for partner related like member type change, INVITE incase of inviations related. validated against PV_ENTITY_TYPE
645    , p_wait_time           IN  NUMBER   -- wait time in days after which the reminder needs to be sent pass zero if no reminder is to be sent
646    , x_return_status       OUT NOCOPY  VARCHAR2
647    , x_msg_count           OUT NOCOPY  NUMBER
648    , x_msg_data            OUT NOCOPY  VARCHAR2
649 );
650 
651 PROCEDURE log_action
652 (
653    itemtype     IN     VARCHAR2
654    , itemkey    IN     VARCHAR2
655    , actid      IN     NUMBER
656    , funcmode   IN     VARCHAR2
657    , resultout  OUT NOCOPY   VARCHAR2
658 );
659 
660 
661 PROCEDURE set_event_code
662 (
663    itemtype  IN     VARCHAR2
664    , itemkey   IN     VARCHAR2
665    , actid     IN     NUMBER
666    , funcmode  IN     VARCHAR2
667    , resultout    OUT NOCOPY   VARCHAR2
668 );
669 
670 
671 PROCEDURE Send_Invitations
672 (
673    p_api_version_number    IN  NUMBER
674    , p_init_msg_list       IN  VARCHAR2 := FND_API.G_FALSE
675    , p_commit              IN  VARCHAR2 := FND_API.G_FALSE
676    , p_validation_level    IN  NUMBER   := FND_API.G_VALID_LEVEL_FULL
677    , p_partner_id          IN  NUMBER
678    , p_invite_header_id    IN  NUMBER
679    , p_from_program_id     IN  NUMBER  DEFAULT NULL
680    , p_notif_event_code    IN  VARCHAR2
681    , p_discount_value      IN  VARCHAR2
682    , p_discount_unit       IN  VARCHAR2
683    , p_currency            IN  VARCHAR2
684    , p_end_date            IN  DATE
685    , x_return_status       OUT NOCOPY  VARCHAR2
686    , x_msg_count           OUT NOCOPY  NUMBER
687    , x_msg_data            OUT NOCOPY  VARCHAR2
688 );
689 
690 
691 END PV_PG_NOTIF_UTILITY_PVT;