34: fetch cur_get_tcapprover_and_ItemKey into l_app_resource_id,l_item_type,l_item_key;
35: close cur_get_tcapprover_and_ItemKey;
36:
37:
38: l_tc_owner_resource_id := wf_engine.GetItemAttrText(
39: itemtype => l_item_type,
40: itemkey => l_item_key,
41: aname => 'RESOURCE_ID');
42:
86: if g_debug then
87: hr_utility.set_location(l_proc, 10);
88: end if;
89:
90: l_app_bb_id:= wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
91: itemkey => p_itemkey,
92: aname => 'APP_BB_ID');
93: l_app_bb_ovn:= wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
94: itemkey => p_itemkey,
89:
90: l_app_bb_id:= wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
91: itemkey => p_itemkey,
92: aname => 'APP_BB_ID');
93: l_app_bb_ovn:= wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
94: itemkey => p_itemkey,
95: aname => 'APP_BB_OVN');
96: open c_get_app_mechanism(l_app_bb_id,l_app_bb_ovn);
97: fetch c_get_app_mechanism into l_app_mechanism;
98:
99: --Bug 5361995.
100: --We should not show the button 'Send to next approver' in the preparer notification when the current
101: --approver is the final approver
102: l_label := wf_engine.GetActivityLabel ( actid => p_actid);
103:
104: if l_label = 'APPROVAL_NOTIFICATION:APPROVED_BY_APR_INACTION' then
105:
106: HXC_FIND_NOTIFY_APRS_PKG.is_final_apr(
109: p_actid ,
110: p_funcmode ,
111: p_result );
112:
113: l_approval_style_id:= wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
114: itemkey => p_itemkey,
115: aname => 'APPROVAL_STYLE_ID');
116:
117: l_preparer_timeout := hxc_notification_helper.preparer_timeout_value(l_approval_style_id);
115: aname => 'APPROVAL_STYLE_ID');
116:
117: l_preparer_timeout := hxc_notification_helper.preparer_timeout_value(l_approval_style_id);
118:
119: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
120: itemkey => p_itemkey,
121: aname => 'APPROVAL_TIMEOUT',
122: avalue => l_preparer_timeout);
123:
178: BEGIN
179:
180: if(hxc_approval_wf_helper.item_attribute_value_exists(p_item_type,p_item_key,'NOTIFICATION_RESEND_COUNTER')) then
181:
182: wf_engine.SetItemAttrNumber(itemtype => p_item_type,
183: itemkey => p_item_key,
184: aname => 'NOTIFICATION_RESEND_COUNTER',
185: avalue => p_resend_number);
186:
185: avalue => p_resend_number);
186:
187: else
188:
189: wf_engine.AddItemAttr(itemtype => p_item_type,
190: itemkey => p_item_key,
191: aname => 'NOTIFICATION_RESEND_COUNTER',
192: number_value => p_resend_number);
193:
273:
274:
275: --find application period id item attribute value
276:
277: l_app_bb_id:= wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
278: itemkey => p_itemkey,
279: aname => 'APP_BB_ID');
280:
281: -- We need to set the total hours and Description in this procedure because we are over writing these values in
279: aname => 'APP_BB_ID');
280:
281: -- We need to set the total hours and Description in this procedure because we are over writing these values in
282: -- prepare notification process while sending superviosr notification.
283: wf_engine.SetItemAttrText
284: (itemtype => p_itemtype,
285: itemkey => p_itemkey,
286: aname => 'DESCRIPTION',
287: avalue => hxc_find_notify_aprs_pkg.get_description(l_app_bb_id));
286: aname => 'DESCRIPTION',
287: avalue => hxc_find_notify_aprs_pkg.get_description(l_app_bb_id));
288:
289: l_total_hours:= HXC_FIND_NOTIFY_APRS_PKG.category_timecard_hrs(l_app_bb_id,'');
290: wf_engine.SetItemAttrNumber(
291: itemtype => p_itemtype,
292: itemkey => p_itemkey,
293: aname => 'TOTAL_TC_HOURS',
294: avalue => l_total_hours);
292: itemkey => p_itemkey,
293: aname => 'TOTAL_TC_HOURS',
294: avalue => l_total_hours);
295:
296: p_tc_bbid:= wf_engine.GetItemAttrNumber
297: (itemtype => p_itemtype,
298: itemkey => p_itemkey,
299: aname => 'TC_BLD_BLK_ID');
300: p_tc_bbovn:= wf_engine.GetItemAttrNumber
296: p_tc_bbid:= wf_engine.GetItemAttrNumber
297: (itemtype => p_itemtype,
298: itemkey => p_itemkey,
299: aname => 'TC_BLD_BLK_ID');
300: p_tc_bbovn:= wf_engine.GetItemAttrNumber
301: (itemtype => p_itemtype,
302: itemkey => p_itemkey,
303: aname => 'TC_BLD_BLK_OVN');
304:
327: --Bug 5359397.
328: --TC_FROM_ROLE needs ro reset to preparer role since we are overwriting this attribute with approver role
329: --in reset_for_next_timeout.
330: l_preparer_role := hxc_approval_wf_helper.find_role_for_recipient('PREPARER',p_tc_bbid,p_tc_bbovn);
331: wf_engine.SetItemAttrText(itemtype => p_itemtype,
332: itemkey => p_itemkey,
333: aname => 'TC_FROM_ROLE',
334: avalue => l_preparer_role);
335:
334: avalue => l_preparer_role);
335:
336: loop_initialization(p_itemtype ,p_itemkey ,l_resend_number-1);
337:
338: l_approval_style_id:= wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
339: itemkey => p_itemkey,
340: aname => 'APPROVAL_STYLE_ID');
341:
342: l_approver_timeout := hxc_notification_helper.approver_timeout_value(l_approval_style_id);
340: aname => 'APPROVAL_STYLE_ID');
341:
342: l_approver_timeout := hxc_notification_helper.approver_timeout_value(l_approval_style_id);
343:
344: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
345: itemkey => p_itemkey,
346: aname => 'APPROVAL_TIMEOUT',
347: avalue => l_approver_timeout);
348: wf_engine.SetItemAttrText(
344: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
345: itemkey => p_itemkey,
346: aname => 'APPROVAL_TIMEOUT',
347: avalue => l_approver_timeout);
348: wf_engine.SetItemAttrText(
349: itemtype => p_itemtype,
350: itemkey => p_itemkey,
351: aname => hxc_approval_wf_helper.c_recipient_code_attribute,
352: avalue => hxc_app_comp_notifications_api.c_recipient_approver);
413: if g_debug then
414: hr_utility.set_location(l_proc, 10);
415: end if;
416:
417: l_timecard_id := wf_engine.GetItemAttrNumber
418: (itemtype => p_itemtype,
419: itemkey => p_itemkey,
420: aname => 'TC_BLD_BLK_ID');
421: l_timecard_ovn := wf_engine.GetItemAttrNumber
417: l_timecard_id := wf_engine.GetItemAttrNumber
418: (itemtype => p_itemtype,
419: itemkey => p_itemkey,
420: aname => 'TC_BLD_BLK_ID');
421: l_timecard_ovn := wf_engine.GetItemAttrNumber
422: (itemtype => p_itemtype,
423: itemkey => p_itemkey,
424: aname => 'TC_BLD_BLK_OVN');
425: l_tc_stop_date := wf_engine.GetItemAttrDate(
421: l_timecard_ovn := wf_engine.GetItemAttrNumber
422: (itemtype => p_itemtype,
423: itemkey => p_itemkey,
424: aname => 'TC_BLD_BLK_OVN');
425: l_tc_stop_date := wf_engine.GetItemAttrDate(
426: itemtype => p_itemtype,
427: itemkey => p_itemkey,
428: aname => 'TC_STOP');
429:
426: itemtype => p_itemtype,
427: itemkey => p_itemkey,
428: aname => 'TC_STOP');
429:
430: l_tc_start_date := wf_engine.GetItemAttrDate(
431: itemtype => p_itemtype,
432: itemkey => p_itemkey,
433: aname => 'TC_START');
434:
431: itemtype => p_itemtype,
432: itemkey => p_itemkey,
433: aname => 'TC_START');
434:
435: l_effective_end_date := wf_engine.GetItemAttrDate(
436: itemtype => p_itemtype,
437: itemkey => p_itemkey,
438: aname => 'APP_END_DATE');
439:
436: itemtype => p_itemtype,
437: itemkey => p_itemkey,
438: aname => 'APP_END_DATE');
439:
440: l_effective_start_date := wf_engine.GetItemAttrDate(
441: itemtype => p_itemtype,
442: itemkey => p_itemkey,
443: aname => 'APP_START_DATE');
444:
441: itemtype => p_itemtype,
442: itemkey => p_itemkey,
443: aname => 'APP_START_DATE');
444:
445: l_current_recipient := wf_engine.getItemAttrText(
446: itemtype => p_itemtype,
447: itemkey => p_itemkey,
448: aname => hxc_approval_wf_helper.c_recipient_code_attribute,
449: ignore_notfound => true);
447: itemkey => p_itemkey,
448: aname => hxc_approval_wf_helper.c_recipient_code_attribute,
449: ignore_notfound => true);
450:
451: l_approval_style_id:= wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
452: itemkey => p_itemkey,
453: aname => 'APPROVAL_STYLE_ID');
454:
455: l_worker_role :=hxc_approval_wf_helper.find_role_for_recipient('WORKER',l_timecard_id,l_timecard_ovn);
474: --set the attibutes for the PREPARER
475:
476: l_preparer_timeout := hxc_notification_helper.preparer_timeout_value(l_approval_style_id);
477:
478: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
479: itemkey => p_itemkey,
480: aname => 'APPROVAL_TIMEOUT',
481: avalue => l_preparer_timeout);
482: --loop variable seeting is not required as it is already set in the timeout_enabled
481: avalue => l_preparer_timeout);
482: --loop variable seeting is not required as it is already set in the timeout_enabled
483:
484:
485: l_tc_from_role :=wf_engine.GetItemAttrText(
486:
487: itemtype => p_itemtype,
488: itemkey => p_itemkey,
489: aname => 'TC_APPROVER_FROM_ROLE');
486:
487: itemtype => p_itemtype,
488: itemkey => p_itemkey,
489: aname => 'TC_APPROVER_FROM_ROLE');
490: wf_engine.SetItemAttrText(itemtype => p_itemtype,
491: itemkey => p_itemkey,
492: aname => 'TC_FROM_ROLE',
493: avalue => l_tc_from_role);
494:
500: fnd_message.set_token('APPROVER_FULL_NAME',hxc_approval_wf_helper.find_full_name_from_role(l_tc_from_role,l_tc_start_date));
501:
502: l_fyi_subject :=fnd_message.get();
503:
504: wf_engine.SetItemAttrText(
505: itemtype => p_itemtype,
506: itemkey => p_itemkey,
507: aname => 'FYI_SUBJECT',
508: avalue => l_fyi_subject);
506: itemkey => p_itemkey,
507: aname => 'FYI_SUBJECT',
508: avalue => l_fyi_subject);
509:
510: wf_engine.SetItemAttrText(
511: itemtype => p_itemtype,
512: itemkey => p_itemkey,
513: aname => 'PREPARER_ROLE',
514: avalue => l_preparer_role );
515:
516:
517:
518:
519: wf_engine.SetItemAttrText(
520: itemtype => p_itemtype,
521: itemkey => p_itemkey,
522: aname => hxc_approval_wf_helper.c_recipient_code_attribute,
523: avalue => hxc_app_comp_notifications_api.c_recipient_preparer);
530: hr_utility.set_location(l_proc, 30);
531: end if;
532:
533: l_admin_timeout := hxc_notification_helper.admin_timeout_value(l_approval_style_id);
534: l_resend_counter := wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
535: itemkey => p_itemkey,
536: aname => 'NOTIFICATION_RESEND_COUNTER');
537: if l_resend_counter = 0 then
538: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
534: l_resend_counter := wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
535: itemkey => p_itemkey,
536: aname => 'NOTIFICATION_RESEND_COUNTER');
537: if l_resend_counter = 0 then
538: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
539: itemkey => p_itemkey,
540: aname => 'APPROVAL_TIMEOUT',
541: avalue => 0);
542:
540: aname => 'APPROVAL_TIMEOUT',
541: avalue => 0);
542:
543: else
544: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
545: itemkey => p_itemkey,
546: aname => 'APPROVAL_TIMEOUT',
547: avalue => l_admin_timeout);
548:
549: loop_initialization(p_itemtype ,p_itemkey ,l_resend_counter-1);
550: end if;
551:
552: --loop variable seeting is not required as it is already set in the timeout_enabled
553: l_apr_name := wf_engine.GetItemAttrText(itemtype => p_itemtype,
554: itemkey => p_itemkey,
555: aname => 'TC_APPROVER_FROM_ROLE');
556:
557: fnd_message.set_name('HXC','HXC_APPR_TO_ADMIN');
563: l_fyi_subject :=fnd_message.get();
564:
565:
566:
567: wf_engine.SetItemAttrText(
568: itemtype => p_itemtype,
569: itemkey => p_itemkey,
570: aname => 'FYI_SUBJECT',
571: avalue => l_fyi_subject);
569: itemkey => p_itemkey,
570: aname => 'FYI_SUBJECT',
571: avalue => l_fyi_subject);
572:
573: wf_engine.SetItemAttrText(itemtype => p_itemtype,
574: itemkey => p_itemkey,
575: aname => 'TC_FROM_ROLE',
576: avalue => l_preparer_role);
577:
574: itemkey => p_itemkey,
575: aname => 'TC_FROM_ROLE',
576: avalue => l_preparer_role);
577:
578: wf_engine.SetItemAttrText(
579: itemtype => p_itemtype,
580: itemkey => p_itemkey,
581: aname => 'ADMIN_ROLE',
582: avalue => l_admin_role );
580: itemkey => p_itemkey,
581: aname => 'ADMIN_ROLE',
582: avalue => l_admin_role );
583:
584: wf_engine.SetItemAttrText(
585: itemtype => p_itemtype,
586: itemkey => p_itemkey,
587: aname => hxc_approval_wf_helper.c_recipient_code_attribute,
588: avalue => hxc_app_comp_notifications_api.c_recipient_admin);
594: if g_debug then
595: hr_utility.set_location(l_proc, 40);
596: end if;
597:
598: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
599: itemkey => p_itemkey,
600: aname => 'APPROVAL_TIMEOUT',
601: avalue => 0);
602:
729:
730: close c_is_error_process;
731:
732:
733: l_timecard_id := wf_engine.GetItemAttrNumber
734: (itemtype => p_itemtype,
735: itemkey => itemkey,
736: aname => 'TC_BLD_BLK_ID');
737: l_timecard_ovn := wf_engine.GetItemAttrNumber
733: l_timecard_id := wf_engine.GetItemAttrNumber
734: (itemtype => p_itemtype,
735: itemkey => itemkey,
736: aname => 'TC_BLD_BLK_ID');
737: l_timecard_ovn := wf_engine.GetItemAttrNumber
738: (itemtype => p_itemtype,
739: itemkey => itemkey,
740: aname => 'TC_BLD_BLK_OVN');
741: l_tc_resubmitted := wf_engine.GetItemAttrText
737: l_timecard_ovn := wf_engine.GetItemAttrNumber
738: (itemtype => p_itemtype,
739: itemkey => itemkey,
740: aname => 'TC_BLD_BLK_OVN');
741: l_tc_resubmitted := wf_engine.GetItemAttrText
742: (itemtype => p_itemtype,
743: itemkey => itemkey,
744: aname => 'TC_RESUBMITTED');
745: l_bb_new := wf_engine.GetItemAttrText
741: l_tc_resubmitted := wf_engine.GetItemAttrText
742: (itemtype => p_itemtype,
743: itemkey => itemkey,
744: aname => 'TC_RESUBMITTED');
745: l_bb_new := wf_engine.GetItemAttrText
746: (itemtype => p_itemtype,
747: itemkey => itemkey,
748: aname => 'BB_NEW');
749:
746: (itemtype => p_itemtype,
747: itemkey => itemkey,
748: aname => 'BB_NEW');
749:
750: l_app_bb_id:= wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
751: itemkey => itemkey,
752: aname => 'APP_BB_ID');
753:
754: l_app_bb_ovn:= wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
750: l_app_bb_id:= wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
751: itemkey => itemkey,
752: aname => 'APP_BB_ID');
753:
754: l_app_bb_ovn:= wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
755: itemkey => itemkey,
756: aname => 'APP_BB_OVN');
757: open c_csr_get_tc_info(l_timecard_id,
758: l_timecard_ovn);
787: if g_debug then
788: hr_utility.trace('l_item_key is : ' || l_item_key);
789: end if;
790:
791: wf_engine.CreateProcess(itemtype => p_itemtype,
792: itemkey => l_item_key,
793: process => l_process_name);
794: wf_engine.setitemowner(p_itemtype,
795: p_item_key,
790:
791: wf_engine.CreateProcess(itemtype => p_itemtype,
792: itemkey => l_item_key,
793: process => l_process_name);
794: wf_engine.setitemowner(p_itemtype,
795: p_item_key,
796: HXC_FIND_NOTIFY_APRS_PKG.get_login(p_person_id=>l_tc_resource_id,
797: p_user_id => l_last_updated_by)
798: );
810: if g_debug then
811: hr_utility.set_location(l_proc, 20);
812: end if;
813:
814: wf_engine.SetItemAttrDate(itemtype => p_itemtype,
815: itemkey => l_item_key,
816: aname => 'APP_START_DATE',
817: avalue => l_period_start_date);
818:
815: itemkey => l_item_key,
816: aname => 'APP_START_DATE',
817: avalue => l_period_start_date);
818:
819: wf_engine.SetItemAttrText(itemtype => p_itemtype,
820: itemkey => l_item_key,
821: aname => 'FORMATTED_APP_START_DATE',
822: avalue => to_char(l_period_start_date,'YYYY/MM/DD'));
823: if g_debug then
825: hr_utility.trace('APP_START_DATE is : ' ||
826: to_char(l_period_start_date, 'DD-MM-YYYY'));
827: end if;
828:
829: wf_engine.SetItemAttrDate(itemtype => p_itemtype,
830: itemkey => l_item_key,
831: aname => 'APP_END_DATE',
832: avalue => l_period_end_date);
833:
836: hr_utility.trace('APP_END_DATE is : ' ||
837: to_char(l_period_end_date, 'DD-MM-YYYY'));
838: end if;
839:
840: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
841: itemkey => l_item_key,
842: aname => 'APP_BB_ID',
843: avalue => l_app_bb_id);
844:
846: hr_utility.set_location(l_proc, 50);
847: hr_utility.trace('APP_BB_ID is : ' || to_char(l_app_bb_id));
848: end if;
849:
850: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
851: itemkey => l_item_key,
852: aname => 'APP_BB_OVN',
853: avalue => l_app_bb_ovn);
854:
858: hr_utility.trace('APP_BB_OVN is : ' ||
859: to_char(l_app_bb_ovn));
860: end if;
861:
862: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
863: itemkey => l_item_key,
864: aname => 'RESOURCE_ID',
865: avalue => l_tc_resource_id);
866:
868: hr_utility.set_location(l_proc, 70);
869: hr_utility.trace('RESOURCE_ID is : ' || to_char(l_tc_resource_id));
870: end if;
871:
872: wf_engine.SetItemAttrText(itemtype => p_itemtype,
873: itemkey => l_item_key,
874: aname => 'TIME_RECIPIENT_ID',
875: avalue => l_time_recipient);
876:
878: hr_utility.set_location(l_proc, 80);
879: hr_utility.trace('TIME_RECIPIENT_ID is : ' || l_time_recipient);
880: end if;
881:
882: wf_engine.SetItemAttrText(itemtype => p_itemtype,
883: itemkey => l_item_key,
884: aname => 'TC_RESUBMITTED',
885: avalue => l_tc_resubmitted);
886:
888: hr_utility.set_location(l_proc, 90);
889: hr_utility.trace('TC_RESUBMITTED is : ' || l_tc_resubmitted);
890: end if;
891:
892: wf_engine.SetItemAttrText(itemtype => p_itemtype,
893: itemkey => l_item_key,
894: aname => 'BB_NEW',
895: avalue => l_bb_new);
896:
898: hr_utility.set_location(l_proc, 100);
899: hr_utility.trace('BB_NEW is : ' || l_bb_new);
900: end if;
901:
902: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
903: itemkey => l_item_key,
904: aname => 'TC_BLD_BLK_ID',
905: avalue => l_timecard_id);
906:
908: hr_utility.set_location(l_proc, 110);
909: hr_utility.trace('TC_BLD_BLK_ID is : ' || to_char(l_timecard_id));
910: end if;
911:
912: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
913: itemkey => l_item_key,
914: aname => 'TC_BLD_BLK_OVN',
915: avalue => l_timecard_ovn);
916:
921: l_approval_style_id := hxc_approval_wf_pkg.get_approval_style_id(l_tc_start_time,
922: l_tc_stop_time,
923: l_tc_resource_id);
924:
925: wf_engine.SetItemAttrNumber(itemtype => p_itemtype,
926: itemkey => l_item_key,
927: aname => 'APPROVAL_STYLE_ID',
928: avalue => l_approval_style_id);
929:
935: '\&AprvResourceId=' || to_char(l_tc_resource_id) ||
936: '\&OAFunc=HXC_TIME_ENTER'||
937: '\&NtfId=-NID-';
938:
939: wf_engine.SetItemAttrText(itemtype => p_itemtype,
940: itemkey => l_item_key,
941: aname => 'HXC_TIMECARD_URL',
942: avalue => l_tc_url);
943:
959: where application_period_id = l_app_bb_id
960: and application_period_ovn = l_app_bb_ovn;
961:
962:
963: wf_engine.StartProcess(itemtype => p_itemtype,itemkey => l_item_key);
964:
965: p_result := 'COMPLETE';
966:
967: exception
1006: fetch c_get_notification into l_original_recipient; --This will fetch the notification id that is in action currently
1007: close c_get_notification;
1008:
1009: --Get the present owner of the notification
1010: l_approver := wf_engine.GetItemAttrText(itemtype => p_itemtype,
1011: itemkey => p_itemkey,
1012: aname => 'APR_SS_LOGIN' );
1013: --Compare the present owner with the original_recipient, if these not same, then it is a transfer action
1014: --Delegate case:
1020:
1021: if l_approver <> l_original_recipient then
1022: --This condition ensures that we are resetting the attribute only in the case of transfer
1023: --If it is a transfer action set the item attribute APR_SS_LOGIN with the new owner i.e. original_recipient.
1024: wf_engine.SetItemAttrText(itemtype => p_itemtype,
1025: itemkey => p_itemkey,
1026: aname => 'APR_SS_LOGIN',
1027: avalue => l_original_recipient);
1028: wf_engine.SetItemAttrText(itemtype => p_itemtype,
1024: wf_engine.SetItemAttrText(itemtype => p_itemtype,
1025: itemkey => p_itemkey,
1026: aname => 'APR_SS_LOGIN',
1027: avalue => l_original_recipient);
1028: wf_engine.SetItemAttrText(itemtype => p_itemtype,
1029: itemkey => p_itemkey,
1030: aname => 'TC_APPROVER_FROM_ROLE',
1031: avalue => l_original_recipient);
1032: wf_engine.SetItemAttrText(itemtype => p_itemtype,
1028: wf_engine.SetItemAttrText(itemtype => p_itemtype,
1029: itemkey => p_itemkey,
1030: aname => 'TC_APPROVER_FROM_ROLE',
1031: avalue => l_original_recipient);
1032: wf_engine.SetItemAttrText(itemtype => p_itemtype,
1033: itemkey => p_itemkey,
1034: aname => 'TC_FROM_ROLE',
1035: avalue => l_approver);
1036: end if;
1057: BEGIN
1058:
1059:
1060:
1061: l_resource_id := wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
1062: itemkey => p_itemkey,
1063: aname => 'RESOURCE_ID' );
1064:
1065: l_tc_start_date := wf_engine.GetItemAttrDate(itemtype => p_itemtype,
1061: l_resource_id := wf_engine.GetItemAttrNumber(itemtype => p_itemtype,
1062: itemkey => p_itemkey,
1063: aname => 'RESOURCE_ID' );
1064:
1065: l_tc_start_date := wf_engine.GetItemAttrDate(itemtype => p_itemtype,
1066: itemkey => p_itemkey,
1067: aname => 'TC_START');
1068:
1069: l_exclude_hours := evaluate_abs_pref(l_resource_id,
1071: );
1072:
1073: IF not(hxc_approval_wf_pkg.item_attribute_exists(p_itemtype, p_itemkey, 'IS_ABS_ENABLED')) THEN
1074:
1075: wf_engine.additemattr
1076: (itemtype => p_itemtype,
1077: itemkey => p_itemkey,
1078: aname => 'IS_ABS_ENABLED',
1079: text_value => 'N');
1081: END IF;
1082:
1083:
1084: if l_exclude_hours = 'Y' then
1085: wf_engine.SetItemAttrText(
1086: itemtype => p_itemtype,
1087: itemkey => p_itemkey,
1088: aname => 'IS_ABS_ENABLED',
1089: avalue => 'Y');
1090:
1091: p_result := 'COMPLETE:Y';
1092:
1093: else
1094: wf_engine.SetItemAttrText(
1095: itemtype => p_itemtype,
1096: itemkey => p_itemkey,
1097: aname => 'IS_ABS_ENABLED',
1098: avalue => 'N');