DBA Data[Home] [Help]

PACKAGE BODY: APPS.IRC_COMMUNICATIONS_SWI

Source


1 Package Body irc_communications_swi As
2 /* $Header: ircomswi.pkb 120.3.12010000.2 2008/11/13 18:44:06 amikukum ship $ */
3 --
4 -- Package variables
5 --
6 g_package  varchar2(33) := 'irc_communications_swi.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |--------------------------< close_communication >-------------------------|
10 -- ----------------------------------------------------------------------------
11 PROCEDURE close_communication
12   (p_validate                     in     number    default hr_api.g_false_num
13   ,p_effective_date               in     date
14   ,p_communication_property_id    in     number
15   ,p_object_type                  in     varchar2
16   ,p_object_id                    in     number
17   ,p_start_date                   in     date
18   ,p_end_date                     in     date
19   ,p_communication_id             in     number
20   ,p_object_version_number        in out nocopy number
21   ,p_return_status                   out nocopy varchar2
22   ) is
23   --
24   -- Variables for API Boolean parameters
25   l_validate                      boolean;
26   --
27   -- Variables for IN/OUT parameters
28   l_object_version_number         number;
29   --
30   -- Other variables
31   l_proc    varchar2(72) := g_package ||'close_communication';
32 Begin
33   hr_utility.set_location(' Entering:' || l_proc,10);
34   --
35   -- Issue a savepoint
36   --
37   savepoint close_communication_swi;
38   --
39   -- Initialise Multiple Message Detection
40   --
41   hr_multi_message.enable_message_list;
42   --
43   -- Remember IN OUT parameter IN values
44   --
45   l_object_version_number         := p_object_version_number;
46   --
47   -- Convert constant values to their corresponding boolean value
48   --
49   l_validate :=
50     hr_api.constant_to_boolean
51       (p_constant_value => p_validate);
52   --
53   -- Register Surrogate ID or user key values
54   --
55   --
56   -- Call API
57   --
58   irc_communications_api.close_communication
59     (p_validate                     => l_validate
60     ,p_effective_date               => p_effective_date
61     ,p_communication_property_id    => p_communication_property_id
62     ,p_object_type                  => p_object_type
63     ,p_object_id                    => p_object_id
64     ,p_start_date                   => p_start_date
65     ,p_end_date                     => p_end_date
66     ,p_communication_id             => p_communication_id
67     ,p_object_version_number        => p_object_version_number
68     );
69   --
70   -- Convert API warning boolean parameter values to specific
71   -- messages and add them to Multiple Message List
72   --
73   --
74   -- Convert API non-warning boolean parameter values
75   --
76   --
77   -- Derive the API return status value based on whether
78   -- messages of any type exist in the Multiple Message List.
79   -- Also disable Multiple Message Detection.
80   --
81   p_return_status := hr_multi_message.get_return_status_disable;
82   hr_utility.set_location(' Leaving:' || l_proc,20);
83   --
84 exception
85   when hr_multi_message.error_message_exist then
86     --
87     -- Catch the Multiple Message List exception which
88     -- indicates API processing has been aborted because
89     -- at least one message exists in the list.
90     --
91     rollback to close_communication_swi;
92     --
93     -- Reset IN OUT parameters and set OUT parameters
94     --
95     p_object_version_number        := l_object_version_number;
96     p_return_status := hr_multi_message.get_return_status_disable;
97     hr_utility.set_location(' Leaving:' || l_proc, 30);
98   when others then
99     --
100     -- When Multiple Message Detection is enabled catch
101 
102     -- any Application specific or other unexpected
103     -- exceptions.  Adding appropriate details to the
104     -- Multiple Message List.  Otherwise re-raise the
105     -- error.
106     --
107     rollback to close_communication_swi;
108     if hr_multi_message.unexpected_error_add(l_proc) then
109        hr_utility.set_location(' Leaving:' || l_proc,40);
110        raise;
111     end if;
112     --
113     -- Reset IN OUT and set OUT parameters
114     --
115     p_object_version_number        := l_object_version_number;
116     p_return_status := hr_multi_message.get_return_status_disable;
117     hr_utility.set_location(' Leaving:' || l_proc,50);
118 end close_communication;
119 --
120 -- ----------------------------------------------------------------------------
121 -- |--------------------------< update_communication >-------------------------|
122 -- ----------------------------------------------------------------------------
123 PROCEDURE update_communication
124   (p_validate                     in     number    default hr_api.g_false_num
125   ,p_effective_date               in     date
126   ,p_communication_property_id    in     number
127   ,p_object_type                  in     varchar2
128   ,p_object_id                    in     number
129   ,p_status                       in     varchar2
130   ,p_start_date                   in     date
131   ,p_end_date                     in     date
132   ,p_communication_id             in     number
133   ,p_object_version_number        in out nocopy number
134   ,p_return_status                   out nocopy varchar2
135   ) is
136   --
137   -- Variables for API Boolean parameters
138   l_validate                      boolean;
139   --
140   -- Variables for IN/OUT parameters
141   l_object_version_number         number;
142   --
143   -- Other variables
144   l_proc    varchar2(72) := g_package ||'update_communication';
145 Begin
146   --hr_utility.trace_on(null,'gaukumar');
147   hr_utility.set_location(' Entering:' || l_proc,10);
148   --
149   -- Issue a savepoint
150   --
151   savepoint update_communication_swi;
152   --
153   -- Initialise Multiple Message Detection
154   --
155   hr_multi_message.enable_message_list;
156   --
157   -- Remember IN OUT parameter IN values
158   --
159   l_object_version_number         := p_object_version_number;
160   --
161   -- Convert constant values to their corresponding boolean value
162   --
163   l_validate :=
164     hr_api.constant_to_boolean
165       (p_constant_value => p_validate);
166   --
167   -- Register Surrogate ID or user key values
168   --
169   --
170   -- Call API
171   --
172   irc_communications_api.update_communication
173     (p_validate                     => l_validate
174     ,p_effective_date               => p_effective_date
175     ,p_communication_property_id    => p_communication_property_id
176     ,p_object_type                  => p_object_type
177     ,p_object_id                    => p_object_id
178     ,p_status                       => p_status
179     ,p_start_date                   => p_start_date
180     ,p_end_date                     => p_end_date
181     ,p_communication_id             => p_communication_id
182     ,p_object_version_number        => l_object_version_number
183     );
184   --
185   -- Convert API warning boolean parameter values to specific
186   -- messages and add them to Multiple Message List
187   --
188   --
189   -- Convert API non-warning boolean parameter values
190   --
191   --
192   -- Derive the API return status value based on whether
193   -- messages of any type exist in the Multiple Message List.
194   -- Also disable Multiple Message Detection.
195   --
196   p_return_status := hr_multi_message.get_return_status_disable;
197   p_object_version_number := l_object_version_number;
198   hr_utility.set_location(' Leaving:' || l_proc,20);
199   hr_utility.set_location(' Leaving: and status ='||p_return_status ,120);
200   --hr_utility.trace_off;
201   --
202 exception
203   when hr_multi_message.error_message_exist then
204     --
205     -- Catch the Multiple Message List exception which
206     -- indicates API processing has been aborted because
207     -- at least one message exists in the list.
208     --
209     rollback to update_communication_swi;
210     --
211     -- Reset IN OUT parameters and set OUT parameters
212     --
213     p_return_status := hr_multi_message.get_return_status_disable;
214     hr_utility.set_location(' Leaving:' || l_proc, 30);
215     hr_utility.set_location(' Leaving: and status ='||p_return_status ,121);
216     --hr_utility.trace_off;
217   when others then
218     --
219     -- When Multiple Message Detection is enabled catch
220     -- any Application specific or other unexpected
221     -- exceptions.  Adding appropriate details to the
222     -- Multiple Message List.  Otherwise re-raise the
223     -- error.
224     --
225     rollback to update_communication_swi;
226     if hr_multi_message.unexpected_error_add(l_proc) then
227        hr_utility.set_location(' Leaving:' || l_proc,40);
228        raise;
229     end if;
230     --
231     -- Reset IN OUT and set OUT parameters
232     --
233     p_return_status := hr_multi_message.get_return_status_disable;
234     hr_utility.set_location(' Leaving:' || l_proc,50);
235     hr_utility.set_location(' Leaving: and status ='||p_return_status ,122);
236     --hr_utility.trace_off;
237 end update_communication;
238 -- ----------------------------------------------------------------------------
239 -- |------------------------< define_comm_properties >------------------------|
240 -- ----------------------------------------------------------------------------
241 PROCEDURE define_comm_properties
242   (p_validate                     in     number    default hr_api.g_false_num
243   ,p_effective_date               in     date
244   ,p_object_type                  in     varchar2
245   ,p_object_id                    in     number
246   ,p_default_comm_status          in     varchar2
247   ,p_allow_attachment_flag        in     varchar2
248   ,p_auto_notification_flag       in     varchar2
249   ,p_allow_add_recipients         in     varchar2
250   ,p_default_moderator            in     varchar2
251   ,p_attribute_category           in     varchar2  default hr_api.g_varchar2
252   ,p_attribute1                   in     varchar2  default hr_api.g_varchar2
253   ,p_attribute2                   in     varchar2  default hr_api.g_varchar2
254   ,p_attribute3                   in     varchar2  default hr_api.g_varchar2
255   ,p_attribute4                   in     varchar2  default hr_api.g_varchar2
256   ,p_attribute5                   in     varchar2  default hr_api.g_varchar2
257   ,p_attribute6                   in     varchar2  default hr_api.g_varchar2
258   ,p_attribute7                   in     varchar2  default hr_api.g_varchar2
259   ,p_attribute8                   in     varchar2  default hr_api.g_varchar2
260   ,p_attribute9                   in     varchar2  default hr_api.g_varchar2
261   ,p_attribute10                  in     varchar2  default hr_api.g_varchar2
262   ,p_information_category         in     varchar2  default hr_api.g_varchar2
263   ,p_information1                 in     varchar2  default hr_api.g_varchar2
264   ,p_information2                 in     varchar2  default hr_api.g_varchar2
265   ,p_information3                 in     varchar2  default hr_api.g_varchar2
266   ,p_information4                 in     varchar2  default hr_api.g_varchar2
267   ,p_information5                 in     varchar2  default hr_api.g_varchar2
268   ,p_information6                 in     varchar2  default hr_api.g_varchar2
269   ,p_information7                 in     varchar2  default hr_api.g_varchar2
270   ,p_information8                 in     varchar2  default hr_api.g_varchar2
271   ,p_information9                 in     varchar2  default hr_api.g_varchar2
272   ,p_information10                in     varchar2  default hr_api.g_varchar2
273   ,p_communication_property_id    in     number
274   ,p_object_version_number           out nocopy number
275   ,p_return_status                   out nocopy varchar2
276   ) is
277   --
278   -- Variables for API Boolean parameters
279   l_validate                      boolean;
280   l_communication_property_id     number;
281   --
282   -- Variables for IN/OUT parameters
283   --
284   -- Other variables
285   l_proc    varchar2(72) := g_package ||'define_comm_properties';
286 Begin
287   hr_utility.set_location(' Entering:' || l_proc,10);
288   --
289   -- Issue a savepoint
290   --
291   savepoint define_comm_properties_swi;
292   --
293   -- Initialise Multiple Message Detection
294   --
295   hr_multi_message.enable_message_list;
296   --
297   -- Remember IN OUT parameter IN values
298   --
299   --
300   -- Convert constant values to their corresponding boolean value
301   --
302   l_validate :=
303     hr_api.constant_to_boolean
304       (p_constant_value => p_validate);
305   --
306   -- Register Surrogate ID or user key values
307   --
308   irc_cmp_ins.set_base_key_value
309     (p_communication_property_id => p_communication_property_id
310     );
311   --
312   -- Call API
313   --
314   irc_communications_api.define_comm_properties
315     (p_validate                     => l_validate
316     ,p_effective_date               => p_effective_date
317     ,p_object_type                  => p_object_type
318     ,p_object_id                    => p_object_id
319     ,p_default_comm_status          => p_default_comm_status
320     ,p_allow_attachment_flag        => p_allow_attachment_flag
321     ,p_auto_notification_flag       => p_auto_notification_flag
322     ,p_allow_add_recipients         => p_allow_add_recipients
323     ,p_default_moderator            => p_default_moderator
324     ,p_attribute_category           => p_attribute_category
325     ,p_attribute1                   => p_attribute1
326     ,p_attribute2                   => p_attribute2
327     ,p_attribute3                   => p_attribute3
328     ,p_attribute4                   => p_attribute4
329     ,p_attribute5                   => p_attribute5
330     ,p_attribute6                   => p_attribute6
331     ,p_attribute7                   => p_attribute7
332     ,p_attribute8                   => p_attribute8
333     ,p_attribute9                   => p_attribute9
334     ,p_attribute10                  => p_attribute10
335     ,p_information_category         => p_information_category
336     ,p_information1                 => p_information1
337     ,p_information2                 => p_information2
338     ,p_information3                 => p_information3
339     ,p_information4                 => p_information4
340     ,p_information5                 => p_information5
341     ,p_information6                 => p_information6
342     ,p_information7                 => p_information7
343     ,p_information8                 => p_information8
344     ,p_information9                 => p_information9
345     ,p_information10                => p_information10
346     ,p_communication_property_id    => l_communication_property_id
347     ,p_object_version_number        => p_object_version_number
348     );
349   --
350   -- Convert API warning boolean parameter values to specific
351   -- messages and add them to Multiple Message List
352   --
353   --
354   -- Convert API non-warning boolean parameter values
355   --
356   --
357   -- Derive the API return status value based on whether
358   -- messages of any type exist in the Multiple Message List.
359   -- Also disable Multiple Message Detection.
360   --
361   p_return_status := hr_multi_message.get_return_status_disable;
362   hr_utility.set_location(' Leaving:' || l_proc,20);
363   --
364 exception
365   when hr_multi_message.error_message_exist then
366     --
367     -- Catch the Multiple Message List exception which
368     -- indicates API processing has been aborted because
369     -- at least one message exists in the list.
370     --
371     rollback to define_comm_properties_swi;
372     --
373     -- Reset IN OUT parameters and set OUT parameters
374     --
375     p_object_version_number        := null;
376     p_return_status := hr_multi_message.get_return_status_disable;
377     hr_utility.set_location(' Leaving:' || l_proc, 30);
378   when others then
379     --
380     -- When Multiple Message Detection is enabled catch
381     -- any Application specific or other unexpected
382     -- exceptions.  Adding appropriate details to the
383     -- Multiple Message List.  Otherwise re-raise the
384     -- error.
385     --
386     rollback to define_comm_properties_swi;
387     if hr_multi_message.unexpected_error_add(l_proc) then
388        hr_utility.set_location(' Leaving:' || l_proc,40);
389        raise;
390     end if;
391     --
392     -- Reset IN OUT and set OUT parameters
393     --
394     p_object_version_number        := null;
395     p_return_status := hr_multi_message.get_return_status_disable;
396     hr_utility.set_location(' Leaving:' || l_proc,50);
397 end define_comm_properties;
398 -- ----------------------------------------------------------------------------
399 -- |--------------------------< create_communication >-------------------------|
400 -- ----------------------------------------------------------------------------
401 PROCEDURE create_communication
402   (p_validate                     in     number    default hr_api.g_false_num
403   ,p_effective_date               in     date
404   ,p_communication_property_id    in     number
405   ,p_object_type                  in     varchar2
406   ,p_object_id                    in     number
407   ,p_status                       in     varchar2
408   ,p_start_date                   in     date
409   ,p_communication_id             in     number
410   ,p_object_version_number           out nocopy number
411   ,p_return_status                   out nocopy varchar2
412   ) is
413   --
414   -- Variables for API Boolean parameters
415   l_validate                      boolean;
416   l_communication_id              number;
417   --
418   -- Variables for IN/OUT parameters
419   --
420   -- Other variables
421   l_proc    varchar2(72) := g_package ||'create_communication';
422 Begin
423   hr_utility.set_location(' Entering:' || l_proc,10);
424   --
425   -- Issue a savepoint
426   --
427   savepoint create_communication_swi;
428   --
429   -- Initialise Multiple Message Detection
430   --
431   hr_multi_message.enable_message_list;
432   --
433   -- Remember IN OUT parameter IN values
434   --
435   --
436   -- Convert constant values to their corresponding boolean value
437   --
438   l_validate :=
439     hr_api.constant_to_boolean
440       (p_constant_value => p_validate);
441   --
442   -- Register Surrogate ID or user key values
443   --
444     irc_cmc_ins.set_base_key_value
445     (p_communication_id => p_communication_id
446     );
447   --
448   -- Call API
449   --
450   irc_communications_api.create_communication
451     (p_validate                     => l_validate
452     ,p_effective_date               => p_effective_date
453     ,p_communication_property_id    => p_communication_property_id
454     ,p_object_type                  => p_object_type
455     ,p_object_id                    => p_object_id
456     ,p_status                       => p_status
457     ,p_start_date                   => p_start_date
458     ,p_object_version_number        => p_object_version_number
459     ,p_communication_id             => l_communication_id
460     );
461   --
462   -- Convert API warning boolean parameter values to specific
463   -- messages and add them to Multiple Message List
464   --
465   --
466   -- Convert API non-warning boolean parameter values
467   --
468   --
469   -- Derive the API return status value based on whether
470   -- messages of any type exist in the Multiple Message List.
471   -- Also disable Multiple Message Detection.
472   --
473   p_return_status := hr_multi_message.get_return_status_disable;
474   hr_utility.set_location(' Leaving:' || l_proc,20);
475   --
476 exception
477   when hr_multi_message.error_message_exist then
478     --
479     -- Catch the Multiple Message List exception which
480     -- indicates API processing has been aborted because
481     -- at least one message exists in the list.
482     --
483     rollback to create_communication_swi;
484     --
485     -- Reset IN OUT parameters and set OUT parameters
486     --
487     p_object_version_number        := null;
488     p_return_status := hr_multi_message.get_return_status_disable;
489     hr_utility.set_location(' Leaving:' || l_proc, 30);
490   when others then
491     --
492     -- When Multiple Message Detection is enabled catch
493     -- any Application specific or other unexpected
494     -- exceptions.  Adding appropriate details to the
495     -- Multiple Message List.  Otherwise re-raise the
496     -- error.
497     --
498     rollback to create_communication_swi;
499     if hr_multi_message.unexpected_error_add(l_proc) then
500        hr_utility.set_location(' Leaving:' || l_proc,40);
501        raise;
502     end if;
503     --
504     -- Reset IN OUT and set OUT parameters
505     --
506     p_object_version_number        := null;
507     p_return_status := hr_multi_message.get_return_status_disable;
508     hr_utility.set_location(' Leaving:' || l_proc,50);
509 end create_communication;
510 -- ----------------------------------------------------------------------------
511 -- |------------------------< update_comm_properties >------------------------|
512 -- ----------------------------------------------------------------------------
513 PROCEDURE update_comm_properties
514   (p_validate                     in     number    default hr_api.g_false_num
515   ,p_effective_date               in     date
516   ,p_object_type                  in     varchar2
517   ,p_object_id                    in     number
518   ,p_default_comm_status          in     varchar2
519   ,p_allow_attachment_flag        in     varchar2
520   ,p_auto_notification_flag       in     varchar2
521   ,p_allow_add_recipients         in     varchar2
522   ,p_default_moderator            in     varchar2
523   ,p_attribute_category           in     varchar2  default hr_api.g_varchar2
524   ,p_attribute1                   in     varchar2  default hr_api.g_varchar2
525   ,p_attribute2                   in     varchar2  default hr_api.g_varchar2
526   ,p_attribute3                   in     varchar2  default hr_api.g_varchar2
527   ,p_attribute4                   in     varchar2  default hr_api.g_varchar2
528   ,p_attribute5                   in     varchar2  default hr_api.g_varchar2
529   ,p_attribute6                   in     varchar2  default hr_api.g_varchar2
530   ,p_attribute7                   in     varchar2  default hr_api.g_varchar2
531   ,p_attribute8                   in     varchar2  default hr_api.g_varchar2
532   ,p_attribute9                   in     varchar2  default hr_api.g_varchar2
533   ,p_attribute10                  in     varchar2  default hr_api.g_varchar2
534   ,p_information_category         in     varchar2  default hr_api.g_varchar2
535   ,p_information1                 in     varchar2  default hr_api.g_varchar2
536   ,p_information2                 in     varchar2  default hr_api.g_varchar2
537   ,p_information3                 in     varchar2  default hr_api.g_varchar2
538   ,p_information4                 in     varchar2  default hr_api.g_varchar2
539   ,p_information5                 in     varchar2  default hr_api.g_varchar2
540   ,p_information6                 in     varchar2  default hr_api.g_varchar2
541   ,p_information7                 in     varchar2  default hr_api.g_varchar2
542   ,p_information8                 in     varchar2  default hr_api.g_varchar2
543   ,p_information9                 in     varchar2  default hr_api.g_varchar2
544   ,p_information10                in     varchar2  default hr_api.g_varchar2
545   ,p_communication_property_id    in     number
546   ,p_object_version_number        in out nocopy number
547   ,p_return_status                   out nocopy varchar2
548   ) is
549   --
550   -- Variables for API Boolean parameters
551   l_validate                      boolean;
552   l_object_version_number         number := p_object_version_number;
553   --
554   -- Variables for IN/OUT parameters
555   --
556   -- Other variables
557   l_proc    varchar2(72) := g_package ||'update_comm_properties';
558 Begin
559   hr_utility.set_location(' Entering:' || l_proc,10);
560   --
561   -- Issue a savepoint
562   --
563   savepoint UPDATE_COMM_PROPERTIES_SWI;
564   --
565   -- Initialise Multiple Message Detection
566   --
567   hr_multi_message.enable_message_list;
568   --
569   -- Remember IN OUT parameter IN values
570   --
571   --
572   -- Convert constant values to their corresponding boolean value
573   --
574   l_validate :=
575     hr_api.constant_to_boolean
576       (p_constant_value => p_validate);
577   --
578   -- Register Surrogate ID or user key values
579   --
580   --
581   -- Call API
582   --
583   irc_communications_api.update_comm_properties
584     (p_validate                     => l_validate
585     ,p_effective_date               => p_effective_date
586     ,p_object_type                  => p_object_type
587     ,p_object_id                    => p_object_id
588     ,p_default_comm_status          => p_default_comm_status
589     ,p_allow_attachment_flag        => p_allow_attachment_flag
590     ,p_auto_notification_flag       => p_auto_notification_flag
591     ,p_allow_add_recipients         => p_allow_add_recipients
592     ,p_default_moderator            => p_default_moderator
593     ,p_attribute_category           => p_attribute_category
594     ,p_attribute1                   => p_attribute1
595     ,p_attribute2                   => p_attribute2
596     ,p_attribute3                   => p_attribute3
597     ,p_attribute4                   => p_attribute4
598     ,p_attribute5                   => p_attribute5
599     ,p_attribute6                   => p_attribute6
600     ,p_attribute7                   => p_attribute7
601     ,p_attribute8                   => p_attribute8
602     ,p_attribute9                   => p_attribute9
603     ,p_attribute10                  => p_attribute10
604     ,p_information_category         => p_information_category
605     ,p_information1                 => p_information1
606     ,p_information2                 => p_information2
607     ,p_information3                 => p_information3
608     ,p_information4                 => p_information4
609     ,p_information5                 => p_information5
610     ,p_information6                 => p_information6
611     ,p_information7                 => p_information7
612     ,p_information8                 => p_information8
613     ,p_information9                 => p_information9
614     ,p_information10                => p_information10
615     ,p_communication_property_id    => p_communication_property_id
616     ,p_object_version_number        => l_object_version_number
617     );
618   --
619   -- Convert API warning boolean parameter values to specific
620   -- messages and add them to Multiple Message List
621   --
622   --
623   -- Convert API non-warning boolean parameter values
624   --
625   --
626   -- Derive the API return status value based on whether
627   -- messages of any type exist in the Multiple Message List.
628   -- Also disable Multiple Message Detection.
629   --
630   p_return_status := hr_multi_message.get_return_status_disable;
631   p_object_version_number := l_object_version_number;
632   hr_utility.set_location(' Leaving:' || l_proc,20);
633   --
634 exception
635   when hr_multi_message.error_message_exist then
636     --
637     -- Catch the Multiple Message List exception which
638     -- indicates API processing has been aborted because
639     -- at least one message exists in the list.
640     --
641     rollback to update_comm_properties_swi;
642     --
643     -- Reset IN OUT parameters and set OUT parameters
644     --
645     p_return_status := hr_multi_message.get_return_status_disable;
646     hr_utility.set_location(' Leaving:' || l_proc, 30);
647   when others then
648     --
649     -- When Multiple Message Detection is enabled catch
650     -- any Application specific or other unexpected
651     -- exceptions.  Adding appropriate details to the
652     -- Multiple Message List.  Otherwise re-raise the
653     -- error.
654     --
655     rollback to update_comm_properties_swi;
656     if hr_multi_message.unexpected_error_add(l_proc) then
657        hr_utility.set_location(' Leaving:' || l_proc,40);
658        raise;
659     end if;
660     --
661     -- Reset IN OUT and set OUT parameters
662     --
663     p_return_status := hr_multi_message.get_return_status_disable;
664     hr_utility.set_location(' Leaving:' || l_proc,50);
665 end update_comm_properties;
666 -- ----------------------------------------------------------------------------
667 -- |------------------------< delete_comm_properties >-------------------------|
668 -- ----------------------------------------------------------------------------
669 PROCEDURE delete_comm_properties
670   (p_validate                     in     number    default hr_api.g_false_num
671   ,p_object_version_number        in     number
672   ,p_communication_property_id    in     number
673   ,p_effective_date               in     date      default hr_api.g_date
674   ,p_return_status                   out nocopy varchar2
675   ) is
676   --
677   -- Variables for API Boolean parameters
678   l_validate                      boolean;
679   --
680   -- Variables for IN/OUT parameters
681   --
682   -- Other variables
683   l_proc    varchar2(72) := g_package ||'delete_comm_properties';
684 Begin
685   hr_utility.set_location(' Entering:' || l_proc,10);
686   --
687   -- Issue a savepoint
688   --
689   savepoint delete_comm_properties_swi;
690   --
691   -- Initialise Multiple Message Detection
692   --
693   hr_multi_message.enable_message_list;
694   --
695   -- Remember IN OUT parameter IN values
696   --
697   --
698   -- Convert constant values to their corresponding boolean value
699   --
700   l_validate :=
701     hr_api.constant_to_boolean
702       (p_constant_value => p_validate);
703   --
704   -- Register Surrogate ID or user key values
705   --
706   --
707   -- Call API
708   --
709   irc_communications_api.delete_comm_properties
710     (p_validate                     => l_validate
711     ,p_object_version_number        => p_object_version_number
712     ,p_communication_property_id    => p_communication_property_id
713     ,p_effective_date               => p_effective_date
714     );
715   --
716   -- Convert API warning boolean parameter values to specific
717   -- messages and add them to Multiple Message List
718   --
719   --
720   -- Convert API non-warning boolean parameter values
721   --
722   --
723   -- Derive the API return status value based on whether
724   -- messages of any type exist in the Multiple Message List.
725   -- Also disable Multiple Message Detection.
726   --
727   p_return_status := hr_multi_message.get_return_status_disable;
728   hr_utility.set_location(' Leaving:' || l_proc,20);
729   --
730 exception
731   when hr_multi_message.error_message_exist then
732     --
733     -- Catch the Multiple Message List exception which
734     -- indicates API processing has been aborted because
735     -- at least one message exists in the list.
736     --
737     rollback to delete_comm_properties_swi;
738     --
739     -- Reset IN OUT parameters and set OUT parameters
740     --
741     p_return_status := hr_multi_message.get_return_status_disable;
742     hr_utility.set_location(' Leaving:' || l_proc, 30);
743   when others then
744     --
745     -- When Multiple Message Detection is enabled catch
746     -- any Application specific or other unexpected
747     -- exceptions.  Adding appropriate details to the
748     -- Multiple Message List.  Otherwise re-raise the
749     -- error.
750     --
751     rollback to delete_comm_properties_swi;
752     if hr_multi_message.unexpected_error_add(l_proc) then
753        hr_utility.set_location(' Leaving:' || l_proc,40);
754        raise;
755     end if;
756     --
757     -- Reset IN OUT and set OUT parameters
758     --
759     p_return_status := hr_multi_message.get_return_status_disable;
760     hr_utility.set_location(' Leaving:' || l_proc,50);
761 end delete_comm_properties;
762 --
763 --
764 -- ----------------------------------------------------------------------------
765 -- |----------------------------< create_comm_topic >------------------------------|
766 -- ----------------------------------------------------------------------------
767 --
768 procedure create_comm_topic
769   (p_validate                     in     number    default hr_api.g_false_num
770   ,p_effective_date               in     date
771   ,p_communication_id             in     number
772   ,p_subject                      in     varchar2
773   ,p_status                       in     varchar2
774   ,p_communication_topic_id       in     number
775   ,p_object_version_number        out    nocopy number
776   ,p_return_status                out    nocopy varchar2
777   ) is
778   --
779   -- Variables for API Boolean parameters
780   l_validate                      boolean;
781   l_communication_topic_id     number;
782   --
783   -- Variables for IN/OUT parameters
784   --
785   -- Other variables
786   l_proc    varchar2(72) := g_package ||'create_comm_topic';
787 Begin
788   hr_utility.set_location(' Entering:' || l_proc,10);
789   --
790   -- Issue a savepoint
791   --
792   savepoint CREATE_COMM_TOPIC;
793   --
794   -- Initialise Multiple Message Detection
795   --
796   hr_multi_message.enable_message_list;
797   --
798   -- Remember IN OUT parameter IN values
799   --
800   --
801   -- Convert constant values to their corresponding boolean value
802   --
803   l_validate :=
804     hr_api.constant_to_boolean
805       (p_constant_value => p_validate);
806   --
807   -- Register Surrogate ID or user key values
808   --
809   irc_cmt_ins.set_base_key_value
810     (p_communication_topic_id => p_communication_topic_id
811     );
812   --
813   -- Call API
814   --
815   irc_communications_api.create_comm_topic
816    (p_validate                => l_validate
817    ,p_effective_date          => p_effective_date
818    ,p_communication_id        => p_communication_id
819    ,p_subject                 => p_subject
820    ,p_status                  => p_status
821    ,p_communication_topic_id  => l_communication_topic_id
822    ,p_object_version_number   => p_object_version_number
823     );
824   --
825   -- Convert API warning boolean parameter values to specific
826   -- messages and add them to Multiple Message List
827   --
828   --
829   -- Convert API non-warning boolean parameter values
830   --
831   --
832   -- Derive the API return status value based on whether
833   -- messages of any type exist in the Multiple Message List.
834   -- Also disable Multiple Message Detection.
835   --
836   p_return_status := hr_multi_message.get_return_status_disable;
837   hr_utility.set_location(' Leaving:' || l_proc,20);
838   --
839 exception
840   when hr_multi_message.error_message_exist then
841     --
842     -- Catch the Multiple Message List exception which
843     -- indicates API processing has been aborted because
844     -- at least one message exists in the list.
845     --
846     rollback to CREATE_COMM_TOPIC;
847     --
848     -- Reset IN OUT parameters and set OUT parameters
849     --
850     p_object_version_number        := null;
851     p_return_status := hr_multi_message.get_return_status_disable;
852     hr_utility.set_location(' Leaving:' || l_proc, 30);
853   when others then
854     --
855     -- When Multiple Message Detection is enabled catch
856     -- any Application specific or other unexpected
857     -- exceptions.  Adding appropriate details to the
858     -- Multiple Message List.  Otherwise re-raise the
859     -- error.
860     --
861     rollback to CREATE_COMM_TOPIC;
862     if hr_multi_message.unexpected_error_add(l_proc) then
863        hr_utility.set_location(' Leaving:' || l_proc,40);
864        raise;
865     end if;
866     --
867     -- Reset IN OUT and set OUT parameters
868     --
869     p_object_version_number        := null;
870     p_return_status := hr_multi_message.get_return_status_disable;
871     hr_utility.set_location(' Leaving:' || l_proc,50);
872 end create_comm_topic;
873 --
874 -- ----------------------------------------------------------------------------
875 -- |----------------------------< CREATE_MESSAGE >-----------------------------|
876 -- ----------------------------------------------------------------------------
877 --
878 procedure create_message
879   (p_validate                     in     number    default hr_api.g_false_num
880   ,p_effective_date               in     date
881   ,p_communication_topic_id       in     number
882   ,p_parent_id                    in     number    default hr_api.g_number
883   ,p_message_subject              in     varchar2  default hr_api.g_varchar2
884   ,p_message_post_date            in     date
885   ,p_sender_type                  in     varchar2
886   ,p_sender_id                    in     number
887   ,p_message_body                 in     varchar2  default hr_api.g_varchar2
888   ,p_document_type                in     varchar2  default hr_api.g_varchar2
889   ,p_document_id                  in     number    default hr_api.g_number
890   ,p_deleted_flag                 in     varchar2  default hr_api.g_varchar2
891   ,p_communication_message_id     in     number
892   ,p_object_version_number        out    nocopy number
893   ,p_return_status                out    nocopy varchar2
894   ) is
895   --
896   -- Variables for API Boolean parameters
897   l_validate                      boolean;
898   l_communication_message_id     number;
899   --
900   -- Variables for IN/OUT parameters
901   --
902   -- Other variables
903   l_proc    varchar2(72) := g_package ||'create_message';
904 Begin
905   hr_utility.set_location(' Entering:' || l_proc,10);
906   --
907   -- Issue a savepoint
908   --
909   savepoint CREATE_MESSAGE;
910   --
911   -- Initialise Multiple Message Detection
912   --
913   hr_multi_message.enable_message_list;
914   --
915   -- Remember IN OUT parameter IN values
916   --
917   --
918   -- Convert constant values to their corresponding boolean value
919   --
920   l_validate :=
921     hr_api.constant_to_boolean
922       (p_constant_value => p_validate);
923   --
924   -- Register Surrogate ID or user key values
925   --
926   irc_cmm_ins.set_base_key_value
927     (p_communication_message_id => p_communication_message_id
928     );
929   --
930   -- Call API
931   --
932   irc_communications_api.create_message
933   (p_validate                     => l_validate
934   ,p_effective_date               => p_effective_date
935   ,p_communication_topic_id       => p_communication_topic_id
936   ,p_parent_id                    => p_parent_id
937   ,p_message_subject              => p_message_subject
938   ,p_message_post_date            => p_message_post_date
939   ,p_sender_type                  => p_sender_type
940   ,p_sender_id                    => p_sender_id
941   ,p_message_body                 => p_message_body
942   ,p_document_type                => p_document_type
943   ,p_document_id                  => p_document_id
944   ,p_deleted_flag                 => p_deleted_flag
945   ,p_communication_message_id     => l_communication_message_id
946   ,p_object_version_number        => p_object_version_number
947   );
948   --
949   -- Convert API warning boolean parameter values to specific
950   -- messages and add them to Multiple Message List
951   --
952   --
953   -- Convert API non-warning boolean parameter values
954   --
955   --
956   -- Derive the API return status value based on whether
957   -- messages of any type exist in the Multiple Message List.
958   -- Also disable Multiple Message Detection.
959   --
960   p_return_status := hr_multi_message.get_return_status_disable;
961   hr_utility.set_location(' Leaving:' || l_proc,20);
962   --
963 exception
964   when hr_multi_message.error_message_exist then
965     --
966     -- Catch the Multiple Message List exception which
967     -- indicates API processing has been aborted because
968     -- at least one message exists in the list.
969     --
970     rollback to CREATE_MESSAGE;
971     --
972     -- Reset IN OUT parameters and set OUT parameters
973     --
974     p_object_version_number        := null;
975     p_return_status := hr_multi_message.get_return_status_disable;
976     hr_utility.set_location(' Leaving:' || l_proc, 30);
977   when others then
978     --
979     -- When Multiple Message Detection is enabled catch
980     -- any Application specific or other unexpected
981     -- exceptions.  Adding appropriate details to the
982     -- Multiple Message List.  Otherwise re-raise the
983     -- error.
984     --
985     rollback to CREATE_MESSAGE;
986     if hr_multi_message.unexpected_error_add(l_proc) then
987        hr_utility.set_location(' Leaving:' || l_proc,40);
988        raise;
989     end if;
990     --
991     -- Reset IN OUT and set OUT parameters
992     --
993     p_object_version_number        := null;
994     p_return_status := hr_multi_message.get_return_status_disable;
995     hr_utility.set_location(' Leaving:' || l_proc,50);
996 end create_message;
997 --
998 -- ----------------------------------------------------------------------------
999 -- |----------------------------< UPDATE_MESSAGE >----------------------------|
1000 -- ----------------------------------------------------------------------------
1001 --
1002 procedure update_message
1003   (p_validate                     in     number    default hr_api.g_false_num
1004   ,p_effective_date               in     date
1005   ,p_deleted_flag                 in     varchar2  default hr_api.g_varchar2
1006   ,p_communication_message_id     in     number
1007   ,p_object_version_number        in out nocopy number
1008   ,p_return_status                out    nocopy varchar2
1009   ) is
1010   --
1011   -- Variables for API Boolean parameters
1012   l_validate                      boolean;
1013   l_object_version_number     number;
1014   --
1015   -- Variables for IN/OUT parameters
1016   --
1017   -- Other variables
1018   l_proc    varchar2(72) := g_package ||'update_message';
1019 Begin
1020   hr_utility.set_location(' Entering:' || l_proc,10);
1021   --
1022   -- Issue a savepoint
1023   --
1024   savepoint UPDATE_MESSAGE;
1025   --
1026   -- Initialise Multiple Message Detection
1027   --
1028   hr_multi_message.enable_message_list;
1029   --
1030   -- Remember IN OUT parameter IN values
1031   --
1032   --
1033   -- Convert constant values to their corresponding boolean value
1034   --
1035   l_validate :=
1036     hr_api.constant_to_boolean
1037       (p_constant_value => p_validate);
1038   l_object_version_number := p_object_version_number;
1039   --
1040   -- Call API
1041   --
1042   irc_communications_api.update_message
1043   (p_validate                     => l_validate
1044   ,p_effective_date               => p_effective_date
1045   ,p_deleted_flag                 => p_deleted_flag
1046   ,p_communication_message_id     => p_communication_message_id
1047   ,p_object_version_number        => l_object_version_number
1048   );
1049   --
1050   -- Convert API warning boolean parameter values to specific
1051   -- messages and add them to Multiple Message List
1052   --
1053   --
1054   -- Convert API non-warning boolean parameter values
1055   --
1056   --
1057   -- Derive the API return status value based on whether
1058   -- messages of any type exist in the Multiple Message List.
1059   -- Also disable Multiple Message Detection.
1060   --
1061   p_return_status := hr_multi_message.get_return_status_disable;
1062   hr_utility.set_location(' Leaving:' || l_proc,20);
1063   p_object_version_number := l_object_version_number;
1064   --
1065 exception
1066   when hr_multi_message.error_message_exist then
1067     --
1068     -- Catch the Multiple Message List exception which
1069     -- indicates API processing has been aborted because
1070     -- at least one message exists in the list.
1071     --
1072     rollback to UPDATE_MESSAGE;
1073     --
1074     -- Reset IN OUT parameters and set OUT parameters
1075     --
1076     p_return_status := hr_multi_message.get_return_status_disable;
1077     hr_utility.set_location(' Leaving:' || l_proc, 30);
1078   when others then
1079     --
1080     -- When Multiple Message Detection is enabled catch
1081     -- any Application specific or other unexpected
1082     -- exceptions.  Adding appropriate details to the
1083     -- Multiple Message List.  Otherwise re-raise the
1084     -- error.
1085     --
1086     rollback to UPDATE_MESSAGE;
1087     if hr_multi_message.unexpected_error_add(l_proc) then
1088        hr_utility.set_location(' Leaving:' || l_proc,40);
1089        raise;
1090     end if;
1091     --
1092     -- Reset IN OUT and set OUT parameters
1093     --
1094     p_return_status := hr_multi_message.get_return_status_disable;
1095     hr_utility.set_location(' Leaving:' || l_proc,50);
1096 end update_message;
1097 --
1098 -- ----------------------------------------------------------------------------
1099 -- |----------------------------< ADD_RECIPIENT >-----------------------------|
1100 -- ----------------------------------------------------------------------------
1101 --
1102 procedure ADD_RECIPIENT
1103   (p_validate                      in     number     default hr_api.g_false_num
1104   ,p_effective_date                in     date
1105   ,p_communication_object_type     in     varchar2
1106   ,p_communication_object_id       in     number
1107   ,p_recipient_type                in     varchar2
1108   ,p_recipient_id                  in     number
1109   ,p_start_date_active             in     date
1110   ,p_end_date_active               in     date      default hr_api.g_date
1111   ,p_primary_flag                  in     varchar2  default hr_api.g_varchar2
1112   ,p_communication_recipient_id    in     number
1113   ,p_object_version_number         out nocopy number
1114   ,p_return_status                 out nocopy varchar2
1115   ) is
1116   --
1117   -- Variables for API Boolean parameters
1118   l_validate                      boolean;
1119   l_communication_recipient_id     number;
1120   --
1121   -- Variables for IN/OUT parameters
1122   --
1123   -- Other variables
1124   l_proc    varchar2(72) := g_package ||'add_recipient';
1125 Begin
1126   hr_utility.set_location(' Entering:' || l_proc,10);
1127   --
1128   -- Issue a savepoint
1129   --
1130   savepoint ADD_RECIPIENT;
1131   --
1132   -- Initialise Multiple Message Detection
1133   --
1134   hr_multi_message.enable_message_list;
1135   --
1136   -- Remember IN OUT parameter IN values
1137   --
1138   --
1139   -- Convert constant values to their corresponding boolean value
1140   --
1141   l_validate :=
1142     hr_api.constant_to_boolean
1143       (p_constant_value => p_validate);
1144   --
1145   -- Register Surrogate ID or user key values
1146   --
1147   irc_cmr_ins.set_base_key_value
1148     (p_communication_recipient_id => p_communication_recipient_id
1149     );
1150   --
1151   -- Call API
1152   --
1153   irc_communications_api.add_recipient
1154   (p_validate                      => l_validate
1155   ,p_effective_date                => p_effective_date
1156   ,p_communication_object_type     => p_communication_object_type
1157   ,p_communication_object_id       => p_communication_object_id
1158   ,p_recipient_type                => p_recipient_type
1159   ,p_recipient_id                  => p_recipient_id
1160   ,p_start_date_active             => p_start_date_active
1161   ,p_end_date_active               => p_end_date_active
1162   ,p_primary_flag                  => p_primary_flag
1163   ,p_communication_recipient_id    => l_communication_recipient_id
1164   ,p_object_version_number         => p_object_version_number
1165   );
1166   --
1167   -- Convert API warning boolean parameter values to specific
1168   -- messages and add them to Multiple Message List
1169   --
1170   --
1171   -- Convert API non-warning boolean parameter values
1172   --
1173   --
1174   -- Derive the API return status value based on whether
1175   -- messages of any type exist in the Multiple Message List.
1176   -- Also disable Multiple Message Detection.
1177   --
1178   p_return_status := hr_multi_message.get_return_status_disable;
1179   hr_utility.set_location(' Leaving:' || l_proc,20);
1180   --
1181 exception
1182   when hr_multi_message.error_message_exist then
1183     --
1184     -- Catch the Multiple Message List exception which
1185     -- indicates API processing has been aborted because
1186     -- at least one message exists in the list.
1187     --
1188     rollback to ADD_RECIPIENT;
1189     --
1190     -- Reset IN OUT parameters and set OUT parameters
1191     --
1192     p_object_version_number        := null;
1193     p_return_status := hr_multi_message.get_return_status_disable;
1194     hr_utility.set_location(' Leaving:' || l_proc, 30);
1195   when others then
1196     --
1197     -- When Multiple Message Detection is enabled catch
1198     -- any Application specific or other unexpected
1199     -- exceptions.  Adding appropriate details to the
1200     -- Multiple Message List.  Otherwise re-raise the
1201     -- error.
1202     --
1203     rollback to ADD_RECIPIENT;
1204     if hr_multi_message.unexpected_error_add(l_proc) then
1205        hr_utility.set_location(' Leaving:' || l_proc,40);
1206        raise;
1207     end if;
1208     --
1209     -- Reset IN OUT and set OUT parameters
1210     --
1211     p_object_version_number        := null;
1212     p_return_status := hr_multi_message.get_return_status_disable;
1213     hr_utility.set_location(' Leaving:' || l_proc,50);
1214 end add_recipient;
1215 --
1216 --Save For Later Code Changes
1217 -- ----------------------------------------------------------------------------
1218 -- |-------------------------< process_com_api >--------------------------|
1219 -- ----------------------------------------------------------------------------
1220 
1221 procedure process_com_api
1222 (
1223   p_document            in         CLOB
1224  ,p_return_status       out nocopy VARCHAR2
1225  ,p_validate            in         number    default hr_api.g_false_num
1226  ,p_effective_date      in         date      default null
1227 )
1228 IS
1229    l_postState VARCHAR2(2);
1230    l_return_status VARCHAR2(1);
1231    l_object_version_number number;
1232    l_commitElement xmldom.DOMElement;
1233    l_parser xmlparser.Parser;
1234    l_CommitNode xmldom.DOMNode;
1235    l_proc    varchar2(72) := g_package || 'PROCESS_COM_API';
1236 
1237    -- Variables for OUT parameters
1238    l_communication_property_id     number;
1239    l_vacancy_id                    number;
1240    l_effective_date                date  :=  trunc(sysdate);
1241    --
1242 BEGIN
1243 --
1244    hr_utility.set_location(' Entering:' || l_proc,10);
1245    hr_utility.set_location(' CLOB --> xmldom.DOMNode:' || l_proc,15);
1246 --
1247    l_parser      := xmlparser.newParser;
1248    xmlparser.ParseCLOB(l_parser,p_document);
1249    l_CommitNode  := xmldom.makeNode(xmldom.getDocumentElement(xmlparser.getDocument(l_parser)));
1250 --
1251 
1252    hr_utility.set_location('Extracting the PostState:' || l_proc,20);
1253 
1254    l_commitElement := xmldom.makeElement(l_CommitNode);
1255    l_postState := xmldom.getAttribute(l_commitElement, 'PS');
1256 --
1257 --Get the values for in/out parameters
1258 --
1259    l_communication_property_id :=  hr_transaction_swi.getNumberValue(l_CommitNode,'CommunicationPropertyId');
1260    l_object_version_number     := hr_transaction_swi.getNumberValue(l_CommitNode,'ObjectVersionNumber');
1261 --
1262    if p_effective_date is null
1263    then
1264    --
1265      l_effective_date := trunc(sysdate);
1266    --
1267    else
1268    --
1269      l_effective_date := p_effective_date;
1270    --
1271    end if;
1272    --
1273 
1274    if l_postState = '0' then
1275    define_comm_properties(
1276     p_validate                  =>  p_validate
1277    ,p_effective_date            =>  l_effective_date
1278    ,p_object_type               =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'ObjectType')
1279    ,p_object_id                 =>  hr_transaction_swi.getNumberValue(l_CommitNode,'ObjectId')
1280    ,p_default_comm_status       =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'DefaultCommStatus')
1281    ,p_allow_attachment_flag     =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'AllowAttachmentFlag')
1282    ,p_auto_notification_flag    =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'AutoNotificationFlag')
1283    ,p_allow_add_recipients      =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'AllowAddRecipients')
1284    ,p_default_moderator         =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'DefaultModerator')
1285    ,p_attribute_category        =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'AttributeCategory')
1286    ,p_attribute1                =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute1')
1287    ,p_attribute2                =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute2')
1288    ,p_attribute3                =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute3')
1289    ,p_attribute4                =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute4')
1290    ,p_attribute5                =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute5')
1291    ,p_attribute6                =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute6')
1292    ,p_attribute7                =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute7')
1293    ,p_attribute8                =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute8')
1294    ,p_attribute9                =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute9')
1295    ,p_attribute10               =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute10')
1296    ,p_information_category      =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'InformationCategory')
1297    ,p_information1              =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information1')
1298    ,p_information2              =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information2')
1299    ,p_information3              =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information3')
1300    ,p_information4              =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information4')
1301    ,p_information5              =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information5')
1302    ,p_information6              =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information6')
1303    ,p_information7              =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information7')
1304    ,p_information8              =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information8')
1305    ,p_information9              =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information9')
1306    ,p_information10             =>  hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information10')
1307    ,p_communication_property_id =>  l_communication_property_id
1308    ,p_object_version_number     =>  l_object_version_number
1309    ,p_return_status             =>  l_return_status
1310    ) ;
1311 
1312    elsif l_postState = '2' then
1313      -- call update offer
1314      --
1315      update_comm_properties(
1316       p_validate                     =>       p_validate
1317      ,p_effective_date               =>       l_effective_date
1318      ,p_object_type                  =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'ObjectType')
1319      ,p_object_id                    =>       hr_transaction_swi.getNumberValue(l_CommitNode,'ObjectId')
1320      ,p_default_comm_status          =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'DefaultCommStatus')
1321      ,p_allow_attachment_flag        =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'AllowAttachmentFlag')
1322      ,p_auto_notification_flag       =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'AutoNotificationFlag')
1323      ,p_allow_add_recipients         =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'AllowAddRecipients')
1324      ,p_default_moderator            =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'DefaultModerator')
1325      ,p_attribute_category           =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'AttributeCategory')
1326      ,p_attribute1                   =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute1')
1327      ,p_attribute2                   =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute2')
1328      ,p_attribute3                   =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute3')
1329      ,p_attribute4                   =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute4')
1330      ,p_attribute5                   =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute5')
1331      ,p_attribute6                   =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute6')
1332      ,p_attribute7                   =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute7')
1333      ,p_attribute8                   =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute8')
1334      ,p_attribute9                   =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute9')
1335      ,p_attribute10                  =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Attribute10')
1336      ,p_information_category           =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'InformationCategory')
1337      ,p_information1                 =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information1')
1338      ,p_information2                 =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information2')
1339      ,p_information3                 =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information3')
1340      ,p_information4                 =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information4')
1341      ,p_information5                 =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information5')
1342      ,p_information6                 =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information6')
1343      ,p_information7                 =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information7')
1344      ,p_information8                 =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information8')
1345      ,p_information9                 =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information9')
1346      ,p_information10                =>       hr_transaction_swi.getVarchar2Value(l_CommitNode,'Information10')
1347      ,p_communication_property_id    =>       l_communication_property_id
1348      ,p_object_version_number        =>       l_object_version_number
1349      ,p_return_status                =>       l_return_status
1350      );
1351      --
1352    elsif l_postState = '3' then
1353      -- call delete offer
1354      --
1355      delete_comm_properties(
1356       p_validate                     =>       p_validate
1357      ,p_object_version_number        =>       l_object_version_number
1358      ,p_communication_property_id    =>       l_communication_property_id
1359      ,p_effective_date               =>       l_effective_date
1360      ,p_return_status                =>       l_return_status
1361      );
1362      --
1363    end if;
1364 
1365    p_return_status := l_return_status;
1366    hr_utility.set_location('Exiting:' || l_proc,40);
1367 
1368 end process_com_api;
1369 --
1370 -- ----------------------------------------------------------------------------
1371 -- |--------------------------< start_mass_communication >---------------------|
1372 -- ----------------------------------------------------------------------------
1373 --
1374 PROCEDURE start_mass_communication
1375   (
1376    p_assignmentIdListGIn in  varchar2
1377   ,p_return_status                   out nocopy varchar2
1378   ) is
1379   --
1380   -- Variables for API Boolean parameters
1381   l_validate                      boolean;
1382   l_communication_id              number;
1383   --
1384   -- Variables for IN/OUT parameters
1385   --
1386   -- Other variables
1387   l_proc    varchar2(72) := g_package ||'start_mass_communication_gui';
1388 Begin
1389   hr_utility.set_location(' Entering:' || l_proc,10);
1390   --
1391   -- Issue a savepoint
1392   --
1393   savepoint start_mass_communication;
1394   --
1395   -- Initialise Multiple Message Detection
1396   --
1397   hr_multi_message.enable_message_list;
1398   --
1399   -- Remember IN OUT parameter IN values
1400   --
1401   -- Call API
1402   --
1403   irc_communications_api.start_mass_communication
1404     (p_assignmentIdListIn                     => p_assignmentIdListGIn
1405     );
1406   --
1407   -- Convert API warning boolean parameter values to specific
1408   -- messages and add them to Multiple Message List
1409   --
1410   --
1411   -- Convert API non-warning boolean parameter values
1412   --
1413   --
1414   -- Derive the API return status value based on whether
1415   -- messages of any type exist in the Multiple Message List.
1416   -- Also disable Multiple Message Detection.
1417   --
1418   p_return_status := hr_multi_message.get_return_status_disable;
1419   hr_utility.set_location(' Leaving:' || l_proc,20);
1420   --
1421 exception
1422   when hr_multi_message.error_message_exist then
1423     --
1424     -- Catch the Multiple Message List exception which
1425     -- indicates API processing has been aborted because
1426     -- at least one message exists in the list.
1427     --
1428     rollback to start_mass_communication;
1429     --
1430     -- Reset IN OUT parameters and set OUT parameters
1431     --
1432     p_return_status := hr_multi_message.get_return_status_disable;
1433     hr_utility.set_location(' Leaving:' || l_proc, 30);
1434   when others then
1435     --
1436     -- When Multiple Message Detection is enabled catch
1437     -- any Application specific or other unexpected
1438     -- exceptions.  Adding appropriate details to the
1439     -- Multiple Message List.  Otherwise re-raise the
1440     -- error.
1441     --
1442     rollback to start_mass_communication;
1443     if hr_multi_message.unexpected_error_add(l_proc) then
1444        hr_utility.set_location(' Leaving:' || l_proc,40);
1445        raise;
1446     end if;
1447     --
1448     -- Reset IN OUT and set OUT parameters
1449     --
1450     p_return_status := hr_multi_message.get_return_status_disable;
1451     hr_utility.set_location(' Leaving:' || l_proc,50);
1452 end start_mass_communication;
1453 --
1454 -- ----------------------------------------------------------------------------
1455 -- |--------------------------< close_mass_communication >---------------------|
1456 -- ----------------------------------------------------------------------------
1457 --
1458 PROCEDURE close_mass_communication
1459   (
1460    p_assignmentIdListGIn in  varchar2
1461   ,p_return_status                   out nocopy varchar2
1462   ) is
1463   --
1464   -- Variables for API Boolean parameters
1465   l_validate                      boolean;
1466   l_communication_id              number;
1467   --
1468   -- Variables for IN/OUT parameters
1469   --
1470   -- Other variables
1471   l_proc    varchar2(72) := g_package ||'close_mass_communication_gui';
1472 Begin
1473   hr_utility.set_location(' Entering:' || l_proc,10);
1474   --
1475   -- Issue a savepoint
1476   --
1477   savepoint close_mass_communication;
1478   --
1479   -- Initialise Multiple Message Detection
1480   --
1481   hr_multi_message.enable_message_list;
1482   --
1483   -- Remember IN OUT parameter IN values
1484   --
1485   -- Call API
1486   --
1487   irc_communications_api.close_mass_communication
1488     (p_assignmentIdListIn                     => p_assignmentIdListGIn
1489     );
1490   --
1491   -- Convert API warning boolean parameter values to specific
1492   -- messages and add them to Multiple Message List
1493   --
1494   --
1495   -- Convert API non-warning boolean parameter values
1496   --
1497   --
1498   -- Derive the API return status value based on whether
1499   -- messages of any type exist in the Multiple Message List.
1500   -- Also disable Multiple Message Detection.
1501   --
1502   p_return_status := hr_multi_message.get_return_status_disable;
1503   hr_utility.set_location(' Leaving:' || l_proc,20);
1504   --
1505 exception
1506   when hr_multi_message.error_message_exist then
1507     --
1508     -- Catch the Multiple Message List exception which
1509     -- indicates API processing has been aborted because
1510     -- at least one message exists in the list.
1511     --
1512     rollback to close_mass_communication;
1513     --
1514     -- Reset IN OUT parameters and set OUT parameters
1515     --
1516     p_return_status := hr_multi_message.get_return_status_disable;
1517     hr_utility.set_location(' Leaving:' || l_proc, 30);
1518   when others then
1519     --
1520     -- When Multiple Message Detection is enabled catch
1521     -- any Application specific or other unexpected
1522     -- exceptions.  Adding appropriate details to the
1523     -- Multiple Message List.  Otherwise re-raise the
1524     -- error.
1525     --
1526     rollback to close_mass_communication;
1527     if hr_multi_message.unexpected_error_add(l_proc) then
1528        hr_utility.set_location(' Leaving:' || l_proc,40);
1529        raise;
1530     end if;
1531     --
1532     -- Reset IN OUT and set OUT parameters
1533     --
1534     p_return_status := hr_multi_message.get_return_status_disable;
1535     hr_utility.set_location(' Leaving:' || l_proc,50);
1536 end close_mass_communication;
1537 
1538 end irc_communications_swi;