462: END IF;
463: --
464: IF (funcmode = 'RUN') THEN
465: --{
466: l_deliveryId := WF_ENGINE.GetItemAttrNumber(itemtype, itemkey, 'DELIVERY_ID');
467: l_orgId := WF_ENGINE.GetItemAttrNumber(itemtype, itemKey, 'ORG_ID');
468: l_routrespNum := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'ROUT_RESP_NUM');
469: l_performer := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'TO_USER');
470: --
463: --
464: IF (funcmode = 'RUN') THEN
465: --{
466: l_deliveryId := WF_ENGINE.GetItemAttrNumber(itemtype, itemkey, 'DELIVERY_ID');
467: l_orgId := WF_ENGINE.GetItemAttrNumber(itemtype, itemKey, 'ORG_ID');
468: l_routrespNum := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'ROUT_RESP_NUM');
469: l_performer := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'TO_USER');
470: --
471: -- Check whether the to role is NULL. If yes, then the WF cannot progress
464: IF (funcmode = 'RUN') THEN
465: --{
466: l_deliveryId := WF_ENGINE.GetItemAttrNumber(itemtype, itemkey, 'DELIVERY_ID');
467: l_orgId := WF_ENGINE.GetItemAttrNumber(itemtype, itemKey, 'ORG_ID');
468: l_routrespNum := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'ROUT_RESP_NUM');
469: l_performer := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'TO_USER');
470: --
471: -- Check whether the to role is NULL. If yes, then the WF cannot progress
472: --
465: --{
466: l_deliveryId := WF_ENGINE.GetItemAttrNumber(itemtype, itemkey, 'DELIVERY_ID');
467: l_orgId := WF_ENGINE.GetItemAttrNumber(itemtype, itemKey, 'ORG_ID');
468: l_routrespNum := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'ROUT_RESP_NUM');
469: l_performer := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'TO_USER');
470: --
471: -- Check whether the to role is NULL. If yes, then the WF cannot progress
472: --
473: IF l_performer IS NULL THEN
525: wsh_debug_sv.log(l_moduleName, 'Failure Message subject', l_msgFailSubject);
526: wsh_debug_sv.log(l_moduleName, 'Body', l_failReason);
527: END IF;
528: --
529: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT_FAIL', l_msgFailSubject);
530: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'NOTFN_FAILED_BODY', l_failReason);
531: resultout := 'F';
532: --
533: ELSE
526: wsh_debug_sv.log(l_moduleName, 'Body', l_failReason);
527: END IF;
528: --
529: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT_FAIL', l_msgFailSubject);
530: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'NOTFN_FAILED_BODY', l_failReason);
531: resultout := 'F';
532: --
533: ELSE
534: --
682: END IF;
683: --
684: IF NOT l_planDelSts THEN
685: --{
686: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT_FAIL', l_msgFailSubject);
687: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'NOTFN_FAILED_BODY', l_failReason);
688: resultout := 'F';
689: --}
690: ELSE
683: --
684: IF NOT l_planDelSts THEN
685: --{
686: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT_FAIL', l_msgFailSubject);
687: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'NOTFN_FAILED_BODY', l_failReason);
688: resultout := 'F';
689: --}
690: ELSE
691: --{
707: --
708: -- Set the WF item attributes for the routing response OA
709: -- region to be rendered
710: --
711: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'ROUT_REQ_NUM',l_routreqNum);
712: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'P_STOPID', l_pickupStopId);
713: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'D_STOPID', l_dropoffStopId);
714: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'TRIP_ID', l_TripId);
715: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT', l_msgSubject);
708: -- Set the WF item attributes for the routing response OA
709: -- region to be rendered
710: --
711: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'ROUT_REQ_NUM',l_routreqNum);
712: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'P_STOPID', l_pickupStopId);
713: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'D_STOPID', l_dropoffStopId);
714: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'TRIP_ID', l_TripId);
715: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT', l_msgSubject);
716: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'REVISION_NUM', l_revNum);
709: -- region to be rendered
710: --
711: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'ROUT_REQ_NUM',l_routreqNum);
712: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'P_STOPID', l_pickupStopId);
713: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'D_STOPID', l_dropoffStopId);
714: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'TRIP_ID', l_TripId);
715: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT', l_msgSubject);
716: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'REVISION_NUM', l_revNum);
717: --
710: --
711: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'ROUT_REQ_NUM',l_routreqNum);
712: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'P_STOPID', l_pickupStopId);
713: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'D_STOPID', l_dropoffStopId);
714: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'TRIP_ID', l_TripId);
715: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT', l_msgSubject);
716: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'REVISION_NUM', l_revNum);
717: --
718: IF nvl(wf_core.translate('WF_HEADER_ATTR'),'N') = 'Y' THEN
711: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'ROUT_REQ_NUM',l_routreqNum);
712: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'P_STOPID', l_pickupStopId);
713: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'D_STOPID', l_dropoffStopId);
714: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'TRIP_ID', l_TripId);
715: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT', l_msgSubject);
716: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'REVISION_NUM', l_revNum);
717: --
718: IF nvl(wf_core.translate('WF_HEADER_ATTR'),'N') = 'Y' THEN
719: --
712: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'P_STOPID', l_pickupStopId);
713: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'D_STOPID', l_dropoffStopId);
714: WF_ENGINE.SetItemAttrNumber(itemType, itemKey, 'TRIP_ID', l_TripId);
715: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT', l_msgSubject);
716: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'REVISION_NUM', l_revNum);
717: --
718: IF nvl(wf_core.translate('WF_HEADER_ATTR'),'N') = 'Y' THEN
719: --
720: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'DELIVERY_NAME',l_DelName);
716: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'REVISION_NUM', l_revNum);
717: --
718: IF nvl(wf_core.translate('WF_HEADER_ATTR'),'N') = 'Y' THEN
719: --
720: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'DELIVERY_NAME',l_DelName);
721: --
722: END IF;
723: --
724: resultout := 'T';
747: wsh_debug_sv.log(l_moduleName, 'Failure Message subject', l_msgFailSubject);
748: wsh_debug_sv.log(l_moduleName, 'Body', l_failReason);
749: END IF;
750: --
751: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT_FAIL', l_msgFailSubject);
752: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'NOTFN_FAILED_BODY', l_failReason);
753: --
754: resultout := 'F';
755: --}
748: wsh_debug_sv.log(l_moduleName, 'Body', l_failReason);
749: END IF;
750: --
751: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT_FAIL', l_msgFailSubject);
752: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'NOTFN_FAILED_BODY', l_failReason);
753: --
754: resultout := 'F';
755: --}
756: END IF;
840: END IF;
841: --
842: IF (funcmode = 'RUN') THEN
843: --
844: l_deliveryId := WF_ENGINE.GetItemAttrNumber(itemtype, itemkey, 'DELIVERY_ID');
845: l_TxnId := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'TRANSACTION_ID');
846: l_revNum := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'REVISION_NUM');
847: l_respNum := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'ROUT_RESP_NUM');
848: --
841: --
842: IF (funcmode = 'RUN') THEN
843: --
844: l_deliveryId := WF_ENGINE.GetItemAttrNumber(itemtype, itemkey, 'DELIVERY_ID');
845: l_TxnId := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'TRANSACTION_ID');
846: l_revNum := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'REVISION_NUM');
847: l_respNum := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'ROUT_RESP_NUM');
848: --
849: IF l_debugOn THEN
842: IF (funcmode = 'RUN') THEN
843: --
844: l_deliveryId := WF_ENGINE.GetItemAttrNumber(itemtype, itemkey, 'DELIVERY_ID');
845: l_TxnId := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'TRANSACTION_ID');
846: l_revNum := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'REVISION_NUM');
847: l_respNum := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'ROUT_RESP_NUM');
848: --
849: IF l_debugOn THEN
850: wsh_debug_sv.log(l_moduleName, 'l_deliveryId', l_deliveryId);
843: --
844: l_deliveryId := WF_ENGINE.GetItemAttrNumber(itemtype, itemkey, 'DELIVERY_ID');
845: l_TxnId := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'TRANSACTION_ID');
846: l_revNum := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'REVISION_NUM');
847: l_respNum := WF_ENGINE.GetItemAttrText(itemtype, itemKey, 'ROUT_RESP_NUM');
848: --
849: IF l_debugOn THEN
850: wsh_debug_sv.log(l_moduleName, 'l_deliveryId', l_deliveryId);
851: wsh_debug_sv.log(l_moduleName, 'l_TxnId', l_TxnId);
870: --
871: FND_MESSAGE.SET_NAME('FTE', 'FTE_RRESP_POST_FAILURE_REASON');
872: l_failReason := FND_MESSAGE.GET;
873: --
874: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT_FAIL', l_msgFailSubject);
875: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'NOTFN_FAILED_BODY', l_failReason);
876: resultout := 'F';
877: --
878: END IF;
871: FND_MESSAGE.SET_NAME('FTE', 'FTE_RRESP_POST_FAILURE_REASON');
872: l_failReason := FND_MESSAGE.GET;
873: --
874: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'SUBJECT_FAIL', l_msgFailSubject);
875: WF_ENGINE.SetItemAttrText(itemType, itemKey, 'NOTFN_FAILED_BODY', l_failReason);
876: resultout := 'F';
877: --
878: END IF;
879: --
2152: resultout := 'COMPLETE';
2153: --
2154: ELSIF(funcmode = 'SET_CTX') THEN
2155: --{
2156: l_userId := wf_engine.GetItemAttrNumber('FTERRESP',itemKey,'USER_ID');
2157: l_respAppId := wf_engine.GetItemAttrNumber('FTERRESP',itemKey, 'APPLICATION_ID');
2158: l_respId := wf_engine.GetItemAttrNumber('FTERRESP',itemKey,'RESPONSIBILITY_ID');
2159: --
2160: IF(l_respAppId IS NULL OR l_respId IS NULL) THEN
2153: --
2154: ELSIF(funcmode = 'SET_CTX') THEN
2155: --{
2156: l_userId := wf_engine.GetItemAttrNumber('FTERRESP',itemKey,'USER_ID');
2157: l_respAppId := wf_engine.GetItemAttrNumber('FTERRESP',itemKey, 'APPLICATION_ID');
2158: l_respId := wf_engine.GetItemAttrNumber('FTERRESP',itemKey,'RESPONSIBILITY_ID');
2159: --
2160: IF(l_respAppId IS NULL OR l_respId IS NULL) THEN
2161: RAISE no_data_found;
2154: ELSIF(funcmode = 'SET_CTX') THEN
2155: --{
2156: l_userId := wf_engine.GetItemAttrNumber('FTERRESP',itemKey,'USER_ID');
2157: l_respAppId := wf_engine.GetItemAttrNumber('FTERRESP',itemKey, 'APPLICATION_ID');
2158: l_respId := wf_engine.GetItemAttrNumber('FTERRESP',itemKey,'RESPONSIBILITY_ID');
2159: --
2160: IF(l_respAppId IS NULL OR l_respId IS NULL) THEN
2161: RAISE no_data_found;
2162: ELSE
2166: resultout := 'COMPLETE';
2167: --}
2168: ELSIF(funcmode = 'TEST_CTX') THEN
2169: --
2170: l_orgId := wf_engine.GetItemAttrNumber( 'FTERRESP', itemKey, 'ORG_ID');
2171: --
2172: IF l_debugOn THEN
2173: wsh_debug_sv.log(l_moduleName, 'l_orgId', l_orgId);
2174: END IF;