125: BEGIN
126:
127: if ( funcmode = 'RUN' ) then
128:
129: p_requestor_id:=to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID'));
130:
131: open user_info(p_requestor_id);
132: fetch user_info into requestor_info_rec;
133: l_requestor_name := requestor_info_rec.user_name;
132: fetch user_info into requestor_info_rec;
133: l_requestor_name := requestor_info_rec.user_name;
134: close user_info;
135:
136: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR', l_requestor_name);
137:
138:
139: p_resp_key := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY');
140:
135:
136: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR', l_requestor_name);
137:
138:
139: p_resp_key := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY');
140:
141: open approver_cur(p_resp_key);
142: fetch approver_cur into l_approver_id;
143: close approver_cur;
142: fetch approver_cur into l_approver_id;
143: close approver_cur;
144: l_approver_name := l_respString||l_approver_id;
145:
146: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCAPPROVER', l_approver_name);
147:
148:
149:
150: --get the global variables transaction id and transaction type
149:
150: --get the global variables transaction id and transaction type
151:
152:
153: wf_engine.SetItemAttrText (itemtype => itemtype,
154: itemkey => itemkey,
155: aname => l_doc_attr,
156: avalue => 'PLSQLCLOB:OKL_SSC_WF.getAssetReturnDocument/'||
157: itemtype ||':'||itemkey||':NID');
183: end if;
184: if ( funcmode = 'TIMEOUT' ) then
185: resultout := 'COMPLETE';
186: else
187: resultout := wf_engine.eng_timedout;
188: return;
189: end if;
190:
191: exception
242:
243: l_itemtype := substr(document_id, first_index+1, second_index-first_index-1);
244: l_itemkey := substr(document_id, second_index+1, third_index-second_index-1);
245:
246: l_tas_id := to_number(WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTASID'));
247: l_tal_type := WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTALTYPE');
248:
249:
250: IF (display_type = 'text/html') THEN
243: l_itemtype := substr(document_id, first_index+1, second_index-first_index-1);
244: l_itemkey := substr(document_id, second_index+1, third_index-second_index-1);
245:
246: l_tas_id := to_number(WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTASID'));
247: l_tal_type := WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTALTYPE');
248:
249:
250: IF (display_type = 'text/html') THEN
251:
337: BEGIN
338:
339: if ( funcmode = 'RUN' ) then
340:
341: p_requestor_id:=to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID'));
342: open user_info(p_requestor_id);
343: fetch user_info into requestor_info_rec;
344: l_requestor_name := requestor_info_rec.user_name;
345: close user_info;
345: close user_info;
346:
347:
348:
349: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR', l_requestor_name);
350:
351: p_resp_key := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY');
352:
353: open approver_cur(p_resp_key);
347:
348:
349: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR', l_requestor_name);
350:
351: p_resp_key := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY');
352:
353: open approver_cur(p_resp_key);
354: fetch approver_cur into l_approver_id;
355: close approver_cur;
354: fetch approver_cur into l_approver_id;
355: close approver_cur;
356: l_approver_name := l_respString||l_approver_id;
357:
358: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCAPPROVER', l_approver_name);
359:
360:
361: wf_engine.SetItemAttrText (itemtype => itemtype,
362: itemkey => itemkey,
357:
358: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCAPPROVER', l_approver_name);
359:
360:
361: wf_engine.SetItemAttrText (itemtype => itemtype,
362: itemkey => itemkey,
363: aname => l_doc_attr,
364: avalue => 'PLSQLCLOB:OKL_SSC_WF.getSerialNumDocument/'||
365: itemtype ||':'||itemkey||':NID');
389: end if;
390: if ( funcmode = 'TIMEOUT' ) then
391: resultout := 'COMPLETE';
392: else
393: resultout := wf_engine.eng_timedout;
394: return;
395: end if;
396:
397: exception
450:
451: l_itemtype := substr(document_id, first_index+1, second_index-first_index-1);
452: l_itemkey := substr(document_id, second_index+1, third_index-second_index-1);
453:
454: l_tas_id := to_number(WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTASID'));
455: l_tal_type := WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTALTYPE');
456:
457:
458: IF (display_type = 'text/html') THEN
451: l_itemtype := substr(document_id, first_index+1, second_index-first_index-1);
452: l_itemkey := substr(document_id, second_index+1, third_index-second_index-1);
453:
454: l_tas_id := to_number(WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTASID'));
455: l_tal_type := WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTALTYPE');
456:
457:
458: IF (display_type = 'text/html') THEN
459:
511: begin
512:
513:
514: -- assign variable to attribute
515: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
516:
517:
518: if ( funcmode = 'RUN' ) then
519:
517:
518: if ( funcmode = 'RUN' ) then
519:
520:
521: l_tas_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCTASID'));
522:
523: update_serial_number(p_api_version => 1.0,
524: p_init_msg_list => OKC_API.G_FALSE,
525: p_tas_id => l_tas_id,
557: end if;
558: if ( funcmode = 'TIMEOUT' ) then
559: resultout := 'COMPLETE';
560: else
561: resultout := wf_engine.eng_timedout;
562: return;
563: end if;
564:
565: exception
609: BEGIN
610:
611: if ( funcmode = 'RUN' ) then
612:
613: p_requestor_id:=to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID'));
614:
615: open user_info(p_requestor_id);
616: fetch user_info into requestor_info_rec;
617: l_requestor_name := requestor_info_rec.user_name;
616: fetch user_info into requestor_info_rec;
617: l_requestor_name := requestor_info_rec.user_name;
618: close user_info;
619:
620: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR', l_requestor_name);
621:
622: p_resp_key := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY');
623:
624: open approver_cur(p_resp_key);
618: close user_info;
619:
620: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR', l_requestor_name);
621:
622: p_resp_key := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY');
623:
624: open approver_cur(p_resp_key);
625: fetch approver_cur into l_approver_id;
626: close approver_cur;
625: fetch approver_cur into l_approver_id;
626: close approver_cur;
627: l_approver_name := l_respString||l_approver_id;
628:
629: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCAPPROVER', l_approver_name);
630:
631: wf_engine.SetItemAttrText (itemtype => itemtype,
632: itemkey => itemkey,
633: aname => l_doc_attr,
627: l_approver_name := l_respString||l_approver_id;
628:
629: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCAPPROVER', l_approver_name);
630:
631: wf_engine.SetItemAttrText (itemtype => itemtype,
632: itemkey => itemkey,
633: aname => l_doc_attr,
634: avalue => 'PLSQLCLOB:OKL_SSC_WF.getLocationDocument/'||
635: itemtype ||':'||itemkey||':NID');
658: end if;
659: if ( funcmode = 'TIMEOUT' ) then
660: resultout := 'COMPLETE';
661: else
662: resultout := wf_engine.eng_timedout;
663: return;
664: end if;
665:
666: exception
760: l_itemkey := substr(document_id, second_index+1, third_index-second_index-1);
761:
762: -- Bug#4274575 - smadhava - 28-Sep-2005 - Modified - Start
763: /*
764: l_tas_id := to_number(WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTASID'));
765: l_tal_type := WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTALTYPE');
766: */
767:
768: -- have to fetch the location names for the Ids
761:
762: -- Bug#4274575 - smadhava - 28-Sep-2005 - Modified - Start
763: /*
764: l_tas_id := to_number(WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTASID'));
765: l_tal_type := WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTALTYPE');
766: */
767:
768: -- have to fetch the location names for the Ids
769: l_new_location_id1 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'NEWSITEID1');
765: l_tal_type := WF_ENGINE.GetItemAttrText(l_itemtype,l_itemkey,'SSCTALTYPE');
766: */
767:
768: -- have to fetch the location names for the Ids
769: l_new_location_id1 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'NEWSITEID1');
770: l_old_location_id1 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'OLDSITE1');
771: l_new_location_id2 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'NEWSITEID2');
772: l_old_location_id2 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'OLDSITE2');
773: l_trx_date := wf_engine.GetItemAttrDate(l_itemtype, l_itemkey, 'TRX_DATE');
766: */
767:
768: -- have to fetch the location names for the Ids
769: l_new_location_id1 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'NEWSITEID1');
770: l_old_location_id1 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'OLDSITE1');
771: l_new_location_id2 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'NEWSITEID2');
772: l_old_location_id2 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'OLDSITE2');
773: l_trx_date := wf_engine.GetItemAttrDate(l_itemtype, l_itemkey, 'TRX_DATE');
774: l_asset_id := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'ASSETID');
767:
768: -- have to fetch the location names for the Ids
769: l_new_location_id1 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'NEWSITEID1');
770: l_old_location_id1 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'OLDSITE1');
771: l_new_location_id2 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'NEWSITEID2');
772: l_old_location_id2 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'OLDSITE2');
773: l_trx_date := wf_engine.GetItemAttrDate(l_itemtype, l_itemkey, 'TRX_DATE');
774: l_asset_id := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'ASSETID');
775:
768: -- have to fetch the location names for the Ids
769: l_new_location_id1 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'NEWSITEID1');
770: l_old_location_id1 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'OLDSITE1');
771: l_new_location_id2 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'NEWSITEID2');
772: l_old_location_id2 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'OLDSITE2');
773: l_trx_date := wf_engine.GetItemAttrDate(l_itemtype, l_itemkey, 'TRX_DATE');
774: l_asset_id := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'ASSETID');
775:
776: OPEN c_get_location(l_old_location_id1,l_old_location_id2);
769: l_new_location_id1 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'NEWSITEID1');
770: l_old_location_id1 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'OLDSITE1');
771: l_new_location_id2 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'NEWSITEID2');
772: l_old_location_id2 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'OLDSITE2');
773: l_trx_date := wf_engine.GetItemAttrDate(l_itemtype, l_itemkey, 'TRX_DATE');
774: l_asset_id := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'ASSETID');
775:
776: OPEN c_get_location(l_old_location_id1,l_old_location_id2);
777: FETCH c_get_location INTO l_old_location;
770: l_old_location_id1 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'OLDSITE1');
771: l_new_location_id2 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'NEWSITEID2');
772: l_old_location_id2 := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'OLDSITE2');
773: l_trx_date := wf_engine.GetItemAttrDate(l_itemtype, l_itemkey, 'TRX_DATE');
774: l_asset_id := wf_engine.GetItemAttrText(l_itemtype, l_itemkey, 'ASSETID');
775:
776: OPEN c_get_location(l_old_location_id1,l_old_location_id2);
777: FETCH c_get_location INTO l_old_location;
778: CLOSE c_get_location;
885:
886:
887:
888: -- assign variable to attribute
889: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
890:
891:
892: if ( funcmode = 'RUN' ) then
893: /*
891:
892: if ( funcmode = 'RUN' ) then
893: /*
894: -- Bug#4274575 - smadhava - 28-Sep-2005 - Modified - Start
895: l_new_location_id1 := wf_engine.GetItemAttrText(itemtype, itemkey, 'NEWSITEID1');
896: l_new_location_id2 := wf_engine.GetItemAttrText(itemtype, itemkey, 'NEWSITEID2');
897: l_old_location_id1 := wf_engine.GetItemAttrText(itemtype, itemkey, 'OLDSITE1');
898: l_old_location_id2 := wf_engine.GetItemAttrText(itemtype, itemkey, 'OLDSITE2');
899: l_trx_date := wf_engine.GetItemAttrDate(itemtype, itemkey, 'TRX_DATE');
892: if ( funcmode = 'RUN' ) then
893: /*
894: -- Bug#4274575 - smadhava - 28-Sep-2005 - Modified - Start
895: l_new_location_id1 := wf_engine.GetItemAttrText(itemtype, itemkey, 'NEWSITEID1');
896: l_new_location_id2 := wf_engine.GetItemAttrText(itemtype, itemkey, 'NEWSITEID2');
897: l_old_location_id1 := wf_engine.GetItemAttrText(itemtype, itemkey, 'OLDSITE1');
898: l_old_location_id2 := wf_engine.GetItemAttrText(itemtype, itemkey, 'OLDSITE2');
899: l_trx_date := wf_engine.GetItemAttrDate(itemtype, itemkey, 'TRX_DATE');
900: l_asset_id := wf_engine.GetItemAttrText(itemtype, itemkey, 'ASSETID');
893: /*
894: -- Bug#4274575 - smadhava - 28-Sep-2005 - Modified - Start
895: l_new_location_id1 := wf_engine.GetItemAttrText(itemtype, itemkey, 'NEWSITEID1');
896: l_new_location_id2 := wf_engine.GetItemAttrText(itemtype, itemkey, 'NEWSITEID2');
897: l_old_location_id1 := wf_engine.GetItemAttrText(itemtype, itemkey, 'OLDSITE1');
898: l_old_location_id2 := wf_engine.GetItemAttrText(itemtype, itemkey, 'OLDSITE2');
899: l_trx_date := wf_engine.GetItemAttrDate(itemtype, itemkey, 'TRX_DATE');
900: l_asset_id := wf_engine.GetItemAttrText(itemtype, itemkey, 'ASSETID');
901:
894: -- Bug#4274575 - smadhava - 28-Sep-2005 - Modified - Start
895: l_new_location_id1 := wf_engine.GetItemAttrText(itemtype, itemkey, 'NEWSITEID1');
896: l_new_location_id2 := wf_engine.GetItemAttrText(itemtype, itemkey, 'NEWSITEID2');
897: l_old_location_id1 := wf_engine.GetItemAttrText(itemtype, itemkey, 'OLDSITE1');
898: l_old_location_id2 := wf_engine.GetItemAttrText(itemtype, itemkey, 'OLDSITE2');
899: l_trx_date := wf_engine.GetItemAttrDate(itemtype, itemkey, 'TRX_DATE');
900: l_asset_id := wf_engine.GetItemAttrText(itemtype, itemkey, 'ASSETID');
901:
902: OPEN okl_loc_csr(l_new_location_id1, l_new_location_id2);
895: l_new_location_id1 := wf_engine.GetItemAttrText(itemtype, itemkey, 'NEWSITEID1');
896: l_new_location_id2 := wf_engine.GetItemAttrText(itemtype, itemkey, 'NEWSITEID2');
897: l_old_location_id1 := wf_engine.GetItemAttrText(itemtype, itemkey, 'OLDSITE1');
898: l_old_location_id2 := wf_engine.GetItemAttrText(itemtype, itemkey, 'OLDSITE2');
899: l_trx_date := wf_engine.GetItemAttrDate(itemtype, itemkey, 'TRX_DATE');
900: l_asset_id := wf_engine.GetItemAttrText(itemtype, itemkey, 'ASSETID');
901:
902: OPEN okl_loc_csr(l_new_location_id1, l_new_location_id2);
903: FETCH okl_loc_csr INTO l_party_site_id, l_location_id;
896: l_new_location_id2 := wf_engine.GetItemAttrText(itemtype, itemkey, 'NEWSITEID2');
897: l_old_location_id1 := wf_engine.GetItemAttrText(itemtype, itemkey, 'OLDSITE1');
898: l_old_location_id2 := wf_engine.GetItemAttrText(itemtype, itemkey, 'OLDSITE2');
899: l_trx_date := wf_engine.GetItemAttrDate(itemtype, itemkey, 'TRX_DATE');
900: l_asset_id := wf_engine.GetItemAttrText(itemtype, itemkey, 'ASSETID');
901:
902: OPEN okl_loc_csr(l_new_location_id1, l_new_location_id2);
903: FETCH okl_loc_csr INTO l_party_site_id, l_location_id;
904: CLOSE okl_loc_csr;
919: x_return_status => x_return_status,
920: x_msg_count => x_msg_count,
921: x_msg_data => l_msg_data);
922:
923: l_tas_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCTASID'));
924:
925:
926: update_location(p_api_version => 1.0,
927: p_init_msg_list => OKC_API.G_FALSE,
933: -- Bug#4274575 - smadhava - 28-Sep-2005 - Modified - end
934: --check the update result
935: --asawanka ebtax changes start
936:
937: l_asset_id := wf_engine.GetItemAttrText(itemtype, itemkey, 'ASSETID');
938:
939:
940: OKL_BLK_AST_UPD_PVT.process_update_location(
941: p_api_version => 1.0,
973: end if;
974: if ( funcmode = 'TIMEOUT' ) then
975: resultout := 'COMPLETE';
976: else
977: resultout := wf_engine.eng_timedout;
978: return;
979: end if;
980:
981: exception
1514:
1515: if ( funcmode = 'RUN' ) then
1516:
1517: --Read attributes from WorkFlow
1518: l_provider_name:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCNEWINSURANCEPROVIDERNUMBER');
1519:
1520: open provider_info(l_provider_name);
1521: fetch provider_info into l_provider_id;
1522: close provider_info;
1522: close provider_info;
1523:
1524:
1525:
1526: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCINSPROVIDERID',to_char(l_provider_id));
1527:
1528: open site_id_cur(l_provider_id);
1529: fetch site_id_cur into l_site_id;
1530: close site_id_cur;
1528: open site_id_cur(l_provider_id);
1529: fetch site_id_cur into l_site_id;
1530: close site_id_cur;
1531:
1532: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCSITEID',to_char(l_site_id));
1533:
1534: resultout := 'COMPLETE';
1535:
1536: return;
1555: end if;
1556: if ( funcmode = 'TIMEOUT' ) then
1557: resultout := 'COMPLETE';
1558: else
1559: resultout := wf_engine.eng_timedout;
1560: return;
1561: end if;
1562:
1563: exception
1579:
1580:
1581: begin
1582: l_respString:='FND_RESP540:';
1583: l_resp_key :=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEYFORNEWPROV');
1584:
1585: if ( funcmode = 'RUN' ) then
1586:
1587:
1591: FROM fnd_responsibility
1592: WHERE responsibility_key = l_resp_key
1593: AND application_id = 540;
1594:
1595: wf_engine.SetItemAttrText (itemtype => itemtype,
1596: itemkey => itemkey,
1597: aname => 'SSC_NTFRECIPIENT_ITMATTR2',
1598: avalue => l_respString || l_respId);
1599:
1623: end if;
1624: if ( funcmode = 'TIMEOUT' ) then
1625: resultout := 'COMPLETE';
1626: else
1627: resultout := wf_engine.eng_timedout;
1628: return;
1629: end if;
1630:
1631: exception
1669: if ( funcmode = 'RUN' ) then
1670:
1671:
1672:
1673: l_resp_key:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEY');
1674:
1675:
1676: SELECT responsibility_id
1677: INTO l_respId
1678: FROM fnd_responsibility
1679: WHERE responsibility_key = l_resp_key
1680: AND application_id = 540;
1681:
1682: wf_engine.SetItemAttrText (itemtype => itemtype,
1683: itemkey => itemkey,
1684: aname => 'SSC_NTFRECIPIENT_ITMATTR',
1685: avalue => l_respString || l_respId);
1686:
1687:
1688:
1689: --Read attributes from WorkFlow
1690: --Read attributes from WorkFlow
1691: l_providerid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCINSPROVIDERID');
1692: l_siteid := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCSITEID');
1693: l_chrid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID');
1694: l_coverage_amount:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCCOVERAGEAMOUNT');
1695: l_deductible:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCDEDUCTIBLE');
1688:
1689: --Read attributes from WorkFlow
1690: --Read attributes from WorkFlow
1691: l_providerid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCINSPROVIDERID');
1692: l_siteid := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCSITEID');
1693: l_chrid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID');
1694: l_coverage_amount:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCCOVERAGEAMOUNT');
1695: l_deductible:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCDEDUCTIBLE');
1696: l_requestor_userid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'REQUESTOR');
1689: --Read attributes from WorkFlow
1690: --Read attributes from WorkFlow
1691: l_providerid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCINSPROVIDERID');
1692: l_siteid := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCSITEID');
1693: l_chrid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID');
1694: l_coverage_amount:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCCOVERAGEAMOUNT');
1695: l_deductible:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCDEDUCTIBLE');
1696: l_requestor_userid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'REQUESTOR');
1697:
1690: --Read attributes from WorkFlow
1691: l_providerid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCINSPROVIDERID');
1692: l_siteid := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCSITEID');
1693: l_chrid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID');
1694: l_coverage_amount:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCCOVERAGEAMOUNT');
1695: l_deductible:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCDEDUCTIBLE');
1696: l_requestor_userid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'REQUESTOR');
1697:
1698: l_policynum:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPOLICYNUMBER');
1691: l_providerid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCINSPROVIDERID');
1692: l_siteid := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCSITEID');
1693: l_chrid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID');
1694: l_coverage_amount:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCCOVERAGEAMOUNT');
1695: l_deductible:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCDEDUCTIBLE');
1696: l_requestor_userid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'REQUESTOR');
1697:
1698: l_policynum:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPOLICYNUMBER');
1699: l_lessor_insured:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORINSURED');
1692: l_siteid := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCSITEID');
1693: l_chrid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID');
1694: l_coverage_amount:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCCOVERAGEAMOUNT');
1695: l_deductible:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCDEDUCTIBLE');
1696: l_requestor_userid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'REQUESTOR');
1697:
1698: l_policynum:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPOLICYNUMBER');
1699: l_lessor_insured:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORINSURED');
1700: l_lessor_payee:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORPAYEE');
1694: l_coverage_amount:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCCOVERAGEAMOUNT');
1695: l_deductible:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCDEDUCTIBLE');
1696: l_requestor_userid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'REQUESTOR');
1697:
1698: l_policynum:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPOLICYNUMBER');
1699: l_lessor_insured:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORINSURED');
1700: l_lessor_payee:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORPAYEE');
1701:
1702: l_start_date:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCSTARTDATE');
1695: l_deductible:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCDEDUCTIBLE');
1696: l_requestor_userid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'REQUESTOR');
1697:
1698: l_policynum:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPOLICYNUMBER');
1699: l_lessor_insured:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORINSURED');
1700: l_lessor_payee:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORPAYEE');
1701:
1702: l_start_date:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCSTARTDATE');
1703: l_end_date:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCENDDATE');
1696: l_requestor_userid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'REQUESTOR');
1697:
1698: l_policynum:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPOLICYNUMBER');
1699: l_lessor_insured:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORINSURED');
1700: l_lessor_payee:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORPAYEE');
1701:
1702: l_start_date:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCSTARTDATE');
1703: l_end_date:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCENDDATE');
1704:
1698: l_policynum:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPOLICYNUMBER');
1699: l_lessor_insured:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORINSURED');
1700: l_lessor_payee:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORPAYEE');
1701:
1702: l_start_date:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCSTARTDATE');
1703: l_end_date:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCENDDATE');
1704:
1705: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
1706:
1699: l_lessor_insured:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORINSURED');
1700: l_lessor_payee:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCLESSORPAYEE');
1701:
1702: l_start_date:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCSTARTDATE');
1703: l_end_date:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCENDDATE');
1704:
1705: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
1706:
1707:
1701:
1702: l_start_date:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCSTARTDATE');
1703: l_end_date:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCENDDATE');
1704:
1705: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
1706:
1707:
1708: --get contract number for notification
1709: SELECT contract_number
1710: INTO l_knum
1711: FROM okc_k_headers_v
1712: WHERE id = l_chrid;
1713:
1714: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCONTRACTNUMBER',l_knum);
1715:
1716:
1717: --Set attributes in record
1718: l_policy_rec.policy_number := l_policynum;
1769: end if;
1770: if ( funcmode = 'TIMEOUT' ) then
1771: resultout := 'COMPLETE';
1772: else
1773: resultout := wf_engine.eng_timedout;
1774: return;
1775: end if;
1776:
1777: exception
1814: l_respString:='FND_RESP540:';
1815:
1816:
1817: if ( funcmode = 'RUN' ) then
1818: p_chrid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID');
1819: p_requestor_userid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'REQUESTOR');
1820: l_resp_key :=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEY');
1821:
1822: open contract_info(p_chrid);
1815:
1816:
1817: if ( funcmode = 'RUN' ) then
1818: p_chrid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID');
1819: p_requestor_userid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'REQUESTOR');
1820: l_resp_key :=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEY');
1821:
1822: open contract_info(p_chrid);
1823: fetch contract_info into l_knum;
1816:
1817: if ( funcmode = 'RUN' ) then
1818: p_chrid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID');
1819: p_requestor_userid:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'REQUESTOR');
1820: l_resp_key :=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEY');
1821:
1822: open contract_info(p_chrid);
1823: fetch contract_info into l_knum;
1824: close contract_info;
1832: FROM fnd_responsibility
1833: WHERE responsibility_key = l_resp_key
1834: AND application_id = 540;
1835:
1836: wf_engine.SetItemAttrText (itemtype => itemtype,
1837: itemkey => itemkey,
1838: aname => 'SSC_NTFRECIPIENT_ITMATTR',
1839: avalue => l_respString || l_respId);
1840:
1837: itemkey => itemkey,
1838: aname => 'SSC_NTFRECIPIENT_ITMATTR',
1839: avalue => l_respString || l_respId);
1840:
1841: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCKNUM',l_knum);
1842: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR',l_username);
1843: resultout := 'COMPLETE';
1844:
1845: return;
1838: aname => 'SSC_NTFRECIPIENT_ITMATTR',
1839: avalue => l_respString || l_respId);
1840:
1841: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCKNUM',l_knum);
1842: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR',l_username);
1843: resultout := 'COMPLETE';
1844:
1845: return;
1846: end if;
1864: end if;
1865: if ( funcmode = 'TIMEOUT' ) then
1866: resultout := 'COMPLETE';
1867: else
1868: resultout := wf_engine.eng_timedout;
1869: return;
1870: end if;
1871:
1872: exception
1929: begin
1930:
1931: if ( funcmode = 'RUN' ) then
1932:
1933: l_chr_id:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
1934: l_format_id:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCINVFORID'));
1935: l_requestor_id:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID'));
1936: l_resp_key := ( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY'));
1937:
1930:
1931: if ( funcmode = 'RUN' ) then
1932:
1933: l_chr_id:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
1934: l_format_id:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCINVFORID'));
1935: l_requestor_id:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID'));
1936: l_resp_key := ( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY'));
1937:
1938: open contract_cur(l_chr_id);
1931: if ( funcmode = 'RUN' ) then
1932:
1933: l_chr_id:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
1934: l_format_id:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCINVFORID'));
1935: l_requestor_id:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID'));
1936: l_resp_key := ( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY'));
1937:
1938: open contract_cur(l_chr_id);
1939: fetch contract_cur into l_contract_number,l_org_info;
1932:
1933: l_chr_id:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
1934: l_format_id:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCINVFORID'));
1935: l_requestor_id:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID'));
1936: l_resp_key := ( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY'));
1937:
1938: open contract_cur(l_chr_id);
1939: fetch contract_cur into l_contract_number,l_org_info;
1940: close contract_cur;
1958: close old_format_cur;
1959:
1960: l_approver := l_respString||l_approver_id;
1961:
1962: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCKNUM',l_contract_number);
1963: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR',l_requestor);
1964: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCAPPROVER',l_approver);
1965: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWINVFOR',l_new_format);
1966: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURINVFOR',l_current_format);
1959:
1960: l_approver := l_respString||l_approver_id;
1961:
1962: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCKNUM',l_contract_number);
1963: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR',l_requestor);
1964: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCAPPROVER',l_approver);
1965: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWINVFOR',l_new_format);
1966: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURINVFOR',l_current_format);
1967: -- the error notification goes to the l_admin through WF default error processing
1960: l_approver := l_respString||l_approver_id;
1961:
1962: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCKNUM',l_contract_number);
1963: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR',l_requestor);
1964: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCAPPROVER',l_approver);
1965: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWINVFOR',l_new_format);
1966: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURINVFOR',l_current_format);
1967: -- the error notification goes to the l_admin through WF default error processing
1968: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
1961:
1962: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCKNUM',l_contract_number);
1963: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR',l_requestor);
1964: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCAPPROVER',l_approver);
1965: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWINVFOR',l_new_format);
1966: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURINVFOR',l_current_format);
1967: -- the error notification goes to the l_admin through WF default error processing
1968: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
1969: resultout := 'COMPLETE';
1962: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCKNUM',l_contract_number);
1963: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR',l_requestor);
1964: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCAPPROVER',l_approver);
1965: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWINVFOR',l_new_format);
1966: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURINVFOR',l_current_format);
1967: -- the error notification goes to the l_admin through WF default error processing
1968: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
1969: resultout := 'COMPLETE';
1970:
1964: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCAPPROVER',l_approver);
1965: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWINVFOR',l_new_format);
1966: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURINVFOR',l_current_format);
1967: -- the error notification goes to the l_admin through WF default error processing
1968: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
1969: resultout := 'COMPLETE';
1970:
1971: return;
1972: end if;
1990: end if;
1991: if ( funcmode = 'TIMEOUT' ) then
1992: resultout := 'COMPLETE';
1993: else
1994: resultout := wf_engine.eng_timedout;
1995: return;
1996: end if;
1997:
1998: exception
2053: begin
2054:
2055:
2056: -- get attribute values from WF
2057: l_contract_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID');
2058: l_contract_number:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKNUM');
2059: l_invoice_format:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCNEWINVFOR');
2060: open org_info(l_contract_id);
2061: fetch org_info into l_org_info;
2054:
2055:
2056: -- get attribute values from WF
2057: l_contract_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID');
2058: l_contract_number:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKNUM');
2059: l_invoice_format:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCNEWINVFOR');
2060: open org_info(l_contract_id);
2061: fetch org_info into l_org_info;
2062: close org_info ;
2055:
2056: -- get attribute values from WF
2057: l_contract_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID');
2058: l_contract_number:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKNUM');
2059: l_invoice_format:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCNEWINVFOR');
2060: open org_info(l_contract_id);
2061: fetch org_info into l_org_info;
2062: close org_info ;
2063: MO_GLOBAL.set_policy_context('S',l_org_info);
2209: if ( funcmode = 'RUN' ) then
2210:
2211: l_admin := 'SYSADMIN';
2212: -- assign variable to attribute
2213: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
2214:
2215: -- retrieve attributes from workflow engine
2216: p_chrid:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
2217: p_requestor_userid:=to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID'));
2212: -- assign variable to attribute
2213: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
2214:
2215: -- retrieve attributes from workflow engine
2216: p_chrid:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
2217: p_requestor_userid:=to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID'));
2218: p_new_billing_site_id:=to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITEID'));
2219: l_resp_key :=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY');
2220: open org_info(p_chrid);
2213: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
2214:
2215: -- retrieve attributes from workflow engine
2216: p_chrid:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
2217: p_requestor_userid:=to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID'));
2218: p_new_billing_site_id:=to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITEID'));
2219: l_resp_key :=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY');
2220: open org_info(p_chrid);
2221: fetch org_info into l_org_info;
2214:
2215: -- retrieve attributes from workflow engine
2216: p_chrid:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
2217: p_requestor_userid:=to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID'));
2218: p_new_billing_site_id:=to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITEID'));
2219: l_resp_key :=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY');
2220: open org_info(p_chrid);
2221: fetch org_info into l_org_info;
2222: close org_info ;
2215: -- retrieve attributes from workflow engine
2216: p_chrid:=to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
2217: p_requestor_userid:=to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID'));
2218: p_new_billing_site_id:=to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITEID'));
2219: l_resp_key :=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCAPPROVERRESPONSIBILITYKEY');
2220: open org_info(p_chrid);
2221: fetch org_info into l_org_info;
2222: close org_info ;
2223: MO_GLOBAL.set_policy_context('S',l_org_info);
2251: FROM fnd_responsibility
2252: WHERE responsibility_key = l_resp_key -- This example is for 'Lease Center Agent' responsibility
2253: AND application_id = 540;
2254:
2255: wf_engine.SetItemAttrText (itemtype => itemtype ,
2256: itemkey => itemkey ,
2257: aname => 'SSC_NTFRECIPIENT_ITMATTR',
2258: avalue => l_respString || l_respId);
2259:
2258: avalue => l_respString || l_respId);
2259:
2260:
2261:
2262: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCKNUM', l_contract_number );
2263: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR', l_username);
2264: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURBILLSITEADDRESS', l_current_billing_address );
2265: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURBILLSITE',l_current_billing_site);
2266: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITE',l_new_billing_site);
2259:
2260:
2261:
2262: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCKNUM', l_contract_number );
2263: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR', l_username);
2264: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURBILLSITEADDRESS', l_current_billing_address );
2265: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURBILLSITE',l_current_billing_site);
2266: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITE',l_new_billing_site);
2267: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITEADDRESS',l_new_billing_address);
2260:
2261:
2262: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCKNUM', l_contract_number );
2263: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR', l_username);
2264: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURBILLSITEADDRESS', l_current_billing_address );
2265: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURBILLSITE',l_current_billing_site);
2266: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITE',l_new_billing_site);
2267: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITEADDRESS',l_new_billing_address);
2268:
2261:
2262: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCKNUM', l_contract_number );
2263: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR', l_username);
2264: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURBILLSITEADDRESS', l_current_billing_address );
2265: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURBILLSITE',l_current_billing_site);
2266: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITE',l_new_billing_site);
2267: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITEADDRESS',l_new_billing_address);
2268:
2269: resultout := 'COMPLETE';
2262: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCKNUM', l_contract_number );
2263: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR', l_username);
2264: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURBILLSITEADDRESS', l_current_billing_address );
2265: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURBILLSITE',l_current_billing_site);
2266: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITE',l_new_billing_site);
2267: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITEADDRESS',l_new_billing_address);
2268:
2269: resultout := 'COMPLETE';
2270:
2263: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTOR', l_username);
2264: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURBILLSITEADDRESS', l_current_billing_address );
2265: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCURBILLSITE',l_current_billing_site);
2266: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITE',l_new_billing_site);
2267: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITEADDRESS',l_new_billing_address);
2268:
2269: resultout := 'COMPLETE';
2270:
2271: return;
2290: end if;
2291: if ( funcmode = 'TIMEOUT' ) then
2292: resultout := 'COMPLETE';
2293: else
2294: resultout := wf_engine.eng_timedout;
2295: return;
2296: end if;
2297:
2298: exception
2335: if ( funcmode = 'RUN' ) then
2336:
2337: l_admin := 'SYSADMIN';
2338: -- assign variable to attribute
2339: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
2340:
2341:
2342: --retrieve from the workflow engine
2343: l_contract_id := to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
2339: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'WF_ADMINISTRATOR',l_admin);
2340:
2341:
2342: --retrieve from the workflow engine
2343: l_contract_id := to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
2344: l_billing_site_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITEID'));
2345: l_org_id := wf_engine.GetItemAttrNumber(itemtype,itemkey,'ORG_ID');
2346: l_chrv_rec.ID := l_contract_id;
2347: /* Bug 3292221 SPILLAIP changed l_khrv_rec.khr_id to id */
2340:
2341:
2342: --retrieve from the workflow engine
2343: l_contract_id := to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
2344: l_billing_site_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITEID'));
2345: l_org_id := wf_engine.GetItemAttrNumber(itemtype,itemkey,'ORG_ID');
2346: l_chrv_rec.ID := l_contract_id;
2347: /* Bug 3292221 SPILLAIP changed l_khrv_rec.khr_id to id */
2348: l_khrv_rec.ID := l_contract_id;
2341:
2342: --retrieve from the workflow engine
2343: l_contract_id := to_number( WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCKID'));
2344: l_billing_site_id := to_number(WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCNEWBILLSITEID'));
2345: l_org_id := wf_engine.GetItemAttrNumber(itemtype,itemkey,'ORG_ID');
2346: l_chrv_rec.ID := l_contract_id;
2347: /* Bug 3292221 SPILLAIP changed l_khrv_rec.khr_id to id */
2348: l_khrv_rec.ID := l_contract_id;
2349: l_chrv_rec.bill_to_site_use_id := l_billing_site_id;
2396: end if;
2397: if ( funcmode = 'TIMEOUT' ) then
2398: resultout := 'COMPLETE';
2399: else
2400: resultout := wf_engine.eng_timedout;
2401: return;
2402: end if;
2403:
2404: EXCEPTION
2544:
2545: if ( funcmode = 'RUN' ) then
2546:
2547: --Read attributes from WorkFlow
2548: l_pol_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCINSPOLID');
2549: l_requestor_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID');
2550: l_resp_key:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEY');
2551:
2552: --Read from table
2545: if ( funcmode = 'RUN' ) then
2546:
2547: --Read attributes from WorkFlow
2548: l_pol_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCINSPOLID');
2549: l_requestor_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID');
2550: l_resp_key:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEY');
2551:
2552: --Read from table
2553: open policy_info_cur(l_pol_id);
2546:
2547: --Read attributes from WorkFlow
2548: l_pol_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCINSPOLID');
2549: l_requestor_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID');
2550: l_resp_key:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEY');
2551:
2552: --Read from table
2553: open policy_info_cur(l_pol_id);
2554: fetch policy_info_cur into l_pol_number,l_iss_code, l_cancel_date,l_chr_id ;
2577: WHERE responsibility_key = l_resp_key
2578: AND application_id = 540;
2579:
2580:
2581: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCONTRACTNUMBER', l_chr_number );
2582: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTORNAME', l_user_name);
2583: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLNUMBER', l_pol_number);
2584: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLSTATUS', l_pol_status);
2585: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCANCELDATE', l_cancel_date);
2578: AND application_id = 540;
2579:
2580:
2581: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCONTRACTNUMBER', l_chr_number );
2582: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTORNAME', l_user_name);
2583: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLNUMBER', l_pol_number);
2584: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLSTATUS', l_pol_status);
2585: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCANCELDATE', l_cancel_date);
2586: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCOMMENTS', l_comments);
2579:
2580:
2581: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCONTRACTNUMBER', l_chr_number );
2582: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTORNAME', l_user_name);
2583: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLNUMBER', l_pol_number);
2584: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLSTATUS', l_pol_status);
2585: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCANCELDATE', l_cancel_date);
2586: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCOMMENTS', l_comments);
2587: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPERFORMER', l_respString||l_resp_id);
2580:
2581: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCONTRACTNUMBER', l_chr_number );
2582: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTORNAME', l_user_name);
2583: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLNUMBER', l_pol_number);
2584: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLSTATUS', l_pol_status);
2585: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCANCELDATE', l_cancel_date);
2586: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCOMMENTS', l_comments);
2587: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPERFORMER', l_respString||l_resp_id);
2588:
2581: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCONTRACTNUMBER', l_chr_number );
2582: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTORNAME', l_user_name);
2583: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLNUMBER', l_pol_number);
2584: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLSTATUS', l_pol_status);
2585: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCANCELDATE', l_cancel_date);
2586: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCOMMENTS', l_comments);
2587: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPERFORMER', l_respString||l_resp_id);
2588:
2589: resultout := 'COMPLETE';
2582: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTORNAME', l_user_name);
2583: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLNUMBER', l_pol_number);
2584: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLSTATUS', l_pol_status);
2585: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCANCELDATE', l_cancel_date);
2586: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCOMMENTS', l_comments);
2587: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPERFORMER', l_respString||l_resp_id);
2588:
2589: resultout := 'COMPLETE';
2590:
2583: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLNUMBER', l_pol_number);
2584: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPOLSTATUS', l_pol_status);
2585: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCANCELDATE', l_cancel_date);
2586: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCOMMENTS', l_comments);
2587: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPERFORMER', l_respString||l_resp_id);
2588:
2589: resultout := 'COMPLETE';
2590:
2591: return;
2610: end if;
2611: if ( funcmode = 'TIMEOUT' ) then
2612: resultout := 'COMPLETE';
2613: else
2614: resultout := wf_engine.eng_timedout;
2615: return;
2616: end if;
2617:
2618: exception
2789: BEGIN
2790:
2791: if ( funcmode = 'RUN' ) then
2792:
2793: p_resp_key:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEY');
2794: p_claim_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CLAIM_ID');
2795:
2796:
2797: -- SET RECEIVER
2790:
2791: if ( funcmode = 'RUN' ) then
2792:
2793: p_resp_key:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEY');
2794: p_claim_id := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'CLAIM_ID');
2795:
2796:
2797: -- SET RECEIVER
2798: open receiver_cur(p_resp_key);
2799: fetch receiver_cur into l_approver_id;
2800: close receiver_cur;
2801: l_approver_name := l_respString||TO_CHAR(l_approver_id);
2802:
2803: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSC_NTFRECIPIENT_ITMATTR', l_approver_name);
2804:
2805: -- SET CLAIM NUMBER
2806: open claim_info(p_claim_id);
2807: fetch claim_info into l_policy_number,l_claim_number ;
2811: FND_MSG_PUB.ADD;
2812: raise api_exception;
2813: END IF ;
2814:
2815: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'POLICY_NUMBER', l_policy_number);
2816: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'CLAIM_NUMBER', l_claim_number);
2817:
2818:
2819:
2812: raise api_exception;
2813: END IF ;
2814:
2815: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'POLICY_NUMBER', l_policy_number);
2816: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'CLAIM_NUMBER', l_claim_number);
2817:
2818:
2819:
2820: close claim_info;
2846: end if;
2847: if ( funcmode = 'TIMEOUT' ) then
2848: resultout := 'COMPLETE';
2849: else
2850: resultout := wf_engine.eng_timedout;
2851: return;
2852: end if;
2853:
2854: exception
2928: j := NVL(FND_MSG_PUB.Count_Msg,0);
2929: if (j=0) then return; end if;
2930: if (j>9) then j:=9; end if;
2931: FOR I IN 1..J LOOP
2932: wf_engine.SetItemAttrText (itemtype => itemtype,
2933: itemkey => itemkey,
2934: aname => 'MESSAGE'||i,
2935: avalue => FND_MSG_PUB.Get(i,p_encoded =>FND_API.G_FALSE ));
2936: END LOOP;
3355:
3356: if ( funcmode = 'RUN' ) then
3357:
3358: --Read attributes from WorkFlow
3359: l_payment_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPAYMENTID');
3360: l_requestor_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID');
3361: l_payment_number:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPAYMENTREFNUMBER');
3362:
3363:
3356: if ( funcmode = 'RUN' ) then
3357:
3358: --Read attributes from WorkFlow
3359: l_payment_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPAYMENTID');
3360: l_requestor_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID');
3361: l_payment_number:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPAYMENTREFNUMBER');
3362:
3363:
3364: --Read from table
3357:
3358: --Read attributes from WorkFlow
3359: l_payment_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPAYMENTID');
3360: l_requestor_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID');
3361: l_payment_number:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPAYMENTREFNUMBER');
3362:
3363:
3364: --Read from table
3365: open cust_id_info_cur(l_payment_id);
3370: fetch cust_name_info_cur into l_cust_name;
3371: close cust_name_info_cur;
3372:
3373:
3374: l_payee_role := WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCPAYEEROLE');
3375:
3376: SELECT responsibility_id
3377: into l_resp_id
3378: FROM fnd_responsibility
3378: FROM fnd_responsibility
3379: WHERE responsibility_key = l_payee_role
3380: AND application_id = 540;
3381:
3382: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCACCOUNTNAME', l_cust_name );
3383: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPAYMENTNUM', l_payment_number);
3384: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPAYEEPERFORMER', l_respString || l_resp_id );
3385:
3386: resultout := 'COMPLETE';
3379: WHERE responsibility_key = l_payee_role
3380: AND application_id = 540;
3381:
3382: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCACCOUNTNAME', l_cust_name );
3383: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPAYMENTNUM', l_payment_number);
3384: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPAYEEPERFORMER', l_respString || l_resp_id );
3385:
3386: resultout := 'COMPLETE';
3387:
3380: AND application_id = 540;
3381:
3382: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCACCOUNTNAME', l_cust_name );
3383: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPAYMENTNUM', l_payment_number);
3384: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPAYEEPERFORMER', l_respString || l_resp_id );
3385:
3386: resultout := 'COMPLETE';
3387:
3388: return;
3407: end if;
3408: if ( funcmode = 'TIMEOUT' ) then
3409: resultout := 'COMPLETE';
3410: else
3411: resultout := wf_engine.eng_timedout;
3412: return;
3413: end if;
3414:
3415: exception
3641:
3642: if ( funcmode = 'RUN' ) then
3643:
3644: --Read attributes from WorkFlow
3645: l_qte_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCQUOTEID');
3646: l_requestor_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID');
3647: l_resp_key:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEY');
3648:
3649:
3642: if ( funcmode = 'RUN' ) then
3643:
3644: --Read attributes from WorkFlow
3645: l_qte_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCQUOTEID');
3646: l_requestor_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID');
3647: l_resp_key:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEY');
3648:
3649:
3650: --Read from table
3643:
3644: --Read attributes from WorkFlow
3645: l_qte_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCQUOTEID');
3646: l_requestor_id:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCREQUESTORID');
3647: l_resp_key:=WF_ENGINE.GetItemAttrText(itemtype,itemkey,'SSCRESPONSIBILITYKEY');
3648:
3649:
3650: --Read from table
3651: open quote_info_cur(l_qte_id);
3665: FROM fnd_responsibility
3666: WHERE responsibility_key = l_resp_key
3667: AND application_id = 540;
3668:
3669: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCONTRACTNUMBER', l_chr_number );
3670: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTORNAME', l_user_name);
3671: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQUOTENUMBER', l_qte_number);
3672: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQTP', l_qtp);
3673: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQRS', l_qrs);
3666: WHERE responsibility_key = l_resp_key
3667: AND application_id = 540;
3668:
3669: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCONTRACTNUMBER', l_chr_number );
3670: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTORNAME', l_user_name);
3671: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQUOTENUMBER', l_qte_number);
3672: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQTP', l_qtp);
3673: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQRS', l_qrs);
3674: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCOMMENTS', l_comments);
3667: AND application_id = 540;
3668:
3669: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCONTRACTNUMBER', l_chr_number );
3670: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTORNAME', l_user_name);
3671: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQUOTENUMBER', l_qte_number);
3672: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQTP', l_qtp);
3673: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQRS', l_qrs);
3674: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCOMMENTS', l_comments);
3675: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPERFORMER', l_respString||l_resp_id);
3668:
3669: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCONTRACTNUMBER', l_chr_number );
3670: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTORNAME', l_user_name);
3671: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQUOTENUMBER', l_qte_number);
3672: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQTP', l_qtp);
3673: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQRS', l_qrs);
3674: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCOMMENTS', l_comments);
3675: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPERFORMER', l_respString||l_resp_id);
3676:
3669: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCONTRACTNUMBER', l_chr_number );
3670: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTORNAME', l_user_name);
3671: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQUOTENUMBER', l_qte_number);
3672: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQTP', l_qtp);
3673: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQRS', l_qrs);
3674: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCOMMENTS', l_comments);
3675: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPERFORMER', l_respString||l_resp_id);
3676:
3677: resultout := 'COMPLETE';
3670: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCREQUESTORNAME', l_user_name);
3671: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQUOTENUMBER', l_qte_number);
3672: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQTP', l_qtp);
3673: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQRS', l_qrs);
3674: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCOMMENTS', l_comments);
3675: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPERFORMER', l_respString||l_resp_id);
3676:
3677: resultout := 'COMPLETE';
3678:
3671: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQUOTENUMBER', l_qte_number);
3672: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQTP', l_qtp);
3673: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCQRS', l_qrs);
3674: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCCOMMENTS', l_comments);
3675: WF_ENGINE.SetItemAttrText(itemtype,itemkey,'SSCPERFORMER', l_respString||l_resp_id);
3676:
3677: resultout := 'COMPLETE';
3678:
3679: return;
3698: end if;
3699: if ( funcmode = 'TIMEOUT' ) then
3700: resultout := 'COMPLETE';
3701: else
3702: resultout := wf_engine.eng_timedout;
3703: return;
3704: end if;
3705:
3706: exception