101:
102: IF (funcmode = 'RUN') THEN
103: l_progress := '001';
104: IF (g_po_wf_debug = 'Y') THEN
105: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
106: END IF;
107:
108: l_document_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
109: itemkey => itemkey,
121: IF l_interface_source = 'REMIND_NOTIF' THEN
122:
123: l_progress := 'for ame when remin_notif clear all approvers';
124: IF (g_po_wf_debug = 'Y') THEN
125: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
126: END IF;
127:
128: BEGIN
129:
136: WHEN OTHERS THEN
137:
138: l_progress := 'for ame clear all approvers had exceptions '|| SQLERRM || ' code='|| sqlcode;
139: IF (g_po_wf_debug = 'Y') THEN
140: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
141: END IF;
142: END;
143: END IF;
144:
148: itemkey => itemkey,
149: aname => 'FORWARD_TO_ID');
150: l_progress := '002';
151: IF (g_po_wf_debug = 'Y') THEN
152: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
153: END IF;
154:
155: If ( l_forward_to is not null ) then
156: por_ame_approval_list.change_first_approver ( pReqHeaderId => l_document_id,
161: pFieldDelimiter => l_FieldDelimiter );
162:
163: l_progress := '003';
164: IF (g_po_wf_debug = 'Y') THEN
165: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
166: END IF;
167:
168: -- return the req to requester if forwarding fails
169: if ( l_ApprovalListCount = 0 or l_ApprovalListStr = 'NO_DATA_FOUND' or l_ApprovalListStr = 'EXCEPTION' ) then
184: END IF;
185:
186: l_progress := '004';
187: IF (g_po_wf_debug = 'Y') THEN
188: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
189: END IF;
190:
191: END IF; -- FOR 'RUN' MODE
192:
246:
247: IF (funcmode = 'RUN') THEN
248: l_progress := 'Is_Ame_For_Approval: 001';
249: IF (g_po_wf_debug = 'Y') THEN
250: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
251: END IF;
252:
253: l_document_type := wf_engine.GetItemAttrText (itemtype => itemtype,
254: itemkey => itemkey,
342:
343: IF (funcmode = 'RUN') THEN
344: l_progress := 'Is_Ame_For_Rco_Approval: 001';
345: IF (g_po_wf_debug = 'Y') THEN
346: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
347: END IF;
348:
349:
350: begin
363: end;
364:
365: l_progress := 'Is_Ame_For_Rco_Approval: 002';
366: IF (g_po_wf_debug = 'Y') THEN
367: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
368: END IF;
369:
370: if (l_transaction_type is not null) then
371:
457: IF (funcmode = 'RUN') THEN
458:
459: l_progress := 'Get_Next_Approver: 001';
460: IF (g_po_wf_debug = 'Y') THEN
461: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
462: END IF;
463:
464: l_document_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
465: itemkey => itemkey,
480:
481: l_progress := 'Get_Next_Approver: 002-'||to_char(l_document_id)||'-'||
482: l_document_type||'-'||l_document_subtype;
483: IF (g_po_wf_debug = 'Y') THEN
484: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
485: END IF;
486: ame_api.getNextApprover(applicationIdIn=>applicationId,
487: transactionIdIn=>l_document_id,
488: transactionTypeIn=>l_transaction_type,
488: transactionTypeIn=>l_transaction_type,
489: nextApproverOut=>l_next_approver);
490: l_progress := ('l_next_approver=' || to_char(l_next_approver.person_id));
491: IF (g_po_wf_debug = 'Y') THEN
492: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
493: END IF;
494:
495: IF l_next_approver.approval_status = ame_util.exceptionStatus THEN
496: raise E_FAILURE;
510: l_progress := 'Get_Next_Approver: 003- get_next_approver - '||
511: to_char(l_next_approver_id);
512:
513: IF (g_po_wf_debug = 'Y') THEN
514: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
515: END IF;
516:
517: wf_engine.SetItemAttrNumber ( itemtype => itemType,
518: itemkey => itemkey,
543:
544: l_progress := 'Get_Next_Approver: 004- GetUserName - '||
545: l_next_approver_user_name;
546: IF (g_po_wf_debug = 'Y') THEN
547: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
548: END IF;
549:
550:
551: wf_engine.SetItemAttrText( itemtype => itemType,
636: BEGIN
637:
638: l_progress := ' Update_Approval_List_Response: 001- at beginning of function';
639: IF (g_po_wf_debug = 'Y') THEN
640: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
641: END IF;
642:
643: IF (funcmode='RUN') THEN
644:
680: ' RESPONSE' || l_value || ' INSERTION? '||
681: l_insertion_type|| ' AUTHORITY? ' || l_authority_type;
682:
683: IF (g_po_wf_debug = 'Y') THEN
684: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
685: END IF;
686:
687: l_transaction_type := wf_engine.GetItemAttrText (itemtype => itemtype,
688: itemkey => itemkey,
698: p_forward_to_id=>l_forward_to_id,
699: p_response=>l_value);
700:
701: IF (g_po_wf_debug = 'Y') THEN
702: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
703: END IF;
704:
705: resultout:='COMPLETE' || ':' || 'ACTIVITY_PERFORMED';
706: RETURN;
761: BEGIN
762:
763: l_progress := ' Update_Approver_timeout: 001- at beginning of function';
764: IF (g_po_wf_debug = 'Y') THEN
765: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
766: END IF;
767:
768: IF (funcmode='RUN') THEN
769: l_document_id := wf_engine.GetItemAttrNumber (itemtype => itemtype,
793: p_response=>'TIMEOUT');
794:
795: l_progress := ' Update_Approver_timeout: 002- at end of function';
796: IF (g_po_wf_debug = 'Y') THEN
797: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
798: END IF;
799:
800: resultout:='COMPLETE' || ':' || 'ACTIVITY_PERFORMED';
801: RETURN;
933: BEGIN
934:
935: l_progress := ' SET_FORWARD_RESERVE_APPROVER: 001- at beginning of function';
936: IF (g_po_wf_debug = 'Y') THEN
937: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
938: END IF;
939:
940:
941: IF (funcmode='RUN') THEN
950:
951:
952: l_progress := ' DO 2 Roopal Update_Approval_List_Response:- p_itemtype: ' || itemtype || ' l_forward_to_id: ' || l_forward_to_id;
953: IF (g_po_wf_debug = 'Y') THEN
954: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
955: END IF;
956:
957: po_wf_util_pkg.SetItemAttrNumber( itemtype => itemtype,
958: itemkey => itemkey,
978:
979:
980: l_progress := ' DO 2 Roopal Update_Approval_List_Response:- l_user_name: ' || l_user_name || ' l_disp_user_name: ' || l_disp_user_name;
981: IF (g_po_wf_debug = 'Y') THEN
982: /* DEBUG */ PO_WF_DEBUG_PKG.insert_debug(itemtype,itemkey, l_progress);
983: END IF;
984:
985: resultout:='COMPLETE' || ':' || 'ACTIVITY_PERFORMED';
986: RETURN;