29: l_proc := g_package||'check_process';
30: hr_utility.set_location('Entering:'|| l_proc, 10);
31: hr_utility.set_location(l_proc,1);
32:
33: l_taskin_cklid := wf_engine.GetItemAttrNumber(
34: itemtype => itemtype
35: ,itemkey => itemkey
36: ,aname => 'TASKIN_CKLID'
37: ,ignore_notfound => false
36: ,aname => 'TASKIN_CKLID'
37: ,ignore_notfound => false
38: );
39: -- 8891632 starts
40: l_allocated_task_id := wf_engine.GetItemAttrNumber(
41: itemtype => itemtype
42: ,itemkey => itemkey
43: ,aname => 'ALLOC_TASKID'
44: ,ignore_notfound => false
192: open cur_check_wf_status(itemtype||':'|| itemkey ||':%');
193: fetch cur_check_wf_status into l_status,l_responder;
194: if(cur_check_wf_status%FOUND) then
195: if(l_status is not null and l_status='COMPLETE' )then
196: wf_engine.SetItemAttrText(itemtype,itemkey,'TASK_STATUS', hr_general.decode_lookup('PER_CHECKLIST_TASK_STATUS','COM'));
197: wf_engine.SetItemAttrText(itemtype,itemkey,'TASK_DONE_BY',l_responder);
198: resultout:='COMPLETE:'||l_status;
199: else
200: if (l_status is not null and l_status='NOT COMPLETED' )then
193: fetch cur_check_wf_status into l_status,l_responder;
194: if(cur_check_wf_status%FOUND) then
195: if(l_status is not null and l_status='COMPLETE' )then
196: wf_engine.SetItemAttrText(itemtype,itemkey,'TASK_STATUS', hr_general.decode_lookup('PER_CHECKLIST_TASK_STATUS','COM'));
197: wf_engine.SetItemAttrText(itemtype,itemkey,'TASK_DONE_BY',l_responder);
198: resultout:='COMPLETE:'||l_status;
199: else
200: if (l_status is not null and l_status='NOT COMPLETED' )then
201: wf_engine.SetItemAttrText(itemtype,itemkey,'TASK_STATUS',hr_general.decode_lookup('PER_CHECKLIST_TASK_STATUS','REJ'));
197: wf_engine.SetItemAttrText(itemtype,itemkey,'TASK_DONE_BY',l_responder);
198: resultout:='COMPLETE:'||l_status;
199: else
200: if (l_status is not null and l_status='NOT COMPLETED' )then
201: wf_engine.SetItemAttrText(itemtype,itemkey,'TASK_STATUS',hr_general.decode_lookup('PER_CHECKLIST_TASK_STATUS','REJ'));
202: wf_engine.SetItemAttrText(itemtype,itemkey,'TASK_DONE_BY',l_responder);
203: resultout:='COMPLETE:'||l_status;
204: end if;
205: end if;
198: resultout:='COMPLETE:'||l_status;
199: else
200: if (l_status is not null and l_status='NOT COMPLETED' )then
201: wf_engine.SetItemAttrText(itemtype,itemkey,'TASK_STATUS',hr_general.decode_lookup('PER_CHECKLIST_TASK_STATUS','REJ'));
202: wf_engine.SetItemAttrText(itemtype,itemkey,'TASK_DONE_BY',l_responder);
203: resultout:='COMPLETE:'||l_status;
204: end if;
205: end if;
206: end if;
875:
876:
877: -- End of changes as per Bug#12385504
878:
879: varname Wf_Engine.NameTabTyp;
880: varvalue Wf_Engine.TextTabTyp;
881: numname Wf_Engine.NameTabTyp;
882: numvalue Wf_Engine.NumTabTyp;
883: --
876:
877: -- End of changes as per Bug#12385504
878:
879: varname Wf_Engine.NameTabTyp;
880: varvalue Wf_Engine.TextTabTyp;
881: numname Wf_Engine.NameTabTyp;
882: numvalue Wf_Engine.NumTabTyp;
883: --
884: l_performer_name varchar2(3000);
877: -- End of changes as per Bug#12385504
878:
879: varname Wf_Engine.NameTabTyp;
880: varvalue Wf_Engine.TextTabTyp;
881: numname Wf_Engine.NameTabTyp;
882: numvalue Wf_Engine.NumTabTyp;
883: --
884: l_performer_name varchar2(3000);
885:
878:
879: varname Wf_Engine.NameTabTyp;
880: varvalue Wf_Engine.TextTabTyp;
881: numname Wf_Engine.NameTabTyp;
882: numvalue Wf_Engine.NumTabTyp;
883: --
884: l_performer_name varchar2(3000);
885:
886: begin
896: FETCH csr_person_name into l_person_name;
897: CLOSE csr_person_name;
898:
899:
900: wf_engine.CreateProcess (ItemType => l_Item_Type
901: ,ItemKey => l_Item_Key
902: ,process => l_process
903: ,User_Key => l_user_key
904: ,Owner_Role => 'COREHR' --l_task_owner -- p_task_owner
924: varvalue(6) := p_checklist_description;
925: varname(7) := 'PERSON';
926: varvalue(7) := l_person_name;
927:
928: wf_engine.SetItemAttrTextArray(l_Item_Type,l_Item_Key,varname,varvalue);
929: --
930: numname(1) := 'ALLOC_TASKID';
931: numvalue(1) := p_allocated_task_id;
932: numname(2) := 'TASKIN_CKLID';
931: numvalue(1) := p_allocated_task_id;
932: numname(2) := 'TASKIN_CKLID';
933: numvalue(2) := p_task_in_checklist_id;
934:
935: wf_engine.SetItemAttrNumberArray(l_Item_Type,l_Item_Key,numname,numvalue);
936: --
937: wf_engine.SetItemAttrDate (itemtype => l_Item_Type
938: ,itemkey => l_Item_Key
939: ,aname => 'TARGETDATE'
933: numvalue(2) := p_task_in_checklist_id;
934:
935: wf_engine.SetItemAttrNumberArray(l_Item_Type,l_Item_Key,numname,numvalue);
936: --
937: wf_engine.SetItemAttrDate (itemtype => l_Item_Type
938: ,itemkey => l_Item_Key
939: ,aname => 'TARGETDATE'
940: ,avalue => p_target_date
941: );
939: ,aname => 'TARGETDATE'
940: ,avalue => p_target_date
941: );
942:
943: wf_engine.StartProcess (itemtype => l_Item_Type
944: ,itemkey => l_Item_Key
945: );
946: --
947: if g_debug then
989: --
990: if (funcmode = 'RUN') then
991: --
992: --
993: l_alloc_id := wf_engine.GetItemAttrNumber(
994: itemtype => itemtype
995: ,itemkey => itemkey
996: ,aname => 'ALLOC_TASKID'
997: ,ignore_notfound => false
997: ,ignore_notfound => false
998: );
999: --
1000: -- bug 7560762
1001: l_task_done_by := wf_engine.GetItemAttrText(
1002: itemtype => itemtype
1003: ,itemkey => itemkey
1004: ,aname => 'TASK_DONE_BY');
1005: hr_utility.set_location('l_task_done_by '||l_task_done_by,99);
1066: --
1067: if (funcmode = 'RUN')
1068: then
1069: --
1070: l_alloc_id := wf_engine.GetItemAttrNumber(
1071: itemtype => itemtype
1072: ,itemkey => itemkey
1073: ,aname => 'ALLOC_TASKID'
1074: ,ignore_notfound => false
1074: ,ignore_notfound => false
1075: );
1076: --
1077: -- bug 7560762 starts
1078: l_task_done_by := wf_engine.GetItemAttrText(
1079: itemtype => itemtype
1080: ,itemkey => itemkey
1081: ,aname => 'TASK_DONE_BY');
1082:
1142: --
1143: if (funcmode = 'RUN')
1144: then
1145: --
1146: l_total_approvers := wf_engine.GetItemAttrNumber(
1147: itemtype => itemtype
1148: ,itemkey => itemkey
1149: ,aname => 'TOTAL_APPROVERS'
1150: ,ignore_notfound => false
1148: ,itemkey => itemkey
1149: ,aname => 'TOTAL_APPROVERS'
1150: ,ignore_notfound => false
1151: );
1152: l_curr_approver := wf_engine.GetItemAttrNumber(
1153: itemtype => itemtype
1154: ,itemkey => itemkey
1155: ,aname => 'CURRENT_APPROVER'
1156: ,ignore_notfound => false
1159: if l_total_approvers > 1 and (l_curr_approver < l_total_approvers) then
1160: --
1161: l_count := l_curr_approver+1;
1162: -- insert into tp_temp values ('Current Apr lcount ',l_count);
1163: l_taskin_cklid := wf_engine.GetItemAttrNumber(
1164: itemtype => itemtype
1165: ,itemkey => itemkey
1166: ,aname => 'TASKIN_CKLID'
1167: ,ignore_notfound => false
1178: l_recipient := all_approvers(l_count).name;
1179: l_recipient_name := all_approvers(l_count).display_name;
1180:
1181: end;
1182: wf_engine.SetItemAttrNumber (
1183: itemtype => itemtype
1184: ,itemkey => itemkey
1185: ,aname => 'CURRENT_APPROVER'
1186: ,avalue => l_count
1184: ,itemkey => itemkey
1185: ,aname => 'CURRENT_APPROVER'
1186: ,avalue => l_count
1187: );
1188: wf_engine.SetItemAttrText (
1189: itemtype => itemtype
1190: ,itemkey => itemkey
1191: ,aname => 'RECIPIENT'
1192: ,avalue => l_recipient
1190: ,itemkey => itemkey
1191: ,aname => 'RECIPIENT'
1192: ,avalue => l_recipient
1193: );
1194: wf_engine.SetItemAttrText (
1195: itemtype => itemtype
1196: ,itemkey => itemkey
1197: ,aname => 'RECIPIENT_NAME'
1198: ,avalue => l_recipient_name