27: ) IS
28:
29: BEGIN
30:
31: G_K_Header_ID := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'CONTRACT_ID');
32: G_K_Number := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_NUMBER');
33: G_K_Type_Code := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CODE');
34: G_K_Type := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE');
35: G_Type_Class := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CLASS');
28:
29: BEGIN
30:
31: G_K_Header_ID := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'CONTRACT_ID');
32: G_K_Number := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_NUMBER');
33: G_K_Type_Code := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CODE');
34: G_K_Type := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE');
35: G_Type_Class := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CLASS');
36: G_Intent := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'INTENT');
29: BEGIN
30:
31: G_K_Header_ID := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'CONTRACT_ID');
32: G_K_Number := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_NUMBER');
33: G_K_Type_Code := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CODE');
34: G_K_Type := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE');
35: G_Type_Class := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CLASS');
36: G_Intent := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'INTENT');
37: G_Requestor := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'REQUESTOR');
30:
31: G_K_Header_ID := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'CONTRACT_ID');
32: G_K_Number := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_NUMBER');
33: G_K_Type_Code := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CODE');
34: G_K_Type := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE');
35: G_Type_Class := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CLASS');
36: G_Intent := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'INTENT');
37: G_Requestor := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'REQUESTOR');
38: G_Aprv_Path := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_PATH_ID');
31: G_K_Header_ID := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'CONTRACT_ID');
32: G_K_Number := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_NUMBER');
33: G_K_Type_Code := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CODE');
34: G_K_Type := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE');
35: G_Type_Class := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CLASS');
36: G_Intent := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'INTENT');
37: G_Requestor := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'REQUESTOR');
38: G_Aprv_Path := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_PATH_ID');
39: G_Aprv_Seq := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_SEQUENCE');
32: G_K_Number := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_NUMBER');
33: G_K_Type_Code := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CODE');
34: G_K_Type := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE');
35: G_Type_Class := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CLASS');
36: G_Intent := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'INTENT');
37: G_Requestor := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'REQUESTOR');
38: G_Aprv_Path := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_PATH_ID');
39: G_Aprv_Seq := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_SEQUENCE');
40:
33: G_K_Type_Code := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CODE');
34: G_K_Type := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE');
35: G_Type_Class := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CLASS');
36: G_Intent := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'INTENT');
37: G_Requestor := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'REQUESTOR');
38: G_Aprv_Path := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_PATH_ID');
39: G_Aprv_Seq := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_SEQUENCE');
40:
41: END Load_Globals;
34: G_K_Type := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE');
35: G_Type_Class := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CLASS');
36: G_Intent := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'INTENT');
37: G_Requestor := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'REQUESTOR');
38: G_Aprv_Path := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_PATH_ID');
39: G_Aprv_Seq := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_SEQUENCE');
40:
41: END Load_Globals;
42:
35: G_Type_Class := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CLASS');
36: G_Intent := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'INTENT');
37: G_Requestor := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'REQUESTOR');
38: G_Aprv_Path := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_PATH_ID');
39: G_Aprv_Seq := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_SEQUENCE');
40:
41: END Load_Globals;
42:
43:
219: BEGIN
220:
221: IF ( FuncMode = 'RUN' ) THEN
222:
223: G_K_Header_ID := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'CONTRACT_ID');
224:
225: OPEN k ( G_K_Header_ID );
226: FETCH k INTO krec;
227: CLOSE k;
231: FROM wf_items
232: WHERE item_type = ItemType
233: AND item_key = ItemKey;
234:
235: WF_ENGINE.SetItemAttrText( itemtype => ItemType
236: , itemkey => ItemKey
237: , aname => 'K_NUMBER'
238: , avalue => krec.k_number_disp );
239:
236: , itemkey => ItemKey
237: , aname => 'K_NUMBER'
238: , avalue => krec.k_number_disp );
239:
240: WF_ENGINE.SetItemAttrText( itemtype => ItemType
241: , itemkey => ItemKey
242: , aname => 'K_TYPE_CODE'
243: , avalue => krec.k_type_code );
244:
241: , itemkey => ItemKey
242: , aname => 'K_TYPE_CODE'
243: , avalue => krec.k_type_code );
244:
245: WF_ENGINE.SetItemAttrText( itemtype => ItemType
246: , itemkey => ItemKey
247: , aname => 'K_TYPE'
248: , avalue => krec.k_type_name );
249:
246: , itemkey => ItemKey
247: , aname => 'K_TYPE'
248: , avalue => krec.k_type_name );
249:
250: WF_ENGINE.SetItemAttrText( itemtype => ItemType
251: , itemkey => ItemKey
252: , aname => 'K_TYPE_CLASS'
253: , avalue => krec.type_class_code );
254:
251: , itemkey => ItemKey
252: , aname => 'K_TYPE_CLASS'
253: , avalue => krec.type_class_code );
254:
255: WF_ENGINE.SetItemAttrText( itemtype => ItemType
256: , itemkey => ItemKey
257: , aname => 'INTENT'
258: , avalue => krec.buy_or_sell );
259:
256: , itemkey => ItemKey
257: , aname => 'INTENT'
258: , avalue => krec.buy_or_sell );
259:
260: WF_ENGINE.SetItemAttrText( itemtype => ItemType
261: , itemkey => ItemKey
262: , aname => 'CURRENCY_CODE'
263: , avalue => krec.currency_code );
264:
261: , itemkey => ItemKey
262: , aname => 'CURRENCY_CODE'
263: , avalue => krec.currency_code );
264:
265: WF_ENGINE.SetItemAttrText( itemtype => ItemType
266: , itemkey => ItemKey
267: , aname => 'CONTRACT_VALUE'
268: , avalue =>
269: to_char( krec.k_value
268: , avalue =>
269: to_char( krec.k_value
270: , FND_CURRENCY.get_format_mask( krec.currency_code , 38 ) ) );
271:
272: WF_ENGINE.SetItemAttrText( itemtype => ItemType
273: , itemkey => ItemKey
274: , aname => 'SHORT_DESCRIPTION'
275: , avalue => krec.short_description );
276:
273: , itemkey => ItemKey
274: , aname => 'SHORT_DESCRIPTION'
275: , avalue => krec.short_description );
276:
277: WF_ENGINE.SetItemAttrText( itemtype => ItemType
278: , itemkey => ItemKey
279: , aname => 'DESCRIPTION'
280: , avalue => krec.description );
281:
278: , itemkey => ItemKey
279: , aname => 'DESCRIPTION'
280: , avalue => krec.description );
281:
282: WF_ENGINE.SetItemAttrText( itemtype => ItemType
283: , itemkey => ItemKey
284: , aname => 'STS_CODE'
285: , avalue => krec.status_code );
286:
283: , itemkey => ItemKey
284: , aname => 'STS_CODE'
285: , avalue => krec.status_code );
286:
287: WF_ENGINE.SetItemAttrText( itemtype => ItemType
288: , itemkey => ItemKey
289: , aname => 'STE_CODE'
290: , avalue => krec.ste_code );
291:
288: , itemkey => ItemKey
289: , aname => 'STE_CODE'
290: , avalue => krec.ste_code );
291:
292: WF_ENGINE.SetItemAttrText( itemtype => ItemType
293: , itemkey => ItemKey
294: , aname => 'REQUESTOR'
295: , avalue => FND_GLOBAL.User_Name );
296:
293: , itemkey => ItemKey
294: , aname => 'REQUESTOR'
295: , avalue => FND_GLOBAL.User_Name );
296:
297: WF_ENGINE.SetItemAttrNumber( itemtype => ItemType
298: , itemkey => ItemKey
299: , aname => 'APPROVAL_SEQUENCE'
300: , avalue => 0 );
301:
298: , itemkey => ItemKey
299: , aname => 'APPROVAL_SEQUENCE'
300: , avalue => 0 );
301:
302: WF_ENGINE.SetItemAttrNumber( itemtype => ItemType
303: , itemkey => ItemKey
304: , aname => 'ORG_ID'
305: , avalue => krec.authoring_org_id );
306:
303: , itemkey => ItemKey
304: , aname => 'ORG_ID'
305: , avalue => krec.authoring_org_id );
306:
307: WF_ENGINE.SetItemAttrText( itemtype => ItemType
308: , itemkey => ItemKey
309: , aname => 'K_NUMBER_LINK'
310: , avalue => 'PLSQL:OKE_K_APPROVAL_WF2.CONTRACT_NUMBER_LINK/'
311: || ItemType || ':' || ItemKey );
309: , aname => 'K_NUMBER_LINK'
310: , avalue => 'PLSQL:OKE_K_APPROVAL_WF2.CONTRACT_NUMBER_LINK/'
311: || ItemType || ':' || ItemKey );
312:
313: WF_ENGINE.SetItemAttrText( itemtype => ItemType
314: , itemkey => ItemKey
315: , aname => 'APPROVAL_HISTORY'
316: , avalue => 'PLSQL:OKE_K_APPROVAL_WF2.SHOW_APPROVAL_HISTORY/'
317: || ItemType || ':' || ItemKey );
330: ||'&addBreadCrumb=Y';
331:
332:
333:
334: WF_ENGINE.SetItemAttrText( itemtype => ItemType
335: , itemkey => ItemKey
336: , aname => 'FLOWDOWN_LINK'
337: , avalue => P_FLOWDOWN_LINK );
338:
357:
358: EXCEPTION
359: WHEN OTHERS THEN
360: ResultOut := 'ERROR';
361: WF_ENGINE.SetItemAttrText
362: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
363: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
364: , 'INITIALIZE'
365: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
415: ResultOut := 'COMPLETE:Y';
416: ELSE
417: ResultOut := 'COMPLETE:N';
418: FND_MESSAGE.Set_Name('OKE' , 'OKE_APRV_ABT_BOA_NOT_APPROVED');
419: WF_ENGINE.SetItemAttrText
420: ( ItemType => ItemType
421: , ItemKey => ItemKey
422: , AName => 'MESSAGE1'
423: , AValue => FND_MESSAGE.Get );
427: END IF;
428:
429: IF ( FuncMode = 'CANCEL' ) THEN
430:
431: ResultOut := WF_ENGINE.ENG_NULL;
432: RETURN;
433:
434: END IF;
435:
434: END IF;
435:
436: IF ( FuncMode = 'TIMEOUT' ) THEN
437:
438: ResultOut := WF_ENGINE.ENG_NULL;
439: RETURN;
440:
441: END IF;
442:
442:
443: EXCEPTION
444: WHEN OTHERS THEN
445: ResultOut := 'ERROR:';
446: WF_ENGINE.SetItemAttrText
447: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
448: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
449: , 'IS_BOA_APPROVED'
450: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
481: BEGIN
482:
483: IF ( FuncMode = 'RUN' ) THEN
484:
485: ste_code := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'STE_CODE');
486:
487: IF ( ste_code IN ( 'ENTERED' , 'CANCELED' ) ) THEN
488: ResultOut := 'COMPLETE:N';
489: ELSE
488: ResultOut := 'COMPLETE:N';
489: ELSE
490: ResultOut := 'COMPLETE:Y';
491: FND_MESSAGE.Set_Name('OKE' , 'OKE_APRV_ABT_APPROVED');
492: WF_ENGINE.SetItemAttrText
493: ( ItemType => ItemType
494: , ItemKey => ItemKey
495: , AName => 'MESSAGE1'
496: , AValue => FND_MESSAGE.Get );
500: END IF;
501:
502: IF ( FuncMode = 'CANCEL' ) THEN
503:
504: ResultOut := WF_ENGINE.ENG_NULL;
505: RETURN;
506:
507: END IF;
508:
507: END IF;
508:
509: IF ( FuncMode = 'TIMEOUT' ) THEN
510:
511: ResultOut := WF_ENGINE.ENG_NULL;
512: RETURN;
513:
514: END IF;
515:
515:
516: EXCEPTION
517: WHEN OTHERS THEN
518: ResultOut := 'ERROR:';
519: WF_ENGINE.SetItemAttrText
520: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
521: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
522: , 'IS_DOC_APPROVED'
523: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
554: BEGIN
555:
556: IF ( FuncMode = 'RUN' ) THEN
557:
558: IF ( WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'K_TYPE_CLASS') = 'DO' ) THEN
559: ResultOut := 'COMPLETE:Y';
560: ELSE
561: ResultOut := 'COMPLETE:N';
562: END IF;
565: END IF;
566:
567: IF ( FuncMode = 'CANCEL' ) THEN
568:
569: ResultOut := WF_ENGINE.ENG_NULL;
570: RETURN;
571:
572: END IF;
573:
572: END IF;
573:
574: IF ( FuncMode = 'TIMEOUT' ) THEN
575:
576: ResultOut := WF_ENGINE.ENG_NULL;
577: RETURN;
578:
579: END IF;
580:
580:
581: EXCEPTION
582: WHEN OTHERS THEN
583: ResultOut := 'ERROR:';
584: WF_ENGINE.SetItemAttrText
585: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
586: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
587: , 'IS_DOC_DELV_ORDER'
588: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
619: BEGIN
620:
621: IF ( FuncMode = 'RUN' ) THEN
622:
623: ste_code := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'STE_CODE');
624:
625: IF ( ste_code in ( 'CANCELED' , 'TERMINATED' , 'EXPIRED' ) ) THEN
626: ResultOut := 'COMPLETE:Y';
627: FND_MESSAGE.Set_Name('OKE' , 'OKE_APRV_ABT_INACTIVE');
624:
625: IF ( ste_code in ( 'CANCELED' , 'TERMINATED' , 'EXPIRED' ) ) THEN
626: ResultOut := 'COMPLETE:Y';
627: FND_MESSAGE.Set_Name('OKE' , 'OKE_APRV_ABT_INACTIVE');
628: WF_ENGINE.SetItemAttrText
629: ( ItemType => ItemType
630: , ItemKey => ItemKey
631: , AName => 'MESSAGE1'
632: , AValue => FND_MESSAGE.Get );
638: END IF;
639:
640: IF ( FuncMode = 'CANCEL' ) THEN
641:
642: ResultOut := WF_ENGINE.ENG_NULL;
643: RETURN;
644:
645: END IF;
646:
645: END IF;
646:
647: IF ( FuncMode = 'TIMEOUT' ) THEN
648:
649: ResultOut := WF_ENGINE.ENG_NULL;
650: RETURN;
651:
652: END IF;
653:
653:
654: EXCEPTION
655: WHEN OTHERS THEN
656: ResultOut := 'ERROR:';
657: WF_ENGINE.SetItemAttrText
658: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
659: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
660: , 'IS_DOC_INACTIVE'
661: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
698: IF ( FuncMode = 'RUN' ) THEN
699:
700: Load_Globals( ItemType , ItemKey );
701:
702: ApprovalSteps := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVAL_STEPS');
703: ApprovalSeq := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_SEQUENCE');
704:
705: OKE_APPROVAL_PATHS_PKG.Next_Approval_Step( ApprovalSteps , ApprovalSeq , NextApprSeq , NextApprRoleID );
706:
699:
700: Load_Globals( ItemType , ItemKey );
701:
702: ApprovalSteps := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVAL_STEPS');
703: ApprovalSeq := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_SEQUENCE');
704:
705: OKE_APPROVAL_PATHS_PKG.Next_Approval_Step( ApprovalSteps , ApprovalSeq , NextApprSeq , NextApprRoleID );
706:
707: IF ( NextApprRoleID IS NULL ) THEN
714: END IF;
715:
716: IF ( FuncMode = 'CANCEL' ) THEN
717:
718: ResultOut := WF_ENGINE.ENG_NULL;
719: RETURN;
720:
721: END IF;
722:
721: END IF;
722:
723: IF ( FuncMode = 'TIMEOUT' ) THEN
724:
725: ResultOut := WF_ENGINE.ENG_NULL;
726: RETURN;
727:
728: END IF;
729:
729:
730: EXCEPTION
731: WHEN OTHERS THEN
732: ResultOut := 'ERROR:';
733: WF_ENGINE.SetItemAttrText
734: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
735: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
736: , 'IS_FINAL_APPROVER'
737: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
770: IF ( FuncMode = 'RUN' ) THEN
771:
772: Load_Globals( ItemType , ItemKey );
773:
774: Approver := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVER');
775:
776: IF ( Approver = G_Requestor ) THEN
777: --
778: -- If approver is the requestor, there is no need to seek approval.
801: END IF;
802:
803: IF ( FuncMode = 'CANCEL' ) THEN
804:
805: ResultOut := WF_ENGINE.ENG_NULL;
806: RETURN;
807:
808: END IF;
809:
808: END IF;
809:
810: IF ( FuncMode = 'TIMEOUT' ) THEN
811:
812: ResultOut := WF_ENGINE.ENG_NULL;
813: RETURN;
814:
815: END IF;
816:
816:
817: EXCEPTION
818: WHEN OTHERS THEN
819: ResultOut := 'ERROR:';
820: WF_ENGINE.SetItemAttrText
821: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
822: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
823: , 'IS_REQUESTOR_APPROVER'
824: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
853: BEGIN
854:
855: IF ( FuncMode = 'RUN' ) THEN
856:
857: IF ( WF_ENGINE.GetItemAttrText( ItemType , ItemKey , 'SIGNATURE_REQUIRED' ) = 'Y' ) THEN
858: ResultOut := 'COMPLETE:Y';
859: ELSE
860: ResultOut := 'COMPLETE:N';
861: END IF;
864: END IF;
865:
866: IF ( FuncMode = 'CANCEL' ) THEN
867:
868: ResultOut := WF_ENGINE.ENG_NULL;
869: RETURN;
870:
871: END IF;
872:
871: END IF;
872:
873: IF ( FuncMode = 'TIMEOUT' ) THEN
874:
875: ResultOut := WF_ENGINE.ENG_NULL;
876: RETURN;
877:
878: END IF;
879:
879:
880: EXCEPTION
881: WHEN OTHERS THEN
882: ResultOut := 'ERROR:';
883: WF_ENGINE.SetItemAttrText
884: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
885: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
886: , 'IS_SIGNATURE_REQUIRED'
887: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
916: BEGIN
917:
918: IF ( FuncMode = 'RUN' ) THEN
919:
920: IF ( WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'NOTE') IS NULL
921: AND WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'WF_NOTE') IS NULL ) THEN
922: ResultOut := 'COMPLETE:N';
923: ELSE
924: ResultOut := 'COMPLETE:Y';
917:
918: IF ( FuncMode = 'RUN' ) THEN
919:
920: IF ( WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'NOTE') IS NULL
921: AND WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'WF_NOTE') IS NULL ) THEN
922: ResultOut := 'COMPLETE:N';
923: ELSE
924: ResultOut := 'COMPLETE:Y';
925: END IF;
929: END IF;
930:
931: IF ( FuncMode = 'CANCEL' ) THEN
932:
933: ResultOut := WF_ENGINE.ENG_NULL;
934: RETURN;
935:
936: END IF;
937:
936: END IF;
937:
938: IF ( FuncMode = 'TIMEOUT' ) THEN
939:
940: ResultOut := WF_ENGINE.ENG_NULL;
941: RETURN;
942:
943: END IF;
944:
944:
945: EXCEPTION
946: WHEN OTHERS THEN
947: ResultOut := 'ERROR:';
948: WF_ENGINE.SetItemAttrText
949: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
950: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
951: , 'REJ_NOTE_FILLED'
952: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
991: IF ( FuncMode = 'RUN' ) THEN
992:
993: Load_Globals( ItemType , ItemKey );
994:
995: ApprovalSteps := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVAL_STEPS');
996: ApprovalPath := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_PATH_ID');
997: ApprovalSeq := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_SEQUENCE');
998:
999: OKE_APPROVAL_PATHS_PKG.Next_Approval_Step( ApprovalSteps , ApprovalSeq , NextApprSeq , NextApprRoleID );
992:
993: Load_Globals( ItemType , ItemKey );
994:
995: ApprovalSteps := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVAL_STEPS');
996: ApprovalPath := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_PATH_ID');
997: ApprovalSeq := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_SEQUENCE');
998:
999: OKE_APPROVAL_PATHS_PKG.Next_Approval_Step( ApprovalSteps , ApprovalSeq , NextApprSeq , NextApprRoleID );
1000:
993: Load_Globals( ItemType , ItemKey );
994:
995: ApprovalSteps := WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVAL_STEPS');
996: ApprovalPath := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_PATH_ID');
997: ApprovalSeq := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVAL_SEQUENCE');
998:
999: OKE_APPROVAL_PATHS_PKG.Next_Approval_Step( ApprovalSteps , ApprovalSeq , NextApprSeq , NextApprRoleID );
1000:
1001: IF ( NextApprRoleID IS NULL ) THEN
1019:
1020: --
1021: -- Push previous approver to the PREV_APPROVER% attributes
1022: --
1023: WF_ENGINE.SetItemAttrText
1024: ( ItemType , ItemKey , 'PREV_APPROVER'
1025: , WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVER') );
1026: WF_ENGINE.SetItemAttrText
1027: ( ItemType , ItemKey , 'PREV_APPROVER_ROLE'
1021: -- Push previous approver to the PREV_APPROVER% attributes
1022: --
1023: WF_ENGINE.SetItemAttrText
1024: ( ItemType , ItemKey , 'PREV_APPROVER'
1025: , WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVER') );
1026: WF_ENGINE.SetItemAttrText
1027: ( ItemType , ItemKey , 'PREV_APPROVER_ROLE'
1028: , WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVER_ROLE') );
1029: WF_ENGINE.SetItemAttrNumber
1022: --
1023: WF_ENGINE.SetItemAttrText
1024: ( ItemType , ItemKey , 'PREV_APPROVER'
1025: , WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVER') );
1026: WF_ENGINE.SetItemAttrText
1027: ( ItemType , ItemKey , 'PREV_APPROVER_ROLE'
1028: , WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVER_ROLE') );
1029: WF_ENGINE.SetItemAttrNumber
1030: ( ItemType , ItemKey , 'PREV_APPROVER_ROLE_ID'
1024: ( ItemType , ItemKey , 'PREV_APPROVER'
1025: , WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVER') );
1026: WF_ENGINE.SetItemAttrText
1027: ( ItemType , ItemKey , 'PREV_APPROVER_ROLE'
1028: , WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVER_ROLE') );
1029: WF_ENGINE.SetItemAttrNumber
1030: ( ItemType , ItemKey , 'PREV_APPROVER_ROLE_ID'
1031: , WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVER_ROLE_ID') );
1032:
1025: , WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVER') );
1026: WF_ENGINE.SetItemAttrText
1027: ( ItemType , ItemKey , 'PREV_APPROVER_ROLE'
1028: , WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVER_ROLE') );
1029: WF_ENGINE.SetItemAttrNumber
1030: ( ItemType , ItemKey , 'PREV_APPROVER_ROLE_ID'
1031: , WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVER_ROLE_ID') );
1032:
1033: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER' , NextAppr );
1027: ( ItemType , ItemKey , 'PREV_APPROVER_ROLE'
1028: , WF_ENGINE.GetItemAttrText(ItemType , ItemKey , 'APPROVER_ROLE') );
1029: WF_ENGINE.SetItemAttrNumber
1030: ( ItemType , ItemKey , 'PREV_APPROVER_ROLE_ID'
1031: , WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVER_ROLE_ID') );
1032:
1033: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER' , NextAppr );
1034: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER_ROLE' , NextApprRole );
1035: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER_ROLE_ID' , NextApprRoleID );
1029: WF_ENGINE.SetItemAttrNumber
1030: ( ItemType , ItemKey , 'PREV_APPROVER_ROLE_ID'
1031: , WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVER_ROLE_ID') );
1032:
1033: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER' , NextAppr );
1034: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER_ROLE' , NextApprRole );
1035: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER_ROLE_ID' , NextApprRoleID );
1036: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVAL_SEQUENCE' , NextApprSeq );
1037: --
1030: ( ItemType , ItemKey , 'PREV_APPROVER_ROLE_ID'
1031: , WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVER_ROLE_ID') );
1032:
1033: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER' , NextAppr );
1034: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER_ROLE' , NextApprRole );
1035: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER_ROLE_ID' , NextApprRoleID );
1036: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVAL_SEQUENCE' , NextApprSeq );
1037: --
1038: -- Erase note text
1031: , WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'APPROVER_ROLE_ID') );
1032:
1033: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER' , NextAppr );
1034: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER_ROLE' , NextApprRole );
1035: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER_ROLE_ID' , NextApprRoleID );
1036: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVAL_SEQUENCE' , NextApprSeq );
1037: --
1038: -- Erase note text
1039: --
1032:
1033: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER' , NextAppr );
1034: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER_ROLE' , NextApprRole );
1035: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER_ROLE_ID' , NextApprRoleID );
1036: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVAL_SEQUENCE' , NextApprSeq );
1037: --
1038: -- Erase note text
1039: --
1040: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'NOTE' , NULL );
1036: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVAL_SEQUENCE' , NextApprSeq );
1037: --
1038: -- Erase note text
1039: --
1040: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'NOTE' , NULL );
1041: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'WF_NOTE' , NULL );
1042:
1043: IF ( NextAppr IS NULL ) THEN
1044: ResultOut := 'COMPLETE:F';
1037: --
1038: -- Erase note text
1039: --
1040: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'NOTE' , NULL );
1041: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'WF_NOTE' , NULL );
1042:
1043: IF ( NextAppr IS NULL ) THEN
1044: ResultOut := 'COMPLETE:F';
1045: ELSE
1065: END IF;
1066:
1067: IF ( FuncMode = 'CANCEL' ) THEN
1068:
1069: ResultOut := WF_ENGINE.ENG_NULL;
1070: RETURN;
1071:
1072: END IF;
1073:
1072: END IF;
1073:
1074: IF ( FuncMode = 'TIMEOUT' ) THEN
1075:
1076: ResultOut := WF_ENGINE.ENG_NULL;
1077: RETURN;
1078:
1079: END IF;
1080:
1080:
1081: EXCEPTION
1082: WHEN OTHERS THEN
1083: ResultOut := 'ERROR:';
1084: WF_ENGINE.SetItemAttrText
1085: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
1086: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
1087: , 'SELECT_NEXT_APPROVER'
1088: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
1122: IF ( FuncMode = 'RUN' ) THEN
1123:
1124: Load_Globals( ItemType , ItemKey );
1125:
1126: SignatoryRole := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'SIGNATORY_ROLE_ID');
1127: Signatory := KRole_To_WFRole( SignatoryRole );
1128:
1129: IF ( Signatory IS NULL ) THEN
1130: ResultOut := 'COMPLETE:F';
1129: IF ( Signatory IS NULL ) THEN
1130: ResultOut := 'COMPLETE:F';
1131: ELSE
1132:
1133: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'SIGNATORY' , Signatory );
1134:
1135: --
1136: -- Erase note text
1137: --
1134:
1135: --
1136: -- Erase note text
1137: --
1138: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'NOTE' , NULL );
1139: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'WF_NOTE' , NULL );
1140:
1141: --
1142: -- Write Approval History
1135: --
1136: -- Erase note text
1137: --
1138: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'NOTE' , NULL );
1139: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'WF_NOTE' , NULL );
1140:
1141: --
1142: -- Write Approval History
1143: --
1160: END IF;
1161:
1162: IF ( FuncMode = 'CANCEL' ) THEN
1163:
1164: ResultOut := WF_ENGINE.ENG_NULL;
1165: RETURN;
1166:
1167: END IF;
1168:
1167: END IF;
1168:
1169: IF ( FuncMode = 'TIMEOUT' ) THEN
1170:
1171: ResultOut := WF_ENGINE.ENG_NULL;
1172: RETURN;
1173:
1174: END IF;
1175:
1175:
1176: EXCEPTION
1177: WHEN OTHERS THEN
1178: ResultOut := 'ERROR:';
1179: WF_ENGINE.SetItemAttrText
1180: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
1181: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
1182: , 'SELECT_SIGNATORY'
1183: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
1213: SELECT message_name
1214: , recipient_role
1215: , responder
1216: FROM wf_notifications
1217: WHERE notification_id = WF_ENGINE.CONTEXT_NID;
1218: NtfDtlRec NtfDtls%rowtype;
1219:
1220: Performer VARCHAR2(320);
1221: ActionCode VARCHAR2(30);
1246: -- Write Approval History
1247: --
1248: IF ( FuncMode IN ( 'FORWARD' , 'TRANSFER' ) ) THEN
1249:
1250: Performer := WF_ENGINE.CONTEXT_TEXT;
1251: ActionCode := FuncMode;
1252:
1253: ELSE
1254:
1253: ELSE
1254:
1255: Performer := NtfDtlRec.Recipient_Role;
1256:
1257: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER' , Performer );
1258:
1259: IF ( NtfDtlRec.Message_Name = 'MSG_APPROVAL' ) THEN
1260:
1261: ActionCode := WF_NOTIFICATION.GetAttrText( nid => WF_ENGINE.CONTEXT_NID , aname => 'RESULT' );
1257: WF_ENGINE.SetItemAttrText( ItemType , ItemKey , 'APPROVER' , Performer );
1258:
1259: IF ( NtfDtlRec.Message_Name = 'MSG_APPROVAL' ) THEN
1260:
1261: ActionCode := WF_NOTIFICATION.GetAttrText( nid => WF_ENGINE.CONTEXT_NID , aname => 'RESULT' );
1262:
1263: ELSIF ( NtfDtlRec.Message_Name = 'MSG_SIGNATURE' ) THEN
1264:
1265: IF ( WF_NOTIFICATION.GetAttrText( nid => WF_ENGINE.CONTEXT_NID , aname => 'RESULT' ) = 'Y' ) THEN
1261: ActionCode := WF_NOTIFICATION.GetAttrText( nid => WF_ENGINE.CONTEXT_NID , aname => 'RESULT' );
1262:
1263: ELSIF ( NtfDtlRec.Message_Name = 'MSG_SIGNATURE' ) THEN
1264:
1265: IF ( WF_NOTIFICATION.GetAttrText( nid => WF_ENGINE.CONTEXT_NID , aname => 'RESULT' ) = 'Y' ) THEN
1266: ActionCode := 'SIGNED';
1267: ELSE
1268: ActionCode := 'DID_NOT_SIGN';
1269: END IF;
1278: , ActionDate => sysdate
1279: , ApprovalPathID => G_Aprv_Path
1280: , ApprovalSeq => G_Aprv_Seq
1281: , ApproverRoleID => NULL
1282: -- , NoteText => WF_NOTIFICATION.GetAttrText( nid => WF_ENGINE.CONTEXT_NID , aname => 'NOTE' )
1283: , NoteText => WF_NOTIFICATION.GetAttrText( nid => WF_ENGINE.CONTEXT_NID , aname => 'WF_NOTE' )
1284: );
1285:
1286: ResultOut := 'COMPLETE:';
1279: , ApprovalPathID => G_Aprv_Path
1280: , ApprovalSeq => G_Aprv_Seq
1281: , ApproverRoleID => NULL
1282: -- , NoteText => WF_NOTIFICATION.GetAttrText( nid => WF_ENGINE.CONTEXT_NID , aname => 'NOTE' )
1283: , NoteText => WF_NOTIFICATION.GetAttrText( nid => WF_ENGINE.CONTEXT_NID , aname => 'WF_NOTE' )
1284: );
1285:
1286: ResultOut := 'COMPLETE:';
1287: RETURN;
1297:
1298: EXCEPTION
1299: WHEN INVALID_FORWARD_TO THEN
1300: ResultOut := 'ERROR:';
1301: WF_ENGINE.SetItemAttrText
1302: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT'
1303: , AValue => fnd_message.get_string('OKE' , 'OKE_APRV_INVALID_FORWARDTO') );
1304: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
1305: , 'SET_APPROVAL_HISTORY'
1307: RAISE;
1308:
1309: WHEN OTHERS THEN
1310: ResultOut := 'ERROR:';
1311: WF_ENGINE.SetItemAttrText
1312: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
1313: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
1314: , 'SET_APPROVAL_HISTORY'
1315: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
1367: ApprovalSteps := OKE_APPROVAL_PATHS_PKG.Approval_Steps( crec.approval_path_id );
1368:
1369: IF ( ApprovalSteps <> ';' ) THEN
1370:
1371: WF_ENGINE.SetItemAttrNumber( itemtype => ItemType
1372: , itemkey => ItemKey
1373: , aname => 'APPROVAL_PATH_ID'
1374: , avalue => crec.Approval_Path_ID );
1375:
1372: , itemkey => ItemKey
1373: , aname => 'APPROVAL_PATH_ID'
1374: , avalue => crec.Approval_Path_ID );
1375:
1376: WF_ENGINE.SetItemAttrText( itemtype => ItemType
1377: , itemkey => ItemKey
1378: , aname => 'APPROVAL_PATH'
1379: , avalue => crec.Approval_Path );
1380:
1377: , itemkey => ItemKey
1378: , aname => 'APPROVAL_PATH'
1379: , avalue => crec.Approval_Path );
1380:
1381: WF_ENGINE.SetItemAttrText( itemtype => ItemType
1382: , itemkey => ItemKey
1383: , aname => 'APPROVAL_STEPS'
1384: , avalue => ApprovalSteps );
1385:
1382: , itemkey => ItemKey
1383: , aname => 'APPROVAL_STEPS'
1384: , avalue => ApprovalSteps );
1385:
1386: WF_ENGINE.SetItemAttrText( itemtype => ItemType
1387: , itemkey => ItemKey
1388: , aname => 'SIGNATURE_REQUIRED'
1389: , avalue => crec.Signature_Required_Flag );
1390:
1387: , itemkey => ItemKey
1388: , aname => 'SIGNATURE_REQUIRED'
1389: , avalue => crec.Signature_Required_Flag );
1390:
1391: WF_ENGINE.SetItemAttrNumber( itemtype => ItemType
1392: , itemkey => ItemKey
1393: , aname => 'SIGNATORY_ROLE_ID'
1394: , avalue => crec.Signatory_Role_ID );
1395:
1392: , itemkey => ItemKey
1393: , aname => 'SIGNATORY_ROLE_ID'
1394: , avalue => crec.Signatory_Role_ID );
1395:
1396: WF_ENGINE.SetItemAttrText( itemtype => ItemType
1397: , itemkey => ItemKey
1398: , aname => 'SIGNATORY_ROLE'
1399: , avalue => K_Role_Name( crec.Signatory_Role_ID ) );
1400:
1420: END IF;
1421:
1422: IF ( FuncMode = 'CANCEL' ) THEN
1423:
1424: ResultOut := WF_ENGINE.ENG_NULL;
1425: RETURN;
1426:
1427: END IF;
1428:
1427: END IF;
1428:
1429: IF ( FuncMode = 'TIMEOUT' ) THEN
1430:
1431: ResultOut := WF_ENGINE.ENG_NULL;
1432: RETURN;
1433:
1434: END IF;
1435:
1435:
1436: EXCEPTION
1437: WHEN OTHERS THEN
1438: ResultOut := 'ERROR:';
1439: WF_ENGINE.SetItemAttrText
1440: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
1441: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
1442: , 'VALIDATE_APPROVAL_PATH'
1443: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );
1472: x_return_status varchar2(1);
1473: BEGIN
1474: IF ( FuncMode = 'RUN' ) THEN
1475:
1476: L_CONTRACT_ID := WF_ENGINE.GetItemAttrNumber(ItemType , ItemKey , 'CONTRACT_ID');
1477: --bug#5933768
1478: IF(mo_global.is_mo_init_done = 'N') then
1479: mo_global.init('OKE');
1480: okc_context.set_okc_org_context(p_chr_id => L_CONTRACT_ID);
1494: END IF;
1495:
1496: IF ( FuncMode = 'CANCEL' ) THEN
1497:
1498: ResultOut := WF_ENGINE.ENG_NULL;
1499: RETURN;
1500:
1501: END IF;
1502:
1501: END IF;
1502:
1503: IF ( FuncMode = 'TIMEOUT' ) THEN
1504:
1505: ResultOut :=WF_ENGINE.ENG_NULL;
1506: RETURN;
1507:
1508: END IF;
1509:
1509:
1510: EXCEPTION
1511: WHEN OTHERS THEN
1512: ResultOut := 'ERROR:';
1513: WF_ENGINE.SetItemAttrText
1514: ( ItemType => ItemType , ItemKey => ItemKey , AName => 'ERRORTEXT' , AValue => sqlerrm );
1515: WF_CORE.Context( 'OKE_K_APPROVAL_WF'
1516: , 'Erase_Approved'
1517: , ItemType , ItemKey , to_char(ActID) , FuncMode , ResultOut );