69: --
70: -- Other variables
71: l_proc varchar2(72) := g_package ||'create_offer';
72: Begin
73: hr_utility.set_location(' Entering:' || l_proc,10);
74: --
75: -- Issue a savepoint
76: --
77: savepoint create_offer_swi;
164: -- Also disable Multiple Message Detection.
165: --
166: --
167: p_return_status := hr_multi_message.get_return_status_disable;
168: hr_utility.set_location(' Leaving:' || l_proc,20);
169: --
170: exception
171: when hr_multi_message.error_message_exist then
172: --
180: --
181: p_offer_version := null;
182: p_object_version_number := null;
183: p_return_status := hr_multi_message.get_return_status_disable;
184: hr_utility.set_location(' Leaving:' || l_proc, 30);
185: when others then
186: --
187: -- When Multiple Message Detection is enabled catch
188: -- any Application specific or other unexpected
191: -- error.
192: --
193: rollback to create_offer_swi;
194: if hr_multi_message.unexpected_error_add(l_proc) then
195: hr_utility.set_location(' Leaving:' || l_proc,40);
196: raise;
197: end if;
198: --
199: -- Reset IN OUT and set OUT parameters
200: --
201: p_offer_version := null;
202: p_object_version_number := null;
203: p_return_status := hr_multi_message.get_return_status_disable;
204: hr_utility.set_location(' Leaving:' || l_proc,50);
205: end create_offer;
206: -- ----------------------------------------------------------------------------
207: -- |-----------------------------< update_offer >-----------------------------|
208: -- ----------------------------------------------------------------------------
274: --
275: -- Other variables
276: l_proc varchar2(72) := g_package ||'update_offer';
277: Begin
278: hr_utility.set_location(' Entering:' || l_proc,10);
279: --
280: -- Issue a savepoint
281: --
282: savepoint update_offer_swi;
370: -- messages of any type exist in the Multiple Message List.
371: -- Also disable Multiple Message Detection.
372: --
373: p_return_status := hr_multi_message.get_return_status_disable;
374: hr_utility.set_location(' Leaving:' || l_proc,20);
375: --
376: exception
377: when hr_multi_message.error_message_exist then
378: --
387: p_offer_id := l_offer_id;
388: p_object_version_number := l_object_version_number;
389: p_offer_version := null;
390: p_return_status := hr_multi_message.get_return_status_disable;
391: hr_utility.set_location(' Leaving:' || l_proc, 30);
392: when others then
393: --
394: -- When Multiple Message Detection is enabled catch
395: -- any Application specific or other unexpected
398: -- error.
399: --
400: rollback to update_offer_swi;
401: if hr_multi_message.unexpected_error_add(l_proc) then
402: hr_utility.set_location(' Leaving:' || l_proc,40);
403: raise;
404: end if;
405: --
406: -- Reset IN OUT and set OUT parameters
408: p_offer_id := l_offer_id;
409: p_object_version_number := l_object_version_number;
410: p_offer_version := null;
411: p_return_status := hr_multi_message.get_return_status_disable;
412: hr_utility.set_location(' Leaving:' || l_proc,50);
413: end update_offer;
414: -- ----------------------------------------------------------------------------
415: -- |-----------------------------< delete_offer >-----------------------------|
416: -- ----------------------------------------------------------------------------
429: --
430: -- Other variables
431: l_proc varchar2(72) := g_package ||'delete_offer';
432: Begin
433: hr_utility.set_location(' Entering:' || l_proc,10);
434: --
435: -- Issue a savepoint
436: --
437: savepoint delete_offer_swi;
472: -- messages of any type exist in the Multiple Message List.
473: -- Also disable Multiple Message Detection.
474: --
475: p_return_status := hr_multi_message.get_return_status_disable;
476: hr_utility.set_location(' Leaving:' || l_proc,20);
477: --
478: exception
479: when hr_multi_message.error_message_exist then
480: --
486: --
487: -- Reset IN OUT parameters and set OUT parameters
488: --
489: p_return_status := hr_multi_message.get_return_status_disable;
490: hr_utility.set_location(' Leaving:' || l_proc, 30);
491: when others then
492: --
493: -- When Multiple Message Detection is enabled catch
494: -- any Application specific or other unexpected
497: -- error.
498: --
499: rollback to delete_offer_swi;
500: if hr_multi_message.unexpected_error_add(l_proc) then
501: hr_utility.set_location(' Leaving:' || l_proc,40);
502: raise;
503: end if;
504: --
505: -- Reset IN OUT and set OUT parameters
504: --
505: -- Reset IN OUT and set OUT parameters
506: --
507: p_return_status := hr_multi_message.get_return_status_disable;
508: hr_utility.set_location(' Leaving:' || l_proc,50);
509: end delete_offer;
510: -- ----------------------------------------------------------------------------
511: -- |------------------------------< close_offer >-----------------------------|
512: -- ----------------------------------------------------------------------------
530: --
531: -- Other variables
532: l_proc varchar2(72) := g_package ||'close_offer';
533: Begin
534: hr_utility.set_location(' Entering:' || l_proc,10);
535: --
536: -- Issue a savepoint
537: --
538: savepoint close_offer_swi;
578: -- messages of any type exist in the Multiple Message List.
579: -- Also disable Multiple Message Detection.
580: --
581: p_return_status := hr_multi_message.get_return_status_disable;
582: hr_utility.set_location(' Leaving:' || l_proc,20);
583: --
584: exception
585: when hr_multi_message.error_message_exist then
586: --
592: --
593: -- Reset IN OUT parameters and set OUT parameters
594: --
595: p_return_status := hr_multi_message.get_return_status_disable;
596: hr_utility.set_location(' Leaving:' || l_proc, 30);
597: when others then
598: --
599: -- When Multiple Message Detection is enabled catch
600: -- any Application specific or other unexpected
603: -- error.
604: --
605: rollback to close_offer_swi;
606: if hr_multi_message.unexpected_error_add(l_proc) then
607: hr_utility.set_location(' Leaving:' || l_proc,40);
608: raise;
609: end if;
610: --
611: -- Reset IN OUT and set OUT parameters
610: --
611: -- Reset IN OUT and set OUT parameters
612: --
613: p_return_status := hr_multi_message.get_return_status_disable;
614: hr_utility.set_location(' Leaving:' || l_proc,50);
615: end close_offer;
616: -- ----------------------------------------------------------------------------
617: -- |------------------------------< hold_offer >------------------------------|
618: -- ----------------------------------------------------------------------------
636: --
637: -- Other variables
638: l_proc varchar2(72) := g_package ||'hold_offer';
639: Begin
640: hr_utility.set_location(' Entering:' || l_proc,10);
641: --
642: -- Issue a savepoint
643: --
644: savepoint hold_offer_swi;
684: -- messages of any type exist in the Multiple Message List.
685: -- Also disable Multiple Message Detection.
686: --
687: p_return_status := hr_multi_message.get_return_status_disable;
688: hr_utility.set_location(' Leaving:' || l_proc,20);
689: --
690: exception
691: when hr_multi_message.error_message_exist then
692: --
699: -- Reset IN OUT parameters and set OUT parameters
700: --
701: p_object_version_number := l_object_version_number;
702: p_return_status := hr_multi_message.get_return_status_disable;
703: hr_utility.set_location(' Leaving:' || l_proc, 30);
704: when others then
705: --
706: -- When Multiple Message Detection is enabled catch
707: -- any Application specific or other unexpected
710: -- error.
711: --
712: rollback to hold_offer_swi;
713: if hr_multi_message.unexpected_error_add(l_proc) then
714: hr_utility.set_location(' Leaving:' || l_proc,40);
715: raise;
716: end if;
717: --
718: -- Reset IN OUT and set OUT parameters
718: -- Reset IN OUT and set OUT parameters
719: --
720: p_object_version_number := l_object_version_number;
721: p_return_status := hr_multi_message.get_return_status_disable;
722: hr_utility.set_location(' Leaving:' || l_proc,50);
723: end hold_offer;
724: -- ----------------------------------------------------------------------------
725: -- |-----------------------------< release_offer >----------------------------|
726: -- ----------------------------------------------------------------------------
744: --
745: -- Other variables
746: l_proc varchar2(72) := g_package ||'release_offer';
747: Begin
748: hr_utility.set_location(' Entering:' || l_proc,10);
749: --
750: -- Issue a savepoint
751: --
752: savepoint release_offer_swi;
792: -- messages of any type exist in the Multiple Message List.
793: -- Also disable Multiple Message Detection.
794: --
795: p_return_status := hr_multi_message.get_return_status_disable;
796: hr_utility.set_location(' Leaving:' || l_proc,20);
797: --
798: exception
799: when hr_multi_message.error_message_exist then
800: --
807: -- Reset IN OUT parameters and set OUT parameters
808: --
809: p_object_version_number := l_object_version_number;
810: p_return_status := hr_multi_message.get_return_status_disable;
811: hr_utility.set_location(' Leaving:' || l_proc, 30);
812: when others then
813: --
814: -- When Multiple Message Detection is enabled catch
815: -- any Application specific or other unexpected
818: -- error.
819: --
820: rollback to release_offer_swi;
821: if hr_multi_message.unexpected_error_add(l_proc) then
822: hr_utility.set_location(' Leaving:' || l_proc,40);
823: raise;
824: end if;
825: --
826: -- Reset IN OUT and set OUT parameters
826: -- Reset IN OUT and set OUT parameters
827: --
828: p_object_version_number := l_object_version_number;
829: p_return_status := hr_multi_message.get_return_status_disable;
830: hr_utility.set_location(' Leaving:' || l_proc,50);
831: end release_offer;
832: -- ----------------------------------------------------------------------------
833: -- |------------------------< create_offer_assignment >-----------------------|
834: -- ----------------------------------------------------------------------------
962: --
963: -- Other variables
964: l_proc varchar2(72) := g_package ||'create_offer_assignment';
965: Begin
966: hr_utility.set_location(' Entering:' || l_proc,10);
967: --
968: -- Issue a savepoint
969: --
970: savepoint create_offer_assignment_swi;
1137: -- messages of any type exist in the Multiple Message List.
1138: -- Also disable Multiple Message Detection.
1139: --
1140: p_return_status := hr_multi_message.get_return_status_disable;
1141: hr_utility.set_location(' Leaving:' || l_proc,20);
1142: --
1143: exception
1144: when hr_multi_message.error_message_exist then
1145: --
1159: p_comment_id := null;
1160: p_object_version_number := null;
1161: --
1162: p_return_status := hr_multi_message.get_return_status_disable;
1163: hr_utility.set_location(' Leaving:' || l_proc, 30);
1164: when others then
1165: --
1166: -- When Multiple Message Detection is enabled catch
1167: -- any Application specific or other unexpected
1170: -- error.
1171: --
1172: rollback to create_offer_assignment_swi;
1173: if hr_multi_message.unexpected_error_add(l_proc) then
1174: hr_utility.set_location(' Leaving:' || l_proc,40);
1175: raise;
1176: end if;
1177: --
1178: -- Reset IN OUT and set OUT parameters
1185: p_comment_id := null;
1186: p_object_version_number := null;
1187: --
1188: p_return_status := hr_multi_message.get_return_status_disable;
1189: hr_utility.set_location(' Leaving:' || l_proc,50);
1190: end create_offer_assignment;
1191: -- ----------------------------------------------------------------------------
1192: -- |------------------------< update_offer_assignment >-----------------------|
1193: -- ----------------------------------------------------------------------------
1328: --
1329: -- Other variables
1330: l_proc varchar2(72) := g_package ||'update_offer_assignment';
1331: Begin
1332: hr_utility.set_location(' Entering:' || l_proc,10);
1333: --
1334: -- Issue a savepoint
1335: --
1336: savepoint update_offer_assignment_swi;
1523: -- messages of any type exist in the Multiple Message List.
1524: -- Also disable Multiple Message Detection.
1525: --
1526: p_return_status := hr_multi_message.get_return_status_disable;
1527: hr_utility.set_location(' Leaving:' || l_proc,20);
1528: --
1529: exception
1530: when hr_multi_message.error_message_exist then
1531: --
1547: p_validation_start_date := null;
1548: p_validation_end_date := null;
1549: p_offer_id := l_offer_id;
1550: p_return_status := hr_multi_message.get_return_status_disable;
1551: hr_utility.set_location(' Leaving:' || l_proc, 30);
1552: when others then
1553: --
1554: -- When Multiple Message Detection is enabled catch
1555: -- any Application specific or other unexpected
1558: -- error.
1559: --
1560: rollback to update_offer_assignment_swi;
1561: if hr_multi_message.unexpected_error_add(l_proc) then
1562: hr_utility.set_location(' Leaving:' || l_proc,40);
1563: raise;
1564: end if;
1565: --
1566: -- Reset IN OUT and set OUT parameters
1575: p_validation_start_date := null;
1576: p_validation_end_date := null;
1577: p_offer_id := l_offer_id;
1578: p_return_status := hr_multi_message.get_return_status_disable;
1579: hr_utility.set_location(' Leaving:' || l_proc,50);
1580: end update_offer_assignment;
1581: -- ----------------------------------------------------------------------------
1582: -- |------------------------< delete_offer_assignment >-----------------------|
1583: -- ----------------------------------------------------------------------------
1595: --
1596: -- Other variables
1597: l_proc varchar2(72) := g_package ||'delete_offer_assignment';
1598: Begin
1599: hr_utility.set_location(' Entering:' || l_proc,10);
1600: --
1601: -- Issue a savepoint
1602: --
1603: savepoint delete_offer_assignment_swi;
1637: -- messages of any type exist in the Multiple Message List.
1638: -- Also disable Multiple Message Detection.
1639: --
1640: p_return_status := hr_multi_message.get_return_status_disable;
1641: hr_utility.set_location(' Leaving:' || l_proc,20);
1642: --
1643: exception
1644: when hr_multi_message.error_message_exist then
1645: --
1651: --
1652: -- Reset IN OUT parameters and set OUT parameters
1653: --
1654: p_return_status := hr_multi_message.get_return_status_disable;
1655: hr_utility.set_location(' Leaving:' || l_proc, 30);
1656: when others then
1657: --
1658: -- When Multiple Message Detection is enabled catch
1659: -- any Application specific or other unexpected
1662: -- error.
1663: --
1664: rollback to delete_offer_assignment_swi;
1665: if hr_multi_message.unexpected_error_add(l_proc) then
1666: hr_utility.set_location(' Leaving:' || l_proc,40);
1667: raise;
1668: end if;
1669: --
1670: -- Reset IN OUT and set OUT parameters
1669: --
1670: -- Reset IN OUT and set OUT parameters
1671: --
1672: p_return_status := hr_multi_message.get_return_status_disable;
1673: hr_utility.set_location(' Leaving:' || l_proc,50);
1674: end delete_offer_assignment;
1675: -- ----------------------------------------------------------------------------
1676: -- |--------------------------< upload_offer_letter >-------------------------|
1677: -- ----------------------------------------------------------------------------
1690: --
1691: -- Other variables
1692: l_proc varchar2(72) := g_package ||'upload_offer_letter';
1693: Begin
1694: hr_utility.set_location(' Entering:' || l_proc,10);
1695: --
1696: -- Issue a savepoint
1697: --
1698: savepoint upload_offer_letter_swi;
1733: -- messages of any type exist in the Multiple Message List.
1734: -- Also disable Multiple Message Detection.
1735: --
1736: p_return_status := hr_multi_message.get_return_status_disable;
1737: hr_utility.set_location(' Leaving:' || l_proc,20);
1738: --
1739: exception
1740: when hr_multi_message.error_message_exist then
1741: --
1747: --
1748: -- Reset IN OUT parameters and set OUT parameters
1749: --
1750: p_return_status := hr_multi_message.get_return_status_disable;
1751: hr_utility.set_location(' Leaving:' || l_proc, 30);
1752: when others then
1753: --
1754: -- When Multiple Message Detection is enabled catch
1755: -- any Application specific or other unexpected
1758: -- error.
1759: --
1760: rollback to upload_offer_letter_swi;
1761: if hr_multi_message.unexpected_error_add(l_proc) then
1762: hr_utility.set_location(' Leaving:' || l_proc,40);
1763: raise;
1764: end if;
1765: --
1766: -- Reset IN OUT and set OUT parameters
1765: --
1766: -- Reset IN OUT and set OUT parameters
1767: --
1768: p_return_status := hr_multi_message.get_return_status_disable;
1769: hr_utility.set_location(' Leaving:' || l_proc,50);
1770: end upload_offer_letter;
1771: -- ----------------------------------------------------------------------------
1772: -- |--------------------< is_run_benmgle_for_irec_reqd >----------------------|
1773: -- ----------------------------------------------------------------------------
1934: l_offer_assignment_record per_all_assignments_f%rowtype;
1935: l_pay_proposal_record per_pay_proposals%rowtype;
1936: --
1937: Begin
1938: hr_utility.set_location(' Entering:' || l_proc,10);
1939: --
1940: -- Issue a savepoint
1941: --
1942: savepoint IS_RUN_BENMGLE_FOR_IREC_REQD;
2133: -- messages of any type exist in the Multiple Message List.
2134: -- Also disable Multiple Message Detection.
2135: --
2136: p_return_status := hr_multi_message.get_return_status_disable;
2137: hr_utility.set_location(' Leaving:' || l_proc,20);
2138: --
2139: exception
2140: when hr_multi_message.error_message_exist then
2141: --
2147: --
2148: p_return_status := hr_multi_message.get_return_status_disable;
2149: p_is_run_reqd := 'N';
2150: --
2151: hr_utility.set_location(' Leaving:' || l_proc, 30);
2152: when others then
2153: --
2154: -- When Multiple Message Detection is enabled catch
2155: -- any Application specific or other unexpected
2159: --
2160: rollback to IS_RUN_BENMGLE_FOR_IREC_REQD;
2161: --
2162: if hr_multi_message.unexpected_error_add(l_proc) then
2163: hr_utility.set_location(' Leaving:' || l_proc,40);
2164: raise;
2165: end if;
2166: --
2167: p_return_status := hr_multi_message.get_return_status_disable;
2166: --
2167: p_return_status := hr_multi_message.get_return_status_disable;
2168: p_is_run_reqd := 'N';
2169: --
2170: hr_utility.set_location(' Leaving:' || l_proc,50);
2171: --
2172: end is_run_benmgle_for_irec_reqd;
2173: -- ----------------------------------------------------------------------------
2174: -- |-------------------------< run_benmgle_for_irec >-------------------------|
2292: l_proc varchar2(72) := g_package ||'run_benmgle_for_irec';
2293: l_offer_assignment_record per_all_assignments_f%rowtype;
2294: --
2295: Begin
2296: hr_utility.set_location(' Entering:' || l_proc,10);
2297: --
2298: -- Issue a savepoint
2299: --
2300: savepoint run_benmgle_for_irec;
2432: -- messages of any type exist in the Multiple Message List.
2433: -- Also disable Multiple Message Detection.
2434: --
2435: p_return_status := hr_multi_message.get_return_status_disable;
2436: hr_utility.set_location(' Leaving:' || l_proc,20);
2437: --
2438: exception
2439: when hr_multi_message.error_message_exist then
2440: --
2444: --
2445: rollback to run_benmgle_for_irec;
2446: --
2447: p_return_status := hr_multi_message.get_return_status_disable;
2448: hr_utility.set_location(' Leaving:' || l_proc, 30);
2449: when others then
2450: --
2451: -- When Multiple Message Detection is enabled catch
2452: -- any Application specific or other unexpected
2455: -- error.
2456: --
2457: rollback to run_benmgle_for_irec;
2458: if hr_multi_message.unexpected_error_add(l_proc) then
2459: hr_utility.set_location(' Leaving:' || l_proc,40);
2460: raise;
2461: end if;
2462: --
2463: p_return_status := hr_multi_message.get_return_status_disable;
2460: raise;
2461: end if;
2462: --
2463: p_return_status := hr_multi_message.get_return_status_disable;
2464: hr_utility.set_location(' Leaving:' || l_proc,50);
2465: --
2466: end run_benmgle_for_irec;
2467: --
2468: --Save For Later Code Changes
2499: --
2500:
2501: BEGIN
2502: --
2503: hr_utility.set_location(' Entering:' || l_proc,10);
2504: hr_utility.set_location(' CLOB --> xmldom.DOMNode:' || l_proc,15);
2505: --
2506: l_parser := xmlparser.newParser;
2507: xmlparser.ParseCLOB(l_parser,p_document);
2500:
2501: BEGIN
2502: --
2503: hr_utility.set_location(' Entering:' || l_proc,10);
2504: hr_utility.set_location(' CLOB --> xmldom.DOMNode:' || l_proc,15);
2505: --
2506: l_parser := xmlparser.newParser;
2507: xmlparser.ParseCLOB(l_parser,p_document);
2508: l_CommitNode := xmldom.makeNode(xmldom.getDocumentElement(xmlparser.getDocument(l_parser)));
2506: l_parser := xmlparser.newParser;
2507: xmlparser.ParseCLOB(l_parser,p_document);
2508: l_CommitNode := xmldom.makeNode(xmldom.getDocumentElement(xmlparser.getDocument(l_parser)));
2509: --
2510: hr_utility.set_location('Extracting the PostState:' || l_proc,20);
2511:
2512: l_commitElement := xmldom.makeElement(l_CommitNode);
2513: l_postState := xmldom.getAttribute(l_commitElement, 'PS');
2514: --
2608: );
2609: --
2610: end if;
2611: p_return_status := l_return_status;
2612: hr_utility.set_location('Exiting:' || l_proc,40);
2613:
2614: end process_offers_api;
2615:
2616: -- ----------------------------------------------------------------------------
2650: l_effective_date date := trunc(sysdate);
2651:
2652: BEGIN
2653:
2654: hr_utility.set_location(' Entering:' || l_proc,10);
2655: hr_utility.set_location(' CLOB --> xmldom.DOMNode:' || l_proc,15);
2656:
2657: l_parser := xmlparser.newParser;
2658: xmlparser.ParseCLOB(l_parser,p_document);
2651:
2652: BEGIN
2653:
2654: hr_utility.set_location(' Entering:' || l_proc,10);
2655: hr_utility.set_location(' CLOB --> xmldom.DOMNode:' || l_proc,15);
2656:
2657: l_parser := xmlparser.newParser;
2658: xmlparser.ParseCLOB(l_parser,p_document);
2659: l_CommitNode := xmldom.makeNode(xmldom.getDocumentElement(xmlparser.getDocument(l_parser)));
2657: l_parser := xmlparser.newParser;
2658: xmlparser.ParseCLOB(l_parser,p_document);
2659: l_CommitNode := xmldom.makeNode(xmldom.getDocumentElement(xmlparser.getDocument(l_parser)));
2660:
2661: hr_utility.set_location('Extracting the PostState:' || l_proc,20);
2662:
2663: l_commitElement := xmldom.makeElement(l_CommitNode);
2664: l_postState := xmldom.getAttribute(l_commitElement, 'PS');
2665:
2819: );
2820: --
2821: end if;
2822: p_return_status := l_return_status;
2823: hr_utility.set_location('Exiting:' || l_proc,40);
2824:
2825: end process_asg_api;
2826: -- ----------------------------------------------------------------------------
2827: -- |-----------------------------< finalize_transaction >---------------------|
2879: and ios2.offer_status_history_id > ios1.offer_status_history_id);
2880: --
2881: begin
2882: --
2883: hr_utility.set_location(' Entering:' || l_proc,10);
2884: hr_utility.set_location(l_proc || ' Event:' || p_event,13);
2885: --
2886: open csr_offer_details;
2887: fetch csr_offer_details into
2880: --
2881: begin
2882: --
2883: hr_utility.set_location(' Entering:' || l_proc,10);
2884: hr_utility.set_location(l_proc || ' Event:' || p_event,13);
2885: --
2886: open csr_offer_details;
2887: fetch csr_offer_details into
2888: l_offer_id, l_offer_version, l_prev_offer_status,
2889: l_applicant_assignment_id, l_expiry_date,l_object_version_number;
2890: if csr_offer_details%found then
2891: close csr_offer_details;
2892: --
2893: hr_utility.set_location(l_proc,15);
2894: --
2895: -- Approved or updated offer event handling
2896: --
2897: if p_event = 'APPROVED' OR p_event = 'SUBMIT' OR p_event = 'RESUBMIT' then
2894: --
2895: -- Approved or updated offer event handling
2896: --
2897: if p_event = 'APPROVED' OR p_event = 'SUBMIT' OR p_event = 'RESUBMIT' then
2898: hr_utility.set_location(l_proc, 20);
2899: -- if the transaction is approval of PENDING_EXTENDED, the status
2900: -- here will be EXTENDED as the update_offer would have converted
2901: -- the status already.
2902: if l_prev_offer_status = 'EXTENDED' then
2912: --
2913: if l_offer_status_before_hold = 'EXTENDED' then
2914: l_offer_status := NULL;
2915: elsif l_offer_status_before_hold = 'PENDING' then
2916: hr_utility.set_location(l_proc, 24);
2917: l_offer_status := 'APPROVED';
2918: end if;
2919: --
2920: else
2921: --
2922: -- This cursor is used to get the offer status and offer close reason
2923: -- If the close reason is Manager Withdraw or Applicant withdrew their
2924: -- application offer should not be updated
2925: hr_utility.set_location(l_proc, 25);
2926: open csr_offer_history_details(l_offer_id);
2927: fetch csr_offer_history_details into l_status,l_close_reason;
2928: if csr_offer_history_details%found then
2929: hr_utility.set_location(l_proc, 26);
2925: hr_utility.set_location(l_proc, 25);
2926: open csr_offer_history_details(l_offer_id);
2927: fetch csr_offer_history_details into l_status,l_close_reason;
2928: if csr_offer_history_details%found then
2929: hr_utility.set_location(l_proc, 26);
2930: if l_status='CLOSED' and (l_close_reason='MGR_WITHDRAW' OR l_close_reason='WITHDRAWAL') then
2931: hr_utility.set_location(l_proc, 27);
2932: l_offer_status := NULL;
2933: else
2927: fetch csr_offer_history_details into l_status,l_close_reason;
2928: if csr_offer_history_details%found then
2929: hr_utility.set_location(l_proc, 26);
2930: if l_status='CLOSED' and (l_close_reason='MGR_WITHDRAW' OR l_close_reason='WITHDRAWAL') then
2931: hr_utility.set_location(l_proc, 27);
2932: l_offer_status := NULL;
2933: else
2934: hr_utility.set_location(l_proc, 28);
2935: l_offer_status := 'APPROVED';
2930: if l_status='CLOSED' and (l_close_reason='MGR_WITHDRAW' OR l_close_reason='WITHDRAWAL') then
2931: hr_utility.set_location(l_proc, 27);
2932: l_offer_status := NULL;
2933: else
2934: hr_utility.set_location(l_proc, 28);
2935: l_offer_status := 'APPROVED';
2936: end if;
2937: else
2938: hr_utility.set_location(l_proc, 29);
2934: hr_utility.set_location(l_proc, 28);
2935: l_offer_status := 'APPROVED';
2936: end if;
2937: else
2938: hr_utility.set_location(l_proc, 29);
2939: l_offer_status := 'APPROVED';
2940: end if;
2941: close csr_offer_history_details;
2942: end if;
2943: --
2944: -- RFC offer event handling
2945: --
2946: elsif p_event = 'RFC' then
2947: hr_utility.set_location(l_proc, 30);
2948: open csr_offer_history_details(l_offer_id);
2949: fetch csr_offer_history_details into l_status,l_close_reason;
2950: if csr_offer_history_details%found then
2951: hr_utility.set_location(l_proc, 31);
2947: hr_utility.set_location(l_proc, 30);
2948: open csr_offer_history_details(l_offer_id);
2949: fetch csr_offer_history_details into l_status,l_close_reason;
2950: if csr_offer_history_details%found then
2951: hr_utility.set_location(l_proc, 31);
2952: if l_status='CLOSED' and (l_close_reason = 'MGR_WITHDRAW' OR l_close_reason = 'WITHDRAWAL') then
2953: hr_utility.set_location(l_proc, 32);
2954: l_offer_status := NULL;
2955: else
2949: fetch csr_offer_history_details into l_status,l_close_reason;
2950: if csr_offer_history_details%found then
2951: hr_utility.set_location(l_proc, 31);
2952: if l_status='CLOSED' and (l_close_reason = 'MGR_WITHDRAW' OR l_close_reason = 'WITHDRAWAL') then
2953: hr_utility.set_location(l_proc, 32);
2954: l_offer_status := NULL;
2955: else
2956: hr_utility.set_location(l_proc, 33);
2957: l_offer_status := 'CORRECTION';
2952: if l_status='CLOSED' and (l_close_reason = 'MGR_WITHDRAW' OR l_close_reason = 'WITHDRAWAL') then
2953: hr_utility.set_location(l_proc, 32);
2954: l_offer_status := NULL;
2955: else
2956: hr_utility.set_location(l_proc, 33);
2957: l_offer_status := 'CORRECTION';
2958: end if;
2959: close csr_offer_history_details;
2960: else
2957: l_offer_status := 'CORRECTION';
2958: end if;
2959: close csr_offer_history_details;
2960: else
2961: hr_utility.set_location(l_proc, 34);
2962: l_offer_status := 'CORRECTION';
2963: close csr_offer_history_details;
2964: end if;
2965: --
2972: else
2973: handleAttachmentsWhenRejected(p_applicant_assignment_id=>l_applicant_assignment_id);
2974: l_offer_status := 'CLOSED';
2975: if p_event = 'REJECTED' then
2976: hr_utility.set_location(l_proc, 40);
2977: l_change_reason := 'APPROVER_REJECTED';
2978: else
2979: -- DELETE, CANCEL
2980: hr_utility.set_location(l_proc, 50);
2976: hr_utility.set_location(l_proc, 40);
2977: l_change_reason := 'APPROVER_REJECTED';
2978: else
2979: -- DELETE, CANCEL
2980: hr_utility.set_location(l_proc, 50);
2981: l_change_reason := 'MANUAL_CLOSURE';
2982: end if;
2983: end if;
2984: end if;
2983: end if;
2984: end if;
2985: --
2986: if l_offer_status is not null then
2987: hr_utility.set_location(l_proc || ' Offer Status:' || l_offer_status, 60);
2988: update_offer
2989: (p_effective_date => l_effective_date
2990: ,p_offer_status => l_offer_status
2991: ,p_change_reason => l_change_reason
2999: close csr_offer_details;
3000: end if;
3001: --
3002: p_return_status := l_return_status;
3003: hr_utility.set_location('Exiting:' || l_proc,70);
3004: --
3005: end finalize_transaction;
3006:
3007: -- ----------------------------------------------------------------------------
3052: PRAGMA AUTONOMOUS_TRANSACTION;
3053: --
3054: begin
3055: --
3056: hr_utility.set_location(' Entering:' || l_proc,10);
3057: --
3058: if p_applicant_assignment_id is null
3059: then
3060: --
3111: exception
3112: when OTHERS then
3113: rollback;
3114: --
3115: hr_utility.set_location('Exiting:' || l_proc,20);
3116: --
3117: end void_ben_records;
3118:
3119: --
3124: procedure handleAttachmentsWhenCommit(p_applicant_assignment_id in number) is
3125: PRAGMA AUTONOMOUS_TRANSACTION;
3126: l_proc varchar2(72) := g_package || 'handleAttachmentsWhenCommit';
3127: begin
3128: hr_utility.set_location(' Entering:' || l_proc,10);
3129: fnd_attached_documents2_pkg.delete_attachments(X_entity_name=>'IRC_EXT_OFFER_APPROVED',X_pk1_value=>p_applicant_assignment_id,X_delete_document_flag=>'Y');
3130: fnd_attached_documents2_pkg.delete_attachments(X_entity_name=>'IRC_INT_OFFER_APPROVED',X_pk1_value=>p_applicant_assignment_id,X_delete_document_flag=>'Y');
3131:
3132: fnd_attached_documents2_pkg.copy_attachments(X_from_entity_name =>'IRC_EXT_OFFER',X_from_pk1_value =>p_applicant_assignment_id,X_to_entity_name=>'IRC_EXT_OFFER_APPROVED',X_to_pk1_value=>p_applicant_assignment_id);
3134:
3135: fnd_attached_documents2_pkg.delete_attachments(X_entity_name=>'IRC_EXT_OFFER',X_pk1_value=>p_applicant_assignment_id,X_delete_document_flag=>'Y');
3136: fnd_attached_documents2_pkg.delete_attachments(X_entity_name=>'IRC_INT_OFFER',X_pk1_value=>p_applicant_assignment_id,X_delete_document_flag=>'Y');
3137: commit;
3138: hr_utility.set_location(' Exiting:' || l_proc,20);
3139: end;
3140: --
3141: -- ----------------------------------------------------------------------------
3142: -- |-----------------------------< handleAttachmentsWhenRejected >-------------|
3145: procedure handleAttachmentsWhenRejected(p_applicant_assignment_id in number) is
3146: PRAGMA AUTONOMOUS_TRANSACTION;
3147: l_proc varchar2(72) := g_package || 'handleAttachmentsWhenRejected';
3148: begin
3149: hr_utility.set_location(' Entering:' || l_proc,10);
3150: fnd_attached_documents2_pkg.delete_attachments(X_entity_name=>'IRC_EXT_OFFER',X_pk1_value=>p_applicant_assignment_id,X_delete_document_flag=>'Y');
3151: fnd_attached_documents2_pkg.delete_attachments(X_entity_name=>'IRC_INT_OFFER',X_pk1_value=>p_applicant_assignment_id,X_delete_document_flag=>'Y');
3152: commit;
3153: hr_utility.set_location(' Exiting:' || l_proc,20);
3149: hr_utility.set_location(' Entering:' || l_proc,10);
3150: fnd_attached_documents2_pkg.delete_attachments(X_entity_name=>'IRC_EXT_OFFER',X_pk1_value=>p_applicant_assignment_id,X_delete_document_flag=>'Y');
3151: fnd_attached_documents2_pkg.delete_attachments(X_entity_name=>'IRC_INT_OFFER',X_pk1_value=>p_applicant_assignment_id,X_delete_document_flag=>'Y');
3152: commit;
3153: hr_utility.set_location(' Exiting:' || l_proc,20);
3154: end;
3155:
3156: -- ---------------------------------------------------------------------------
3157: -- |-----------------------------< handleAttachmentsWhenEditing >--------------|
3160: procedure handleAttachmentsWhenEdit(p_applicant_assignment_id in number) is
3161: PRAGMA AUTONOMOUS_TRANSACTION;
3162: l_proc varchar2(72) := g_package || 'handleAttachmentsWhenEdit';
3163: begin
3164: hr_utility.set_location(' Entering:' || l_proc,10);
3165:
3166: fnd_attached_documents2_pkg.delete_attachments(X_entity_name=>'IRC_EXT_OFFER',X_pk1_value=>p_applicant_assignment_id,X_delete_document_flag=>'Y');
3167: fnd_attached_documents2_pkg.delete_attachments(X_entity_name=>'IRC_INT_OFFER',X_pk1_value=>p_applicant_assignment_id,X_delete_document_flag=>'Y');
3168:
3168:
3169: fnd_attached_documents2_pkg.copy_attachments(X_from_entity_name =>'IRC_INT_OFFER_APPROVED',X_from_pk1_value =>p_applicant_assignment_id,X_to_entity_name=>'IRC_INT_OFFER',X_to_pk1_value=>p_applicant_assignment_id);
3170: fnd_attached_documents2_pkg.copy_attachments(X_from_entity_name =>'IRC_EXT_OFFER_APPROVED',X_from_pk1_value =>p_applicant_assignment_id,X_to_entity_name=>'IRC_EXT_OFFER',X_to_pk1_value=>p_applicant_assignment_id);
3171: commit;
3172: hr_utility.set_location(' Exiting:' || l_proc,20);
3173: end;
3174:
3175: end irc_offers_swi;